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

: DocumentManifest Transforms: R4 to R3 - XML Representation

Page standards status: Draft Maturity Level: 1

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="Manifest4to3"/>
  <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/DocumentManifest4to3'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'Manifest4to3'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'DocumentManifest Transforms: R4 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/4.0/DocumentManifest<span style="color: navy">&quot; </span><b>alias </b>DocumentManifest <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/3.0/DocumentManifest<span style="color: navy">&quot; </span><b>alias </b>DocumentManifestR3 <b>as </b><b>target</b>

<b>imports</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/StructureMap/*4to3<span style="color: navy">&quot;
</span>
<b>group </b>DocumentManifest<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>DocumentManifestR3, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>DocumentManifest<span style="color: navy">)</span><b> extends </b>DomainResource<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.masterIdentifier<span style="color: navy"><b> -&gt; </b></span>tgt.masterIdentifier<span style="color: navy">;</span>
  src.identifier<span style="color: navy"><b> -&gt; </b></span>tgt.identifier<span style="color: navy">;</span>
  src.status<span style="color: navy"><b> -&gt; </b></span>tgt.status<span style="color: navy">;</span>
  src.type<span style="color: navy"><b> -&gt; </b></span>tgt.type<span style="color: navy">;</span>
  src.subject<span style="color: navy"><b> -&gt; </b></span>tgt.subject<span style="color: navy">;</span>
  src.created<span style="color: navy"><b> -&gt; </b></span>tgt.created<span style="color: navy">;</span>
  src.agent<b> as </b><span style="color: maroon">s</span><b> where </b>type.coding.where((system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType') and (code = 'AUT')).exists()<span style="color: navy"><b> -&gt; </b></span>tgt.author<b> as </b><span style="color: maroon">t</span><b> then </b>DocumentManifestAgent<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.recipient<span style="color: navy"><b> -&gt; </b></span>tgt.recipient<span style="color: navy">;</span>
  src.source<span style="color: navy"><b> -&gt; </b></span>tgt.source<span style="color: navy">;</span>
  src.description<span style="color: navy"><b> -&gt; </b></span>tgt.description<span style="color: navy">;</span>
  src.content<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.content<b> as </b><span style="color: maroon">t</span><b> then </b>content<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.related<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.related<b> as </b><span style="color: maroon">t</span><b> then </b>DocumentManifestRelated<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>DocumentManifestAgent<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.who<b> as </b><span style="color: maroon">vs0</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">tgt</span><span style="color: navy">)</span><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>content<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.extension<b> as </b><span style="color: maroon">s</span><b> where </b>url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-DocumentManifest.content.p_Attachment'<b> then </b>contentAttachment<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">tgt</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src<b> where </b>extension.where(url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-DocumentManifest.content.p_Attachment').empty()<span style="color: navy"><b> -&gt; </b></span>tgt.p = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Reference'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">p</span><b> then </b>Reference<span style="color: navy">(</span><span style="color: maroon">src</span><span style="color: navy">, </span><span style="color: maroon">p</span><span style="color: navy">)</span> <i>&quot;attachment&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>contentAttachment<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.value<span style="color: navy"> : </span>Attachment<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.p = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Attachment'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">t</span><b> then </b>Attachment<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>DocumentManifestRelated<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.identifier<span style="color: navy"><b> -&gt; </b></span>tgt.identifier<span style="color: navy">;</span>
  src.ref<span style="color: navy"><b> -&gt; </b></span>tgt.ref<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/DocumentManifest4to3"/>
  <version value="0.1.0"/>
  <name value="Manifest4to3"/>
  <title value="DocumentManifest Transforms: R4 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="DocumentManifestTransformsR4toR3"/>
  <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/DocumentManifest"/>
    <mode value="source"/>
    <alias value="DocumentManifest"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/3.0/DocumentManifest"/>
    <mode value="target"/>
    <alias value="DocumentManifestR3"/>
  </structure>
  <import value="http://hl7.org/fhir/StructureMap/*4to3"/>
  <group>
    <name value="DocumentManifest"/>
    <extends value="DomainResource"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="DocumentManifestR3"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="DocumentManifest"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="masterIdentifier"/>
      <source>
        <context value="src"/>
        <element value="masterIdentifier"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="masterIdentifier"/>
        <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="identifier"/>
      <source>
        <context value="src"/>
        <element value="identifier"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="identifier"/>
        <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="status"/>
      <source>
        <context value="src"/>
        <element value="status"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="status"/>
        <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="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="subject"/>
      <source>
        <context value="src"/>
        <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="created"/>
      <source>
        <context value="src"/>
        <element value="created"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="created"/>
        <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"/>
        <condition
                   value="type.coding.where((system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType') and (code = 'AUT')).exists()"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="author"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="DocumentManifestAgent"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="recipient"/>
      <source>
        <context value="src"/>
        <element value="recipient"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="recipient"/>
        <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="source"/>
      <source>
        <context value="src"/>
        <element value="source"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="source"/>
        <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="description"/>
      <source>
        <context value="src"/>
        <element value="description"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="description"/>
        <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="content"/>
      <source>
        <context value="src"/>
        <element value="content"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="content"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="content"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="related"/>
      <source>
        <context value="src"/>
        <element value="related"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="related"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="DocumentManifestRelated"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="DocumentManifestAgent"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="who"/>
      <source>
        <context value="src"/>
        <element value="who"/>
        <variable value="vs0"/>
      </source>
      <dependent>
        <name value="Reference"/>
        <parameter>
          <valueId value="vs0"/>
        </parameter>
        <parameter>
          <valueId value="tgt"/>
        </parameter>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="content"/>
    <extends value="Element"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="extension"/>
      <source>
        <context value="src"/>
        <element value="extension"/>
        <variable value="s"/>
        <condition
                   value="url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-DocumentManifest.content.p_Attachment'"/>
      </source>
      <dependent>
        <name value="contentAttachment"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="tgt"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="attachment"/>
      <source>
        <context value="src"/>
        <condition
                   value="extension.where(url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-DocumentManifest.content.p_Attachment').empty()"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="p"/>
        <variable value="p"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Reference"/>
        </parameter>
      </target>
      <dependent>
        <name value="Reference"/>
        <parameter>
          <valueId value="src"/>
        </parameter>
        <parameter>
          <valueId value="p"/>
        </parameter>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="contentAttachment"/>
    <extends value="Element"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="valueAttachment"/>
      <source>
        <context value="src"/>
        <type value="Attachment"/>
        <element value="value"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="p"/>
        <variable value="t"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Attachment"/>
        </parameter>
      </target>
      <dependent>
        <name value="Attachment"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="DocumentManifestRelated"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="identifier"/>
      <source>
        <context value="src"/>
        <element value="identifier"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="identifier"/>
        <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="ref"/>
      <source>
        <context value="src"/>
        <element value="ref"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="ref"/>
        <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>