<?xml version="1.0" encoding="UTF-8"?>

<StructureMap xmlns="http://hl7.org/fhir" resourceDefinition="http://hl7.org/fhir/StructureDefinition/StructureMap|0.1.0">
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap TransformEvaluate</b></p><a name="TransformEvaluate"> </a><a name="hcTransformEvaluate"> </a><p><b>url</b>: <a href="http://hl7.org/fhir/uv/fml/StructureMap/TransformEvaluate">http://hl7.org/fhir/uv/fml/StructureMap/TransformEvaluate</a></p><p><b>name</b>: TransformEvaluate</p><p><b>status</b>: Active</p><p><b>description</b>: </p><div><p>Example demonstrating the evaluate transform to execute a FHIRPath expression</p>
</div><blockquote><p><b>structure</b></p><p><b>url</b>: <a href="http://hl7.org/fhir/R5/patient.html">Patient</a></p><p><b>mode</b>: Source Structure Definition</p></blockquote><blockquote><p><b>structure</b></p><p><b>url</b>: <a href="http://hl7.org/fhir/R5/patient.html">Patient</a></p><p><b>mode</b>: Target Structure Definition</p></blockquote><blockquote><p><b>group</b></p><p><b>name</b>: TransformEvaluate</p><blockquote><p><b>input</b></p><p><b>mode</b>: Source Instance</p><p><b>name</b>: src</p><p><b>type</b>: Patient</p></blockquote><blockquote><p><b>input</b></p><p><b>mode</b>: Target Instance</p><p><b>name</b>: tgt</p><p><b>type</b>: Patient</p></blockquote><blockquote><p><b>rule</b></p><h3>Sources</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Context</b></td><td><b>Element</b></td><td><b>Variable</b></td></tr><tr><td style="display: none">*</td><td>src</td><td>name</td><td>v</td></tr></table><h3>Targets</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Context</b></td><td><b>Element</b></td><td><b>Variable</b></td></tr><tr><td style="display: none">*</td><td>tgt</td><td>name</td><td>tn</td></tr></table><blockquote><p><b>rule</b></p><h3>Sources</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Context</b></td></tr><tr><td style="display: none">*</td><td>v</td></tr></table><blockquote><p><b>target</b></p><p><b>context</b>: tn</p><p><b>element</b>: text</p><p><b>transform</b>: evaluate</p><blockquote><p><b>parameter</b></p><p><b>value</b>: v</p></blockquote><blockquote><p><b>parameter</b></p><p><b>value</b>: surname + ', ' &amp; given.join(' ')</p></blockquote></blockquote><p><b>documentation</b>: Replace the individual properties into text using FHIRPath</p><p><b>name</b>: r2</p></blockquote><p><b>name</b>: r1</p></blockquote></blockquote></div>
  </text>
  <url value="http://hl7.org/fhir/uv/fml/StructureMap/TransformEvaluate"/>
  <name value="TransformEvaluate"/>
  <status value="active"/>
  <description value="Example demonstrating the evaluate transform to execute a FHIRPath expression"/>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Patient"/>
    <mode value="source"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Patient"/>
    <mode value="target"/>
  </structure>
  <group>
    <name value="TransformEvaluate"/>
    <input>
      <mode value="source"/>
      <name value="src"/>
      <type value="Patient"/>
    </input>
    <input>
      <mode value="target"/>
      <name value="tgt"/>
      <type value="Patient"/>
    </input>
    <rule>
      <source>
        <context value="src"/>
        <element value="name"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="name"/>
        <variable value="tn"/>
      </target>
      <rule>
        <source>
          <context value="v"/>
        </source>
        <target>
          <context value="tn"/>
          <element value="text"/>
          <transform value="evaluate"/>
          <parameter>
            <valueId value="v"/>
          </parameter>
          <parameter>
            <valueString value="surname + ', ' &amp; given.join(' ')"/>
          </parameter>
        </target>
        <documentation value="Replace the individual properties into text using FHIRPath"/>
        <name value="r2"/>
      </rule>
      <name value="r1"/>
    </rule>
  </group>
  <id value="TransformEvaluate"/>
</StructureMap>