Pricing Checks
In this example, the usage of reference sheets is explained through a Validation Rule. The validation rule makes use of the reference sheet to determine the pricing information for a service type. This information is then used to validate the requested number of units and to set the authorized number of units on the authorization.
Process Step |
Rule Step |
Provider Check |
Validation Rule |
The validation rule is setup as follows:
Field |
Value |
Code |
VAL_SERVICE_TYPE_PRICING |
Description |
Service type pricing |
Dynamic Logic Condition |
DYLO_VAL_SERVICE_TYPE_PRICING |
Dynamic Logic Function |
DYLO_VAL_SERVICE_TYPE_PRICING |
Message |
MSG_SERVICE_TYPE_PRICING_DONE |
Inherit? |
N |
Enabled? |
Y |
The dynamic logic condition requires a reference sheet to be set up. This reference sheet contains the list of service types for which the authorized units can be determined by using the function dynamic logic.
The following image describes the reference sheet referred in the condition dynamic logic

If the service type on the authorization belongs to the list, then the condition dynamic logic evaluates to true and the function dynamic logic is executed to establish the authorized units. An informative message is also set on the authorization indicating that the authorized units were established by the validation rule. The condition dynamic logic looks like:
/* where serviceTypeList is the usage name of the reference sheet*/ def serviceType = new SearchBuilder(ReferenceSheetLine.class).join("serviceTypeList").by("serviceType").eq(authorizationServiceType.code).execute(); return serviceType!=null?true:false
The function dynamic logic requires two reference sheets to be set up. The first reference sheet holds the mapping between the service types and rate cards. = The second reference sheet is the rate card. For details on the set up of the reference sheets; refer to section "Reference Sheets" in the Dynamic Logic chapter of the Developer Guide.
Reference Sheet #1

Reference Sheet #2

The function dynamic logic looks up the reference sheet 'serviceTypeRateCardMapping' based on the service type code and service provider group scope. It then selects the applicable rate card reference sheet. So, if the service type code on the authorization is 11 and service provider group scope is IN then 'INStandard' rates will be applied and the reference sheet 'INStandard' will be selected. The allowed number of units will be looked up in 'INStandard' for service type 11. If the number of allowed units is greater than the value of requested number of units on the authorization, then the authorized number of units is set to the requested number of units; otherwise, the authorized number of units is set to the allowed number of units.
def primaryServiceType = authorizationServiceTypeList.getAt(0).serviceType.code def rateCard = new SearchBuilder(ReferenceSheetLine.class).join("rateCardMapping").by("serviceType").eq(primaryServiceType).and().by("IN_OON").eq(authorization.providerGroupScope).execute(); def allowedUnits = 0 if (rateCard.equals("INStandard")){ def rateCardSheet = referenceSheets.INStandard allowedUnits = rateCardSheet.find({it-> it.serviceType == primaryServiceType }) } else if (rateCard.equals("OONDefault")){ def rateCardSheet = referenceSheets.OONDefault allowedUnits = rateCardSheet.find ({it-> it.serviceType == primaryServiceType }) } if (allowedUnits < authorization.requestedNumberOfUnits) { authorization.authorizedNumberOfUnits = allowedUnits } else { authorization.authorizedNumberOfUnits = authorization.requestedNumberOfUnits }