FHIR Cross-Version Mapping Pack
0.1.0 - Ballot for Release 5.1.0 International flag

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

: Dosage Transforms: R3 to R4 - XML Representation

Page standards status: Draft Maturity Level: 1

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="Dosage3to4"/>
  <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/Dosage3to4'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'Dosage3to4'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'Dosage Transforms: R3 to R4'</span>
<span style="color: #cc00cc">/// <b>status</b> = </span><span style="color: blue">'active'</span>

<b>uses</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/3.0/Dosage<span style="color: navy">&quot; </span><b>alias </b>DosageR3 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/4.0/Dosage<span style="color: navy">&quot; </span><b>alias </b>Dosage <b>as </b><b>target</b>

<b>imports</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/StructureMap/*3to4<span style="color: navy">&quot;
</span>
<b>group </b>Dosage<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>DosageR3, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>Dosage<span style="color: navy">)</span><b> extends </b>BackboneElement<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.sequence<span style="color: navy"><b> -&gt; </b></span>tgt.sequence<span style="color: navy">;</span>
  src.text<span style="color: navy"><b> -&gt; </b></span>tgt.text<span style="color: navy">;</span>
  src.additionalInstruction<span style="color: navy"><b> -&gt; </b></span>tgt.additionalInstruction<span style="color: navy">;</span>
  src.patientInstruction<span style="color: navy"><b> -&gt; </b></span>tgt.patientInstruction<span style="color: navy">;</span>
  src.timing<span style="color: navy"><b> -&gt; </b></span>tgt.timing<span style="color: navy">;</span>
  src.asNeeded<span style="color: navy"> : </span>boolean<b> as </b><span style="color: maroon">vs</span><span style="color: navy"><b> -&gt; </b></span>tgt.asNeeded = <b>create</b><span style="color: navy">(</span><span style="color: blue">'boolean'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">vt</span><b> then </b>boolean<span style="color: navy">(</span><span style="color: maroon">vs</span><span style="color: navy">, </span><span style="color: maroon">vt</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.asNeeded<span style="color: navy"> : </span>CodeableConcept<b> as </b><span style="color: maroon">vs</span><span style="color: navy"><b> -&gt; </b></span>tgt.asNeeded = <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">vt</span><b> then </b>CodeableConcept<span style="color: navy">(</span><span style="color: maroon">vs</span><span style="color: navy">, </span><span style="color: maroon">vt</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.site<span style="color: navy"><b> -&gt; </b></span>tgt.site<span style="color: navy">;</span>
  src.route<span style="color: navy"><b> -&gt; </b></span>tgt.route<span style="color: navy">;</span>
  src.method<span style="color: navy"><b> -&gt; </b></span>tgt.method<span style="color: navy">;</span>
  src<b> where </b>dose.exists() or rate.exists()<span style="color: navy"><b> -&gt; </b></span>tgt.doseAndRate<b> as </b><span style="color: maroon">vt0</span><b> then </b>doseAndRate<span style="color: navy">(</span><span style="color: maroon">src</span><span style="color: navy">, </span><span style="color: maroon">vt0</span><span style="color: navy">)</span> <i>&quot;doserate&quot;</i><span style="color: navy">;</span>
  src.maxDosePerPeriod<span style="color: navy"><b> -&gt; </b></span>tgt.maxDosePerPeriod<span style="color: navy">;</span>
  src.maxDosePerAdministration<span style="color: navy"><b> -&gt; </b></span>tgt.maxDosePerAdministration<span style="color: navy">;</span>
  src.maxDosePerLifetime<span style="color: navy"><b> -&gt; </b></span>tgt.maxDosePerLifetime<span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>doseAndRate<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><span style="color: navy"> {
</span>  src.dose<span style="color: navy"> : </span>Range<b> as </b><span style="color: maroon">vs</span><span style="color: navy"><b> -&gt; </b></span>tgt.dose = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Range'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">vt</span><b> then </b>Range<span style="color: navy">(</span><span style="color: maroon">vs</span><span style="color: navy">, </span><span style="color: maroon">vt</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.dose<span style="color: navy"> : </span>Quantity<b> as </b><span style="color: maroon">vs</span><span style="color: navy"><b> -&gt; </b></span>tgt.dose = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Quantity'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">vt</span><b> then </b>Quantity<span style="color: navy">(</span><span style="color: maroon">vs</span><span style="color: navy">, </span><span style="color: maroon">vt</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.rate<span style="color: navy"> : </span>Ratio<b> as </b><span style="color: maroon">vs</span><span style="color: navy"><b> -&gt; </b></span>tgt.rate = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Ratio'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">vt</span><b> then </b>Ratio<span style="color: navy">(</span><span style="color: maroon">vs</span><span style="color: navy">, </span><span style="color: maroon">vt</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.rate<span style="color: navy"> : </span>Range<b> as </b><span style="color: maroon">vs</span><span style="color: navy"><b> -&gt; </b></span>tgt.rate = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Range'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">vt</span><b> then </b>Range<span style="color: navy">(</span><span style="color: maroon">vs</span><span style="color: navy">, </span><span style="color: maroon">vt</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.rate<span style="color: navy"> : </span>Quantity<b> as </b><span style="color: maroon">vs</span><span style="color: navy"><b> -&gt; </b></span>tgt.rate = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Quantity'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">vt</span><b> then </b>Quantity<span style="color: navy">(</span><span style="color: maroon">vs</span><span style="color: navy">, </span><span style="color: maroon">vt</span><span style="color: navy">)</span><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/Dosage3to4"/>
  <version value="0.1.0"/>
  <name value="Dosage3to4"/>
  <title value="Dosage Transforms: R3 to R4"/>
  <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="DosageTransformsR3toR4"/>
  <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/Dosage"/>
    <mode value="source"/>
    <alias value="DosageR3"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/Dosage"/>
    <mode value="target"/>
    <alias value="Dosage"/>
  </structure>
  <import value="http://hl7.org/fhir/StructureMap/*3to4"/>
  <group>
    <name value="Dosage"/>
    <extends value="BackboneElement"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="DosageR3"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="Dosage"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="sequence"/>
      <source>
        <context value="src"/>
        <element value="sequence"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="sequence"/>
        <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="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="additionalInstruction"/>
      <source>
        <context value="src"/>
        <element value="additionalInstruction"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="additionalInstruction"/>
        <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="patientInstruction"/>
      <source>
        <context value="src"/>
        <element value="patientInstruction"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="patientInstruction"/>
        <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="timing"/>
      <source>
        <context value="src"/>
        <element value="timing"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="timing"/>
        <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="asNeededBoolean"/>
      <source>
        <context value="src"/>
        <type value="boolean"/>
        <element value="asNeeded"/>
        <variable value="vs"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="asNeeded"/>
        <variable value="vt"/>
        <transform value="create"/>
        <parameter>
          <valueString value="boolean"/>
        </parameter>
      </target>
      <dependent>
        <name value="boolean"/>
        <parameter>
          <valueId value="vs"/>
        </parameter>
        <parameter>
          <valueId value="vt"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="asNeededCodeableConcept"/>
      <source>
        <context value="src"/>
        <type value="CodeableConcept"/>
        <element value="asNeeded"/>
        <variable value="vs"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="asNeeded"/>
        <variable value="vt"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <dependent>
        <name value="CodeableConcept"/>
        <parameter>
          <valueId value="vs"/>
        </parameter>
        <parameter>
          <valueId value="vt"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="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="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="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="doserate"/>
      <source>
        <context value="src"/>
        <condition value="dose.exists() or rate.exists()"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="doseAndRate"/>
        <variable value="vt0"/>
      </target>
      <dependent>
        <name value="doseAndRate"/>
        <parameter>
          <valueId value="src"/>
        </parameter>
        <parameter>
          <valueId value="vt0"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="maxDosePerPeriod"/>
      <source>
        <context value="src"/>
        <element value="maxDosePerPeriod"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="maxDosePerPeriod"/>
        <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="maxDosePerAdministration"/>
      <source>
        <context value="src"/>
        <element value="maxDosePerAdministration"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="maxDosePerAdministration"/>
        <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="maxDosePerLifetime"/>
      <source>
        <context value="src"/>
        <element value="maxDosePerLifetime"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="maxDosePerLifetime"/>
        <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="doseAndRate"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="doseRange"/>
      <source>
        <context value="src"/>
        <type value="Range"/>
        <element value="dose"/>
        <variable value="vs"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="dose"/>
        <variable value="vt"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Range"/>
        </parameter>
      </target>
      <dependent>
        <name value="Range"/>
        <parameter>
          <valueId value="vs"/>
        </parameter>
        <parameter>
          <valueId value="vt"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="doseQuantity"/>
      <source>
        <context value="src"/>
        <type value="Quantity"/>
        <element value="dose"/>
        <variable value="vs"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="dose"/>
        <variable value="vt"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Quantity"/>
        </parameter>
      </target>
      <dependent>
        <name value="Quantity"/>
        <parameter>
          <valueId value="vs"/>
        </parameter>
        <parameter>
          <valueId value="vt"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="rateRatio"/>
      <source>
        <context value="src"/>
        <type value="Ratio"/>
        <element value="rate"/>
        <variable value="vs"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="rate"/>
        <variable value="vt"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Ratio"/>
        </parameter>
      </target>
      <dependent>
        <name value="Ratio"/>
        <parameter>
          <valueId value="vs"/>
        </parameter>
        <parameter>
          <valueId value="vt"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="rateRange"/>
      <source>
        <context value="src"/>
        <type value="Range"/>
        <element value="rate"/>
        <variable value="vs"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="rate"/>
        <variable value="vt"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Range"/>
        </parameter>
      </target>
      <dependent>
        <name value="Range"/>
        <parameter>
          <valueId value="vs"/>
        </parameter>
        <parameter>
          <valueId value="vt"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="rateQuantity"/>
      <source>
        <context value="src"/>
        <type value="Quantity"/>
        <element value="rate"/>
        <variable value="vs"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="rate"/>
        <variable value="vt"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Quantity"/>
        </parameter>
      </target>
      <dependent>
        <name value="Quantity"/>
        <parameter>
          <valueId value="vs"/>
        </parameter>
        <parameter>
          <valueId value="vt"/>
        </parameter>
      </dependent>
    </rule>
  </group>
</StructureMap>