FHIR Cross-Version Mapping Pack, 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/fhir-cross-version/ and changes regularly. See the Directory of published versions
Page standards status: Draft | Maturity Level: 1 |
<StructureMap xmlns="http://hl7.org/fhir">
<id value="MedicationAdministration3to2"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"><pre class="fml">
<span style="color: #cc00cc">/// <b>url</b> = </span><span style="color: blue">'http://hl7.org/fhir/StructureMap/MedicationAdministration3to2'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'MedicationAdministration3to2'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'MedicationAdministration Transforms: R3 to R2'</span>
<span style="color: #cc00cc">/// <b>status</b> = </span><span style="color: blue">'active'</span>
<b>uses</b><span style="color: navy"> "</span>http://hl7.org/fhir/3.0/MedicationAdministration<span style="color: navy">" </span><b>alias </b>MedicationAdministration <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> "</span>http://hl7.org/fhir/1.0/MedicationAdministration<span style="color: navy">" </span><b>alias </b>MedicationAdministrationR2 <b>as </b><b>target</b>
<b>imports</b><span style="color: navy"> "</span>http://hl7.org/fhir/StructureMap/*3to2<span style="color: navy">"
</span>
<b>group </b>MedicationAdministration<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>MedicationAdministration, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>MedicationAdministrationR2<span style="color: navy">)</span><b> extends </b>DomainResource<b> <<type+>></b><span style="color: navy"> {
</span> src.identifier<span style="color: navy"><b> -> </b></span>tgt.identifier <i>"MedicationAdministration-identifier"</i><span style="color: navy">;</span>
src.status<span style="color: navy"><b> -> </b></span>tgt.status <i>"MedicationAdministration-status"</i><span style="color: navy">;</span>
src.subject<span style="color: navy"><b> -> </b></span>tgt.patient <i>"MedicationAdministration-patient"</i><span style="color: navy">;</span>
src.performer<b> as </b><span style="color: maroon">vs0</span><b> then </b>mAdPerformer<span style="color: navy">(</span><span style="color: maroon">vs0</span><span style="color: navy">, </span><span style="color: maroon">tgt</span><span style="color: navy">)</span> <i>"MedicationAdministration-performer"</i><span style="color: navy">;</span>
src.context<span style="color: navy"><b> -> </b></span>tgt.encounter <i>"MedicationAdministration-encounter"</i><span style="color: navy">;</span>
src.prescription<span style="color: navy"><b> -> </b></span>tgt.prescription <i>"MedicationAdministration-prescription"</i><span style="color: navy">;</span>
src.notGiven<span style="color: navy"><b> -> </b></span>tgt.wasNotGiven <i>"MedicationAdministration-notGiven"</i><span style="color: navy">;</span>
src.reasonNotGiven<span style="color: navy"><b> -> </b></span>tgt.reasonNotGiven <i>"MedicationAdministration-reasonNotGiven"</i><span style="color: navy">;</span>
src.effective<span style="color: navy"><b> -> </b></span>tgt.effectiveTime <i>"MedicationAdministration-effectiveTime"</i><span style="color: navy">;</span>
src.medication<span style="color: navy"><b> -> </b></span>tgt.medication <i>"MedicationAdministration-medication"</i><span style="color: navy">;</span>
src.device<span style="color: navy"><b> -> </b></span>tgt.device <i>"MedicationAdministration-device"</i><span style="color: navy">;</span>
src.note only_one<span style="color: navy"><b> -> </b></span>tgt.note <i>"MedicationAdministration-note"</i><span style="color: navy">;</span>
src.dosage<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -> </b></span>tgt.dosage<b> as </b><span style="color: maroon">vt0</span><b> then </b>mAdDosage<span style="color: navy">(</span><span style="color: maroon">vs0</span><span style="color: navy">, </span><span style="color: maroon">vt0</span><span style="color: navy">)</span> <i>"MedicationAdministration-dosage"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>mAdPerformer<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
</span> src.actor<span style="color: navy"><b> -> </b></span>tgt.practitioner <i>"MedicationAdministration-performer-actor"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>mAdDosage<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>MedicationAdministrationR2, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>MedicationAdministration<span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
</span> src.text<span style="color: navy"><b> -> </b></span>tgt.text <i>"dosage-text"</i><span style="color: navy">;</span>
src.site<span style="color: navy"><b> -> </b></span>tgt.site <i>"dosage-site"</i><span style="color: navy">;</span>
src.route<span style="color: navy"><b> -> </b></span>tgt.route <i>"dosage-route"</i><span style="color: navy">;</span>
src.method<span style="color: navy"><b> -> </b></span>tgt.method <i>"dosage-method"</i><span style="color: navy">;</span>
src.dose<span style="color: navy"><b> -> </b></span>tgt.quantity <i>"dosage-dose"</i><span style="color: navy">;</span>
src.rate<b> where </b>$this is Ratio<span style="color: navy"><b> -> </b></span>tgt.rate <i>"dosage-rate-Ratio"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span></pre></div>
</text>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
<valueCode value="fhir"/>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
<valueInteger value="1">
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
<valueCanonical
value="http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver"/>
</extension>
</valueInteger>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
<valueCode value="draft">
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
<valueCanonical
value="http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver"/>
</extension>
</valueCode>
</extension>
<url value="http://hl7.org/fhir/StructureMap/MedicationAdministration3to2"/>
<version value="0.1.0"/>
<name value="MedicationAdministration3to2"/>
<title value="MedicationAdministration Transforms: R3 to R2"/>
<status value="active"/>
<date value="2024-02-22T03:16:50+00:00"/>
<publisher value="HL7 International / FHIR Infrastructure"/>
<contact>
<telecom>
<system value="url"/>
<value value="http://www.hl7.org/Special/committees/fiwg"/>
</telecom>
</contact>
<description value="MedicationAdministrationTransformsR3toR2"/>
<jurisdiction>
<coding>
<system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
<code value="001"/>
</coding>
</jurisdiction>
<structure>
<url value="http://hl7.org/fhir/3.0/MedicationAdministration"/>
<mode value="source"/>
<alias value="MedicationAdministration"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/1.0/MedicationAdministration"/>
<mode value="target"/>
<alias value="MedicationAdministrationR2"/>
</structure>
<import value="http://hl7.org/fhir/StructureMap/*3to2"/>
<group>
<name value="MedicationAdministration"/>
<extends value="DomainResource"/>
<typeMode value="type-and-types"/>
<input>
<name value="src"/>
<type value="MedicationAdministration"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="MedicationAdministrationR2"/>
<mode value="target"/>
</input>
<rule>
<name value="MedicationAdministration-identifier"/>
<source>
<context value="src"/>
<element value="identifier"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="identifier"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationAdministration-status"/>
<source>
<context value="src"/>
<element value="status"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="status"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationAdministration-patient"/>
<source>
<context value="src"/>
<element value="subject"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="patient"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationAdministration-performer"/>
<source>
<context value="src"/>
<element value="performer"/>
<variable value="vs0"/>
</source>
<dependent>
<name value="mAdPerformer"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="tgt"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationAdministration-encounter"/>
<source>
<context value="src"/>
<element value="context"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="encounter"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationAdministration-prescription"/>
<source>
<context value="src"/>
<element value="prescription"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="prescription"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationAdministration-notGiven"/>
<source>
<context value="src"/>
<element value="notGiven"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="wasNotGiven"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationAdministration-reasonNotGiven"/>
<source>
<context value="src"/>
<element value="reasonNotGiven"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="reasonNotGiven"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationAdministration-effectiveTime"/>
<source>
<context value="src"/>
<element value="effective"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="effectiveTime"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationAdministration-medication"/>
<source>
<context value="src"/>
<element value="medication"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="medication"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationAdministration-device"/>
<source>
<context value="src"/>
<element value="device"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="device"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationAdministration-note"/>
<source>
<context value="src"/>
<element value="note"/>
<listMode value="only_one"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="note"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationAdministration-dosage"/>
<source>
<context value="src"/>
<element value="dosage"/>
<variable value="vs0"/>
</source>
<target>
<context value="tgt"/>
<element value="dosage"/>
<variable value="vt0"/>
</target>
<dependent>
<name value="mAdDosage"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</parameter>
</dependent>
</rule>
</group>
<group>
<name value="mAdPerformer"/>
<extends value="BackboneElement"/>
<input>
<name value="src"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<mode value="target"/>
</input>
<rule>
<name value="MedicationAdministration-performer-actor"/>
<source>
<context value="src"/>
<element value="actor"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="practitioner"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
</group>
<group>
<name value="mAdDosage"/>
<extends value="BackboneElement"/>
<input>
<name value="src"/>
<type value="MedicationAdministrationR2"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="MedicationAdministration"/>
<mode value="target"/>
</input>
<rule>
<name value="dosage-text"/>
<source>
<context value="src"/>
<element value="text"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="text"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="dosage-site"/>
<source>
<context value="src"/>
<element value="site"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="site"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="dosage-route"/>
<source>
<context value="src"/>
<element value="route"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="route"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="dosage-method"/>
<source>
<context value="src"/>
<element value="method"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="method"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="dosage-dose"/>
<source>
<context value="src"/>
<element value="dose"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="quantity"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="dosage-rate-Ratio"/>
<source>
<context value="src"/>
<element value="rate"/>
<variable value="vvv"/>
<condition value="$this is Ratio"/>
</source>
<target>
<context value="tgt"/>
<element value="rate"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
</group>
</StructureMap>