US Veterans Health Administration FHIR Map Set Implementation Guide
2.5.0 - 260401a United States of America flag

US Veterans Health Administration FHIR Map Set Implementation Guide - Downloaded Version 2.5.0 See the Directory of published versions

: Vpr2DocumentReferenceDocumentReference - XML Representation

Draft as of 2026-03-31

Raw xml | Download


<StructureMap xmlns="http://hl7.org/fhir">
  <id value="Vpr2DocumentReferenceDocumentReference"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap Vpr2DocumentReferenceDocumentReference</b></p><a name="Vpr2DocumentReferenceDocumentReference"> </a><a name="hcVpr2DocumentReferenceDocumentReference"> </a><pre class="fml">
<b>map</b><span style="color: navy"> &quot;</span>http://va.gov/fhir/StructureMap/Vpr2DocumentReferenceDocumentReference<span style="color: navy">&quot; = &quot;</span>Vpr2DocumentReferenceDocumentReference<span style="color: navy">&quot;

</span><b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-VprDocument.html" title="VPR document">http://va.gov/fhir/StructureDefinition/VprDocument</a><span style="color: navy">&quot; </span><b>alias </b>VprDocument <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-DocumentReferenceDocumentReference.html" title="Document Reference DocumentReference">http://va.gov/fhir/StructureDefinition/DocumentReferenceDocumentReference</a><span style="color: navy">&quot; </span><b>alias </b>DocumentReferenceDocumentReference <b>as </b><b>target</b>

<b>group </b>map<span style="color: navy">(</span><b>source</b> <span style="color: maroon">document</span><span style="color: navy"> : </span>VprDocument, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>DocumentReferenceDocumentReference<span style="color: navy">)</span><b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  document.status<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.docStatus = <span style="color: maroon">v</span><span style="color: navy">;</span>
  document.clinician<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.author = <span style="color: maroon">v</span><span style="color: navy">;</span>
  document.parent<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span> tgt.relatesTo<b> as </b><span style="color: maroon">r0</span><span style="color: navy">, </span> r0.target = <span style="color: maroon">v</span><span style="color: navy">, </span> r0.code = <span style="color: blue">'#appends'</span><span style="color: navy">;</span>
  document.subject<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.description = <span style="color: maroon">v</span><span style="color: navy">;</span>
  document.content<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span> tgt.content<b> as </b><span style="color: maroon">c0</span><span style="color: navy">, </span> c0.attachment<b> as </b><span style="color: maroon">a1</span><span style="color: navy">, </span> a1.url = <span style="color: maroon">v</span><span style="color: navy">;</span>
  document.content<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span> tgt.content<b> as </b><span style="color: maroon">c0</span><span style="color: navy">, </span> c0.attachment<b> as </b><span style="color: maroon">a1</span><span style="color: navy">, </span> a1.size = <span style="color: maroon">v</span><span style="color: navy">;</span>
  document.content<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span> tgt.content<b> as </b><span style="color: maroon">c0</span><span style="color: navy">, </span> c0.attachment<b> as </b><span style="color: maroon">a1</span><span style="color: navy">, </span> a1.hash = <span style="color: maroon">v</span><span style="color: navy">;</span>
  document.encounter<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span> tgt.context<b> as </b><span style="color: maroon">c0</span><span style="color: navy">, </span> c0.encounter = <span style="color: maroon">v</span><span style="color: navy">;</span>
  document.facility<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span> tgt.context<b> as </b><span style="color: maroon">c0</span><span style="color: navy">, </span> c0.facilityType = <span style="color: maroon">v</span><span style="color: navy">;</span>
<span style="color: navy">}

</span></pre></div>
  </text>
  <url
       value="http://va.gov/fhir/StructureMap/Vpr2DocumentReferenceDocumentReference"/>
  <version value="2.5.0"/>
  <name value="Vpr2DocumentReferenceDocumentReference"/>
  <status value="draft"/>
  <date value="2026-03-31T16:09:38+00:00"/>
  <publisher value="VA"/>
  <contact>
    <name value="VA"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.va.gov"/>
    </telecom>
  </contact>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="US"/>
      <display value="United States of America"/>
    </coding>
  </jurisdiction>
  <structure>
    <url value="http://va.gov/fhir/StructureDefinition/VprDocument"/>
    <mode value="source"/>
    <alias value="VprDocument"/>
  </structure>
  <structure>
    <url
         value="http://va.gov/fhir/StructureDefinition/DocumentReferenceDocumentReference"/>
    <mode value="target"/>
    <alias value="DocumentReferenceDocumentReference"/>
  </structure>
  <group>
    <name value="map"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="document"/>
      <type value="VprDocument"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="DocumentReferenceDocumentReference"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="status"/>
      <source>
        <context value="document"/>
        <element value="status"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="docStatus"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="clinician"/>
      <source>
        <context value="document"/>
        <element value="clinician"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="author"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="parent"/>
      <source>
        <context value="document"/>
        <element value="parent"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="relatesTo"/>
        <variable value="r0"/>
      </target>
      <target>
        <context value="r0"/>
        <contextType value="variable"/>
        <element value="target"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
      <target>
        <context value="r0"/>
        <contextType value="variable"/>
        <element value="code"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="#appends"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="subject"/>
      <source>
        <context value="document"/>
        <element value="subject"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="description"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="content"/>
      <source>
        <context value="document"/>
        <element value="content"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="content"/>
        <variable value="c0"/>
      </target>
      <target>
        <context value="c0"/>
        <contextType value="variable"/>
        <element value="attachment"/>
        <variable value="a1"/>
      </target>
      <target>
        <context value="a1"/>
        <contextType value="variable"/>
        <element value="url"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="content"/>
      <source>
        <context value="document"/>
        <element value="content"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="content"/>
        <variable value="c0"/>
      </target>
      <target>
        <context value="c0"/>
        <contextType value="variable"/>
        <element value="attachment"/>
        <variable value="a1"/>
      </target>
      <target>
        <context value="a1"/>
        <contextType value="variable"/>
        <element value="size"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="content"/>
      <source>
        <context value="document"/>
        <element value="content"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="content"/>
        <variable value="c0"/>
      </target>
      <target>
        <context value="c0"/>
        <contextType value="variable"/>
        <element value="attachment"/>
        <variable value="a1"/>
      </target>
      <target>
        <context value="a1"/>
        <contextType value="variable"/>
        <element value="hash"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="encounter"/>
      <source>
        <context value="document"/>
        <element value="encounter"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="context"/>
        <variable value="c0"/>
      </target>
      <target>
        <context value="c0"/>
        <contextType value="variable"/>
        <element value="encounter"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="facility"/>
      <source>
        <context value="document"/>
        <element value="facility"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="context"/>
        <variable value="c0"/>
      </target>
      <target>
        <context value="c0"/>
        <contextType value="variable"/>
        <element value="facilityType"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
</StructureMap>