Starter FHIR Implementation Guide
1.0.1 - draft
Starter FHIR Implementation Guide, published by Jembi Health Systems. This guide is not an authorized publication; it is the continuous build for version 1.0.1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/jembi/Starter-FHIR-IG/ and changes regularly. See the Directory of published versions
Draft as of 2024-11-17 |
<StructureMap xmlns="http://hl7.org/fhir">
<id value="ProprietaryBreastfeedingStatusToObservation"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap ProprietaryBreastfeedingStatusToObservation</b></p><a name="ProprietaryBreastfeedingStatusToObservation"> </a><a name="hcProprietaryBreastfeedingStatusToObservation"> </a><a name="ProprietaryBreastfeedingStatusToObservation-en-US"> </a><pre class="fml">
<b>map</b><span style="color: navy"> "</span>http://jembi.org/fhir/StructureMap/ProprietaryBreastfeedingStatusToObservation<span style="color: navy">" = "</span>ProprietaryBreastfeedingStatusToObservation<span style="color: navy">"
</span><b>uses</b><span style="color: navy"> "</span><a href="StructureDefinition-BreastfeedingStatusProprietaryLogicalModel.html" title="Breastfeeding Status Proprietary Logical Model">http://jembi.org/fhir/StructureDefinition/BreastfeedingStatusProprietaryLogicalModel</a><span style="color: navy">" </span><b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> "</span><a href="StructureDefinition-breastfeeding-status-observation.html" title="Observation - Breastfeeding Status">http://jembi.org/fhir/StructureDefinition/breastfeeding-status-observation</a><span style="color: navy">" </span><b>as </b><b>target</b>
<b>group </b>ProprietaryBreastfeedingStatusToObservation<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>BreastfeedingStatusProprietaryLogicalModel, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>Observation<span style="color: navy">)</span><span style="color: navy"> {
</span> src<span style="color: navy"><b> -> </b></span>tgt.id = <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span> <i>"SetObservationId"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span>tgt.meta<b> as </b><span style="color: maroon">meta</span><b> then</b><span style="color: navy"> {
</span> src<span style="color: navy"><b> -> </b></span>meta.profile = <span style="color: blue">'http://jembi.org/fhir/StructureDefinition/breastfeeding-status-observation'</span> <i>"SetObservationMetaProfile"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"SetObservationMeta"</i><span style="color: navy">;</span>
src.observationStatus<b> as </b><span style="color: maroon">status</span><span style="color: navy"><b> -> </b></span>tgt.status = <span style="color: maroon">status</span> <i>"SetObservationStatus"</i><span style="color: navy">;</span>
src.code<b> as </b><span style="color: maroon">code</span><span style="color: navy"><b> -> </b></span>tgt.code = <b>cc</b><span style="color: navy">(</span><span style="color: blue">'http://loinc.org'</span><span style="color: navy">, </span><span style="color: maroon">code</span><span style="color: navy">)</span> <i>"SetObservationCode"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span> tgt.code<b> as </b><span style="color: maroon">code</span><span style="color: navy">, </span> code.text = <span style="color: blue">'Breastfeeding status'</span> <i>"SetObservationCodeText"</i><span style="color: navy">;</span>
src.date<b> as </b><span style="color: maroon">authored</span><span style="color: navy"><b> -> </b></span>tgt.effective = <b>create</b><span style="color: navy">(</span><span style="color: blue">'dateTime'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsDate</span><b> then</b><span style="color: navy"> {
</span> authored<span style="color: navy"><b> -> </b></span>obsDate.value = <span style="color: maroon">authored</span> <i>"SetObservationEffectiveDateTime"</i><span style="color: navy">;</span>
<span style="color: navy">}</span><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span>tgt.category = <b>cc</b><span style="color: navy">(</span><span style="color: blue">'http://terminology.hl7.org/CodeSystem/observation-category'</span><span style="color: navy">, </span><span style="color: blue">'exam'</span><span style="color: navy">)</span> <i>"SetObservationCategory"</i><span style="color: navy">;</span>
src.patient<b> as </b><span style="color: maroon">patient</span><span style="color: navy"><b> -> </b></span>tgt.subject<b> as </b><span style="color: maroon">subject</span><b> then</b><span style="color: navy"> {
</span> patient<span style="color: navy"><b> -> </b></span>subject.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Patient/'</span><span style="color: navy">, </span><span style="color: blue">'Some FHIR ID generated at the time of CREATE'</span><span style="color: navy">)</span> <i>"SetPatientReference"</i><span style="color: navy">;</span>
patient<span style="color: navy"><b> -> </b></span>subject.extension<b> as </b><span style="color: maroon">ext</span><b> then</b><span style="color: navy"> {
</span> patient<span style="color: navy"><b> -> </b></span>ext.value = <span style="color: maroon">patient</span> <i>"SetOriginalPatientReferenceValue"</i><span style="color: navy">;</span>
patient<span style="color: navy"><b> -> </b></span>ext.url = <span style="color: blue">'http://jembi.org/fhir/StructureDefinition/source-system-resource-reference'</span> <i>"SetOriginalPatientReferenceUrl"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"ProcessPatientReferenceExtension"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"SetObservationPatientReference"</i><span style="color: navy">;</span>
src.performer<b> as </b><span style="color: maroon">author</span><span style="color: navy"><b> -> </b></span>tgt.performer<b> as </b><span style="color: maroon">practitioner</span><b> then</b><span style="color: navy"> {
</span> author<span style="color: navy"><b> -> </b></span>practitioner.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Practitioner/'</span><span style="color: navy">, </span><span style="color: blue">'Some FHIR ID generated at the time of CREATE'</span><span style="color: navy">)</span> <i>"ProcessPerformerReference"</i><span style="color: navy">;</span>
author<span style="color: navy"><b> -> </b></span>practitioner.extension<b> as </b><span style="color: maroon">ext</span><b> then</b><span style="color: navy"> {
</span> author<span style="color: navy"><b> -> </b></span>ext.value = <span style="color: maroon">author</span> <i>"SetOriginalPractitionerReferenceValue"</i><span style="color: navy">;</span>
author<span style="color: navy"><b> -> </b></span>ext.url = <span style="color: blue">'http://jembi.org/fhir/StructureDefinition/source-system-resource-reference'</span> <i>"SetOriginalPractitionerReferenceUrl"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"ProcessPractitionerReferenceExtension"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"SetObservationPerformerReference"</i><span style="color: navy">;</span>
src.encounter<b> as </b><span style="color: maroon">encounter</span><span style="color: navy"><b> -> </b></span>tgt.encounter<b> as </b><span style="color: maroon">enc</span><b> then</b><span style="color: navy"> {
</span> encounter<span style="color: navy"><b> -> </b></span>enc.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Encounter/'</span><span style="color: navy">, </span><span style="color: blue">'Some FHIR ID generated at the time of CREATE'</span><span style="color: navy">)</span> <i>"ProcessEncounterReference"</i><span style="color: navy">;</span>
encounter<span style="color: navy"><b> -> </b></span>enc.extension<b> as </b><span style="color: maroon">ext</span><b> then</b><span style="color: navy"> {
</span> encounter<span style="color: navy"><b> -> </b></span>ext.value = <span style="color: maroon">encounter</span> <i>"SetOriginalEncounterReferenceValue"</i><span style="color: navy">;</span>
encounter<span style="color: navy"><b> -> </b></span>ext.url = <span style="color: blue">'http://jembi.org/fhir/StructureDefinition/source-system-resource-reference'</span> <i>"SetOriginalEncounterReferenceUrl"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"ProcessEncounterReferenceExtension"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"SetObservationEncounterReference"</i><span style="color: navy">;</span>
src.breastFeedingStatus<b> as </b><span style="color: maroon">breastfeeding</span><span style="color: navy"><b> -> </b></span>tgt.value = <b>create</b><span style="color: navy">(</span><span style="color: blue">'CodeableConcept'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsValue</span><b> then</b><span style="color: navy"> {
</span> breastfeeding<span style="color: navy"><b> -> </b></span>obsValue.coding = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><b> then</b><span style="color: navy"> {
</span> breastfeeding<span style="color: navy"><b> -> </b></span>coding.system = <span style="color: blue">'http://loinc.org'</span> <i>"SetObservationValueCodingSystem"</i><span style="color: navy">;</span>
breastfeeding<span style="color: navy"><b> -> </b></span>coding.code = <span style="color: maroon">breastfeeding</span> <i>"SetObservationValueCodingCode"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"SetObservationValueCoding"</i><span style="color: navy">;</span>
<span style="color: navy">}</span><span style="color: navy">;</span>
<span style="color: navy">}
</span></pre></div>
</text>
<url
value="http://jembi.org/fhir/StructureMap/ProprietaryBreastfeedingStatusToObservation"/>
<version value="1.0.1"/>
<name value="ProprietaryBreastfeedingStatusToObservation"/>
<status value="draft"/>
<date value="2024-11-17T13:26:33+00:00"/>
<publisher value="Jembi Health Systems"/>
<contact>
<name value="Jembi Health Systems"/>
<telecom>
<system value="url"/>
<value value="https://www.jembi.org/"/>
</telecom>
<telecom>
<system value="email"/>
<value value="info@jembi.org"/>
</telecom>
</contact>
<contact>
<name value="Richard Langford"/>
<telecom>
<system value="email"/>
<value value="richard.langford@jembi.org"/>
<use value="work"/>
</telecom>
</contact>
<jurisdiction>
<coding>
<system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
<code value="001"/>
<display value="World"/>
</coding>
</jurisdiction>
<structure>
<url
value="http://jembi.org/fhir/StructureDefinition/BreastfeedingStatusProprietaryLogicalModel"/>
<mode value="source"/>
</structure>
<structure>
<url
value="http://jembi.org/fhir/StructureDefinition/breastfeeding-status-observation"/>
<mode value="target"/>
</structure>
<group>
<name value="ProprietaryBreastfeedingStatusToObservation"/>
<typeMode value="none"/>
<input>
<name value="src"/>
<type value="BreastfeedingStatusProprietaryLogicalModel"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="Observation"/>
<mode value="target"/>
</input>
<rule>
<name value="SetObservationId"/>
<source>
<context value="src"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="uuid"/>
</target>
</rule>
<rule>
<name value="SetObservationMeta"/>
<source>
<context value="src"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="SetObservationMetaProfile"/>
<source>
<context value="src"/>
</source>
<target>
<context value="meta"/>
<contextType value="variable"/>
<element value="profile"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://jembi.org/fhir/StructureDefinition/breastfeeding-status-observation"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="SetObservationStatus"/>
<source>
<context value="src"/>
<element value="observationStatus"/>
<variable value="status"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueId value="status"/>
</parameter>
</target>
</rule>
<rule>
<name value="SetObservationCode"/>
<source>
<context value="src"/>
<element value="code"/>
<variable value="code"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="cc"/>
<parameter>
<valueString value="http://loinc.org"/>
</parameter>
<parameter>
<valueId value="code"/>
</parameter>
</target>
</rule>
<rule>
<name value="SetObservationCodeText"/>
<source>
<context value="src"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="code"/>
</target>
<target>
<context value="code"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueString value="Breastfeeding status"/>
</parameter>
</target>
</rule>
<rule>
<name value="date"/>
<source>
<context value="src"/>
<element value="date"/>
<variable value="authored"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="effective"/>
<variable value="obsDate"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<rule>
<name value="SetObservationEffectiveDateTime"/>
<source>
<context value="authored"/>
</source>
<target>
<context value="obsDate"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="authored"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="SetObservationCategory"/>
<source>
<context value="src"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="category"/>
<transform value="cc"/>
<parameter>
<valueString
value="http://terminology.hl7.org/CodeSystem/observation-category"/>
</parameter>
<parameter>
<valueString value="exam"/>
</parameter>
</target>
</rule>
<rule>
<name value="SetObservationPatientReference"/>
<source>
<context value="src"/>
<element value="patient"/>
<variable value="patient"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="subject"/>
</target>
<rule>
<name value="SetPatientReference"/>
<source>
<context value="patient"/>
</source>
<target>
<context value="subject"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Patient/"/>
</parameter>
<parameter>
<valueString
value="Some FHIR ID generated at the time of CREATE"/>
</parameter>
</target>
</rule>
<rule>
<name value="ProcessPatientReferenceExtension"/>
<source>
<context value="patient"/>
</source>
<target>
<context value="subject"/>
<contextType value="variable"/>
<element value="extension"/>
<variable value="ext"/>
</target>
<rule>
<name value="SetOriginalPatientReferenceValue"/>
<source>
<context value="patient"/>
</source>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="patient"/>
</parameter>
</target>
</rule>
<rule>
<name value="SetOriginalPatientReferenceUrl"/>
<source>
<context value="patient"/>
</source>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://jembi.org/fhir/StructureDefinition/source-system-resource-reference"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="SetObservationPerformerReference"/>
<source>
<context value="src"/>
<element value="performer"/>
<variable value="author"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="performer"/>
<variable value="practitioner"/>
</target>
<rule>
<name value="ProcessPerformerReference"/>
<source>
<context value="author"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueString
value="Some FHIR ID generated at the time of CREATE"/>
</parameter>
</target>
</rule>
<rule>
<name value="ProcessPractitionerReferenceExtension"/>
<source>
<context value="author"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="extension"/>
<variable value="ext"/>
</target>
<rule>
<name value="SetOriginalPractitionerReferenceValue"/>
<source>
<context value="author"/>
</source>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="author"/>
</parameter>
</target>
</rule>
<rule>
<name value="SetOriginalPractitionerReferenceUrl"/>
<source>
<context value="author"/>
</source>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://jembi.org/fhir/StructureDefinition/source-system-resource-reference"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="SetObservationEncounterReference"/>
<source>
<context value="src"/>
<element value="encounter"/>
<variable value="encounter"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="encounter"/>
<variable value="enc"/>
</target>
<rule>
<name value="ProcessEncounterReference"/>
<source>
<context value="encounter"/>
</source>
<target>
<context value="enc"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Encounter/"/>
</parameter>
<parameter>
<valueString
value="Some FHIR ID generated at the time of CREATE"/>
</parameter>
</target>
</rule>
<rule>
<name value="ProcessEncounterReferenceExtension"/>
<source>
<context value="encounter"/>
</source>
<target>
<context value="enc"/>
<contextType value="variable"/>
<element value="extension"/>
<variable value="ext"/>
</target>
<rule>
<name value="SetOriginalEncounterReferenceValue"/>
<source>
<context value="encounter"/>
</source>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="encounter"/>
</parameter>
</target>
</rule>
<rule>
<name value="SetOriginalEncounterReferenceUrl"/>
<source>
<context value="encounter"/>
</source>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://jembi.org/fhir/StructureDefinition/source-system-resource-reference"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="breastFeedingStatus"/>
<source>
<context value="src"/>
<element value="breastFeedingStatus"/>
<variable value="breastfeeding"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="value"/>
<variable value="obsValue"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="SetObservationValueCoding"/>
<source>
<context value="breastfeeding"/>
</source>
<target>
<context value="obsValue"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<rule>
<name value="SetObservationValueCodingSystem"/>
<source>
<context value="breastfeeding"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString value="http://loinc.org"/>
</parameter>
</target>
</rule>
<rule>
<name value="SetObservationValueCodingCode"/>
<source>
<context value="breastfeeding"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueId value="breastfeeding"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</group>
</StructureMap>