SGHI FHIR Profile Implementation Guide
0.1.0 - ci-build

SGHI FHIR Profile Implementation Guide, published by Kathurima Kimathi. 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/savannahghi/sil_fhir_profile_ig/ and changes regularly. See the Directory of published versions

## : MedicationRequest Transforms: R4 → SGHI R5 - XML Representation

Active as of 2026-05-21

Raw xml | Download

    <StructureMap xmlns="http://hl7.org/fhir">
      <id value="MedicationRequestSGHI5"/>
      <text>
        <status value="generated"/>
        <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap MedicationRequestSGHI5</b></p><a name="MedicationRequestSGHI5"> </a><a name="hcMedicationRequestSGHI5"> </a><pre class="fml">
    <span style="color: #cc00cc">/// <b>url</b> = </span><span style="color: blue">'https://fhir.slade360.co.ke/fhir/StructureMap/MedicationRequestSGHI5'</span>
    <span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'MedicationRequestSGHI5'</span>
    <span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'MedicationRequest Transforms: R4 → SGHI R5'</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/4.0/StructureDefinition/MedicationRequest<span style="color: navy">&quot; </span><b>alias </b>MedicationRequestR4 <b>as </b><b>source</b>
    <b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-medicationrequest.html" title="SGHI MedicationRequest">https://fhir.slade360.co.ke/fhir/StructureDefinition/medicationrequest</a><span style="color: navy">&quot; </span><b>alias </b>SGHIMedicationRequest <b>as </b><b>target</b>

    <b>imports</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/StructureMap/*4to5<span style="color: navy">&quot;
    </span>
    <b>group </b>SGHIMedicationRequest<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>MedicationRequestR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>SGHIMedicationRequest<span style="color: navy">)</span><b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
    </span>  src.id<b> as </b><span style="color: maroon">uuid</span><span style="color: navy"><b> -&gt; </b></span>tgt.id = <span style="color: maroon">uuid</span><span style="color: navy">;</span>
      src.active<span style="color: navy"><b> -&gt; </b></span>tgt.active<span style="color: navy">;</span>
      src.language<span style="color: navy"><b> -&gt; </b></span>tgt.language<span style="color: navy">;</span>
      src<span style="color: navy"><b> -&gt; </b></span>tgt.meta<b> as </b><span style="color: maroon">t_meta</span><b> then</b><span style="color: navy"> {
    </span>    src<span style="color: navy"><b> -&gt; </b></span>t_meta.profile = <span style="color: blue">'https://fhir.slade360.co.ke/fhir/StructureDefinition/medicationrequest'</span> <i>&quot;addprofile&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;addtometa&quot;</i><span style="color: navy">;</span>
      src<b> where </b>text.exists().not()<span style="color: navy"><b> -&gt; </b></span>tgt.text = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Narrative'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">t_text</span><b> then</b><span style="color: navy"> {
    </span>    src<span style="color: navy"><b> -&gt; </b></span>t_text.status = <span style="color: blue">'generated'</span> <i>&quot;settextstatus&quot;</i><span style="color: navy">;</span>
        src<span style="color: navy"><b> -&gt; </b></span>t_text.div = <span style="color: blue">'&lt;div xmlns=\&quot;http://www.w3.org/1999/xhtml\&quot;&gt;&lt;h1&gt;Generated text&lt;/h1&gt;&lt;/div&gt;'</span> <i>&quot;settextdiv&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;createhardcodedtext&quot;</i><span style="color: navy">;</span>
      src<span style="color: navy"><b> -&gt; </b></span>tgt.text = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Narrative'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">ttt</span><b> then</b><span style="color: navy"> {
    </span>    src.text<b> as </b><span style="color: maroon">st</span><b> then</b><span style="color: navy"> {
    </span>      st.status<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>ttt.status = <span style="color: maroon">s</span><span style="color: navy">;</span>
          st.div<b> as </b><span style="color: maroon">d</span><span style="color: navy"><b> -&gt; </b></span>ttt.div = <span style="color: navy">(</span>'&lt;div xmlns=\&quot;http://www.w3.org/1999/xhtml\&quot;&gt;&lt;p&gt;' + d + '&lt;/p&gt;&lt;/div&gt;'<span style="color: navy">)</span> <i>&quot;wraptextinhtml&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setting text&quot;</i><span style="color: navy">;</span>
      src.id<b> as </b><span style="color: maroon">s_id</span><span style="color: navy"><b> -&gt; </b></span>tgt.identifier = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Identifier'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">t_ident</span><b> then</b><span style="color: navy"> {
    </span>    s_id<b> as </b><span style="color: maroon">uuid</span><span style="color: navy"><b> -&gt; </b></span>t_ident.value = <span style="color: maroon">uuid</span> <i>&quot;copyid&quot;</i><span style="color: navy">;</span>
        src<span style="color: navy"><b> -&gt; </b></span>t_ident.use = <span style="color: blue">'official'</span> <i>&quot;setuse&quot;</i><span style="color: navy">;</span>
        src<span style="color: navy"><b> -&gt; </b></span>t_ident.system = <span style="color: blue">'https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem'</span> <i>&quot;setsystem&quot;</i><span style="color: navy">;</span>
        src<span style="color: navy"><b> -&gt; </b></span>t_ident.type = <b>create</b><span style="color: navy">(</span><span style="color: blue">'CodeableConcept'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">t_type</span><b> then</b><span style="color: navy"> {
    </span>      src<span style="color: navy"><b> -&gt; </b></span>t_type.coding = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">t_code</span><b> then</b><span style="color: navy"> {
    </span>        src<span style="color: navy"><b> -&gt; </b></span>t_code.system = <span style="color: blue">'https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem'</span> <i>&quot;typesystem&quot;</i><span style="color: navy">;</span>
            src<span style="color: navy"><b> -&gt; </b></span>t_code.code = <span style="color: blue">'fhir-id'</span> <i>&quot;typecode&quot;</i><span style="color: navy">;</span>
            src<span style="color: navy"><b> -&gt; </b></span>t_code.display = <span style="color: blue">'FHIR Id'</span> <i>&quot;typedisplay&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;initcoding&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;inittype&quot;</i><span style="color: navy">;</span>
        src.meta<b> as </b><span style="color: maroon">sm</span><b> then</b><span style="color: navy"> {
    </span>      sm.tag last<b> as </b><span style="color: maroon">st</span><span style="color: navy"><b> -&gt; </b></span>t_ident.assigner = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Reference'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">ta</span><b> then </b>TransformAssigner<span style="color: navy">(</span><span style="color: maroon">st</span><span style="color: navy">, </span><span style="color: maroon">ta</span><span style="color: navy">)</span><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;setting owner&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;addfhirididentifier&quot;</i><span style="color: navy">;</span>
      src.status<span style="color: navy"><b> -&gt; </b></span>tgt.status<span style="color: navy">;</span>
      src.intent<span style="color: navy"><b> -&gt; </b></span>tgt.intent<span style="color: navy">;</span>
      src.priority<span style="color: navy"><b> -&gt; </b></span>tgt.priority<span style="color: navy">;</span>
      src.authoredOn<span style="color: navy"><b> -&gt; </b></span>tgt.authoredOn<span style="color: navy">;</span>
      src.medication<b> as </b><span style="color: maroon">sm</span><span style="color: navy"><b> -&gt; </b></span>tgt.medication = <b>create</b><span style="color: navy">(</span><span style="color: blue">'CodeableReference'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">tm</span><b> then</b><span style="color: navy"> {
    </span>    src<b> where </b>reference.exists().not()<span style="color: navy"><b> -&gt; </b></span>tm.reference = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Reference'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">trf</span><b> then</b><span style="color: navy"> {
    </span>      sm.text<span style="color: navy"><b> -&gt; </b></span>trf.display<span style="color: navy">;</span>
          sm.text<b> as </b><span style="color: maroon">txt</span><span style="color: navy"><b> -&gt; </b></span>trf.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Medication/'</span><span style="color: navy">, </span><span style="color: maroon">txt</span><span style="color: navy">)</span> <i>&quot;dummy reference&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;set reference&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span><span style="color: navy">;</span>
      src.subject<b> as </b><span style="color: maroon">sb</span><span style="color: navy"><b> -&gt; </b></span>tgt.subject<b> as </b><span style="color: maroon">tb</span><b> then </b>TransformReference<span style="color: navy">(</span><span style="color: maroon">sb</span><span style="color: navy">, </span><span style="color: maroon">tb</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.encounter<b> as </b><span style="color: maroon">se</span><span style="color: navy"><b> -&gt; </b></span>tgt.encounter<b> as </b><span style="color: maroon">te</span><b> then </b>TransformReference<span style="color: navy">(</span><span style="color: maroon">se</span><span style="color: navy">, </span><span style="color: maroon">te</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.requester<b> as </b><span style="color: maroon">sr</span><span style="color: navy"><b> -&gt; </b></span>tgt.requester<b> as </b><span style="color: maroon">tr</span><b> then </b>TransformReference<span style="color: navy">(</span><span style="color: maroon">sr</span><span style="color: navy">, </span><span style="color: maroon">tr</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.category<b> as </b><span style="color: maroon">sg</span><span style="color: navy"><b> -&gt; </b></span>tgt.category<b> as </b><span style="color: maroon">tg</span><b> then</b><span style="color: navy"> {
    </span>    sg.coding<b> as </b><span style="color: maroon">sc</span><span style="color: navy"><b> -&gt; </b></span>tg.coding<b> as </b><span style="color: maroon">tc</span><b> then </b>TransformCoding<span style="color: navy">(</span><span style="color: maroon">sc</span><span style="color: navy">, </span><span style="color: maroon">tc</span><span style="color: navy">)</span><span style="color: navy">;</span>
        sg.text<span style="color: navy"><b> -&gt; </b></span>tg.text<span style="color: navy">;</span>
      <span style="color: navy">}</span><span style="color: navy">;</span>
      src.note<b> as </b><span style="color: maroon">sn</span><span style="color: navy"><b> -&gt; </b></span>tgt.note<b> as </b><span style="color: maroon">tn</span><b> then</b><span style="color: navy"> {
    </span>    sn.time<span style="color: navy"><b> -&gt; </b></span>tn.time<span style="color: navy">;</span>
        sn.text<span style="color: navy"><b> -&gt; </b></span>tn.text<span style="color: navy">;</span>
      <span style="color: navy">}</span><span style="color: navy">;</span>
      src.dosageInstruction<b> as </b><span style="color: maroon">sd</span><span style="color: navy"><b> -&gt; </b></span>tgt.dosageInstruction<b> as </b><span style="color: maroon">td</span><b> then</b><span style="color: navy"> {
    </span>    sd.asNeeded<span style="color: navy"><b> -&gt; </b></span>td.asNeeded<span style="color: navy">;</span>
        sd.doseAndRate<b> as </b><span style="color: maroon">sd</span><span style="color: navy"><b> -&gt; </b></span>td.doseAndRate<b> as </b><span style="color: maroon">td</span><b> then</b><span style="color: navy"> {
    </span>      sd.doseQuantity<b> as </b><span style="color: maroon">sq</span><span style="color: navy"><b> -&gt; </b></span>td.doseQuantity<b> as </b><span style="color: maroon">tq</span><b> then</b><span style="color: navy"> {
    </span>        sq.code<span style="color: navy"><b> -&gt; </b></span>tq.code<span style="color: navy">;</span>
            sq.system<span style="color: navy"><b> -&gt; </b></span>tq.system<span style="color: navy">;</span>
            sq.unit<span style="color: navy"><b> -&gt; </b></span>tq.unit<span style="color: navy">;</span>
            sq.value<span style="color: navy"><b> -&gt; </b></span>tq.value<span style="color: navy">;</span>
          <span style="color: navy">}</span><span style="color: navy">;</span>
        <span style="color: navy">}</span><span style="color: navy">;</span>
        sd.patientInstruction<span style="color: navy"><b> -&gt; </b></span>td.patientInstruction<span style="color: navy">;</span>
        sd.route<b> as </b><span style="color: maroon">sr</span><span style="color: navy"><b> -&gt; </b></span>td.route<b> as </b><span style="color: maroon">tr</span><b> then</b><span style="color: navy"> {
    </span>      sr.coding<b> as </b><span style="color: maroon">sc</span><span style="color: navy"><b> -&gt; </b></span>tr.coding<b> as </b><span style="color: maroon">tc</span><b> then </b>TransformCoding<span style="color: navy">(</span><span style="color: maroon">sc</span><span style="color: navy">, </span><span style="color: maroon">tc</span><span style="color: navy">)</span><span style="color: navy">;</span>
          sr<b> where </b>coding.exists().not()<span style="color: navy"><b> -&gt; </b></span> tr.coding = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">tc</span><span style="color: navy">, </span> tc.system = <span style="color: blue">'https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem'</span><span style="color: navy">, </span> tc.code = <span style="color: blue">'iv'</span><span style="color: navy">, </span> tc.display = <span style="color: blue">'Intravenous'</span> <i>&quot;setting default route&quot;</i><span style="color: navy">;</span>
          sr.text<span style="color: navy"><b> -&gt; </b></span>tr.text<span style="color: navy">;</span>
        <span style="color: navy">}</span><span style="color: navy">;</span>
        sd.timing<b> as </b><span style="color: maroon">st</span><span style="color: navy"><b> -&gt; </b></span>td.timing<b> as </b><span style="color: maroon">tt</span><b> then</b><span style="color: navy"> {
    </span>      st.repeat<b> as </b><span style="color: maroon">sp</span><span style="color: navy"><b> -&gt; </b></span>tt.repeat<b> as </b><span style="color: maroon">tp</span><b> then</b><span style="color: navy"> {
    </span>        sp.boundsPeriod<b> as </b><span style="color: maroon">sprd</span><span style="color: navy"><b> -&gt; </b></span>tp.boundsPeriod<b> as </b><span style="color: maroon">tprd</span><b> then</b><span style="color: navy"> {
    </span>          sprd.end<span style="color: navy"><b> -&gt; </b></span>tprd.end<span style="color: navy">;</span>
              sprd.start<span style="color: navy"><b> -&gt; </b></span>tprd.start<span style="color: navy">;</span>
            <span style="color: navy">}</span><span style="color: navy">;</span>
            sp.duration<span style="color: navy"><b> -&gt; </b></span>tp.duration<span style="color: navy">;</span>
            sp.durationUnit<span style="color: navy"><b> -&gt; </b></span>tp.durationUnit<span style="color: navy">;</span>
            sp.frequency<span style="color: navy"><b> -&gt; </b></span>tp.frequency<span style="color: navy">;</span>
            sp.period<span style="color: navy"><b> -&gt; </b></span>tp.period<span style="color: navy">;</span>
            sp.periodUnit<span style="color: navy"><b> -&gt; </b></span>tp.periodUnit<span style="color: navy">;</span>
          <span style="color: navy">}</span><span style="color: navy">;</span>
        <span style="color: navy">}</span><span style="color: navy">;</span>
      <span style="color: navy">}</span><span style="color: navy">;</span>
    <span style="color: navy">}

    </span><b>group </b>TransformAssigner<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> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
    </span>  src.code<b> as </b><span style="color: maroon">code</span><span style="color: navy"><b> -&gt; </b></span>tgt.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Organization/'</span><span style="color: navy">, </span><span style="color: maroon">code</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src<b> where </b>display.exists().not()<span style="color: navy"><b> -&gt; </b></span>tgt.display = <span style="color: blue">'Unknown display'</span> <i>&quot;setting default display&quot;</i><span style="color: navy">;</span>
      src.display<span style="color: navy"><b> -&gt; </b></span>tgt.display<span style="color: navy">;</span>
      src.code<span style="color: navy"><b> -&gt; </b></span>tgt.id<span style="color: navy">;</span>
    <span style="color: navy">}

    </span><b>group </b>TransformReference<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> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
    </span>  src.id<span style="color: navy"><b> -&gt; </b></span>tgt.id<span style="color: navy">;</span>
      src.reference<span style="color: navy"><b> -&gt; </b></span>tgt.reference<span style="color: navy">;</span>
      src.display<span style="color: navy"><b> -&gt; </b></span>tgt.display<span style="color: navy">;</span>
      src<b> where </b>display.exists().not()<span style="color: navy"><b> -&gt; </b></span>tgt.display = <span style="color: blue">'Unknown display'</span> <i>&quot;setting display&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}

    </span><b>group </b>TransformCoding<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> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
    </span>  src.code<span style="color: navy"><b> -&gt; </b></span>tgt.code<span style="color: navy">;</span>
      src.display<span style="color: navy"><b> -&gt; </b></span>tgt.display<span style="color: navy">;</span>
      src<b> where </b>display.exists().not()<span style="color: navy"><b> -&gt; </b></span>tgt.display = <span style="color: blue">'Unknown display'</span> <i>&quot;settingdefaultdisplay&quot;</i><span style="color: navy">;</span>
      src.system<span style="color: navy"><b> -&gt; </b></span>tgt.system<span style="color: navy">;</span>
    <span style="color: navy">}

    </span></pre></div>
      </text>
      <url
           value="https://fhir.slade360.co.ke/fhir/StructureMap/MedicationRequestSGHI5"/>
      <version value="0.1.0"/>
      <name value="MedicationRequestSGHI5"/>
      <title value="MedicationRequest Transforms: R4 → SGHI R5"/>
      <status value="active"/>
      <date value="2026-05-21T09:38:13+00:00"/>
      <publisher value="Kathurima Kimathi"/>
      <contact>
        <name value="Kathurima Kimathi"/>
        <telecom>
          <system value="url"/>
          <value value="https://www.linkedin.com/in/kathurima-kimathi/"/>
        </telecom>
        <telecom>
          <system value="email"/>
          <value value="kathurimakimathi415@gmail.com"/>
        </telecom>
      </contact>
      <contact>
        <name value="Oscar John"/>
        <telecom>
          <system value="email"/>
          <value value="oscarjohnotieno@gmail.com"/>
          <use value="work"/>
        </telecom>
      </contact>
      <contact>
        <name value="Kennedy Omondi"/>
        <telecom>
          <system value="email"/>
          <value value="kennankole@gmail.com"/>
          <use value="work"/>
        </telecom>
      </contact>
      <description value="MedicationRequestTransformsR4SGHIR5"/>
      <structure>
        <url
             value="http://hl7.org/fhir/4.0/StructureDefinition/MedicationRequest"/>
        <mode value="source"/>
        <alias value="MedicationRequestR4"/>
      </structure>
      <structure>
        <url
             value="https://fhir.slade360.co.ke/fhir/StructureDefinition/medicationrequest"/>
        <mode value="target"/>
        <alias value="SGHIMedicationRequest"/>
      </structure>
      <import value="http://hl7.org/fhir/StructureMap/*4to5"/>
      <group>
        <name value="SGHIMedicationRequest"/>
        <typeMode value="type-and-types"/>
        <input>
          <name value="src"/>
          <type value="MedicationRequestR4"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <type value="SGHIMedicationRequest"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="id"/>
          <source>
            <context value="src"/>
            <element value="id"/>
            <variable value="uuid"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="id"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="uuid"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="active"/>
          <source>
            <context value="src"/>
            <element value="active"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="active"/>
            <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="language"/>
          <source>
            <context value="src"/>
            <element value="language"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="language"/>
            <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="addtometa"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="meta"/>
            <variable value="t_meta"/>
          </target>
          <rule>
            <name value="addprofile"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="t_meta"/>
              <element value="profile"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.slade360.co.ke/fhir/StructureDefinition/medicationrequest"/>
              </parameter>
            </target>
          </rule>
        </rule>
        <rule>
          <name value="createhardcodedtext"/>
          <source>
            <context value="src"/>
            <condition value="text.exists().not()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="text"/>
            <variable value="t_text"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Narrative"/>
            </parameter>
          </target>
          <rule>
            <name value="settextstatus"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="t_text"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="generated"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="settextdiv"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="t_text"/>
              <element value="div"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;h1&gt;Generated text&lt;/h1&gt;&lt;/div&gt;"/>
              </parameter>
            </target>
          </rule>
        </rule>
        <rule>
          <name value="setting text"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="text"/>
            <variable value="ttt"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Narrative"/>
            </parameter>
          </target>
          <rule>
            <name value="text"/>
            <source>
              <context value="src"/>
              <element value="text"/>
              <variable value="st"/>
            </source>
            <rule>
              <name value="status"/>
              <source>
                <context value="st"/>
                <element value="status"/>
                <variable value="s"/>
              </source>
              <target>
                <context value="ttt"/>
                <element value="status"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="s"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="wraptextinhtml"/>
              <source>
                <context value="st"/>
                <element value="div"/>
                <variable value="d"/>
              </source>
              <target>
                <context value="ttt"/>
                <element value="div"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString
                               value="'&lt;div xmlns=\&quot;http://www.w3.org/1999/xhtml\&quot;&gt;&lt;p&gt;' + d + '&lt;/p&gt;&lt;/div&gt;'"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="addfhirididentifier"/>
          <source>
            <context value="src"/>
            <element value="id"/>
            <variable value="s_id"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="identifier"/>
            <variable value="t_ident"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Identifier"/>
            </parameter>
          </target>
          <rule>
            <name value="copyid"/>
            <source>
              <context value="s_id"/>
              <variable value="uuid"/>
            </source>
            <target>
              <context value="t_ident"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="uuid"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="setuse"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="t_ident"/>
              <element value="use"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="official"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="setsystem"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="t_ident"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="inittype"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="t_ident"/>
              <element value="type"/>
              <variable value="t_type"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <rule>
              <name value="initcoding"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <context value="t_type"/>
                <element value="coding"/>
                <variable value="t_code"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Coding"/>
                </parameter>
              </target>
              <rule>
                <name value="typesystem"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="t_code"/>
                  <element value="system"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString
                                 value="https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="typecode"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="t_code"/>
                  <element value="code"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="fhir-id"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="typedisplay"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="t_code"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="FHIR Id"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="setting owner"/>
            <source>
              <context value="src"/>
              <element value="meta"/>
              <variable value="sm"/>
            </source>
            <rule>
              <name value="tag"/>
              <source>
                <context value="sm"/>
                <element value="tag"/>
                <listMode value="last"/>
                <variable value="st"/>
              </source>
              <target>
                <context value="t_ident"/>
                <element value="assigner"/>
                <variable value="ta"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Reference"/>
                </parameter>
              </target>
              <dependent>
                <name value="TransformAssigner"/>
                <parameter>
                  <valueId value="st"/>
                </parameter>
                <parameter>
                  <valueId value="ta"/>
                </parameter>
              </dependent>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="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="intent"/>
          <source>
            <context value="src"/>
            <element value="intent"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="intent"/>
            <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="priority"/>
          <source>
            <context value="src"/>
            <element value="priority"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="priority"/>
            <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="authoredOn"/>
          <source>
            <context value="src"/>
            <element value="authoredOn"/>
            <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="medication"/>
          <source>
            <context value="src"/>
            <element value="medication"/>
            <variable value="sm"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="medication"/>
            <variable value="tm"/>
            <transform value="create"/>
            <parameter>
              <valueString value="CodeableReference"/>
            </parameter>
          </target>
          <rule>
            <name value="set reference"/>
            <source>
              <context value="src"/>
              <condition value="reference.exists().not()"/>
            </source>
            <target>
              <context value="tm"/>
              <element value="reference"/>
              <variable value="trf"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <rule>
              <name value="text"/>
              <source>
                <context value="sm"/>
                <element value="text"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="trf"/>
                <element value="display"/>
                <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="dummy reference"/>
              <source>
                <context value="sm"/>
                <element value="text"/>
                <variable value="txt"/>
              </source>
              <target>
                <context value="trf"/>
                <element value="reference"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="Medication/"/>
                </parameter>
                <parameter>
                  <valueId value="txt"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="subject"/>
          <source>
            <context value="src"/>
            <element value="subject"/>
            <variable value="sb"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="subject"/>
            <variable value="tb"/>
          </target>
          <dependent>
            <name value="TransformReference"/>
            <parameter>
              <valueId value="sb"/>
            </parameter>
            <parameter>
              <valueId value="tb"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="encounter"/>
          <source>
            <context value="src"/>
            <element value="encounter"/>
            <variable value="se"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="encounter"/>
            <variable value="te"/>
          </target>
          <dependent>
            <name value="TransformReference"/>
            <parameter>
              <valueId value="se"/>
            </parameter>
            <parameter>
              <valueId value="te"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="requester"/>
          <source>
            <context value="src"/>
            <element value="requester"/>
            <variable value="sr"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="requester"/>
            <variable value="tr"/>
          </target>
          <dependent>
            <name value="TransformReference"/>
            <parameter>
              <valueId value="sr"/>
            </parameter>
            <parameter>
              <valueId value="tr"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="category"/>
          <source>
            <context value="src"/>
            <element value="category"/>
            <variable value="sg"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="category"/>
            <variable value="tg"/>
          </target>
          <rule>
            <name value="coding"/>
            <source>
              <context value="sg"/>
              <element value="coding"/>
              <variable value="sc"/>
            </source>
            <target>
              <context value="tg"/>
              <element value="coding"/>
              <variable value="tc"/>
            </target>
            <dependent>
              <name value="TransformCoding"/>
              <parameter>
                <valueId value="sc"/>
              </parameter>
              <parameter>
                <valueId value="tc"/>
              </parameter>
            </dependent>
          </rule>
          <rule>
            <name value="text"/>
            <source>
              <context value="sg"/>
              <element value="text"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="tg"/>
              <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>
        <rule>
          <name value="note"/>
          <source>
            <context value="src"/>
            <element value="note"/>
            <variable value="sn"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="note"/>
            <variable value="tn"/>
          </target>
          <rule>
            <name value="time"/>
            <source>
              <context value="sn"/>
              <element value="time"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="tn"/>
              <element value="time"/>
              <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="text"/>
            <source>
              <context value="sn"/>
              <element value="text"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="tn"/>
              <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>
        <rule>
          <name value="dosageInstruction"/>
          <source>
            <context value="src"/>
            <element value="dosageInstruction"/>
            <variable value="sd"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="dosageInstruction"/>
            <variable value="td"/>
          </target>
          <rule>
            <name value="asNeeded"/>
            <source>
              <context value="sd"/>
              <element value="asNeeded"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="td"/>
              <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="doseAndRate"/>
            <source>
              <context value="sd"/>
              <element value="doseAndRate"/>
              <variable value="sd"/>
            </source>
            <target>
              <context value="td"/>
              <element value="doseAndRate"/>
              <variable value="td"/>
            </target>
            <rule>
              <name value="doseQuantity"/>
              <source>
                <context value="sd"/>
                <element value="doseQuantity"/>
                <variable value="sq"/>
              </source>
              <target>
                <context value="td"/>
                <element value="doseQuantity"/>
                <variable value="tq"/>
              </target>
              <rule>
                <name value="code"/>
                <source>
                  <context value="sq"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="tq"/>
                  <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="system"/>
                <source>
                  <context value="sq"/>
                  <element value="system"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="tq"/>
                  <element value="system"/>
                  <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="unit"/>
                <source>
                  <context value="sq"/>
                  <element value="unit"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="tq"/>
                  <element value="unit"/>
                  <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="value"/>
                <source>
                  <context value="sq"/>
                  <element value="value"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="tq"/>
                  <element value="value"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
                <dependent>
                  <name value="DefaultMappingGroupAnonymousAlias"/>
                  <parameter>
                    <valueId value="vvv"/>
                  </parameter>
                  <parameter>
                    <valueId value="vvv"/>
                  </parameter>
                </dependent>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="patientInstruction"/>
            <source>
              <context value="sd"/>
              <element value="patientInstruction"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="td"/>
              <element value="patientInstruction"/>
              <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="route"/>
            <source>
              <context value="sd"/>
              <element value="route"/>
              <variable value="sr"/>
            </source>
            <target>
              <context value="td"/>
              <element value="route"/>
              <variable value="tr"/>
            </target>
            <rule>
              <name value="coding"/>
              <source>
                <context value="sr"/>
                <element value="coding"/>
                <variable value="sc"/>
              </source>
              <target>
                <context value="tr"/>
                <element value="coding"/>
                <variable value="tc"/>
              </target>
              <dependent>
                <name value="TransformCoding"/>
                <parameter>
                  <valueId value="sc"/>
                </parameter>
                <parameter>
                  <valueId value="tc"/>
                </parameter>
              </dependent>
            </rule>
            <rule>
              <name value="setting default route"/>
              <source>
                <context value="sr"/>
                <condition value="coding.exists().not()"/>
              </source>
              <target>
                <context value="tr"/>
                <element value="coding"/>
                <variable value="tc"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Coding"/>
                </parameter>
              </target>
              <target>
                <context value="tc"/>
                <element value="system"/>
                <transform value="copy"/>
                <parameter>
                  <valueString
                               value="https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"/>
                </parameter>
              </target>
              <target>
                <context value="tc"/>
                <element value="code"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="iv"/>
                </parameter>
              </target>
              <target>
                <context value="tc"/>
                <element value="display"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="Intravenous"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="text"/>
              <source>
                <context value="sr"/>
                <element value="text"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="tr"/>
                <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>
          <rule>
            <name value="timing"/>
            <source>
              <context value="sd"/>
              <element value="timing"/>
              <variable value="st"/>
            </source>
            <target>
              <context value="td"/>
              <element value="timing"/>
              <variable value="tt"/>
            </target>
            <rule>
              <name value="repeat"/>
              <source>
                <context value="st"/>
                <element value="repeat"/>
                <variable value="sp"/>
              </source>
              <target>
                <context value="tt"/>
                <element value="repeat"/>
                <variable value="tp"/>
              </target>
              <rule>
                <name value="boundsPeriod"/>
                <source>
                  <context value="sp"/>
                  <element value="boundsPeriod"/>
                  <variable value="sprd"/>
                </source>
                <target>
                  <context value="tp"/>
                  <element value="boundsPeriod"/>
                  <variable value="tprd"/>
                </target>
                <rule>
                  <name value="end"/>
                  <source>
                    <context value="sprd"/>
                    <element value="end"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="tprd"/>
                    <element value="end"/>
                    <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="start"/>
                  <source>
                    <context value="sprd"/>
                    <element value="start"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="tprd"/>
                    <element value="start"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                  <dependent>
                    <name value="DefaultMappingGroupAnonymousAlias"/>
                    <parameter>
                      <valueId value="vvv"/>
                    </parameter>
                    <parameter>
                      <valueId value="vvv"/>
                    </parameter>
                  </dependent>
                </rule>
              </rule>
              <rule>
                <name value="duration"/>
                <source>
                  <context value="sp"/>
                  <element value="duration"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="tp"/>
                  <element value="duration"/>
                  <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="durationUnit"/>
                <source>
                  <context value="sp"/>
                  <element value="durationUnit"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="tp"/>
                  <element value="durationUnit"/>
                  <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="frequency"/>
                <source>
                  <context value="sp"/>
                  <element value="frequency"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="tp"/>
                  <element value="frequency"/>
                  <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="period"/>
                <source>
                  <context value="sp"/>
                  <element value="period"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="tp"/>
                  <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="periodUnit"/>
                <source>
                  <context value="sp"/>
                  <element value="periodUnit"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="tp"/>
                  <element value="periodUnit"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
                <dependent>
                  <name value="DefaultMappingGroupAnonymousAlias"/>
                  <parameter>
                    <valueId value="vvv"/>
                  </parameter>
                  <parameter>
                    <valueId value="vvv"/>
                  </parameter>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </group>
      <group>
        <name value="TransformAssigner"/>
        <typeMode value="types"/>
        <input>
          <name value="src"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="code"/>
          <source>
            <context value="src"/>
            <element value="code"/>
            <variable value="code"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="reference"/>
            <transform value="append"/>
            <parameter>
              <valueString value="Organization/"/>
            </parameter>
            <parameter>
              <valueId value="code"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="setting default display"/>
          <source>
            <context value="src"/>
            <condition value="display.exists().not()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Unknown display"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="display"/>
          <source>
            <context value="src"/>
            <element value="display"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="display"/>
            <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="code"/>
          <source>
            <context value="src"/>
            <element value="code"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="id"/>
            <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="TransformReference"/>
        <typeMode value="types"/>
        <input>
          <name value="src"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="id"/>
          <source>
            <context value="src"/>
            <element value="id"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="id"/>
            <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="reference"/>
          <source>
            <context value="src"/>
            <element value="reference"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="reference"/>
            <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="display"/>
          <source>
            <context value="src"/>
            <element value="display"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="display"/>
            <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="setting display"/>
          <source>
            <context value="src"/>
            <condition value="display.exists().not()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Unknown display"/>
            </parameter>
          </target>
        </rule>
      </group>
      <group>
        <name value="TransformCoding"/>
        <typeMode value="types"/>
        <input>
          <name value="src"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="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="display"/>
          <source>
            <context value="src"/>
            <element value="display"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="display"/>
            <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="settingdefaultdisplay"/>
          <source>
            <context value="src"/>
            <condition value="display.exists().not()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Unknown display"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="system"/>
          <source>
            <context value="src"/>
            <element value="system"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="system"/>
            <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>