RM invariants in a computable form

In another post Erik noticed a “validate()” method in an OPT model class.

The idea is to generate validation rules for OPT elements. There are 3 levels:

  1. Using generated constraints to validate that the OPT fields are in accordance with the constraints. Each OPT model class will implement a validate() method to validate its data. It will also call a validate() method of its ancestor (in case of RM classes - see #3 below):

  1. Using the “rules” section in the OPT. The rules are in a computable form. They operate on an entire OPT.

  2. Using the “invariants” for the RM classes. These invariants are not yet in a computable form.

@thomas.beale Could the “invariants” use the same EL as the “rules” section in the OPT?

1 Like

THis is certainly the idea - the intention is unify all ‘expression languages’ used in openEHR (whether that quite works out for AQL is another question…)