We're updating the issue view to help you get more done. 

Allow regularly structured primitive objects.


In the current version of ADL and the AOM, primitive objects can only be represented using inline constraint syntax, as per this part of the spec: https://www.openehr.org/releases/AM/latest/docs/ADL2/ADL2.html#_constraints_on_primitive_types

However, there is sometimes a need to constrain an RM attribute statically typed to e.g. Any or similar, to a particular Primitive type, without stating any constraint on the value.

Doing this would require the 'regular' object structure syntax, so that a type name could be expressed. Doing that requires a proper id-code.

The requirement mainly comes from CIMI, where they use the Terminology_code (named 'Concept' in their RM) as the type of various attributes, and want to constrain just the type in a parent archetype and then lower down the specialisation hierarchy, add concrete constraints. Currently the flattener will not allow this.

Impact Analysis

Some impact on ADL2 /AOM2 implementations to accommodate the added syntax. A new version of an ADL2 will parse all existing archetypes in exactly the same way, but also recognise an extra variation on the syntax. Older tools will parse archetypes produced by a newer tool, other than ones actually containing the new syntax.

Change Description

The change will allow the following syntax: attr_1 matches { Terminology_id[id9] <occurrences> } and also attr_1 matches { Terminology_id[id9] <occurrences> matches {<constraint>} } Where * <occurrences> is the usual 'occurrences matches {n..m}' syntax and is optional and * <constraint> is the usual primitive inline constraint e.g. '|1..4|' for integers etc. In the AOM, the any_allowed() function is moved from C_COMPLEX_OBJECT to C_DEFINED_OBJECT, so that C_PRIMITIVE_OBJECT descendants can implement it as well. This enables C_PRIMITIVE_OBJECTs with completely empty constraints to be represented and detected. Various improvements made to c_conforms_to() and c_congruent_to() functions; addition of c_value_conforms_to() and c_value_congruent_to() functions.



Thomas Beale


Thomas Beale

Raised By

Thomas Beale


Thomas Beale

Time estimate



Fix versions

Affects versions

ADL 2.0

Due date