openEHR-technical Digest, Vol 49, Issue 12

Hi dear Ian

According to openEHR-technical Digest, Vol 49, Issue 12 you saied two bellow
statement are correct (in scope of ADL 1.4):

1- The archetype-node-id in a locatable constructed around an archetype
in an archetypeslot is the archetype-node-id it gets from its own archetype
(which is called in the slot).
2- The archetype-node-id in a locatable constructed around the
archetype calling the archetypeslot is to be ignored.

I have a validation problem:
If the archetype-node-id in a locatable constructed around an archetype in
an archetypeslot is the archetype-node-id it gets from its own archetype,
means at0000(child archetype node id) instead of at0001(slot node id) so how
can I apply occurrence of slot? for example

Entry[at0000] matches { -- Encounter
        content matches {
            allow_archetype INSTRUCTION [at0001] occurrences matches {0..1}
matches {
                include
                    domain_concept matches {/instruction.v1/}
            }
            allow_archetype OBSERVATION [at0002] occurrences matches {1..1}
matches {
                include
                    domain_concept matches {/observation.v1/}
            }
        }
    }

the object may be something like this:
                    <content xsi:type="INSTRUCTION"
archetype_node_id="at0000">
                    .....
     </content>
                    <content xsi:type="OBSERVATION"
archetype_node_id="at0000">
                    .....
     </content>

In the above example how I can apply occurrence for INSTRUCTION objects
optional or just one occurrence and OBSERVATION only one occurrence must be
appear.
Or maybe we must bypass constraint defined on slots?
What is the main constraint applied? Slot constraint or child archetype
constraint?

Thanks in advance

Mahdi

The ID needs to be the archetypeID not the archetype-node-ID if it is the
root node of an archetype.

Cheers, Sam

just to clarify a bit:

  • occurrences etc are defined in the archetype, on slot nodes, as for any other object node in an archetype

  • when a slot is being filled (in a template), the id used for the archetype_node_id at the root node of the filler archetype in the resulting structure is the archetype_id of that archetype.

  • this means you never see at0000 in the resulting structure (called an operational template), and therefore, never in data, because all data is generated from operational templates
    the constraints you have in the example below look correct to me - they will be preserved in the operational template.

  • thomas