Missing at code in ITEM_TREE

In latest Archetype Designer v1.24.7, it seems at codes are not assigned to ITEM_TREE in EVALUATION and ACTION archetypes. Same doesn’t happen with OBSERVATION and INSTRUCTION archetypes. See screenshot below:

Has anyone else noticed it? It seems like a bug to me, can’t think of a reason why it would be intended.

I wonder if this relates to fixing this issue in 1.24.7

The rule should be (as I understand it) don’t put terms on RM attributes unless they are LOCATABLE?


@borut.fabjan ?

1 Like

I have detected that recently and needed to edit my archetypes and templates manually to add that atcode, so I switched back to the good old Ocean Archetype Editor :slight_smile:

In the Better Designer I also detected it adds atcodes at the DV_xxx level, which I also needed to remove manually.


@ian.mcnicoll just checked the model and it seems EVENT_CONTEXT is PATHABLE but not LOCATABLE. I’m wondering, since it has an ITEM_STRUCTURE that needs to be archetyped, if it should be LOCATABLE.

Ping @thomas.beale

Thanks for the feedback & confirmation, it’s less than ideal to have to add/remove these codes manually. When saving a composition with missing at code on item_tree, CDR does throw validation error correctly. But this happens much too late in the tool chain, ideally this error of missing at code should be caught or prevented early on. Wonder if CKM detects it when archetypes with missing at code get uploaded. @sebastian.garde

I just wondered the same.

Indirectly only a present:

  • If you have the corresponding at code remains in the ontology for example this gives a warning of an unused code (WOUP).
  • Or if you have a previous revision of the archetype in ckm, this would be detected as a major change, where all the red flags should be up.
  • Or if you have an internal reference to the ITEM_TREE, the Use_node path would be detected as invalid (VUNP). Typical in e.g. OBSERVATIONs, e.g.
    Alcohol intake, Draft archetype [Internet]. openEHR Foundation, openEHR Clinical Knowledge Manager [cited: 2023-05-26]. Available from: https://ckm.openehr.org/ckm/archetypes/1013.1.1631

If the rule is indeed the one Ian mentions…

…then this validation shouldn’t be too hard to add as an explicit additional validation check.

1 Like

It is as Ian mentioned, below is what the specs says about the attribute archetype_nod_id of LOCATABLE:

I think it’s necessary to add an explicit validation check on this to prevent missing at code in LACATABLE classes from causing issues in downstream software.

1 Like

In ADL2, every object node has to have a code (but not every code has to have a terminology definition - that is only needed if there are siblings).

I’m mentioning ADL2 because inside Archetype Designer it is AOM2, and there should be internal codes on every node, so AD should be able to provide an equivalent at-code on every object node in the AOM1.4 view.

Maybe @borut.fabjan could comment?

1 Like

I don’t know about the internal model, what the user sees is ADL 1.4

I guess there is a mismatch there that generates issues, also when exploring opts 1.4

1 Like

Agree. Will fix ASAP.
Remark - not too far in the past CKM was reluctant to upload archetypes using description ‘@ internal @’. @sebastian.garde ? :wink:

1 Like

There are heaps of archetypes in CKM that have an @internal@ description text, to pick one at random:
ACVPU Scale Observation archetype and I believe we have always supported it (I think Ocean even invented this originally for the Archetype Editor a long time ago.)
Maybe I don’t quite understand what you mean, @borut.fabjan ?

it’s fixed with AD 1.24.8.

Default Item tree description is set to: “@ internal @”
[“at0001”] = <
text = <“Item tree”>
description = <“@ internal @”>