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.
Is this a valid archetype id constraint in a slot
or does it need to be
(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?