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: R2 to R3 - XML Representation

Page standards status: Draft Maturity Level: 1

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="Provenance2to3"/>
  <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/Provenance2to3'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'Provenance2to3'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'Provenance 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"> &quot;</span>http://hl7.org/fhir/1.0/Provenance<span style="color: navy">&quot; </span><b>alias </b>ProvenanceR2 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/3.0/Provenance<span style="color: navy">&quot; </span><b>alias </b>Provenance <b>as </b><b>target</b>

<b>imports</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/StructureMap/*2to3<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>ProvenanceR2, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>Provenance<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 <i>&quot;Provenance-target&quot;</i><span style="color: navy">;</span>
  src.period<span style="color: navy"><b> -&gt; </b></span>tgt.period <i>&quot;Provenance-period&quot;</i><span style="color: navy">;</span>
  src.recorded<span style="color: navy"><b> -&gt; </b></span>tgt.recorded <i>&quot;Provenance-recorded&quot;</i><span style="color: navy">;</span>
  src.reason<span style="color: navy"><b> -&gt; </b></span>tgt.reason <i>&quot;Provenance-activity&quot;</i><span style="color: navy">;</span>
  src.activity<span style="color: navy"><b> -&gt; </b></span>tgt.activity <i>&quot;Provenance-activity&quot;</i><span style="color: navy">;</span>
  src.location<span style="color: navy"><b> -&gt; </b></span>tgt.location <i>&quot;Provenance-location&quot;</i><span style="color: navy">;</span>
  src.policy<span style="color: navy"><b> -&gt; </b></span>tgt.policy <i>&quot;Provenance-policy&quot;</i><span style="color: navy">;</span>
  src.agent<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -&gt; </b></span>tgt.agent<b> as </b><span style="color: maroon">vt0</span><b> then </b>prAgent<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>&quot;Provenance-agent&quot;</i><span style="color: navy">;</span>
  src.entity<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -&gt; </b></span>tgt.entity<b> as </b><span style="color: maroon">vt0</span><b> then </b>prEntity<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>&quot;Provenance-entity&quot;</i><span style="color: navy">;</span>
  src.signature<span style="color: navy"><b> -&gt; </b></span>tgt.signature <i>&quot;Provenance-signature&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>prAgent<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<span style="color: navy"><b> -&gt; </b></span>tgt.role <i>&quot;agent-role&quot;</i><span style="color: navy">;</span>
  src.actor<span style="color: navy"><b> -&gt; </b></span>tgt.who <i>&quot;agent-who&quot;</i><span style="color: navy">;</span>
  src.userId<b> as </b><span style="color: maroon">su</span><span style="color: navy"><b> -&gt; </b></span>tgt.who<b> as </b><span style="color: maroon">tu</span><b> then</b><span style="color: navy"> {
</span>    su<span style="color: navy"><b> -&gt; </b></span>tu.identifier<b> as </b><span style="color: maroon">tu</span><b> then </b>Identifier<span style="color: navy">(</span><span style="color: maroon">su</span><span style="color: navy">, </span><span style="color: maroon">tu</span><span style="color: navy">)</span> <i>&quot;agent-userId2&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;agent-userId&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>prEntity<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<span style="color: navy"><b> -&gt; </b></span>tgt.role <i>&quot;entity-role&quot;</i><span style="color: navy">;</span>
  src.agent<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -&gt; </b></span>tgt.agent<b> as </b><span style="color: maroon">vt0</span><b> then </b>prAgent<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>&quot;entity-agent&quot;</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/Provenance2to3"/>
  <version value="0.1.0"/>
  <name value="Provenance2to3"/>
  <title value="Provenance 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="ProvenanceTransformsR2toR3"/>
  <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/Provenance"/>
    <mode value="source"/>
    <alias value="ProvenanceR2"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/3.0/Provenance"/>
    <mode value="target"/>
    <alias value="Provenance"/>
  </structure>
  <import value="http://hl7.org/fhir/StructureMap/*2to3"/>
  <group>
    <name value="Provenance"/>
    <extends value="DomainResource"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="ProvenanceR2"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="Provenance"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="Provenance-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="Provenance-period"/>
      <source>
        <context value="src"/>
        <element value="period"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="period"/>
        <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="Provenance-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="Provenance-activity"/>
      <source>
        <context value="src"/>
        <element value="reason"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="reason"/>
        <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="Provenance-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="Provenance-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="Provenance-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="Provenance-agent"/>
      <source>
        <context value="src"/>
        <element value="agent"/>
        <variable value="vs0"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="agent"/>
        <variable value="vt0"/>
      </target>
      <dependent>
        <name value="prAgent"/>
        <parameter>
          <valueId value="vs0"/>
        </parameter>
        <parameter>
          <valueId value="vt0"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="Provenance-entity"/>
      <source>
        <context value="src"/>
        <element value="entity"/>
        <variable value="vs0"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="entity"/>
        <variable value="vt0"/>
      </target>
      <dependent>
        <name value="prEntity"/>
        <parameter>
          <valueId value="vs0"/>
        </parameter>
        <parameter>
          <valueId value="vt0"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="Provenance-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="prAgent"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="agent-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="agent-who"/>
      <source>
        <context value="src"/>
        <element value="actor"/>
        <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="agent-userId"/>
      <source>
        <context value="src"/>
        <element value="userId"/>
        <variable value="su"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="who"/>
        <variable value="tu"/>
      </target>
      <rule>
        <name value="agent-userId2"/>
        <source>
          <context value="su"/>
        </source>
        <target>
          <context value="tu"/>
          <element value="identifier"/>
          <variable value="tu"/>
        </target>
        <dependent>
          <name value="Identifier"/>
          <parameter>
            <valueId value="su"/>
          </parameter>
          <parameter>
            <valueId value="tu"/>
          </parameter>
        </dependent>
      </rule>
    </rule>
  </group>
  <group>
    <name value="prEntity"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="entity-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="entity-agent"/>
      <source>
        <context value="src"/>
        <element value="agent"/>
        <variable value="vs0"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="agent"/>
        <variable value="vt0"/>
      </target>
      <dependent>
        <name value="prAgent"/>
        <parameter>
          <valueId value="vs0"/>
        </parameter>
        <parameter>
          <valueId value="vt0"/>
        </parameter>
      </dependent>
    </rule>
  </group>
</StructureMap>