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

: Provenance Transforms: R4 to R5 - XML Representation

Page standards status: Draft Maturity Level: 1

Raw xml | Download



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

<b>imports</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/StructureMap/*4to5<span style="color: navy">&quot;
</span>
<b>group </b>Provenance<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>ProvenanceR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>ProvenanceR5<span style="color: navy">)</span><b> extends </b>DomainResource<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.target<span style="color: navy"><b> -&gt; </b></span>tgt.target<span style="color: navy">;</span>
  src.occurred<span style="color: navy"> : </span>Period<span style="color: navy"><b> -&gt; </b></span>tgt.occurred<span style="color: navy">;</span>
  src.occurred<span style="color: navy"> : </span>dateTime<span style="color: navy"><b> -&gt; </b></span>tgt.occurred<span style="color: navy">;</span>
  src.recorded<span style="color: navy"><b> -&gt; </b></span>tgt.recorded<span style="color: navy">;</span>
  src.policy<span style="color: navy"><b> -&gt; </b></span>tgt.policy<span style="color: navy">;</span>
  src.location<span style="color: navy"><b> -&gt; </b></span>tgt.location<span style="color: navy">;</span>
  src.activity<span style="color: navy"><b> -&gt; </b></span>tgt.activity<span style="color: navy">;</span>
  src.agent<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.agent<b> as </b><span style="color: maroon">t</span><b> then </b>ProvenanceAgent<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.entity<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.entity<b> as </b><span style="color: maroon">t</span><b> then </b>ProvenanceEntity<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.signature<span style="color: navy"><b> -&gt; </b></span>tgt.signature<span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>ProvenanceAgent<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.type<span style="color: navy"><b> -&gt; </b></span>tgt.type<span style="color: navy">;</span>
  src.role<span style="color: navy"><b> -&gt; </b></span>tgt.role<span style="color: navy">;</span>
  src.who<span style="color: navy"><b> -&gt; </b></span>tgt.who<span style="color: navy">;</span>
  src.onBehalfOf<span style="color: navy"><b> -&gt; </b></span>tgt.onBehalfOf<span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>ProvenanceEntity<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.role<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.role = <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/Provenance.entity.role-R4toR5'</span><span style="color: navy">, </span><span style="color: blue">'code'</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.what<span style="color: navy"><b> -&gt; </b></span>tgt.what<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/Provenance4to5"/>
  <version value="0.1.0"/>
  <name value="Provenance4to5"/>
  <title value="Provenance Transforms: R4 to R5"/>
  <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="ProvenanceTransformsR4toR5"/>
  <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/4.0/Provenance"/>
    <mode value="source"/>
    <alias value="ProvenanceR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/5.0/Provenance"/>
    <mode value="target"/>
    <alias value="ProvenanceR5"/>
  </structure>
  <import value="http://hl7.org/fhir/StructureMap/*4to5"/>
  <group>
    <name value="Provenance"/>
    <extends value="DomainResource"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="ProvenanceR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="ProvenanceR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="target"/>
      <source>
        <context value="src"/>
        <element value="target"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="target"/>
        <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="occurredPeriod"/>
      <source>
        <context value="src"/>
        <type value="Period"/>
        <element value="occurred"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="occurred"/>
        <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="occurredDateTime"/>
      <source>
        <context value="src"/>
        <type value="dateTime"/>
        <element value="occurred"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="occurred"/>
        <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="recorded"/>
      <source>
        <context value="src"/>
        <element value="recorded"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="recorded"/>
        <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="policy"/>
      <source>
        <context value="src"/>
        <element value="policy"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="policy"/>
        <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="location"/>
      <source>
        <context value="src"/>
        <element value="location"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="location"/>
        <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="activity"/>
      <source>
        <context value="src"/>
        <element value="activity"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="activity"/>
        <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="agent"/>
      <source>
        <context value="src"/>
        <element value="agent"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="agent"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="ProvenanceAgent"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="entity"/>
      <source>
        <context value="src"/>
        <element value="entity"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="entity"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="ProvenanceEntity"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="signature"/>
      <source>
        <context value="src"/>
        <element value="signature"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="signature"/>
        <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="ProvenanceAgent"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="type"/>
      <source>
        <context value="src"/>
        <element value="type"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="type"/>
        <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="role"/>
      <source>
        <context value="src"/>
        <element value="role"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="role"/>
        <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="who"/>
      <source>
        <context value="src"/>
        <element value="who"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="who"/>
        <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="onBehalfOf"/>
      <source>
        <context value="src"/>
        <element value="onBehalfOf"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="onBehalfOf"/>
        <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="ProvenanceEntity"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="role"/>
      <source>
        <context value="src"/>
        <element value="role"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="role"/>
        <transform value="translate"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
        <parameter>
          <valueString
                       value="http://hl7.org/fhir/ConceptMap/Provenance.entity.role-R4toR5"/>
        </parameter>
        <parameter>
          <valueString value="code"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="what"/>
      <source>
        <context value="src"/>
        <element value="what"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="what"/>
        <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>