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

Archetype slot regular expressions should cover whole identifier

Description

In archetypes based on the current specifications (1.0.x), archetype slots have often been defined with partial regular expressions, which match only part of an archetype identifier.
Given the Archetype ID is something like :
openEHR-EHR-CLUSTER.address.v1
instead of :
archetype_id/value matches {/address\.v1/}
we should have (at the very least):
archetype_id/value matches {/CLUSTER\.address\.v1 /}
or (preferably)
archetype_id/value matches {/openEHR-EHR-CLUSTER\.address\.v1 /}

The reason for this is that slot regexes are not just used to determine if a given archetype identifier matches the slot (when a partial regex might work, although probably not reliably), but archetype id regexes are also used against a whole library of archetypes to generate lists of archetype_ids that match the slot, and the intended classes and reference model names need to be used to guarantee correct matching.

Note that regex matching on archetype identifiers is syntactic; it does not ensure that archetypes based on subtypes of a mentioned type will match, since matching is a lexical operation. Such matches have to be specified explicitly by a multi-pattern regex (usually using the '|' character).

Status

Reporter

Thomas Beale

Raised By

Adam Flinton

Components

Affects versions

ADL 1.4