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
Page standards status: Draft | Maturity Level: 1 |
<StructureMap xmlns="http://hl7.org/fhir">
<id value="MedicationOrder2to3"/>
<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/MedicationOrder2to3'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'MedicationOrder2to3'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'MedicationOrder Transforms: R2 to R3'</span>
<span style="color: #cc00cc">/// <b>status</b> = </span><span style="color: blue">'active'</span>
<b>uses</b><span style="color: navy"> "</span>http://hl7.org/fhir/1.0/MedicationOrder<span style="color: navy">" </span><b>alias </b>MedicationOrderR2 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> "</span>http://hl7.org/fhir/3.0/MedicationRequest<span style="color: navy">" </span><b>alias </b>MedicationRequest <b>as </b><b>target</b>
<b>imports</b><span style="color: navy"> "</span>http://hl7.org/fhir/StructureMap/*2to3<span style="color: navy">"
</span>
<b>group </b>MedicationOrder<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>MedicationOrderR2, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>MedicationRequest<span style="color: navy">)</span><b> extends </b>DomainResource<b> <<type+>></b><span style="color: navy"> {
</span> src<span style="color: navy"><b> -> </b></span>tgt.intent = <span style="color: blue">'order'</span> <i>"MedicationOrder-intent"</i><span style="color: navy">;</span>
src.identifier<span style="color: navy"><b> -> </b></span>tgt.identifier <i>"MedicationOrder-identifier"</i><span style="color: navy">;</span>
src.dateWritten<span style="color: navy"><b> -> </b></span>tgt.authoredOn <i>"MedicationOrder-dateWritten"</i><span style="color: navy">;</span>
src.status<span style="color: navy"><b> -> </b></span>tgt.status <i>"MedicationOrder-status"</i><span style="color: navy">;</span>
src.patient<span style="color: navy"><b> -> </b></span>tgt.subject <i>"MedicationOrder-patient"</i><span style="color: navy">;</span>
src<b> where </b>prescriber.exists()<span style="color: navy"><b> -> </b></span>tgt.requester<b> as </b><span style="color: maroon">vt</span><b> then </b>medRequestor<span style="color: navy">(</span><span style="color: maroon">src</span><span style="color: navy">, </span><span style="color: maroon">vt</span><span style="color: navy">)</span> <i>"MedicationOrder-prescriber"</i><span style="color: navy">;</span>
src.encounter<span style="color: navy"><b> -> </b></span>tgt.context <i>"MedicationOrder-encounter"</i><span style="color: navy">;</span>
src.reason<b> where </b>$this is CodeableConcept<span style="color: navy"><b> -> </b></span>tgt.reasonCode <i>"MedicationOrder-reasonCode"</i><span style="color: navy">;</span>
src.reason<b> where </b>$this is Reference<span style="color: navy"><b> -> </b></span>tgt.reasonReference <i>"MedicationOrder-reasonCode"</i><span style="color: navy">;</span>
src.note<span style="color: navy"><b> -> </b></span>tgt.note <i>"MedicationOrder-note"</i><span style="color: navy">;</span>
src.medication<span style="color: navy"><b> -> </b></span>tgt.medication <i>"MedicationOrder-medication"</i><span style="color: navy">;</span>
src.dosageInstruction<b> as </b><span style="color: maroon">vs</span><span style="color: navy"><b> -> </b></span>tgt.dosageInstruction<b> as </b><span style="color: maroon">vt</span><b> then </b>medDosageInstruction<span style="color: navy">(</span><span style="color: maroon">vs</span><span style="color: navy">, </span><span style="color: maroon">vt</span><span style="color: navy">)</span> <i>"MedicationOrder-dosageInstruction"</i><span style="color: navy">;</span>
src.dispenseRequest<b> as </b><span style="color: maroon">vs</span><b> check </b>medication.empty()<span style="color: navy"><b> -> </b></span>tgt.dispenseRequest<b> as </b><span style="color: maroon">vt</span><b> then </b>medDispenseRequest<span style="color: navy">(</span><span style="color: maroon">vs</span><span style="color: navy">, </span><span style="color: maroon">vt</span><span style="color: navy">)</span> <i>"MedicationOrder-dispenseRequest"</i><span style="color: navy">;</span>
src.substitution<b> as </b><span style="color: maroon">vs</span><span style="color: navy"><b> -> </b></span>tgt.substitution<b> as </b><span style="color: maroon">vt</span><b> then </b>medSubstitution<span style="color: navy">(</span><span style="color: maroon">vs</span><span style="color: navy">, </span><span style="color: maroon">vt</span><span style="color: navy">)</span> <i>"MedicationOrder-substitution"</i><span style="color: navy">;</span>
src.priorPrescription<span style="color: navy"><b> -> </b></span>tgt.priorPrescription <i>"MedicationOrder-priorPrescription"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>medDosageInstruction<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.text<span style="color: navy"><b> -> </b></span>tgt.text <i>"dosage-text"</i><span style="color: navy">;</span>
src.additionalInstructions<span style="color: navy"><b> -> </b></span>tgt.additionalInstruction <i>"dosage-additionalInstructions"</i><span style="color: navy">;</span>
src.timing<span style="color: navy"><b> -> </b></span>tgt.timing <i>"dosage-timing"</i><span style="color: navy">;</span>
src.asNeeded<span style="color: navy"><b> -> </b></span>tgt.asNeeded <i>"dosage-asNeeded"</i><span style="color: navy">;</span>
src.site<b> where </b>$this is CodeableConcept<span style="color: navy"><b> -> </b></span>tgt.site <i>"dosage-site"</i><span style="color: navy">;</span>
src.route<span style="color: navy"><b> -> </b></span>tgt.route <i>"dosage-route"</i><span style="color: navy">;</span>
src.method<span style="color: navy"><b> -> </b></span>tgt.method <i>"dosage-method"</i><span style="color: navy">;</span>
src.dose<span style="color: navy"><b> -> </b></span>tgt.dose <i>"dosage-dose"</i><span style="color: navy">;</span>
src.rate<span style="color: navy"><b> -> </b></span>tgt.rate <i>"dosage-rate"</i><span style="color: navy">;</span>
src.maxDosePerPeriod<span style="color: navy"><b> -> </b></span>tgt.maxDosePerPeriod <i>"dosage-maxDosePerPeriod"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>medDispenseRequest<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.validityPeriod<span style="color: navy"><b> -> </b></span>tgt.validityPeriod <i>"dispenseRequest-validityPeriod"</i><span style="color: navy">;</span>
src.numberOfRepeatsAllowed<span style="color: navy"><b> -> </b></span>tgt.numberOfRepeatsAllowed <i>"dispenseRequest-numberOfRepeatsAllowed"</i><span style="color: navy">;</span>
src.quantity<span style="color: navy"><b> -> </b></span>tgt.quantity <i>"dispenseRequest-quantity"</i><span style="color: navy">;</span>
src.expectedSupplyDuration<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -> </b></span>tgt.expectedSupplyDuration<b> as </b><span style="color: maroon">d</span><b> then </b>QuantityToDuration<span style="color: navy">(</span><span style="color: maroon">v</span><span style="color: navy">, </span><span style="color: maroon">d</span><span style="color: navy">)</span> <i>"dispenseRequest-expectedSupplyDuration"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>medSubstitution<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.reason<span style="color: navy"><b> -> </b></span>tgt.reason <i>"substitution-reason"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>medRequestor<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><span style="color: navy"> {
</span> src.prescriber<span style="color: navy"><b> -> </b></span>tgt.agent <i>"MedicationOrder-prescriber2"</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/MedicationOrder2to3"/>
<version value="0.1.0"/>
<name value="MedicationOrder2to3"/>
<title value="MedicationOrder Transforms: R2 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="MedicationOrderTransformsR2toR3"/>
<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/1.0/MedicationOrder"/>
<mode value="source"/>
<alias value="MedicationOrderR2"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/3.0/MedicationRequest"/>
<mode value="target"/>
<alias value="MedicationRequest"/>
</structure>
<import value="http://hl7.org/fhir/StructureMap/*2to3"/>
<group>
<name value="MedicationOrder"/>
<extends value="DomainResource"/>
<typeMode value="type-and-types"/>
<input>
<name value="src"/>
<type value="MedicationOrderR2"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="MedicationRequest"/>
<mode value="target"/>
</input>
<rule>
<name value="MedicationOrder-intent"/>
<source>
<context value="src"/>
</source>
<target>
<context value="tgt"/>
<element value="intent"/>
<transform value="copy"/>
<parameter>
<valueString value="order"/>
</parameter>
</target>
</rule>
<rule>
<name value="MedicationOrder-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="MedicationOrder-dateWritten"/>
<source>
<context value="src"/>
<element value="dateWritten"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="authoredOn"/>
<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="MedicationOrder-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="MedicationOrder-patient"/>
<source>
<context value="src"/>
<element value="patient"/>
<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="MedicationOrder-prescriber"/>
<source>
<context value="src"/>
<condition value="prescriber.exists()"/>
</source>
<target>
<context value="tgt"/>
<element value="requester"/>
<variable value="vt"/>
</target>
<dependent>
<name value="medRequestor"/>
<parameter>
<valueId value="src"/>
</parameter>
<parameter>
<valueId value="vt"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationOrder-encounter"/>
<source>
<context value="src"/>
<element value="encounter"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="context"/>
<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="MedicationOrder-reasonCode"/>
<source>
<context value="src"/>
<element value="reason"/>
<variable value="vvv"/>
<condition value="$this is CodeableConcept"/>
</source>
<target>
<context value="tgt"/>
<element value="reasonCode"/>
<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="MedicationOrder-reasonCode"/>
<source>
<context value="src"/>
<element value="reason"/>
<variable value="vvv"/>
<condition value="$this is Reference"/>
</source>
<target>
<context value="tgt"/>
<element value="reasonReference"/>
<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="MedicationOrder-note"/>
<source>
<context value="src"/>
<element value="note"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="note"/>
<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="MedicationOrder-medication"/>
<source>
<context value="src"/>
<element value="medication"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="medication"/>
<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="MedicationOrder-dosageInstruction"/>
<source>
<context value="src"/>
<element value="dosageInstruction"/>
<variable value="vs"/>
</source>
<target>
<context value="tgt"/>
<element value="dosageInstruction"/>
<variable value="vt"/>
</target>
<dependent>
<name value="medDosageInstruction"/>
<parameter>
<valueId value="vs"/>
</parameter>
<parameter>
<valueId value="vt"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationOrder-dispenseRequest"/>
<source>
<context value="src"/>
<element value="dispenseRequest"/>
<variable value="vs"/>
<check value="medication.empty()"/>
</source>
<target>
<context value="tgt"/>
<element value="dispenseRequest"/>
<variable value="vt"/>
</target>
<dependent>
<name value="medDispenseRequest"/>
<parameter>
<valueId value="vs"/>
</parameter>
<parameter>
<valueId value="vt"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationOrder-substitution"/>
<source>
<context value="src"/>
<element value="substitution"/>
<variable value="vs"/>
</source>
<target>
<context value="tgt"/>
<element value="substitution"/>
<variable value="vt"/>
</target>
<dependent>
<name value="medSubstitution"/>
<parameter>
<valueId value="vs"/>
</parameter>
<parameter>
<valueId value="vt"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="MedicationOrder-priorPrescription"/>
<source>
<context value="src"/>
<element value="priorPrescription"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="priorPrescription"/>
<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="medDosageInstruction"/>
<extends value="Element"/>
<input>
<name value="src"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<mode value="target"/>
</input>
<rule>
<name value="dosage-text"/>
<source>
<context value="src"/>
<element value="text"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="text"/>
<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="dosage-additionalInstructions"/>
<source>
<context value="src"/>
<element value="additionalInstructions"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="additionalInstruction"/>
<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="dosage-timing"/>
<source>
<context value="src"/>
<element value="timing"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="timing"/>
<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="dosage-asNeeded"/>
<source>
<context value="src"/>
<element value="asNeeded"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="asNeeded"/>
<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="dosage-site"/>
<source>
<context value="src"/>
<element value="site"/>
<variable value="vvv"/>
<condition value="$this is CodeableConcept"/>
</source>
<target>
<context value="tgt"/>
<element value="site"/>
<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="dosage-route"/>
<source>
<context value="src"/>
<element value="route"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="route"/>
<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="dosage-method"/>
<source>
<context value="src"/>
<element value="method"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="method"/>
<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="dosage-dose"/>
<source>
<context value="src"/>
<element value="dose"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="dose"/>
<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="dosage-rate"/>
<source>
<context value="src"/>
<element value="rate"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="rate"/>
<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="dosage-maxDosePerPeriod"/>
<source>
<context value="src"/>
<element value="maxDosePerPeriod"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="maxDosePerPeriod"/>
<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="medDispenseRequest"/>
<extends value="BackboneElement"/>
<input>
<name value="src"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<mode value="target"/>
</input>
<rule>
<name value="dispenseRequest-validityPeriod"/>
<source>
<context value="src"/>
<element value="validityPeriod"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="validityPeriod"/>
<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="dispenseRequest-numberOfRepeatsAllowed"/>
<source>
<context value="src"/>
<element value="numberOfRepeatsAllowed"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="numberOfRepeatsAllowed"/>
<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="dispenseRequest-quantity"/>
<source>
<context value="src"/>
<element value="quantity"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="quantity"/>
<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="dispenseRequest-expectedSupplyDuration"/>
<source>
<context value="src"/>
<element value="expectedSupplyDuration"/>
<variable value="v"/>
</source>
<target>
<context value="tgt"/>
<element value="expectedSupplyDuration"/>
<variable value="d"/>
</target>
<dependent>
<name value="QuantityToDuration"/>
<parameter>
<valueId value="v"/>
</parameter>
<parameter>
<valueId value="d"/>
</parameter>
</dependent>
</rule>
</group>
<group>
<name value="medSubstitution"/>
<extends value="BackboneElement"/>
<input>
<name value="src"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<mode value="target"/>
</input>
<rule>
<name value="substitution-reason"/>
<source>
<context value="src"/>
<element value="reason"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="reason"/>
<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="medRequestor"/>
<input>
<name value="src"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<mode value="target"/>
</input>
<rule>
<name value="MedicationOrder-prescriber2"/>
<source>
<context value="src"/>
<element value="prescriber"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="agent"/>
<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>