Stream: implementers
Topic: StructureDefn Snapshot - "Liveness" of children from parent
Msm123 Msm123 (Oct 24 2018 at 20:07):
I'm working on some processing the snapshot from a structured definition but have a question about exactly how "removal" works.
Eg I've been given a STU3 based StructureDefinition based upon http://hl7.org/fhir/StructureDefinition/Bundle (the profile has been authored with Firely Forge )
The Bundle.signature has been removed.
The differential of the (xml based) profile file has
id - Bundle.signature
path/value - Bundle.signature
max/value - 0
The snapshot has a max 0 for the id & path for Bundle.signature.
All the "children" still have values to say that they are still in use, eg
Bundle.signature.id min 0, max 1
Bundle.signature.extension min 0, max *
My question what is the rule/logic can be applied to determine what children have also been removed because the parent has been removed.
In the above case – “Bundle.signature” is 0..0 – so then anything else with
“id”
or
“path” (?)
which starts with “Bundle.signature” are no longer live?
What actually determines a parent - or is it just anything "under" something with max of 0 has also been removed?
Are there any complexities with slices which need to be considered?
Thanks
Lloyd McKenzie (Oct 25 2018 at 03:59):
If an ancestor can't appear, then the children can't appear under that ancestor. There are some places where types can be re-used, so cardinality of child elements might be relevant if the same backbone type gets referenced other places.
Msm123 Msm123 (Oct 26 2018 at 08:15):
I don't think my initial question has that clear. Let me try again.
I've copied/edited a fragment of the profile /StructureDefinition/snapshot/element[85]
<element id="Bundle.signature">
<path value="Bundle.signature"/>
<short value="Digital Signature"/>
<min value="0"/>
<max value="0"/>
</element>
<element id="Bundle.signature.id">
<path value="Bundle.signature.id"/>
<short value="xml:id (or equivalent in JSON)"/>
<min value="0"/>
<max value="1"/>
</element>
<element id="Bundle.signature.extension">
<path value="Bundle.signature.extension"/>
<slicing>
..
</slicing>
<short value="Additional Content defined by implementations"/>
<min value="0"/>
<max value="*"/>
</element>
The 1st element has max of 0 - so its removed and therefore so have all the children.
To identify children, is it a case of :-
(1) Take the "element id" ("Bundle.signature") - and for the other elements, if the id (string) "starts" with Bundle.signature then they're also "dead".
(2) Take the "path value" and for the other elements, if the path (string) "starts" with Bundle.signature then they're also "dead".
(3) Any other way?
Thanks again
Michel Rutten (Oct 26 2018 at 08:55):
@Msm123 Msm123 Please note that you also have to take slicing into account, in order to transform a flattened list of element definitions into a connected tree. Slice names are reflected in element ids, e.g. patient.identifier:ssn
.
Last updated: Apr 12 2022 at 19:14 UTC