Validations

A validation is type of dynamic logic that takes a pre-defined set of values as input and returns a boolean value as output. Each validation has a signature. A signature specifies the expected input and output values of a dynamic logic. The Oracle Insurance Gateway has the following signature for validations:

Field

A field can have zero or one dynamic logic validation defined. The following signature applies:

Table 1. Field
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 simple 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)