A quick question of an implementation detail to which I’m hoping is a simple 
answer ☺

When we create an Operational Template, we should fill the archetype roots with 
a copy of the structure of the other archetype. Then the node id of the 
C_ARCHETYPE_ROOT is set to the id of that archetype.

This makes it much easier to work with these templates in many cases, since 
they can be sent to the UI and the UI does not need to retrieve other 
archetypes to render something and requires much less logic.

Also in templates you can define overlays of other archetypes.
However, I have a use case where I want to be able to detect which archetypes 
are used in C_ARCHETYPE_ROOTS in an operational template and link to that 
archetype. In the current Operational Template creation of Archie, I set both 
the node id and the archetype_ref of the C_ARCHETYPE_ROOT to the archetype id 
of the overlay, not the parent archetype.
This means that the archetype id used in the archetype_ref of the 
C_ARCHETYPE_ROOT is only valid within the context of the template and cannot 
just be retrieved from the generic top level archetype repository. I can work 
with that, but it just does not sound like a good  solution.

That brings me to my question:
What should the values of the following two fields of C_ARCHETYPE_ROOT be in 
the resulting operational template, in the case that the C_ARCHETYPE_ROOT in 
the template points to an overlay of an archetype:
node_id:
archetype_ref:

Should this be:
node_id: archetype id of overlay
archetype_ref: archetype id of parent of overlay

Or something else?

Regards,

Pieter Bos


_______________________________________________
openEHR-implementers mailing list
[email protected]
http://lists.openehr.org/mailman/listinfo/openehr-implementers_lists.openehr.org

Reply via email to