Patient Cloud AppConnect Android API References
|
Inherits com.mdsol.babbage.model.Field.
Public Member Functions | |
native int | getMaximumResponseDecimalCount () |
native int | getMaximumResponseIntegerCount () |
native long[] | getSubjectResponse () |
native boolean | isPartialOrFullResponse (String string, char decimalSeparator) |
native boolean | isResponseDecimalCountRequired () |
native boolean | isResponseIntegerCountRequired () |
native String | responseToString (long[] response, char decimalSeparator) |
native void | setSubjectResponse (long[] response) |
native long[] | stringToResponse (String string, char decimalSeparator) |
![]() | |
native boolean | equals (Object other) |
native String | getFieldNumber () |
native String | getFieldOID () |
native int | getFieldOrdinal () |
native Type | getFieldType () |
native String | getHeader () |
native long | getID () |
native String | getLabel () |
native Problem | getResponseProblem () |
native boolean | isVisible () |
![]() | |
Datastore | getDatastore () |
Additional Inherited Members | |
![]() | |
void | finalize () |
![]() | |
long | mNativeObject |
The number response is modeled as a vector of int values. The first int represents the integers. The second int is optional and represents the decimals.
NumericField expects a numerical response from the user. The response is made up of integers (before the decimal point) and decimals (after the decimal point). Decimals are optional.
The number response is modeled as a vector of int values. The first int represents the integers. The second int is optional and represents the decimals. So as not to lose zeros after the decimal point, remember that the second int is also padded against the maximum decimal count that the data format specifies. See examples below.
The number response must respect the field’s data format. The data format here is a string of the form x.y, where:
Format examples:
Examples of format and how numeric responses are modeled against it:
Interrogate the expected response format easily with the following numeric field properties:
native int com.mdsol.babbage.model.NumericField.getMaximumResponseDecimalCount | ( | ) |
Gets the maximum number of decimals (digits after the decimal point) that the response can have. This information is extracted from the data format of the field.
native int com.mdsol.babbage.model.NumericField.getMaximumResponseIntegerCount | ( | ) |
Gets the maximum number of integers (digits before the decimal point) that the response can have. Information extracted from the field's data format. If the response is negative, the response does not include the minus sign.
native long [] com.mdsol.babbage.model.NumericField.getSubjectResponse | ( | ) |
Returns subject responses entered for questions for given fields.
native boolean com.mdsol.babbage.model.NumericField.isPartialOrFullResponse | ( | String | string, |
char | decimalSeparator | ||
) |
Identify if string is a possible part of a valid response or a valid response itself.
string | String response. |
decimalSeparator | Decimal separator in use. |
native boolean com.mdsol.babbage.model.NumericField.isResponseDecimalCountRequired | ( | ) |
Gets whether the number of decimals is required instead of a maximum. Information extracted from the field's data format. When this method returns
, the response must have exactly the number of digits returned by getMaximumResponseDecimalCount().
native boolean com.mdsol.babbage.model.NumericField.isResponseIntegerCountRequired | ( | ) |
Identifies whether the number of integers is required instead of just being a maximum. This information is extracted from the data format of the field. When this method returns
, the response must have exactly the number of integers returned by getMaximumResponseIntegerCount().
native String com.mdsol.babbage.model.NumericField.responseToString | ( | long[] | response, |
char | decimalSeparator | ||
) |
Converts an array of longs response to a string. The array must have one or two values. The first value represents the integers. The second value represents the decimals against the maximum decimal count. If the response cannot be converted while respecting the maximum integer and decimal counts, this method returns
.
response | Array of longs representing the response. |
decimalSeparator | Decimal separator in use. |
native void com.mdsol.babbage.model.NumericField.setSubjectResponse | ( | long[] | response | ) |
Allows you to set the response from the screen.
Screen | response. |
native long [] com.mdsol.babbage.model.NumericField.stringToResponse | ( | String | string, |
char | decimalSeparator | ||
) |
Converts a string to an array of long responses. The array will have one or two values. The first value represents the integers. The second value represents the decimals against the maximum decimal count. If the string cannot be converted while respecting the maximum integer and decimal counts, this method returns
.
string | String response. |
decimalSeparator | Decimal separator in use. |