Question about paths to C_SINGLE_ATTRIBUTE alternatives

Hi,

I was chatting with Diego, about the need of nodeIds for ELEMENT.value and I detected some archetypes with alternatives but no nodeIds, I guess, created with the Archetype Editor.

Examples from openEHR-EHR-CLUSTER.timing_daily.v0

ELEMENT[at0004] occurrences matches {0..} matches { – Specific time
value matches {
DV_TIME matches {
}
DV_INTERVAL<DV_TIME> matches {
upper matches {
DV_TIME matches {}
}
lower matches {
DV_TIME matches {
}
}
}
}
}
ELEMENT[at0026] occurrences matches {0..} matches { – Named time event
value matches {
DV_TEXT matches {
}
DV_CODED_TEXT matches {
defining_code matches {
[local::
at0031, – immediately (stat)
at0032, – in the morning
at0033, – at night
at0034] – in the morning and at night
}
}
}
}

How can software create paths to the specific ELEMENT.value constraint if the constraints don’t have a nodeId?

This remembers me of an old discussion about if the nodeIds should or not be mandatory. Opinions?

These are ADL 1.4 archetypes, and the rule there was that alternative nodes had to be of different RM types, so that an instance in the data of DV_TIME under ELEMENT[at0004] could be connected with the DV_TIME child node in the archetype.

ADL 2 gets rid of this subtlety and simply requires node ids on all nodes, but only requires definitions of them in the terminology section where they need to be distinguished.

  • thomas

I think we have discussed this several times (and I'm happy with
current ADL2 implementation :slight_smile:

I believe that the only way of querying or filtering these paths is to
look in the RM for some attribute that is not in any of the other
types. If this is not possible (e.g. domain types are implicitly a set
of sibling nodes from the same class) you have to know the values that
would make that path unique (in case of the domain type in your
example it would be the implicit code_string values from the
CODE_PHRASE).
This makes your queries bound to a given version of your RM (also, it
makes the queries harder to be translated to other standards). I can't
think a better way of achieving this.

Regards

I fully agree that they should be mandatory. Things like this make writing software based on OpenEHR more complex than it could be.

I also never understood that the DV_-types do not have an archetype node id in the reference model. This adds complexity, because the paths in an archetype do not always match the paths in a reference model object. Sometimes you just need paths based on an archetype that need to work in reference model objects. For example when displaying information, rendering forms, evaluating rules or score calculations, or rendering a UI to edit stored reference model objects. Of course, you can write something that converts these paths from the AOM to the RM, but I don’t see why that should be necessary.

Perhaps someone can explain the reasoning behind these choices?

Regards,

Pieter Bos
Nedap Healthcare

@Thomas thanks for the pointer.

We were talking with Diego about the need of storing the nodeId in the IM for datatypes to allow querying over specific DV alternatives of an ELEMENT.value, because for path-based queries having nodeId for DV is easier to implement than trying to derive the DV from it’s attributes in the path.

I think this goes in the lines of what Pieter commented on his email.

@All is there any change request to the IM for adding a nodeId field for DATAVALUE, or maybe make it extend LOCATABLE?
Is there any constraint for making DATAVALUE extend LOCATABLE?

Hi Pieter,

this is because they don’t inherit from LOCATABLE, which is a modelling decision from a long time ago. I’m not aware that it has caused major problems (at least not reported ones) but I can imagine that it might seem better today to make DATA_VALUE inherit from LOCATABLE, or at least to have the archetype_node_id field in it. I’m not that clear on how much it matters in anyone’s implementation. well the RM objects, down to the ELEMENT nodes, should have archetype paths that match the archetypes that create them, with the added complexity that real data may contain multiple instances that match a given archetype path, as . Can you provide more detail on what ‘conversion’ you are referring to here? thanks - thomas

Hi Thomas, do you recall if we have any change request to make dvs inherit from locatable?

So far we have a Problem Report which I think needs to be discussed by the Specifictions Editorial Committee in the normal way to decide if it becomes a CR, what release it would go in and so on.

  • thomas