Stream: IG creation
Topic: Use a pre-defined extension
Brian Reinhold (Oct 24 2018 at 09:12):
I am trying to use a pre-defined HL7 extension for the Observation resource defined here
http://build.fhir.org/extension-observation-gatewaydevice.html
But I am not quite sure how to include it in my structure definition differential. I think it should look like this:
<element id="Observation.extension"> <path value="Observation.extension" /> <short value="Extension for the PHG" /> <min value="0"/> <max value="1"/> </element> <element id="Observation.extension.url"> <path value="Observation.extension.url" /> <short value="Url indicating this is the gateway device extension" /> <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-gatewayDevice" /> </element> <element id="Observation.extension.value[x]"> <path value="Observation.extension.valueReference" /> <short value="Reference to the Personal Health Gateway (PHG) Device" /> <min value="1" /> <type> <code value="Reference" /> </type> </element>
But I am not sure. I am getting errors in the build of the guide but removing this part doesn't solve the error so I can't tell if this is correct. I am confused by the use of the element 'gatewayDevce' in the definition versus the classic definition of extension value[x].
Lloyd McKenzie (Oct 25 2018 at 03:45):
Define an element with a path of "Observation.extension" with a slice name and specify the type as Extension with a targetProfile of your extension URL. That's all you need to do. (Though you might want to assert constraints on cardinality and/or flag it as mustSupport.)
Last updated: Apr 12 2022 at 19:14 UTC