Validation
A validation is a piece of dynamic logic that takes a value as its input and returns a Boolean as a result. Within the dynamic logic, the input value is referenced as "value". Oracle Health Insurance Authorizations can use dynamic logic validations in the configuration of the following items: fields and bank accounts. Per item a signature is specified. A signature specifies the expected in- and output for a specific piece of dynamic logic. The following sections each elaborate on one of these signatures.
Bank Account
Every bank account number has a related bank account validation. Every bank account validation has a dynamic logic validation attached to validate the value of the bank account number. The following signature applies:
In or Out | Name | Type | Description |
---|---|---|---|
In |
value |
String |
The value of the bank account number |
Out |
n/a |
Boolean |
True when the bank account is valid |
This signature does not specify a default as-of date. This dynamic logic validation is executed when entering a new bank account number.
Field
A field can have zero or one dynamic logic validation defined. The following signature applies:
In or Out | Name | Type | Description |
---|---|---|---|
In |
value |
Same as the field data type |
The value of the field |
Out |
n/a |
Boolean |
True when the value is valid |
The output will be interpreted by Oracle Health Insurance according to Groovy truth logic, meaning that in case a NULL value is returned - this will be interpreted as false.
This signature does not specify a default as-of date. The execution moment depends on the field type; for free fields the dynamic logic validation is executed when entering a value for the free field; for flex fields the dynamic logic validation is executed when entering a flex code. Consider some examples of field validations:
The dynamic logic to accept only values in uppercase:
value == value.toUpperCase()
To accept only values is in lowercase:
value == value.toLowerCase()
To accept only values that can be parsed as an integer:
value.isInteger()
To accept only values that have no more than 40 characters:
maxLength = 40 value.length() <= maxLength
To accept only values between two numerical values:
min = 18 max = 65 value >= min && value <= max
To accept only values in a specified list:
allowedValues = [ "A", "B", "C" ] allowedValues.contains(value)