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.
I'm not sure if I understand this problem correctly, but if the object is meant to be specialized down in the hierarchy, shouldn't the id be mandatory?
What is the problem in using something like this?
that is the idea, except that the 'matches' keyword will be used as well - see the change description I have added.