Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleADL - mandatory existence of an attribute
borderStylesolid
ELEMENT matches
{
   value existence matches {1} matches{*}
}

This indicates that the value attribute has to be present. In fact, to this point such statements do not occur in ADL; only statements that an attributes existence is optional occur.

Code Block
titleADL - mandatory existence of an attribute
borderStylesolid
ELEMENT matches
{
   value existence matches {0..1} matches{*}
}

More about this in a moment.

...

In the reference parser, if no statement is made in the ADL (which is the current situation in virtually all archetypes) the existence attribute of the C_ATTRIBUTE class in memory is set to {1..1} i.e. mandatory. This contravenes that principle that no statement about something means that the reference model specification is followed. This has arisen because the C_ATTRIBUTE class attribute 'existence' is mandatory and the reference parser has not known about reference models; so mandatory existence of {1..1} was chosen many years ago without fully comprehending the consequences. But such statements are not saved as part of the ADL (as no statement is taken to mean that the attribute is mandatory).
In fact most attributes in the openEHR reference model, as in most reference models, are optional. This is the nub of the issue. Everyone has been assuming that no statement in ADL means the attribute's existence is taken from the reference model. Let us consider what we might usefully say as a constraint statement about the existence of attributes.
Attributes in reference models can only be optional or mandatory. It is clear that there are no valid constraint statements to make about the existence of a mandatory attribute - it exists and that is that. So constraint statements can only be made on an optional attribute, and valid statements are to say that it must exists (existence matches {1..1} = mandatory) or that it must not exist (existence matches {0..0} = prohibited). Most important, statements about existence should only occur when constraining the existence as expressed in the reference model.
XML archetypes differ from ADL in that they are direct serialisations of the AOM. This does mean that XML archetypes do have existence statements and they are virtually all mandatory. These will have to change to be correct constraint statements and be ignored for now.
It is worth noting that similar approaches are taken for cardinality and occurrences. These This will need to be upgraded in the future as well.

...