Position To Node Example

Navigation:  Formulas > Runtime formula processing > PositionToNode >

Position To Node Example

Previous pageReturn to chapter overviewNext page

Below you can see an extract from the Calculate Customer Claim formula, which can be found in the Health Claim schema of the Health Claim Processing repository.

This example demonstrates how to locate the specific `Provider' (an instance of the Provider repeating node) that supplied the current `Claim Item' service. The PositionToNode operator is used to locate the Provider.

 

4-40PositiontoNode

Figure 4-40: Extract from the `Calculate Customer Claim' formula

 

The PositionToNode operation returns the node index (i.e. the numerical value representing the node's position in the list of nodes) of the provider that corresponds with the claim item currently in focus. Because the Provider repeating node is not reachable from the ClaimItem repeating node, IDIOM needs to use PositionToNode to change from the current `Claim Item' context to the `Provider' context in order to obtain the index value and return it to the formula.

 

4-41NodeExample

Figure 4-41: Extract from the `Calculate Customer Claim' formula showing other operators used in the formula

 

The Formula Definition portion of the Logical English version of the formula can be seen in the screen shot below:

 

4-42 Figure 4-42: Logical English Formula Definition for the `Calculate Customer Claim' formula.