FHIR Mapping Language (FML), published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/mapping-language-ig/ and changes regularly. See the Directory of published versions
| Page standards status: Informative |
<StructureMap xmlns="http://hl7.org/fhir"
resourceDefinition="http://hl7.org/fhir/StructureDefinition/StructureMap|0.1.0">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap ConceptMapEmbedded</b></p><a name="ConceptMapEmbedded"> </a><a name="hcConceptMapEmbedded"> </a><pre class="fml">
<span style="color: #cc00cc">/// <b>url</b> = </span><span style="color: blue">'http://hl7.org/fhir/uv/mapping-language/StructureMap/ConceptMapEmbedded'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'ConceptMapEmbedded'</span>
<span style="color: #cc00cc">/// <b>status</b> = </span><span style="color: blue">'draft'</span>
<span style="color: #cc00cc">/// <b>description</b> = </span><span style="color: blue">'Example Map to demonstrate an embedded ConceptMap'</span>
<b>conceptmap</b><span style="color: navy"> "</span>GenderMap<span style="color: navy">" {
</span><b> prefix </b>s<span style="color: navy"> = "</span><a href="http://hl7.org/fhir/6.0.0-ballot5/codesystem-administrative-gender.html" title="AdministrativeGender">http://hl7.org/fhir/administrative-gender</a><span style="color: navy">"
</span><b> prefix </b>t<span style="color: navy"> = "</span><a href="http://terminology.hl7.org/7.4.0/CodeSystem-v2-0001.html" title="administrativeSex">http://terminology.hl7.org/CodeSystem/v2-0001</a><span style="color: navy">"
</span>
s<span style="color: navy">:</span>male <b>-</b> t<span style="color: navy">:</span>M
s<span style="color: navy">:</span>female <b>-</b> t<span style="color: navy">:</span>F
s<span style="color: navy">:</span>other <b>-</b> t<span style="color: navy">:</span>O
s<span style="color: navy">:</span>unknown <b>-</b> t<span style="color: navy">:</span>U
<span style="color: navy">}
</span><b>uses</b><span style="color: navy"> "</span><a href="http://hl7.org/fhir/6.0.0-ballot5/patient.html" title="Patient">http://hl7.org/fhir/StructureDefinition/Patient</a><span style="color: navy">" </span><b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> "</span><a href="http://hl7.org/fhir/6.0.0-ballot5/observation.html" title="Observation">http://hl7.org/fhir/StructureDefinition/Observation</a><span style="color: navy">" </span><b>as </b><b>target</b>
<b>group </b>ConceptMapEmbedded<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>Patient, <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.gender<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -> </b></span>tgt.value = <b>translate</b><span style="color: navy">(</span><span style="color: maroon">v</span><span style="color: navy">, </span><span style="color: blue">'#GenderMap'</span><span style="color: navy">, </span><span style="color: blue">'CodeableConcept'</span><span style="color: navy">)</span> <i>"r1"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span></pre></div>
</text>
<url
value="http://hl7.org/fhir/uv/mapping-language/StructureMap/ConceptMapEmbedded"/>
<name value="ConceptMapEmbedded"/>
<status value="draft"/>
<description value="Example Map to demonstrate an embedded ConceptMap"/>
<structure>
<url value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<mode value="source"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/StructureDefinition/Observation"/>
<mode value="target"/>
</structure>
<group>
<name value="ConceptMapEmbedded"/>
<input>
<mode value="source"/>
<name value="src"/>
<type value="Patient"/>
</input>
<input>
<mode value="target"/>
<name value="tgt"/>
<type value="Observation"/>
</input>
<rule>
<source>
<context value="src"/>
<element value="gender"/>
<variable value="v"/>
</source>
<target>
<context value="tgt"/>
<element value="value"/>
<transform value="translate"/>
<parameter>
<valueId value="v"/>
</parameter>
<parameter>
<valueString value="#GenderMap">
<extension
url="http://hl7.org/fhir/StructureDefinition/referencesContained">
<valueReference>
<reference value="#GenderMap"/>
</valueReference>
</extension>
</valueString>
</parameter>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<name value="r1"/>
</rule>
</group>
<id value="ConceptMapEmbedded"/>
<language value="en"/>
<contained>
<ConceptMap>
<id value="GenderMap"/>
<status value="draft"/>
<group>
<source value="http://hl7.org/fhir/administrative-gender"/>
<target value="http://terminology.hl7.org/CodeSystem/v2-0001"/>
<element>
<code value="male"/>
<target>
<relationship value="related-to"/>
<code value="M"/>
</target>
</element>
<element>
<code value="female"/>
<target>
<relationship value="related-to"/>
<code value="F"/>
</target>
</element>
<element>
<code value="other"/>
<target>
<relationship value="related-to"/>
<code value="O"/>
</target>
</element>
<element>
<code value="unknown"/>
<target>
<relationship value="related-to"/>
<code value="U"/>
</target>
</element>
</group>
</ConceptMap>
</contained>
</StructureMap>