Skip to content

pQuery.registerOutputBigDecimal

Signature: pQuery.registerOutputBigDecimal(parameterName)

Returns: ParameterizedQuery pQuery - this ParameterizedQuery object. To see what methods can be used on a ParameterizedQuery, refer to the 'Parameterized Query' functions.

Sets the output parameterName as a java.math.BigDecimal type.

Note

The parameterName may include the parameter prefix character (colon ':' or at sign '@') but is not required. For example: ':fieldValue' and 'fieldValue' will reference the same named parameter.

Parameters

Type Name Description Default
String parameterName the name of the parameter

Example

// Create the pQuery object with the stored procedure to be called
var pQuery = qie.getParameterizedQuery("CALL demo_number(:patientId, :result)");

// Set the values for the input parameters
pQuery.setBigDecimal("patientId", 1);
// Register the output parameters
pQuery.registerOutputBigDecimal("result");

// Execute the stored procedure
var queryResult = pQuery.doQuery("EMR Database");

// Get the value from the registered output parameter
var balance = pQuery.getOutputParameter('result'); // "96.2500"