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="Provenance3to4"/>
<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/Provenance3to4'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'Provenance3to4'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'Provenance 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"> "</span>http://hl7.org/fhir/3.0/Provenance<span style="color: navy">" </span><b>alias </b>ProvenanceR3 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> "</span>http://hl7.org/fhir/4.0/Provenance<span style="color: navy">" </span><b>alias </b>Provenance <b>as </b><b>target</b>
<b>imports</b><span style="color: navy"> "</span>http://hl7.org/fhir/StructureMap/*3to4<span style="color: navy">"
</span>
<b>group </b>Provenance<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>ProvenanceR3, <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> <<type+>></b><span style="color: navy"> {
</span> src.target<span style="color: navy"><b> -> </b></span>tgt.target<span style="color: navy">;</span>
src.period<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -> </b></span>tgt.occurred = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Period'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">vt0</span><b> then </b>Period<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><span style="color: navy">;</span>
src.recorded<span style="color: navy"><b> -> </b></span>tgt.recorded<span style="color: navy">;</span>
src.policy<span style="color: navy"><b> -> </b></span>tgt.policy<span style="color: navy">;</span>
src.location<span style="color: navy"><b> -> </b></span>tgt.location<span style="color: navy">;</span>
src.reason<span style="color: navy"><b> -> </b></span>tgt.reason<span style="color: navy">;</span>
src.activity<span style="color: navy"><b> -> </b></span>tgt.activity<span style="color: navy">;</span>
src.agent<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -> </b></span>tgt.agent<b> as </b><span style="color: maroon">vt0</span><b> then </b>agent<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><span style="color: navy">;</span>
src.entity<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -> </b></span>tgt.entity<b> as </b><span style="color: maroon">vt0</span><b> then </b>entity<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><span style="color: navy">;</span>
src.signature<span style="color: navy"><b> -> </b></span>tgt.signature<span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>agent<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>ProvenanceR3, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>Provenance<span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
</span> src.role<span style="color: navy"><b> -> </b></span>tgt.role<span style="color: navy">;</span>
src.who<span style="color: navy"> : </span>uri<b> as </b><span style="color: maroon">vs</span><span style="color: navy"><b> -> </b></span> tgt.who<b> as </b><span style="color: maroon">ref</span><span style="color: navy">, </span> ref.reference = <span style="color: maroon">vs</span><span style="color: navy">, </span> ref.extension<b> as </b><span style="color: maroon">ext</span><span style="color: navy">, </span> ext.url = <span style="color: blue">'http://hl7.org/fhir/3.0/StructureDefinition/BaseType'</span><span style="color: navy">, </span> ext.value = <span style="color: blue">'uri'</span><span style="color: navy">;</span>
src.who<span style="color: navy"> : </span>Reference<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -> </b></span>tgt.who<b> as </b><span style="color: maroon">vt0</span><b> then </b>Reference<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><span style="color: navy">;</span>
src.onBehalfOf<span style="color: navy"> : </span>uri<b> as </b><span style="color: maroon">vs</span><span style="color: navy"><b> -> </b></span> tgt.onBehalfOf<b> as </b><span style="color: maroon">ref</span><span style="color: navy">, </span> ref.reference = <span style="color: maroon">vs</span><span style="color: navy">, </span> ref.extension<b> as </b><span style="color: maroon">ext</span><span style="color: navy">, </span> ext.url = <span style="color: blue">'http://hl7.org/fhir/3.0/StructureDefinition/BaseType'</span><span style="color: navy">, </span> ext.value = <span style="color: blue">'uri'</span><span style="color: navy">;</span>
src.onBehalfOf<span style="color: navy"> : </span>Reference<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -> </b></span>tgt.onBehalfOf<b> as </b><span style="color: maroon">vt0</span><b> then </b>reference<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><span style="color: navy">;</span>
src.relatedAgentType<span style="color: navy"><b> -> </b></span>tgt.type<span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>entity<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>ProvenanceR3, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>Provenance<span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
</span> src.role<span style="color: navy"><b> -> </b></span>tgt.role<span style="color: navy">;</span>
src.what<span style="color: navy"> : </span>uri<b> as </b><span style="color: maroon">vs</span><span style="color: navy"><b> -> </b></span> tgt.what<b> as </b><span style="color: maroon">ref</span><span style="color: navy">, </span> ref.reference = <span style="color: maroon">vs</span><span style="color: navy">, </span> ref.extension<b> as </b><span style="color: maroon">ext</span><span style="color: navy">, </span> ext.url = <span style="color: blue">'http://hl7.org/fhir/3.0/StructureDefinition/BaseType'</span><span style="color: navy">, </span> ext.value = <span style="color: blue">'uri'</span><span style="color: navy">;</span>
src.what<span style="color: navy"> : </span>Reference<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -> </b></span>tgt.what<b> as </b><span style="color: maroon">vt0</span><b> then </b>Reference<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><span style="color: navy">;</span>
src.what<span style="color: navy"> : </span>Identifier<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -> </b></span>tgt.what<b> as </b><span style="color: maroon">vt0</span><b> then </b>Identifier2Reference<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><span style="color: navy">;</span>
src.agent<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -> </b></span>tgt.agent<b> as </b><span style="color: maroon">vt0</span><b> then </b>agent<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><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/Provenance3to4"/>
<version value="0.1.0"/>
<name value="Provenance3to4"/>
<title value="Provenance 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="ProvenanceTransformsR3toR4"/>
<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/Provenance"/>
<mode value="source"/>
<alias value="ProvenanceR3"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/4.0/Provenance"/>
<mode value="target"/>
<alias value="Provenance"/>
</structure>
<import value="http://hl7.org/fhir/StructureMap/*3to4"/>
<group>
<name value="Provenance"/>
<extends value="DomainResource"/>
<typeMode value="type-and-types"/>
<input>
<name value="src"/>
<type value="ProvenanceR3"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="Provenance"/>
<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="period"/>
<source>
<context value="src"/>
<element value="period"/>
<variable value="vs0"/>
</source>
<target>
<context value="tgt"/>
<element value="occurred"/>
<variable value="vt0"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="Period"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</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="reason"/>
<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="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="vs0"/>
</source>
<target>
<context value="tgt"/>
<element value="agent"/>
<variable value="vt0"/>
</target>
<dependent>
<name value="agent"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="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="entity"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</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="agent"/>
<extends value="BackboneElement"/>
<input>
<name value="src"/>
<type value="ProvenanceR3"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="Provenance"/>
<mode value="target"/>
</input>
<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="whoUri"/>
<source>
<context value="src"/>
<type value="uri"/>
<element value="who"/>
<variable value="vs"/>
</source>
<target>
<context value="tgt"/>
<element value="who"/>
<variable value="ref"/>
</target>
<target>
<context value="ref"/>
<element value="reference"/>
<transform value="copy"/>
<parameter>
<valueId value="vs"/>
</parameter>
</target>
<target>
<context value="ref"/>
<element value="extension"/>
<variable value="ext"/>
</target>
<target>
<context value="ext"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://hl7.org/fhir/3.0/StructureDefinition/BaseType"/>
</parameter>
</target>
<target>
<context value="ext"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="whoReference"/>
<source>
<context value="src"/>
<type value="Reference"/>
<element value="who"/>
<variable value="vs0"/>
</source>
<target>
<context value="tgt"/>
<element value="who"/>
<variable value="vt0"/>
</target>
<dependent>
<name value="Reference"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="onBehalfOfUri"/>
<source>
<context value="src"/>
<type value="uri"/>
<element value="onBehalfOf"/>
<variable value="vs"/>
</source>
<target>
<context value="tgt"/>
<element value="onBehalfOf"/>
<variable value="ref"/>
</target>
<target>
<context value="ref"/>
<element value="reference"/>
<transform value="copy"/>
<parameter>
<valueId value="vs"/>
</parameter>
</target>
<target>
<context value="ref"/>
<element value="extension"/>
<variable value="ext"/>
</target>
<target>
<context value="ext"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://hl7.org/fhir/3.0/StructureDefinition/BaseType"/>
</parameter>
</target>
<target>
<context value="ext"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="onBehalfOfReference"/>
<source>
<context value="src"/>
<type value="Reference"/>
<element value="onBehalfOf"/>
<variable value="vs0"/>
</source>
<target>
<context value="tgt"/>
<element value="onBehalfOf"/>
<variable value="vt0"/>
</target>
<dependent>
<name value="reference"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="relatedAgentType"/>
<source>
<context value="src"/>
<element value="relatedAgentType"/>
<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>
</group>
<group>
<name value="entity"/>
<extends value="BackboneElement"/>
<input>
<name value="src"/>
<type value="ProvenanceR3"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="Provenance"/>
<mode value="target"/>
</input>
<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="whatUri"/>
<source>
<context value="src"/>
<type value="uri"/>
<element value="what"/>
<variable value="vs"/>
</source>
<target>
<context value="tgt"/>
<element value="what"/>
<variable value="ref"/>
</target>
<target>
<context value="ref"/>
<element value="reference"/>
<transform value="copy"/>
<parameter>
<valueId value="vs"/>
</parameter>
</target>
<target>
<context value="ref"/>
<element value="extension"/>
<variable value="ext"/>
</target>
<target>
<context value="ext"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://hl7.org/fhir/3.0/StructureDefinition/BaseType"/>
</parameter>
</target>
<target>
<context value="ext"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="whatReference"/>
<source>
<context value="src"/>
<type value="Reference"/>
<element value="what"/>
<variable value="vs0"/>
</source>
<target>
<context value="tgt"/>
<element value="what"/>
<variable value="vt0"/>
</target>
<dependent>
<name value="Reference"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="whatIdentifier"/>
<source>
<context value="src"/>
<type value="Identifier"/>
<element value="what"/>
<variable value="vs0"/>
</source>
<target>
<context value="tgt"/>
<element value="what"/>
<variable value="vt0"/>
</target>
<dependent>
<name value="Identifier2Reference"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="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="agent"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</parameter>
</dependent>
</rule>
</group>
</StructureMap>