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

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

Active as of 2026-05-21

Raw xml | Download

    <StructureMap xmlns="http://hl7.org/fhir">
      <id value="Task4toSGHI5"/>
      <text>
        <status value="generated"/>
        <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap Task4toSGHI5</b></p><a name="Task4toSGHI5"> </a><a name="hcTask4toSGHI5"> </a><pre class="fml">
    <span style="color: #cc00cc">/// <b>url</b> = </span><span style="color: blue">'https://fhir.slade360.co.ke/fhir/StructureMap/Task4toSGHI5'</span>
    <span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'Task4toSGHI5'</span>
    <span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'Task 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/Task<span style="color: navy">&quot; </span><b>alias </b>TaskR4 <b>as </b><b>source</b>
    <b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-task.html" title="SGHI Task">https://fhir.slade360.co.ke/fhir/StructureDefinition/task</a><span style="color: navy">&quot; </span><b>alias </b>SGHITask <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>SGHITask<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>TaskR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>SGHITask<span style="color: navy">)</span><b> extends </b>DomainResource<b> &lt;&lt;type+&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.active<span style="color: navy"><b> -&gt; </b></span>tgt.active = <span style="color: blue">'true'</span><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.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">tgt_n</span><b> then</b><span style="color: navy"> {
    </span>    src<span style="color: navy"><b> -&gt; </b></span>tgt_n.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>tgt_n.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<b> as </b><span style="color: maroon">sc</span><b> where </b>identifier.exists().not()<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">tt_id</span><b> then</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>tt_id.value = <span style="color: maroon">uuid</span> <i>&quot;creating id&quot;</i><span style="color: navy">;</span>
        src<span style="color: navy"><b> -&gt; </b></span>tt_id.use = <span style="color: blue">'official'</span> <i>&quot;creating use&quot;</i><span style="color: navy">;</span>
        src<span style="color: navy"><b> -&gt; </b></span>tt_id.type<b> as </b><span style="color: maroon">ty</span><b> then</b><span style="color: navy"> {
    </span>      src<span style="color: navy"><b> -&gt; </b></span>ty.coding = <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">ty_c</span><b> then</b><span style="color: navy"> {
    </span>        src<span style="color: navy"><b> -&gt; </b></span>ty_c.system = <span style="color: blue">'https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem'</span> <i>&quot;creating coding&quot;</i><span style="color: navy">;</span>
            src<span style="color: navy"><b> -&gt; </b></span>ty_c.code = <span style="color: blue">'fhir-id'</span> <i>&quot;creating code&quot;</i><span style="color: navy">;</span>
            src<span style="color: navy"><b> -&gt; </b></span>ty_c.display = <span style="color: blue">'FHIR Id'</span> <i>&quot;creating display&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;creating identifier type&quot;</i><span style="color: navy">;</span>
          src<span style="color: navy"><b> -&gt; </b></span>tt_id.system = <span style="color: blue">'https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem'</span> <i>&quot;creating system&quot;</i><span style="color: navy">;</span>
          src.owner<b> as </b><span style="color: maroon">sp</span><span style="color: navy"><b> -&gt; </b></span>tt_id.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">t_assigner</span><b> then</b><span style="color: navy"> {
    </span>        sp.reference<span style="color: navy"><b> -&gt; </b></span>t_assigner.reference<span style="color: navy">;</span>
            sp<b> where </b>sp.display.exists().not()<span style="color: navy"><b> -&gt; </b></span>t_assigner.display = <span style="color: blue">'Unknown display'</span> <i>&quot;setting default display&quot;</i><span style="color: navy">;</span>
            sp.display<span style="color: navy"><b> -&gt; </b></span>t_assigner.display<span style="color: navy">;</span>
          <span style="color: navy">}</span><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;creating identifier type&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;creating identifier&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Create identifier</span>
      src.meta<b> as </b><span style="color: maroon">s_meta</span><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>    s_meta.lastUpdated<span style="color: navy"><b> -&gt; </b></span>t_meta.lastUpdated<span style="color: navy">;</span>
        s_meta.language<span style="color: navy"><b> -&gt; </b></span>t_meta.language<span style="color: navy">;</span>
        s_meta.tags<span style="color: navy"><b> -&gt; </b></span>t_meta.tags<span style="color: navy">;</span>
        src.meta<b> where </b>profile.exists().not()<span style="color: navy"><b> -&gt; </b></span>t_meta.profile = <span style="color: blue">'https://fhir.slade360.co.ke/fhir/StructureDefinition/task'</span> <i>&quot;setprofileinmeta&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;set profile in meta&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.period<span style="color: navy"><b> -&gt; </b></span>tgt.period<span style="color: navy">;</span>
      src<b> as </b><span style="color: maroon">sb</span><b> where </b>businessStatus.exists()<span style="color: navy"><b> -&gt; </b></span>tgt.businessStatus<b> as </b><span style="color: maroon">tb</span><b> then</b><span style="color: navy"> {
    </span>    sb.text<span style="color: navy"><b> -&gt; </b></span>tb.text<span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;mapping business status&quot;</i><span style="color: navy">;</span>
      src.basedOn<b> as </b><span style="color: maroon">sb</span><span style="color: navy"><b> -&gt; </b></span>tgt.basedOn<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.authoredOn<span style="color: navy"><b> -&gt; </b></span>tgt.authoredOn<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.executionPeriod<b> as </b><span style="color: maroon">sp</span><span style="color: navy"><b> -&gt; </b></span>tgt.executionPeriod<b> as </b><span style="color: maroon">tp</span><b> then </b>TransformPeriod<span style="color: navy">(</span><span style="color: maroon">sp</span><span style="color: navy">, </span><span style="color: maroon">tp</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.focus<b> as </b><span style="color: maroon">sf</span><span style="color: navy"><b> -&gt; </b></span>tgt.focus<b> as </b><span style="color: maroon">tf</span><b> then </b>TransformReference<span style="color: navy">(</span><span style="color: maroon">sf</span><span style="color: navy">, </span><span style="color: maroon">tf</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.for<b> as </b><span style="color: maroon">sf</span><span style="color: navy"><b> -&gt; </b></span>tgt.for<b> as </b><span style="color: maroon">tf</span><b> then </b>TransformReference<span style="color: navy">(</span><span style="color: maroon">sf</span><span style="color: navy">, </span><span style="color: maroon">tf</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.intent<span style="color: navy"><b> -&gt; </b></span>tgt.intent<span style="color: navy">;</span>
      src.owner<b> as </b><span style="color: maroon">so</span><span style="color: navy"><b> -&gt; </b></span>tgt.owner<b> as </b><span style="color: maroon">to</span><b> then </b>TransformReference<span style="color: navy">(</span><span style="color: maroon">so</span><span style="color: navy">, </span><span style="color: maroon">to</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.priority<span style="color: navy"><b> -&gt; </b></span>tgt.priority<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<b> where </b>requestedPerformer.exists().not()<span style="color: navy"><b> -&gt; </b></span>tgt.requestedPerformer = <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">to</span><b> then</b><span style="color: navy"> {
    </span>    src.owner<b> as </b><span style="color: maroon">so</span><span style="color: navy"><b> -&gt; </b></span>to.reference<b> as </b><span style="color: maroon">to</span><b> then </b>TransformReference<span style="color: navy">(</span><span style="color: maroon">so</span><span style="color: navy">, </span><span style="color: maroon">to</span><span style="color: navy">)</span><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;creating requested performer&quot;</i><span style="color: navy">;</span>
      src<b> where </b>businessStatus.exists().not()<span style="color: navy"><b> -&gt; </b></span>tgt.businessStatus = <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">tb</span><b> then</b><span style="color: navy"> {
    </span>    src.basedOn first<b> as </b><span style="color: maroon">st</span><b> then</b><span style="color: navy"> {
    </span>      st.type<b> as </b><span style="color: maroon">text</span><span style="color: navy"><b> -&gt; </b></span>tb.text = <span style="color: maroon">text</span><span style="color: navy">;</span>
        <span style="color: navy">}</span><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;creating business status&quot;</i><span style="color: navy">;</span>
      src.businessStatus<b> as </b><span style="color: maroon">st</span><span style="color: navy"><b> -&gt; </b></span>tgt.businessStatus<b> as </b><span style="color: maroon">ts</span><b> then</b><span style="color: navy"> {
    </span>    st.text<span style="color: navy"><b> -&gt; </b></span>ts.text<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.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>
    <span style="color: navy">}

    </span><b>group </b>TransformPeriod<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.start<span style="color: navy"><b> -&gt; </b></span>tgt.start<span style="color: navy">;</span>
      src.end<span style="color: navy"><b> -&gt; </b></span>tgt.end<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></pre></div>
      </text>
      <url value="https://fhir.slade360.co.ke/fhir/StructureMap/Task4toSGHI5"/>
      <version value="0.1.0"/>
      <name value="Task4toSGHI5"/>
      <title value="Task 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="TaskTransformsR4SGHIR5"/>
      <structure>
        <url value="http://hl7.org/fhir/4.0/StructureDefinition/Task"/>
        <mode value="source"/>
        <alias value="TaskR4"/>
      </structure>
      <structure>
        <url value="https://fhir.slade360.co.ke/fhir/StructureDefinition/task"/>
        <mode value="target"/>
        <alias value="SGHITask"/>
      </structure>
      <import value="http://hl7.org/fhir/StructureMap/*4to5"/>
      <group>
        <name value="SGHITask"/>
        <extends value="DomainResource"/>
        <typeMode value="type-and-types"/>
        <input>
          <name value="src"/>
          <type value="TaskR4"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <type value="SGHITask"/>
          <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="active"/>
          <source>
            <context value="src"/>
            <element value="active"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="active"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="true"/>
            </parameter>
          </target>
        </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="createhardcodedtext"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="text"/>
            <variable value="tgt_n"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Narrative"/>
            </parameter>
          </target>
          <rule>
            <name value="settextstatus"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="tgt_n"/>
              <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="tgt_n"/>
              <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="creating identifier"/>
          <source>
            <context value="src"/>
            <variable value="sc"/>
            <condition value="identifier.exists().not()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="identifier"/>
            <variable value="tt_id"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Identifier"/>
            </parameter>
          </target>
          <rule>
            <name value="creating id"/>
            <source>
              <context value="src"/>
              <element value="id"/>
              <variable value="uuid"/>
            </source>
            <target>
              <context value="tt_id"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="uuid"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="creating use"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="tt_id"/>
              <element value="use"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="official"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="creating identifier type"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="tt_id"/>
              <element value="type"/>
              <variable value="ty"/>
            </target>
            <rule>
              <name value="creating identifier type"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <context value="ty"/>
                <element value="coding"/>
                <variable value="ty_c"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="CodeableConcept"/>
                </parameter>
              </target>
              <rule>
                <name value="creating coding"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="ty_c"/>
                  <element value="system"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString
                                 value="https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="creating code"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="ty_c"/>
                  <element value="code"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="fhir-id"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="creating display"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="ty_c"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="FHIR Id"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <rule>
              <name value="creating system"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <context value="tt_id"/>
                <element value="system"/>
                <transform value="copy"/>
                <parameter>
                  <valueString
                               value="https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="owner"/>
              <source>
                <context value="src"/>
                <element value="owner"/>
                <variable value="sp"/>
              </source>
              <target>
                <context value="tt_id"/>
                <element value="assigner"/>
                <variable value="t_assigner"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Reference"/>
                </parameter>
              </target>
              <rule>
                <name value="reference"/>
                <source>
                  <context value="sp"/>
                  <element value="reference"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="t_assigner"/>
                  <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="setting default display"/>
                <source>
                  <context value="sp"/>
                  <condition value="sp.display.exists().not()"/>
                </source>
                <target>
                  <context value="t_assigner"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="Unknown display"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="display"/>
                <source>
                  <context value="sp"/>
                  <element value="display"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="t_assigner"/>
                  <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>
          </rule>
          <documentation value="Create identifier"/>
        </rule>
        <rule>
          <name value="set profile in meta"/>
          <source>
            <context value="src"/>
            <element value="meta"/>
            <variable value="s_meta"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="meta"/>
            <variable value="t_meta"/>
          </target>
          <rule>
            <name value="lastUpdated"/>
            <source>
              <context value="s_meta"/>
              <element value="lastUpdated"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="t_meta"/>
              <element value="lastUpdated"/>
              <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="s_meta"/>
              <element value="language"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="t_meta"/>
              <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="tags"/>
            <source>
              <context value="s_meta"/>
              <element value="tags"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="t_meta"/>
              <element value="tags"/>
              <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="setprofileinmeta"/>
            <source>
              <context value="src"/>
              <element value="meta"/>
              <condition value="profile.exists().not()"/>
            </source>
            <target>
              <context value="t_meta"/>
              <element value="profile"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.slade360.co.ke/fhir/StructureDefinition/task"/>
              </parameter>
            </target>
          </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="period"/>
          <source>
            <context value="src"/>
            <element value="period"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <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="mapping business status"/>
          <source>
            <context value="src"/>
            <variable value="sb"/>
            <condition value="businessStatus.exists()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="businessStatus"/>
            <variable value="tb"/>
          </target>
          <rule>
            <name value="text"/>
            <source>
              <context value="sb"/>
              <element value="text"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="tb"/>
              <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="basedOn"/>
          <source>
            <context value="src"/>
            <element value="basedOn"/>
            <variable value="sb"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="basedOn"/>
            <variable value="tb"/>
          </target>
          <dependent>
            <name value="TransformReference"/>
            <parameter>
              <valueId value="sb"/>
            </parameter>
            <parameter>
              <valueId value="tb"/>
            </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="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="executionPeriod"/>
          <source>
            <context value="src"/>
            <element value="executionPeriod"/>
            <variable value="sp"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="executionPeriod"/>
            <variable value="tp"/>
          </target>
          <dependent>
            <name value="TransformPeriod"/>
            <parameter>
              <valueId value="sp"/>
            </parameter>
            <parameter>
              <valueId value="tp"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="focus"/>
          <source>
            <context value="src"/>
            <element value="focus"/>
            <variable value="sf"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="focus"/>
            <variable value="tf"/>
          </target>
          <dependent>
            <name value="TransformReference"/>
            <parameter>
              <valueId value="sf"/>
            </parameter>
            <parameter>
              <valueId value="tf"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="for"/>
          <source>
            <context value="src"/>
            <element value="for"/>
            <variable value="sf"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="for"/>
            <variable value="tf"/>
          </target>
          <dependent>
            <name value="TransformReference"/>
            <parameter>
              <valueId value="sf"/>
            </parameter>
            <parameter>
              <valueId value="tf"/>
            </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="owner"/>
          <source>
            <context value="src"/>
            <element value="owner"/>
            <variable value="so"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="owner"/>
            <variable value="to"/>
          </target>
          <dependent>
            <name value="TransformReference"/>
            <parameter>
              <valueId value="so"/>
            </parameter>
            <parameter>
              <valueId value="to"/>
            </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="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="creating requested performer"/>
          <source>
            <context value="src"/>
            <condition value="requestedPerformer.exists().not()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="requestedPerformer"/>
            <variable value="to"/>
            <transform value="create"/>
            <parameter>
              <valueString value="CodeableReference"/>
            </parameter>
          </target>
          <rule>
            <name value="owner"/>
            <source>
              <context value="src"/>
              <element value="owner"/>
              <variable value="so"/>
            </source>
            <target>
              <context value="to"/>
              <element value="reference"/>
              <variable value="to"/>
            </target>
            <dependent>
              <name value="TransformReference"/>
              <parameter>
                <valueId value="so"/>
              </parameter>
              <parameter>
                <valueId value="to"/>
              </parameter>
            </dependent>
          </rule>
        </rule>
        <rule>
          <name value="creating business status"/>
          <source>
            <context value="src"/>
            <condition value="businessStatus.exists().not()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="businessStatus"/>
            <variable value="tb"/>
            <transform value="create"/>
            <parameter>
              <valueString value="CodeableConcept"/>
            </parameter>
          </target>
          <rule>
            <name value="basedOn"/>
            <source>
              <context value="src"/>
              <element value="basedOn"/>
              <listMode value="first"/>
              <variable value="st"/>
            </source>
            <rule>
              <name value="type"/>
              <source>
                <context value="st"/>
                <element value="type"/>
                <variable value="text"/>
              </source>
              <target>
                <context value="tb"/>
                <element value="text"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="text"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="businessStatus"/>
          <source>
            <context value="src"/>
            <element value="businessStatus"/>
            <variable value="st"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="businessStatus"/>
            <variable value="ts"/>
          </target>
          <rule>
            <name value="text"/>
            <source>
              <context value="st"/>
              <element value="text"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="ts"/>
              <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>
      </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="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>
      </group>
      <group>
        <name value="TransformPeriod"/>
        <typeMode value="types"/>
        <input>
          <name value="src"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="start"/>
          <source>
            <context value="src"/>
            <element value="start"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <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>
          <name value="end"/>
          <source>
            <context value="src"/>
            <element value="end"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <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>
      </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>
    </StructureMap>