CER Utility to Identify Dependencies to Store

A client of CER uses CER to perform complex calculations. Often the client of CER may also need to store dependencies in the Dependency Manager so that the Dependency Manager can notify the client whenever precedents change, and that client can then re-invoke CER to recalculate its output, taking the changes to precedent data into account.

CER contains a utility to help its clients identify dependencies to store in the Dependency Manager. The utility takes in an attribute value (that CER has calculated) and returns a set of precedents for that attribute value. A client of CER can then pass its dependent and the identified precedents to the Dependency Manager to store dependency records.

When CER calculates an attribute value, it keeps in memory a full tree of logical dependencies containing:

The utility is able to parse this tree of logical dependencies in order to provide a much smaller set of precedents, typically based off the leaf nodes of the tree; that is to say, typically the intermediate calculation results are ignored and the dependencies stored reflect that calculated attribute value ultimately depends on the external input data accessed during calculations.

Note: Any non-trivial calculation, such as those typically performed by CER, will have a number of intermediate derived values "in between" the overall dependent and its input precedents.

These intermediate values are not passed to the Dependency Manager; rather, the Dependency Manager stores dependency records which link high-level dependents (such as a case's entitlement) directly to its low-level precedents (such as entity, evidence and rate data).

Intermediate values are not of interest when storing dependencies.

The precedents identified by the utility are a mixture of: