Stream: implementers
Topic: Extension content in Snapshot?
Ardon Toonstra (Dec 06 2021 at 09:11):
Should the content of extensions be included in the snapshot of the host profile?
Patrick Werner (Dec 06 2021 at 10:06):
I would expect them to contain the extension content.
Ardon Toonstra (Dec 06 2021 at 10:56):
It seems that the snapshot generators of JAVA and .NET only include the root concept details into the host profiles snapshot. It leaves out the .value[x]
constraints like a binding. (Checked the JAVA stuff by looking at the snapshots of the US Core IG)
Makes me wonder about this part of the spec: "a StructureDefinition can also carry a "snapshot" - a fully calculated form of the structure that is not dependent on any other structure." https://hl7.org/FHIR/profiling.html#snapshot
Grahame Grieve (Dec 06 2021 at 11:07):
where what? Can you give an example?
Ardon Toonstra (Dec 06 2021 at 11:47):
us-core-patient profile includes the us-core-birthsex extension like this in the diff:
<element id="Patient.extension:birthsex">
<path value="Patient.extension"/>
<sliceName value="birthsex"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex"/>
</type>
<mustSupport value="false"/>
<mapping>
<identity value="argonaut-dq-dstu2"/>
<map value="Patient.extension"/>
</mapping>
</element>
Resulting in this snapshot:
<element id="Patient.extension:birthsex">
<path value="Patient.extension"/>
<sliceName value="birthsex"/>
<short value="Extension"/>
<definition value="A code classifying the person's sex assigned at birth as specified by the [Office of the National Coordinator for Health IT (ONC)](https://www.healthit.gov/newsroom/about-onc)."/>
<comment value="The codes required are intended to present birth sex (i.e., the sex recorded on the patient’s birth certificate) and not gender identity or reassigned sex."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="DomainResource.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex"/>
</type>
<condition value="ele-1"/>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression value="hasValue() or (children().count() > id.count())"/>
<xpath value="@value|f:*|h:div"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
<constraint>
<key value="ext-1"/>
<severity value="error"/>
<human value="Must have either extensions or value[x], not both"/>
<expression value="extension.exists() != value.exists()"/>
<xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/>
<source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
</constraint>
<mustSupport value="false"/>
<isModifier value="false"/>
<mapping>
<identity value="rim"/>
<map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender"/>
</mapping>
<mapping>
<identity value="iso11179"/>
<map value=".patient.administrativeGenderCode"/>
</mapping>
<mapping>
<identity value="argonaut-dq-dstu2"/>
<map value="Patient.extension"/>
</mapping>
</element>
I would expect that also the following would be included in the snapshot:
<element id="Extension.url">
<path value="Extension.url"/>
<fixedUri value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex"/>
</element>
<element id="Extension.valueCode">
<path value="Extension.valueCode"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<binding>
<strength value="required"/>
<description value="Code for sex assigned at birth"/>
<valueSet value="http://hl7.org/fhir/us/core/ValueSet/birthsex"/>
</binding>
</element>
Ardon Toonstra (Dec 06 2021 at 11:48):
I would like to know why it isn't or why it shouldn't be included.
Ardon Toonstra (Dec 07 2021 at 08:28):
Perhaps this question is more suited in the #conformance stream? Shall I move it?
Grahame Grieve (Dec 07 2021 at 09:54):
if you want. It's on my todo list, but it probably belongs in conformance
Ardon Toonstra (Dec 08 2021 at 14:43):
Last updated: Apr 12 2022 at 19:14 UTC