Archetype_ID doesn't have namespace

Hi there,
I came across ARCHETYPE_ID class in Base package, used in ARCHETYPEDthat is used in LOCATABLE which is the root class of data that will result using archetypes.

My question is, If data is created using an archetype that contains a specific namespace , isn’t the knowledge of that namespace inside the the resultant data crucial? since different namespaces might result in two different archetypes (even though both represent the same concept) and we need precise relationship with the data original archetype?

I quote from ADL2.

Once a namespace is attached to an archetype, it is considered a part of the identifier, and never changed, even if the archetype moves to a new publishing organisation. This ensures the constant relationship between archetypes and the data created using them.

For example: if data resulted from these two archetypes, the might have different structure, but in ARCHETYPE_ID both are represented as openEHR-EHR-OBSERVATION.haematology_result.v1.0.0

archetype (adl_version=2.0.5; rm_release=1.0.2)
    br.gov.saude::openEHR-EHR-OBSERVATION.haematology_result.v1.0.0

archetype (adl_version=2.0.5; rm_release=1.0.2)
    uk.org.primary_care::openEHR-EHR-OBSERVATION.haematology_result.v1.2.0

I wanted to ask the same question regarding the version number, since ARCHETYPE_ID class have just the trunk version, but according to SemVer, usually there is no big change between branch versions, so i assumed that this is a less important information?

This is unfortunately a ‘known issue’ with the RM/BASE spec. There’s a lot of discussion on how to fix this with regard to the migration to adl2. See this ticket and the linked ones Jira
The only production system using adl2 I’m aware of breaks the archetype_id spec by (always) storing the namespaced and versioned archetype_hrid in the archetype_id.value.
You are correct the namespace is a bigger issue than the versioning. But both are important.
Could you share a bit more around the project where you are running into this issue please?

Thank you,
Fortunately it is not in-production project, but just stumbled upon it while planning on implementing an object mapper between data and its archetype with Rm_overlay, and realised that to do so, a more specific archetyped_id in the archetyped data should present.

I noticed that the topic regarding the fix is private, If I may ask regarding what is the most favoured fix strategy? will it be by just changing the rule of ARCHETYPE_ID

Thank you for your reply

No clear favourite atm. There’s different strategies, and different aspects of the problem. The main points are outlined on jira and confluence. Those should be public. Only the SEC internal discussion on discourse is private (for now). If you need help accessing something send me a dm.

1 Like