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

: DataRequirement Transforms: R5 to R4 - XML Representation

Page standards status: Draft Maturity Level: 1

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="DataRequirement5to4"/>
  <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/DataRequirement5to4'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'DataRequirement5to4'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'DataRequirement Transforms: R5 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/5.0/DataRequirement<span style="color: navy">&quot; </span><b>alias </b>DataRequirementR5 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/4.0/DataRequirement<span style="color: navy">&quot; </span><b>alias </b>DataRequirementR4 <b>as </b><b>target</b>

<b>imports</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/StructureMap/*5to4<span style="color: navy">&quot;
</span>
<b>group </b>DataRequirement<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>DataRequirementR5, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>DataRequirementR4<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.type<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.type = <b>translate</b><span style="color: navy">(</span><span style="color: maroon">v</span><span style="color: navy">, </span><span style="color: blue">'http://hl7.org/fhir/cross-version/types5to4'</span><span style="color: navy">, </span><span style="color: blue">'code'</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.profile<span style="color: navy"><b> -&gt; </b></span>tgt.profile<span style="color: navy">;</span>
  src.subject<span style="color: navy"> : </span>CodeableConcept<span style="color: navy"><b> -&gt; </b></span>tgt.subject<span style="color: navy">;</span>
  src.subject<span style="color: navy"> : </span>Reference<span style="color: navy"><b> -&gt; </b></span>tgt.subject<span style="color: navy">;</span>
  src.mustSupport<span style="color: navy"><b> -&gt; </b></span>tgt.mustSupport<span style="color: navy">;</span>
  src.codeFilter<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.codeFilter<b> as </b><span style="color: maroon">t</span><b> then </b>DataRequirementCodeFilter<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.dateFilter<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.dateFilter<b> as </b><span style="color: maroon">t</span><b> then </b>DataRequirementDateFilter<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.limit<span style="color: navy"><b> -&gt; </b></span>tgt.limit<span style="color: navy">;</span>
  src.sort<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.sort<b> as </b><span style="color: maroon">t</span><b> then </b>DataRequirementSort<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>DataRequirementCodeFilter<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>Element<span style="color: navy"> {
</span>  src.path<span style="color: navy"><b> -&gt; </b></span>tgt.path<span style="color: navy">;</span>
  src.searchParam<span style="color: navy"><b> -&gt; </b></span>tgt.searchParam<span style="color: navy">;</span>
  src.valueSet<span style="color: navy"><b> -&gt; </b></span>tgt.valueSet<span style="color: navy">;</span>
  src.code<span style="color: navy"><b> -&gt; </b></span>tgt.code<span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>DataRequirementDateFilter<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>Element<span style="color: navy"> {
</span>  src.path<span style="color: navy"><b> -&gt; </b></span>tgt.path<span style="color: navy">;</span>
  src.searchParam<span style="color: navy"><b> -&gt; </b></span>tgt.searchParam<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>dateTime<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>Period<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>Duration<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
<span style="color: navy">}

</span><span style="color: navy">// </span><span style="color: green">- not in R4</span>
<span style="color: navy">// </span><span style="color: green">group DataRequirementValueFilter(source src, target tgt) extends Element {</span>
<span style="color: #b36b00" title="This element was not defined prior to R5">// src.path -&gt; tgt.path;</span>
<span style="color: #b36b00" title="This element was not defined prior to R5">// src.searchParam -&gt; tgt.searchParam;</span>
<span style="color: #b36b00" title="This element was not defined prior to R5">// src.comparator -&gt; tgt.comparator;</span>
<span style="color: #b36b00" title="This element was not defined prior to R5">// src.value : dateTime -&gt; tgt.value;</span>
<span style="color: #b36b00" title="This element was not defined prior to R5">// src.value : Period -&gt; tgt.value;</span>
<span style="color: #b36b00" title="This element was not defined prior to R5">// src.value : Duration -&gt; tgt.value;</span>
<span style="color: navy">// </span><span style="color: green">}</span>
<b>group </b>DataRequirementSort<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>Element<span style="color: navy"> {
</span>  src.path<span style="color: navy"><b> -&gt; </b></span>tgt.path<span style="color: navy">;</span>
  src.direction<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.direction = <b>translate</b><span style="color: navy">(</span><span style="color: maroon">v</span><span style="color: navy">, </span><span style="color: blue">'http://hl7.org/fhir/ConceptMap/DataRequirement.sort.direction-R5toR4'</span><span style="color: navy">, </span><span style="color: blue">'code'</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/DataRequirement5to4"/>
  <version value="0.1.0"/>
  <name value="DataRequirement5to4"/>
  <title value="DataRequirement Transforms: R5 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="DataRequirementTransformsR5toR4"/>
  <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/5.0/DataRequirement"/>
    <mode value="source"/>
    <alias value="DataRequirementR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/DataRequirement"/>
    <mode value="target"/>
    <alias value="DataRequirementR4"/>
  </structure>
  <import value="http://hl7.org/fhir/StructureMap/*5to4"/>
  <group>
    <name value="DataRequirement"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="DataRequirementR5"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="DataRequirementR4"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="type"/>
      <source>
        <context value="src"/>
        <element value="type"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="type"/>
        <transform value="translate"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
        <parameter>
          <valueString value="http://hl7.org/fhir/cross-version/types5to4"/>
        </parameter>
        <parameter>
          <valueString value="code"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="profile"/>
      <source>
        <context value="src"/>
        <element value="profile"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="profile"/>
        <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="subjectCodeableConcept"/>
      <source>
        <context value="src"/>
        <type value="CodeableConcept"/>
        <element value="subject"/>
        <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="subjectReference"/>
      <source>
        <context value="src"/>
        <type value="Reference"/>
        <element value="subject"/>
        <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="mustSupport"/>
      <source>
        <context value="src"/>
        <element value="mustSupport"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="mustSupport"/>
        <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="codeFilter"/>
      <source>
        <context value="src"/>
        <element value="codeFilter"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="codeFilter"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="DataRequirementCodeFilter"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="dateFilter"/>
      <source>
        <context value="src"/>
        <element value="dateFilter"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="dateFilter"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="DataRequirementDateFilter"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="limit"/>
      <source>
        <context value="src"/>
        <element value="limit"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="limit"/>
        <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="sort"/>
      <source>
        <context value="src"/>
        <element value="sort"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="sort"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="DataRequirementSort"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="DataRequirementCodeFilter"/>
    <extends value="Element"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="path"/>
      <source>
        <context value="src"/>
        <element value="path"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="path"/>
        <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="searchParam"/>
      <source>
        <context value="src"/>
        <element value="searchParam"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="searchParam"/>
        <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="valueSet"/>
      <source>
        <context value="src"/>
        <element value="valueSet"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="valueSet"/>
        <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="code"/>
      <source>
        <context value="src"/>
        <element value="code"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="code"/>
        <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="DataRequirementDateFilter"/>
    <extends value="Element"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="path"/>
      <source>
        <context value="src"/>
        <element value="path"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="path"/>
        <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="searchParam"/>
      <source>
        <context value="src"/>
        <element value="searchParam"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="searchParam"/>
        <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="valueDateTime"/>
      <source>
        <context value="src"/>
        <type value="dateTime"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <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="valuePeriod"/>
      <source>
        <context value="src"/>
        <type value="Period"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <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="valueDuration"/>
      <source>
        <context value="src"/>
        <type value="Duration"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <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="DataRequirementSort"/>
    <extends value="Element"/>
    <documentation
                   value="- not in R4
group DataRequirementValueFilter(source src, target tgt) extends Element {
src.path -&gt; tgt.path;
src.searchParam -&gt; tgt.searchParam;
src.comparator -&gt; tgt.comparator;
src.value : dateTime -&gt; tgt.value;
src.value : Period -&gt; tgt.value;
src.value : Duration -&gt; tgt.value;
}"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="path"/>
      <source>
        <context value="src"/>
        <element value="path"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="path"/>
        <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="direction"/>
      <source>
        <context value="src"/>
        <element value="direction"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="direction"/>
        <transform value="translate"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
        <parameter>
          <valueString
                       value="http://hl7.org/fhir/ConceptMap/DataRequirement.sort.direction-R5toR4"/>
        </parameter>
        <parameter>
          <valueString value="code"/>
        </parameter>
      </target>
    </rule>
  </group>
</StructureMap>