Hi
from Archetype Object Model 2 (AOM2) :
VDFAI: archetype identifier validity in definition. Any archetype identifier mentioned in an archetype slot in the definition section must conform to the published openEHR specification for archetype identifiers.
Given that we usually have regexes in the Slots, I can read “conform to” in two ways:
- The specified regex MUST NOT allow any strings that are no valid archetype ids or
- It must simply still be possible to construct a correct archetype id from the regex.
Concrete example:
Is this a valid archetype id constraint in a slot
A)
/openEHR-EHR-CLUSTER\.my_concept.*/
or does it need to be
B)
/openEHR-EHR-CLUSTER\.my_concept(-[a-zA-Z0-9_]+)*\.v[0-9]+/
(Noting this is still a comprise due to the .v01 not really being a valid version).
The original Java reference implementation actually uses a compromise and checks a few things like there being the correct number of hyphens and dots in the archetype, that there is a “.v” part and that after the (last) .v the regex allows a number.
It seems to me that the first interpretation is quite strict and the second maybe too loose to be meaningful.
Any comments on what is (and also what should be) the right interpretation of this rule?
Regards,
Sebastian