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="MedicationAdministration2to3"/>
<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/MedicationAdministration2to3'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'MedicationAdministration2to3'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'MedicationAdministration Transforms: R2 to R3'</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/1.0/MedicationAdministration<span style="color: navy">" </span><b>alias </b>MedicationAdministrationR2 <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>RatioR2 <b>as </b><b>source</b>
<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>target</b>
<b>imports</b><span style="color: navy"> "</span>http://hl7.org/fhir/StructureMap/*2to3<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>MedicationAdministrationR2, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>MedicationAdministration<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.patient<span style="color: navy"><b> -> </b></span>tgt.subject <i>"MedicationAdministration-patient"</i><span style="color: navy">;</span>
src.practitioner<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -> </b></span> tgt.performer<b> as </b><span style="color: maroon">vd</span><span style="color: navy">, </span> vd.actor = <span style="color: maroon">v</span> <i>"MedicationAdministration-practitioner"</i><span style="color: navy">;</span>
src.encounter<span style="color: navy"><b> -> </b></span>tgt.context <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.wasNotGiven<span style="color: navy"><b> -> </b></span>tgt.notGiven <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.effectiveTime<span style="color: navy"><b> -> </b></span>tgt.effective <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<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>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.quantity<span style="color: navy"><b> -> </b></span>tgt.dose <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/MedicationAdministration2to3"/>
<version value="0.1.0"/>
<name value="MedicationAdministration2to3"/>
<title value="MedicationAdministration Transforms: R2 to R3"/>
<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="MedicationAdministrationTransformsR2toR3"/>
<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/1.0/MedicationAdministration"/>
<mode value="source"/>
<alias value="MedicationAdministrationR2"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/1.0/MedicationAdministration"/>
<mode value="source"/>
<alias value="RatioR2"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/3.0/MedicationAdministration"/>
<mode value="target"/>
<alias value="MedicationAdministration"/>
</structure>
<import value="http://hl7.org/fhir/StructureMap/*2to3"/>
<group>
<name value="MedicationAdministration"/>
<extends value="DomainResource"/>
<typeMode value="type-and-types"/>
<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="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="patient"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="subject"/>
<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-practitioner"/>
<source>
<context value="src"/>
<element value="practitioner"/>
<variable value="v"/>
</source>
<target>
<context value="tgt"/>
<element value="performer"/>
<variable value="vd"/>
</target>
<target>
<context value="vd"/>
<element value="actor"/>
<transform value="copy"/>
<parameter>
<valueId value="v"/>
</parameter>
</target>
</rule>
<rule>
<name value="MedicationAdministration-encounter"/>
<source>
<context value="src"/>
<element value="encounter"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="context"/>
<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="wasNotGiven"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="notGiven"/>
<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="effectiveTime"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="effective"/>
<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"/>
<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="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="quantity"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="dose"/>
<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>