Conditions
Like validations, dynamic logic conditions return a Boolean. The difference is that a condition has one or more objects as its input parameters, rather than a single value. Which object(s) are passed along as input parameters differs per signature. The return value 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.
Attribution Filter
It’s possible to specify a condition on a contract provider filter rule. This condition typically holds restrictions on the provider of the attribution that cannot be evaluated through the static dimensions for provider assignment type and provider group or it holds restrictions on the time validity of the attribution. The following signature applies:
In or Out | Name | Type | Description |
---|---|---|---|
In |
attribution |
Attribution |
The attribution to be checked |
In |
contractProviderFilterRule |
ContractProviderFilterRule |
The provider filter rule (used for parametrization) |
In |
contractCalculationPeriod |
ContractCalculationPeriod |
The contract calculation period that is being evaluated |
In |
referenceDate |
Date |
The reference date of the contract calculation period |
Out |
n/a |
Boolean |
True when the attribution meets the criteria of the condition |
For example if the provider’s grade (dynamic field) needs to be evaluated, consider the following condition to clarify:
return attribution.provider.grade >= 2
For example if the time validity of the attribution needs to be evaluated, consider the following condition to clarify:
return attribution.startDate <= referenceDate && attribution.endDate >= referenceDate
Contract Alignment Filter
It’s possible to specify a condition on a contract. This condition typically holds restrictions on the contract alignment, like the member of the contract alignment should not be under the age of 18 at a certain date like the contract calculation period start date or the reference date. The following signature applies:
In or Out | Name | Type | Description |
---|---|---|---|
In |
contractAlignment |
ContractAlignment |
The contract alignment to be checked |
In |
contractCalculationPeriod |
ContractCalculationPeriod |
The contract calculation period that is being evaluated |
In |
referenceDate |
ReferenceDate |
The reference date of the contract calculation period |
Out |
n/a |
Boolean |
True when the contract alignment meets the criteria of the condition |
For example if the member’s age needs to be evaluated, consider the following condition to clarify:
return contractAlignment.person.getAge(referenceDate) >= 18
Country
It’s possible to specify a condition on a country. Only addresses that meet this condition are valid for that particular country. The following signature applies:
In or Out | Name | Type | Description |
---|---|---|---|
In |
address |
Address |
The address to be checked |
Out |
n/a |
Boolean |
True when the address is allowed |
This signature does not specify a default as-of date. This dynamic logic condition is executed when an address (in the specified country) is created or updated.
Dynamic Field Usage
A dynamic field usage extends a table with a dynamic field. A dynamic usage can specify two dynamic logic conditions: the first specifies when it is allowed to set the value for a dynamic field; the second specifies when it is required to set the value for a dynamic field. Both conditions have their own signature.
Dynamic Field Usage (Allowed)
The following signature applies to dynamic field usage conditions that specify when a value is allowed:
In or Out | Name | Type | Description |
---|---|---|---|
In |
Depends on the entity being extended |
Depends on the entity being extended |
The entity that is being extended |
Out |
n/a |
Boolean |
True when the dynamic check message must be attached |
This signature does not specify a default as-of date. The condition is executed when a user or integration point request message tries to set the value of the dynamic field.
For example, if the dynamic field usage is on the REL_RELATIONS table, the object name in the dynamic logic is "relation", being of the type "Relation". Consider the following condition to clarify:
return relation.isPerson() && relation.gender == "F"
Dynamic Field Usage (Mandatory)
The following signature applies to dynamic field usage conditions that specify when a value is mandatory:
In or Out | Name | Type | Description |
---|---|---|---|
In |
Depends on the entity being extended |
Depends on the entity being extended |
The entity that is being extended |
Out |
n/a |
Boolean |
True when the dynamic check message must be attached |
This signature does not specify a default as-of date. The condition is executed when a new record (in the extended table) is being created or an existing record is being updated.
Geographic Region
A geographic region is defined by one or more dynamic logic conditions. An address is in a geographic region if one of the geographic conditions evaluates as true.
The following signature applies:
In or Out | Name | Type | Description |
---|---|---|---|
In |
address |
Address |
Address to be checked. |
In |
geographicCondition |
GeographicCondition |
The geographic condition being evaluated. Can be used to parametrize the dynamic logic |
Out |
n/a |
Boolean |
True when the address belongs to the geographic region |
For example, the geographic region "NEWTON" consists of all addresses that have a zipcode between 02344 and 02349:
return address.postalCode >= "02344" && address.postalCode <= "02349"
This signature does not specify a default as-of date. This dynamic logic is executed when the pre-defined address method inGeographicRegion() is called.
Schedule Dimension Evaluation
There are two signatures for schedule dimension evaluation conditions.
Adjustment Schedule Line Evaluation
The following signature applies for the evaluation of the adjustment schedule lines for an adjustment schedule:
In or Out | Name | Type | Description |
---|---|---|---|
In |
attribution |
Attribution |
The attribution for which the adjustment is being evaluated |
In |
adjustmentScheduleLine |
AdjustmentScheduleLine |
The adjustment schedule line that is being evaluated |
In |
contractCalculationPeriod |
ContractCalculationPeriod |
The contract calculation period that is being evaluated |
In |
referenceDate |
Date |
The reference date of the contract calculation period |
Out |
n/a |
Boolean |
True when the adjustment schedule line applies |
This logic is executed during the evaluation of the adjustment schedule lines, to determine which adjustment schedule line applies.
For example, if there is a dimension 'memberAge' (range) on the adjustment schedule line, consider the following condition to clarify:
def age = attribution.person.getAge(referenceDate) return adjustmentScheduleLine.memberAge?.fromValue!=null && age >= adjustmentScheduleLine.memberAge?.fromValue && (age <= adjustmentScheduleLine.memberAge?.toValue || adjustmentScheduleLine.memberAge?.toValue == null)
Rate Schedule Line Evaluation
The following signature applies for the evaluation of the rate schedule lines for a rate schedule:
In or Out | Name | Type | Description |
---|---|---|---|
In |
attribution |
Attribution |
The attribution for which the rate is being evaluated |
In |
rateScheduleLine |
RateScheduleLine |
The rate schedule line that is being evaluated |
In |
contractCalculationPeriod |
ContractCalculationPeriod |
The contract calculation period that is being evaluated |
In |
referenceDate |
Date |
The reference date of the contract calculation period |
Out |
n/a |
Boolean |
True when the rate schedule line applies |
This logic is executed during the evaluation of the rate schedule lines, to determine which rate schedule line applies.
For example, if there is a dimension 'memberAge' (range) on the rate schedule line, consider the following condition to clarify:
def age = attribution.person.getAge(referenceDate) return rateScheduleLine.memberAge?.fromValue!=null && age >= rateScheduleLine.memberAge?.fromValue && (age <= rateScheduleLine.memberAge?.toValue || rateScheduleLine.memberAge?.toValue == null)