Hi,
My name is Ann-Sofie and I’m working at the Karolinska University Hospital in Stockholm.
We’re trying to understand how to best populate references to the enclosing composition, when referring from an action to an (activity within an) instruction in the same composition.
The use case is to refer to each related medication order, from each medication management, in a structure like the below to set the ACTIVITY in a planned or scheduled state:
What we’ve learned so far, from the specifications and with some help from @ian.mcnicoll, is that we should use the ACTION.instruction_details attribute for this, which means we would like to produce something like the following in canonical format:
or possibly, if the full composition uid should be used:
and in flat format:
or
To create compositions with instructions_details like the above, when the instruction is in the same composition as the action, we need a way to
-
either explicitly set the composition uid in the create request, and also refer to that uid in the instruction_details (in the same create request payload),
-
or a way to implicitly refer to the enclosing composition (and let the EHR server create the uid).
Betters CDR (EHR Server) has a convenient special value, $selfComposition, that can be used to refer to the enclosing composition, and which will be replaced with the actual generated uid when the composition is created. This works both in canonical and flat format. So if we provide the following in the create composition payload to Betters CDR:
the CDR will replace the $selfComposition value with the generated composition uid, i.e. resulting in:
So, what we are wondering is:
-
Is there any alternative way to implicitly refer to the enclosing composition, that may work in more CDRs than Betters? Or are there plans to incorporate the Better $selfComposition reference value or something similar in the specifications? Should we create a specification Problem Report?
-
If we would go with the option of explicitly setting the composition uid when creating the composition, what is the latest recommendation for doing that? (For canonical and flat, respectively, if different) It seems the question was left somewhat open in the following discussion thread :
REST API for creating compositions with id (started by @Dileep_V_S )
and related ticket:
[SPECITS-62] - openEHR JIRA (reported by @sebastian.iancu ) -
Is there a recommendation (or even specified in the specs?) for whether to use the full composition uid or only the uuid/guid part, in the instruction_details|composition_uid (i.e. /instruction_details/instruction_id/id/value)?
From the spec it seems to me that only the uuid/guid part should be used, e.g. from https://specifications.openehr.org/releases/RM/latest/common.html#_unique_node_identification:
” …top-level types such as COMPOSITION, EHR_STATUS, PARTY etc for which it is recommended to set the uid value to a copy of the uid.object_id() value of the owning VERSION object (usually an ORIGINAL_VERSION), i.e. the leading Uid, which is normally a Guid. This enables easy identification of standalone top-level objects in a serialised form. For example, if the ORIGINAL_VERSION.uid is 87284370-2D4B-4e3d-A3F3-F303D2F4F34B::uk.nhs.ehr1::2, the Guid 87284370-2D4B-4e3d-A3F3-F303D2F4F34B would be copied to the contained COMPOSITION.uid field.”
Also, in examples in both the Better developer guide (https://docs.better.care/ehr-server/3.2/web_templates/web_templates_developer_guide.html#_linking_instructions_and_actions) and the EHRBase docs (e.g. here: 8.2. RM-Mappings — EHRbase documentation) only the leading Guid part is specified, e.g.:
On the other hand, we have also seen examples where the full composition uid is used, and that is also what is generated by the Better CDR (EHR Server) when using the $selfComposition value in the create request – i.e. providing the following in the create payload:
will result in a composition_uid populated like this: