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

: DocumentReference Transforms: R3 to R2 - XML Representation

Page standards status: Draft Maturity Level: 1

Raw xml | Download



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

<b>imports</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/StructureMap/*3to2<span style="color: navy">&quot;
</span>
<b>group </b>DocumentReference<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>DocumentReference, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>DocumentReferenceR2<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 <i>&quot;DocumentReference-masterIdentifier&quot;</i><span style="color: navy">;</span>
  src.identifier<span style="color: navy"><b> -&gt; </b></span>tgt.identifier <i>&quot;DocumentReference-identifier&quot;</i><span style="color: navy">;</span>
  src.subject<span style="color: navy"><b> -&gt; </b></span>tgt.subject <i>&quot;DocumentReference-subject&quot;</i><span style="color: navy">;</span>
  src.type<span style="color: navy"><b> -&gt; </b></span>tgt.type <i>&quot;DocumentReference-type&quot;</i><span style="color: navy">;</span>
  src.class<span style="color: navy"><b> -&gt; </b></span>tgt.class <i>&quot;DocumentReference-class&quot;</i><span style="color: navy">;</span>
  src.author<span style="color: navy"><b> -&gt; </b></span>tgt.author <i>&quot;DocumentReference-author&quot;</i><span style="color: navy">;</span>
  src.custodian<span style="color: navy"><b> -&gt; </b></span>tgt.custodian <i>&quot;DocumentReference-custodian&quot;</i><span style="color: navy">;</span>
  src.authenticator<span style="color: navy"><b> -&gt; </b></span>tgt.authenticator <i>&quot;DocumentReference-authenticator&quot;</i><span style="color: navy">;</span>
  src.created<span style="color: navy"><b> -&gt; </b></span>tgt.created <i>&quot;DocumentReference-created&quot;</i><span style="color: navy">;</span>
  src.indexed<span style="color: navy"><b> -&gt; </b></span>tgt.indexed <i>&quot;DocumentReference-indexed&quot;</i><span style="color: navy">;</span>
  src.status<span style="color: navy"><b> -&gt; </b></span>tgt.status <i>&quot;DocumentReference-status&quot;</i><span style="color: navy">;</span>
  src.docStatus<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.docStatus = <b>cc</b><span style="color: navy">(</span><span style="color: blue">'http://hl7.org/fhir/composition-status'</span><span style="color: navy">, </span><span style="color: maroon">c</span><span style="color: navy">)</span> <i>&quot;DocumentReference-docStatus&quot;</i><span style="color: navy">;</span>
  src.relatesTo<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -&gt; </b></span>tgt.relatesTo<b> as </b><span style="color: maroon">vt0</span><b> then </b>drRelatesTo<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;DocumentReference-relatesTo&quot;</i><span style="color: navy">;</span>
  src.description<span style="color: navy"><b> -&gt; </b></span>tgt.description <i>&quot;DocumentReference-description&quot;</i><span style="color: navy">;</span>
  src.securityLabel<span style="color: navy"><b> -&gt; </b></span>tgt.securityLabel <i>&quot;DocumentReference-securityLabel&quot;</i><span style="color: navy">;</span>
  src.content<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -&gt; </b></span>tgt.content<b> as </b><span style="color: maroon">vt0</span><b> then </b>drContent<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;DocumentReference-content&quot;</i><span style="color: navy">;</span>
  src.context<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -&gt; </b></span>tgt.context<b> as </b><span style="color: maroon">vt0</span><b> then </b>drContext<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;DocumentReference-context&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>drRelatesTo<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.code<span style="color: navy"><b> -&gt; </b></span>tgt.code <i>&quot;relatesTo-code&quot;</i><span style="color: navy">;</span>
  src.target<span style="color: navy"><b> -&gt; </b></span>tgt.target <i>&quot;relatesTo-target&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>drContent<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.attachment<span style="color: navy"><b> -&gt; </b></span>tgt.attachment <i>&quot;content-attachment&quot;</i><span style="color: navy">;</span>
  src.format<span style="color: navy"><b> -&gt; </b></span>tgt.format <i>&quot;content-format&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>drContext<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.encounter<span style="color: navy"><b> -&gt; </b></span>tgt.encounter <i>&quot;context-encounter&quot;</i><span style="color: navy">;</span>
  src.event<span style="color: navy"><b> -&gt; </b></span>tgt.event <i>&quot;context-event&quot;</i><span style="color: navy">;</span>
  src.period<span style="color: navy"><b> -&gt; </b></span>tgt.period <i>&quot;context-period&quot;</i><span style="color: navy">;</span>
  src.facilityType<span style="color: navy"><b> -&gt; </b></span>tgt.facilityType <i>&quot;context-facilityType&quot;</i><span style="color: navy">;</span>
  src.practiceSetting<span style="color: navy"><b> -&gt; </b></span>tgt.practiceSetting <i>&quot;context-practiceSetting&quot;</i><span style="color: navy">;</span>
  src.sourcePatientInfo<span style="color: navy"><b> -&gt; </b></span>tgt.sourcePatientInfo <i>&quot;context-sourcePatientInfo&quot;</i><span style="color: navy">;</span>
  src.related<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -&gt; </b></span>tgt.related<b> as </b><span style="color: maroon">vt0</span><b> then </b>drrelated<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;context-related&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>drrelated<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 <i>&quot;related-identifier&quot;</i><span style="color: navy">;</span>
  src.ref<span style="color: navy"><b> -&gt; </b></span>tgt.ref <i>&quot;related-ref&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/DocumentReference3to2"/>
  <version value="0.1.0"/>
  <name value="DocumentReference3to2"/>
  <title value="DocumentReference Transforms: R3 to R2"/>
  <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="DocumentReferenceTransformsR3toR2"/>
  <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/DocumentReference"/>
    <mode value="source"/>
    <alias value="DocumentReference"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/1.0/DocumentReference"/>
    <mode value="target"/>
    <alias value="DocumentReferenceR2"/>
  </structure>
  <import value="http://hl7.org/fhir/StructureMap/*3to2"/>
  <group>
    <name value="DocumentReference"/>
    <extends value="DomainResource"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="DocumentReference"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="DocumentReferenceR2"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="DocumentReference-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="DocumentReference-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="DocumentReference-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="DocumentReference-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="DocumentReference-class"/>
      <source>
        <context value="src"/>
        <element value="class"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="class"/>
        <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="DocumentReference-author"/>
      <source>
        <context value="src"/>
        <element value="author"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="author"/>
        <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="DocumentReference-custodian"/>
      <source>
        <context value="src"/>
        <element value="custodian"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="custodian"/>
        <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="DocumentReference-authenticator"/>
      <source>
        <context value="src"/>
        <element value="authenticator"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="authenticator"/>
        <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="DocumentReference-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="DocumentReference-indexed"/>
      <source>
        <context value="src"/>
        <element value="indexed"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="indexed"/>
        <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="DocumentReference-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="DocumentReference-docStatus"/>
      <source>
        <context value="src"/>
        <element value="docStatus"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="docStatus"/>
        <transform value="cc"/>
        <parameter>
          <valueString value="http://hl7.org/fhir/composition-status"/>
        </parameter>
        <parameter>
          <valueId value="c"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="DocumentReference-relatesTo"/>
      <source>
        <context value="src"/>
        <element value="relatesTo"/>
        <variable value="vs0"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="relatesTo"/>
        <variable value="vt0"/>
      </target>
      <dependent>
        <name value="drRelatesTo"/>
        <parameter>
          <valueId value="vs0"/>
        </parameter>
        <parameter>
          <valueId value="vt0"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="DocumentReference-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="DocumentReference-securityLabel"/>
      <source>
        <context value="src"/>
        <element value="securityLabel"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="securityLabel"/>
        <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="DocumentReference-content"/>
      <source>
        <context value="src"/>
        <element value="content"/>
        <variable value="vs0"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="content"/>
        <variable value="vt0"/>
      </target>
      <dependent>
        <name value="drContent"/>
        <parameter>
          <valueId value="vs0"/>
        </parameter>
        <parameter>
          <valueId value="vt0"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="DocumentReference-context"/>
      <source>
        <context value="src"/>
        <element value="context"/>
        <variable value="vs0"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="context"/>
        <variable value="vt0"/>
      </target>
      <dependent>
        <name value="drContext"/>
        <parameter>
          <valueId value="vs0"/>
        </parameter>
        <parameter>
          <valueId value="vt0"/>
        </parameter>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="drRelatesTo"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="relatesTo-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>
    <rule>
      <name value="relatesTo-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>
  </group>
  <group>
    <name value="drContent"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="content-attachment"/>
      <source>
        <context value="src"/>
        <element value="attachment"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="attachment"/>
        <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-format"/>
      <source>
        <context value="src"/>
        <element value="format"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="format"/>
        <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="drContext"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="context-encounter"/>
      <source>
        <context value="src"/>
        <element value="encounter"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="encounter"/>
        <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="context-event"/>
      <source>
        <context value="src"/>
        <element value="event"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="event"/>
        <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="context-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="context-facilityType"/>
      <source>
        <context value="src"/>
        <element value="facilityType"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="facilityType"/>
        <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="context-practiceSetting"/>
      <source>
        <context value="src"/>
        <element value="practiceSetting"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="practiceSetting"/>
        <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="context-sourcePatientInfo"/>
      <source>
        <context value="src"/>
        <element value="sourcePatientInfo"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="sourcePatientInfo"/>
        <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="context-related"/>
      <source>
        <context value="src"/>
        <element value="related"/>
        <variable value="vs0"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="related"/>
        <variable value="vt0"/>
      </target>
      <dependent>
        <name value="drrelated"/>
        <parameter>
          <valueId value="vs0"/>
        </parameter>
        <parameter>
          <valueId value="vt0"/>
        </parameter>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="drrelated"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="related-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="related-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>