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

<StructureMap xmlns="http://hl7.org/fhir" resourceDefinition="http://hl7.org/fhir/StructureDefinition/StructureMap|0.1.0">
  <id value="supplyrequest-transform"/>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap supplyrequest-transform</b></p><a name="supplyrequest-transform"> </a><a name="hcsupplyrequest-transform"> </a><p><b>url</b>: <a href="http://hl7.org/fhir/StructureMap/supplyrequest-transform">Transform from an ActivityDefinition to a SupplyRequest</a></p><p><b>identifier</b>: <a href="http://terminology.hl7.org/7.2.0/NamingSystem-uri.html" title="As defined by RFC 3986 (http://www.ietf.org/rfc/rfc3986.txt)(with many schemes defined in many RFCs). For OIDs and UUIDs, use the URN form (urn:oid:(note: lowercase) and urn:uuid:). See http://www.ietf.org/rfc/rfc3001.txt and http://www.ietf.org/rfc/rfc4122.txt 

This oid is used as an identifier II.root to indicate the the extension is an absolute URI (technically, an IRI). Typically, this is used for OIDs and GUIDs. Note that when this OID is used with OIDs and GUIDs, the II.extension should start with urn:oid or urn:uuid: 

Note that this OID is created to aid with interconversion between CDA and FHIR - FHIR uses urn:ietf:rfc:3986 as equivalent to this OID. URIs as identifiers appear more commonly in FHIR.

This OID may also be used in CD.codeSystem.">Uniform Resource Identifier (URI)</a>/urn:oid:2.16.840.1.113883.4.642.13.1</p><p><b>name</b>: TransformFromAnActivityDefinitionToASupplyRequest</p><p><b>title</b>: Transform from an ActivityDefinition to a SupplyRequest</p><p><b>status</b>: Draft</p><p><b>description</b>: </p><div><p>Transform from an ActivityDefinition to a SupplyRequest</p>
</div><blockquote><p><b>structure</b></p><p><b>url</b>: <a href="http://hl7.org/fhir/R5/activitydefinition.html">ActivityDefinition</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/supplyrequest.html">SupplyRequest</a></p><p><b>mode</b>: Target Structure Definition</p></blockquote><blockquote><p><b>group</b></p><p><b>name</b>: main</p><blockquote><p><b>input</b></p><p><b>name</b>: source</p><p><b>type</b>: ActivityDefinition</p><p><b>mode</b>: Source Instance</p></blockquote><blockquote><p><b>input</b></p><p><b>name</b>: target</p><p><b>type</b>: SupplyRequest</p><p><b>mode</b>: Target Instance</p></blockquote><blockquote><p><b>rule</b></p><p><b>name</b>: status</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>source</td><td>id</td><td>a</td></tr></table><blockquote><p><b>target</b></p><p><b>context</b>: target</p><p><b>element</b>: status</p><p><b>transform</b>: evaluate</p><h3>Parameters</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Value[x]</b></td></tr><tr><td style="display: none">*</td><td>'draft'</td></tr></table></blockquote></blockquote><blockquote><p><b>rule</b></p><p><b>name</b>: category</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>source</td><td>id</td><td>a</td></tr></table><blockquote><p><b>target</b></p><p><b>context</b>: target</p><p><b>element</b>: category</p><p><b>transform</b>: evaluate</p><h3>Parameters</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Value[x]</b></td></tr><tr><td style="display: none">*</td><td>'non-stock'</td></tr></table></blockquote></blockquote><blockquote><p><b>rule</b></p><p><b>name</b>: priority</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>source</td><td>id</td><td>a</td></tr></table><blockquote><p><b>target</b></p><p><b>context</b>: target</p><p><b>element</b>: priority</p><p><b>transform</b>: evaluate</p><h3>Parameters</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Value[x]</b></td></tr><tr><td style="display: none">*</td><td>'routine'</td></tr></table></blockquote></blockquote><blockquote><p><b>rule</b></p><p><b>name</b>: quantity</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>source</td><td>quantity</td><td>a</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>Transform</b></td></tr><tr><td style="display: none">*</td><td>target</td><td>category</td><td>copy</td></tr></table></blockquote><blockquote><p><b>rule</b></p><p><b>name</b>: item</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>source</td><td>code</td><td>a</td></tr></table><blockquote><p><b>target</b></p><p><b>context</b>: target</p><p><b>element</b>: item</p><p><b>variable</b>: b</p><p><b>transform</b>: create</p></blockquote><blockquote><p><b>target</b></p><p><b>context</b>: b</p><p><b>element</b>: concept</p><p><b>transform</b>: copy</p></blockquote></blockquote><blockquote><p><b>rule</b></p><p><b>name</b>: when</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>source</td><td>id</td><td>a</td></tr></table><blockquote><p><b>target</b></p><p><b>context</b>: target</p><p><b>element</b>: occurrence</p><p><b>transform</b>: evaluate</p><h3>Parameters</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Value[x]</b></td></tr><tr><td style="display: none">*</td><td>now()</td></tr></table></blockquote></blockquote><blockquote><p><b>rule</b></p><p><b>name</b>: authoredOn</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>source</td><td>id</td><td>a</td></tr></table><blockquote><p><b>target</b></p><p><b>context</b>: target</p><p><b>element</b>: authoredOn</p><p><b>transform</b>: evaluate</p><h3>Parameters</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Value[x]</b></td></tr><tr><td style="display: none">*</td><td>now()</td></tr></table></blockquote></blockquote></blockquote></div>
  </text>
  <url value="http://hl7.org/fhir/StructureMap/supplyrequest-transform"/>
  <identifier>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:oid:2.16.840.1.113883.4.642.13.1"/>
  </identifier>
  <name value="TransformFromAnActivityDefinitionToASupplyRequest"/>
  <title value="Transform from an ActivityDefinition to a SupplyRequest"/>
  <status value="draft"/>
  <description value="Transform from an ActivityDefinition to a SupplyRequest"/>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
    <mode value="source"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/SupplyRequest"/>
    <mode value="target"/>
  </structure>
  <group>
    <name value="main"/>
    <input>
      <name value="source"/>
      <type value="ActivityDefinition"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="target"/>
      <type value="SupplyRequest"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="status"/>
      <source>
        <context value="source"/>
        <element value="id"/>
        <variable value="a"/>
      </source>
      <target>
        <context value="target"/>
        <element value="status"/>
        <transform value="evaluate"/>
        <parameter>
          <valueString value="'draft'"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="category"/>
      <source>
        <context value="source"/>
        <element value="id"/>
        <variable value="a"/>
      </source>
      <target>
        <context value="target"/>
        <element value="category"/>
        <transform value="evaluate"/>
        <parameter>
          <valueString value="'non-stock'"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="priority"/>
      <source>
        <context value="source"/>
        <element value="id"/>
        <variable value="a"/>
      </source>
      <target>
        <context value="target"/>
        <element value="priority"/>
        <transform value="evaluate"/>
        <parameter>
          <valueString value="'routine'"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="quantity"/>
      <source>
        <context value="source"/>
        <element value="quantity"/>
        <variable value="a"/>
      </source>
      <target>
        <context value="target"/>
        <element value="category"/>
        <transform value="copy"/>
      </target>
    </rule>
    <rule>
      <name value="item"/>
      <source>
        <context value="source"/>
        <element value="code"/>
        <variable value="a"/>
      </source>
      <target>
        <context value="target"/>
        <element value="item"/>
        <variable value="b"/>
        <transform value="create"/>
      </target>
      <target>
        <context value="b"/>
        <element value="concept"/>
        <transform value="copy"/>
      </target>
    </rule>
    <rule>
      <name value="when"/>
      <source>
        <context value="source"/>
        <element value="id"/>
        <variable value="a"/>
      </source>
      <target>
        <context value="target"/>
        <element value="occurrence"/>
        <transform value="evaluate"/>
        <parameter>
          <valueString value="now()"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="authoredOn"/>
      <source>
        <context value="source"/>
        <element value="id"/>
        <variable value="a"/>
      </source>
      <target>
        <context value="target"/>
        <element value="authoredOn"/>
        <transform value="evaluate"/>
        <parameter>
          <valueString value="now()"/>
        </parameter>
      </target>
    </rule>
  </group>
</StructureMap>