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

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

Active as of 2026-05-21

Raw xml | Download

    <StructureMap xmlns="http://hl7.org/fhir">
      <id value="Patient4toSGHI5"/>
      <text>
        <status value="generated"/>
        <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap Patient4toSGHI5</b></p><a name="Patient4toSGHI5"> </a><a name="hcPatient4toSGHI5"> </a><pre class="fml">
    <span style="color: #cc00cc">/// <b>url</b> = </span><span style="color: blue">'https://fhir.slade360.co.ke/fhir/StructureMap/Patient4toSGHI5'</span>
    <span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'Patient4toSGHI5'</span>
    <span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'Patient 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/Patient<span style="color: navy">&quot; </span><b>alias </b>PatientR4 <b>as </b><b>source</b>
    <b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-patient.html" title="SGHI Patient">https://fhir.slade360.co.ke/fhir/StructureDefinition/patient</a><span style="color: navy">&quot; </span><b>alias </b>SGHIPatient <b>as </b><b>target</b>
    <b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-human-name.html" title="SGHI HumanName">https://fhir.slade360.co.ke/fhir/StructureDefinition/human-name</a><span style="color: navy">&quot; </span><b>alias </b>SGHIHumanName <b>as </b><b>produced</b>
    <b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-contact-point.html" title="SGHI ContactPoint">https://fhir.slade360.co.ke/fhir/StructureDefinition/contact-point</a><span style="color: navy">&quot; </span><b>alias </b>SGHIContactPoint <b>as </b><b>produced</b>
    <b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-codeableconcept.html" title="SGHI CodeableConcept">https://fhir.slade360.co.ke/fhir/StructureDefinition/codeableconcept</a><span style="color: navy">&quot; </span><b>alias </b>SGHICodeableConcept <b>as </b><b>produced</b>
    <b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-reference.html" title="SGHI Reference">https://fhir.slade360.co.ke/fhir/StructureDefinition/reference</a><span style="color: navy">&quot; </span><b>alias </b>SGHIReference <b>as </b><b>produced</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>SGHIPatient<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>PatientR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>SGHIPatient<span style="color: navy">)</span><b> extends </b>DomainResource<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
    </span>  src.text<span style="color: navy"><b> -&gt; </b></span>tgt.text<span style="color: navy">;</span>
      src.identifier<b> as </b><span style="color: maroon">s</span><b> where </b>(s.system != 'healthcloud.msisdn') and s.value.exists()<span style="color: navy"><b> -&gt; </b></span>tgt.identifier<b> as </b><span style="color: maroon">t</span><b> then</b><span style="color: navy"> {
    </span>    s.use<span style="color: navy"><b> -&gt; </b></span>t.use <i>&quot;copyuse&quot;</i><span style="color: navy">;</span>
        s.value<span style="color: navy"><b> -&gt; </b></span>t.value <i>&quot;copyvalue&quot;</i><span style="color: navy">;</span>
        s.period<span style="color: navy"><b> -&gt; </b></span>t.period <i>&quot;copyperiod&quot;</i><span style="color: navy">;</span>
        s.type<b> as </b><span style="color: maroon">ty</span><b> then</b><span style="color: navy"> {
    </span>      ty.coding first<b> as </b><span style="color: maroon">cf</span><b> then</b><span style="color: navy"> {
    </span>        cf.system<b> as </b><span style="color: maroon">legacy</span><span style="color: navy"><b> -&gt; </b></span>t.type<b> as </b><span style="color: maroon">result</span><b> then </b>TranslateLegacyIdentifier<span style="color: navy">(</span><span style="color: maroon">legacy</span><span style="color: navy">, </span><span style="color: maroon">result</span><span style="color: navy">)</span> <i>&quot;calltranslator&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;whensourcehascoding&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;mapidentifiertype&quot;</i><span style="color: navy">;</span>
        s<span style="color: navy"><b> -&gt; </b></span>t.system = <span style="color: blue">'https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem'</span> <i>&quot;SetFixedIdentifierSystem&quot;</i><span style="color: navy">;</span>
        src.managingOrganization<b> as </b><span style="color: maroon">mo</span><span style="color: navy"><b> -&gt; </b></span>t.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>      mo.reference<span style="color: navy"><b> -&gt; </b></span>t_assigner.reference <i>&quot;setassignerreffrommo&quot;</i><span style="color: navy">;</span>
          mo.display<span style="color: navy"><b> -&gt; </b></span>t_assigner.display <i>&quot;setassignerdisplayfrommo&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;createandpopulateassigner&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;processoneidentifier&quot;</i><span style="color: navy">;</span>
      src.identifier<b> as </b><span style="color: maroon">s_id</span><span style="color: navy"><b> -&gt; </b></span>tgt.identifier<b> as </b><span style="color: maroon">t_id</span><b> then</b><span style="color: navy"> {
    </span>    s_id.use<span style="color: navy"><b> -&gt; </b></span>t_id.use <i>&quot;copyuse&quot;</i><span style="color: navy">;</span>
        src.id<b> as </b><span style="color: maroon">uuid</span><span style="color: navy"><b> -&gt; </b></span>t_id.value = <span style="color: maroon">uuid</span><span style="color: navy">;</span>
        s_id.period<span style="color: navy"><b> -&gt; </b></span>t_id.period<span style="color: navy">;</span>
        s_id.type<b> as </b><span style="color: maroon">st</span><span style="color: navy"><b> -&gt; </b></span>t_id.type<b> as </b><span style="color: maroon">tt</span><b> then</b><span style="color: navy"> {
    </span>      st.coding<span style="color: navy"><b> -&gt; </b></span> tt.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">tt</span><span style="color: navy">, </span> tt.system = <span style="color: blue">'https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem'</span><span style="color: navy">, </span> tt.code = <span style="color: blue">'fhir-id'</span><span style="color: navy">, </span> tt.display = <span style="color: blue">'FHIR Id'</span><span style="color: navy">;</span>
        <span style="color: navy">}</span><span style="color: navy">;</span>
        s_id<span style="color: navy"><b> -&gt; </b></span>t_id.system = <span style="color: blue">'https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem'</span> <i>&quot;SetFixedIdentifierSystem&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;create the default FHIR ID identifier type&quot;</i><span style="color: navy">;</span>
      src.active<span style="color: navy"><b> -&gt; </b></span>tgt.active<span style="color: navy">;</span>
      src.name first<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.name<b> as </b><span style="color: maroon">t</span><b> then </b>SGHIHumanNameMap<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.telecom<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.telecom<b> as </b><span style="color: maroon">t</span><b> then </b>SGHIContactPointMap<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.gender<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.gender = <b>translate</b><span style="color: navy">(</span><span style="color: maroon">v</span><span style="color: navy">, </span><span style="color: blue">'http://hl7.org/fhir/uv/xver/ConceptMap/pat.gender-4to5'</span><span style="color: navy">, </span><span style="color: blue">'code'</span><span style="color: navy">)</span> <i>&quot;mapgender&quot;</i><span style="color: navy">;</span>
      src.birthDate<span style="color: navy"><b> -&gt; </b></span>tgt.birthDate<span style="color: navy">;</span>
      src.deceased<span style="color: navy"> : </span>boolean<span style="color: navy"><b> -&gt; </b></span>tgt.deceased<span style="color: navy">;</span>
      src.deceased<span style="color: navy"> : </span>dateTime<span style="color: navy"><b> -&gt; </b></span>tgt.deceased<span style="color: navy">;</span>
      src.multipleBirth<span style="color: navy"> : </span>boolean<span style="color: navy"><b> -&gt; </b></span>tgt.multipleBirth<span style="color: navy">;</span>
      src.multipleBirth<span style="color: navy"> : </span>integer<span style="color: navy"><b> -&gt; </b></span>tgt.multipleBirth<span style="color: navy">;</span>
      src.address<span style="color: navy"><b> -&gt; </b></span>tgt.address<span style="color: navy">;</span>
      src.photo<span style="color: navy"><b> -&gt; </b></span>tgt.photo<span style="color: navy">;</span>
      src.contact<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.contact<b> as </b><span style="color: maroon">t</span><b> then </b>SGHIPatientContact<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.communication<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.communication<b> as </b><span style="color: maroon">t</span><b> then </b>PatientCommunication<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.managingOrganization<span style="color: navy"><b> -&gt; </b></span>tgt.managingOrganization<span style="color: navy">;</span>
      src.generalPractitioner<span style="color: navy"><b> -&gt; </b></span>tgt.generalPractitioner<span style="color: navy">;</span>
      src.link<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.link<b> as </b><span style="color: maroon">t</span><b> then </b>SGHIPatientLink<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><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">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.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/patient'</span> <i>&quot;addprofile&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;addprofiletometa&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}

    </span><b>group </b>TranslateLegacyIdentifier<span style="color: navy">(</span><b>source</b> <span style="color: maroon">legacy_code</span><span style="color: navy"> : </span>string, <b>target</b> <span style="color: maroon">result</span><span style="color: navy"> : </span>CodeableConcept<span style="color: navy">)</span><span style="color: navy"> {
    </span>  legacy_code<span style="color: navy"><b> -&gt; </b></span>result.coding = <b>translate</b><span style="color: navy">(</span><span style="color: maroon">legacy_code</span><span style="color: navy">, </span><span style="color: blue">'https://fhir.slade360.co.ke/fhir/ConceptMap/LegacyIdentifierToSGHI'</span><span style="color: navy">, </span><span style="color: blue">'Coding'</span><span style="color: navy">)</span> <i>&quot;translatetocoding&quot;</i><span style="color: navy">;</span>
      legacy_code<span style="color: navy"><b> -&gt; </b></span>result.text <i>&quot;settext&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}

    </span><b>group </b>SGHIHumanNameMap<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy">)</span><b> extends </b>HumanName<span style="color: navy"> {
    </span>  src.use<span style="color: navy"><b> -&gt; </b></span>tgt.use<span style="color: navy">;</span>
      src.text<span style="color: navy"><b> -&gt; </b></span>tgt.text<span style="color: navy">;</span>
      src.family<span style="color: navy"><b> -&gt; </b></span>tgt.family<span style="color: navy">;</span>
      src.given<span style="color: navy"><b> -&gt; </b></span>tgt.given<span style="color: navy">;</span>
      src.prefix<span style="color: navy"><b> -&gt; </b></span>tgt.prefix<span style="color: navy">;</span>
      src.suffix<span style="color: navy"><b> -&gt; </b></span>tgt.suffix<span style="color: navy">;</span>
      src.period<span style="color: navy"><b> -&gt; </b></span>tgt.period<span style="color: navy">;</span>
    <span style="color: navy">}

    </span><b>group </b>SGHIContactPointMap<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy">)</span><b> extends </b>ContactPoint<span style="color: navy"> {
    </span>  src.system<span style="color: navy"><b> -&gt; </b></span>tgt.system<span style="color: navy">;</span>
      src.value<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
      src.use<span style="color: navy"><b> -&gt; </b></span>tgt.use<span style="color: navy">;</span>
      src.rank<span style="color: navy"><b> -&gt; </b></span>tgt.rank<span style="color: navy">;</span>
      src.period<span style="color: navy"><b> -&gt; </b></span>tgt.period<span style="color: navy">;</span>
    <span style="color: navy">}

    </span><b>group </b>SGHICodeableConceptCopy<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy">)</span><b> extends </b>CodeableConcept<span style="color: navy"> {
    </span>  src.coding<span style="color: navy"><b> -&gt; </b></span>tgt.coding<span style="color: navy">;</span>
      src.text<span style="color: navy"><b> -&gt; </b></span>tgt.text<span style="color: navy">;</span>
    <span style="color: navy">}

    </span><b>group </b>SGHIPatientContact<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
    </span>  src.relationship<b> as </b><span style="color: maroon">r</span><span style="color: navy"><b> -&gt; </b></span>tgt.relationship<b> as </b><span style="color: maroon">t</span><b> then </b>SGHICodeableConceptCopy<span style="color: navy">(</span><span style="color: maroon">r</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.name<b> as </b><span style="color: maroon">n</span><span style="color: navy"><b> -&gt; </b></span>tgt.name<b> as </b><span style="color: maroon">tn</span><b> then </b>SGHIHumanNameMap<span style="color: navy">(</span><span style="color: maroon">n</span><span style="color: navy">, </span><span style="color: maroon">tn</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.telecom first<b> as </b><span style="color: maroon">c</span><span style="color: navy"><b> -&gt; </b></span>tgt.telecom<b> as </b><span style="color: maroon">tc</span><b> then </b>SGHIContactPointMap<span style="color: navy">(</span><span style="color: maroon">c</span><span style="color: navy">, </span><span style="color: maroon">tc</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src.address<span style="color: navy"><b> -&gt; </b></span>tgt.address<span style="color: navy">;</span>
      src.gender<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.gender = <b>translate</b><span style="color: navy">(</span><span style="color: maroon">v</span><span style="color: navy">, </span><span style="color: blue">'http://hl7.org/fhir/uv/xver/ConceptMap/pat.co.gender-4to5'</span><span style="color: navy">, </span><span style="color: blue">'code'</span><span style="color: navy">)</span> <i>&quot;mapcontactgender&quot;</i><span style="color: navy">;</span>
      src.organization<span style="color: navy"><b> -&gt; </b></span>tgt.organization<span style="color: navy">;</span>
      src.period<span style="color: navy"><b> -&gt; </b></span>tgt.period<span style="color: navy">;</span>
    <span style="color: navy">}

    </span><b>group </b>PatientCommunication<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
    </span>  src.language<span style="color: navy"><b> -&gt; </b></span>tgt.language<span style="color: navy">;</span>
      src.preferred<span style="color: navy"><b> -&gt; </b></span>tgt.preferred<span style="color: navy">;</span>
    <span style="color: navy">}

    </span><b>group </b>SGHIPatientLink<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
    </span>  src.other<span style="color: navy"><b> -&gt; </b></span>tgt.other<span style="color: navy">;</span>
      src.type<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.type = <b>translate</b><span style="color: navy">(</span><span style="color: maroon">v</span><span style="color: navy">, </span><span style="color: blue">'http://hl7.org/fhir/uv/xver/ConceptMap/pat.li.type-4to5'</span><span style="color: navy">, </span><span style="color: blue">'code'</span><span style="color: navy">)</span> <i>&quot;maplinktype&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}

    </span></pre></div>
      </text>
      <url value="https://fhir.slade360.co.ke/fhir/StructureMap/Patient4toSGHI5"/>
      <version value="0.1.0"/>
      <name value="Patient4toSGHI5"/>
      <title value="Patient 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="PatientTransformsR4SGHIR5"/>
      <structure>
        <url value="http://hl7.org/fhir/4.0/StructureDefinition/Patient"/>
        <mode value="source"/>
        <alias value="PatientR4"/>
      </structure>
      <structure>
        <url
             value="https://fhir.slade360.co.ke/fhir/StructureDefinition/patient"/>
        <mode value="target"/>
        <alias value="SGHIPatient"/>
      </structure>
      <structure>
        <url
             value="https://fhir.slade360.co.ke/fhir/StructureDefinition/human-name"/>
        <mode value="produced"/>
        <alias value="SGHIHumanName"/>
      </structure>
      <structure>
        <url
             value="https://fhir.slade360.co.ke/fhir/StructureDefinition/contact-point"/>
        <mode value="produced"/>
        <alias value="SGHIContactPoint"/>
      </structure>
      <structure>
        <url
             value="https://fhir.slade360.co.ke/fhir/StructureDefinition/codeableconcept"/>
        <mode value="produced"/>
        <alias value="SGHICodeableConcept"/>
      </structure>
      <structure>
        <url
             value="https://fhir.slade360.co.ke/fhir/StructureDefinition/reference"/>
        <mode value="produced"/>
        <alias value="SGHIReference"/>
      </structure>
      <import value="http://hl7.org/fhir/StructureMap/*4to5"/>
      <group>
        <name value="SGHIPatient"/>
        <extends value="DomainResource"/>
        <typeMode value="type-and-types"/>
        <input>
          <name value="src"/>
          <type value="PatientR4"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <type value="SGHIPatient"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="text"/>
          <source>
            <context value="src"/>
            <element value="text"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="text"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="processoneidentifier"/>
          <source>
            <context value="src"/>
            <element value="identifier"/>
            <variable value="s"/>
            <condition
                       value="(s.system != 'healthcloud.msisdn') and s.value.exists()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="identifier"/>
            <variable value="t"/>
          </target>
          <rule>
            <name value="copyuse"/>
            <source>
              <context value="s"/>
              <element value="use"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="t"/>
              <element value="use"/>
              <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="copyvalue"/>
            <source>
              <context value="s"/>
              <element value="value"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="t"/>
              <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>
            <name value="copyperiod"/>
            <source>
              <context value="s"/>
              <element value="period"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="t"/>
              <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="mapidentifiertype"/>
            <source>
              <context value="s"/>
              <element value="type"/>
              <variable value="ty"/>
            </source>
            <rule>
              <name value="whensourcehascoding"/>
              <source>
                <context value="ty"/>
                <element value="coding"/>
                <listMode value="first"/>
                <variable value="cf"/>
              </source>
              <rule>
                <name value="calltranslator"/>
                <source>
                  <context value="cf"/>
                  <element value="system"/>
                  <variable value="legacy"/>
                </source>
                <target>
                  <context value="t"/>
                  <element value="type"/>
                  <variable value="result"/>
                </target>
                <dependent>
                  <name value="TranslateLegacyIdentifier"/>
                  <parameter>
                    <valueId value="legacy"/>
                  </parameter>
                  <parameter>
                    <valueId value="result"/>
                  </parameter>
                </dependent>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="SetFixedIdentifierSystem"/>
            <source>
              <context value="s"/>
            </source>
            <target>
              <context value="t"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="createandpopulateassigner"/>
            <source>
              <context value="src"/>
              <element value="managingOrganization"/>
              <variable value="mo"/>
            </source>
            <target>
              <context value="t"/>
              <element value="assigner"/>
              <variable value="t_assigner"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <rule>
              <name value="setassignerreffrommo"/>
              <source>
                <context value="mo"/>
                <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="setassignerdisplayfrommo"/>
              <source>
                <context value="mo"/>
                <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>
        <rule>
          <name value="create the default FHIR ID identifier type"/>
          <source>
            <context value="src"/>
            <element value="identifier"/>
            <variable value="s_id"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="identifier"/>
            <variable value="t_id"/>
          </target>
          <rule>
            <name value="copyuse"/>
            <source>
              <context value="s_id"/>
              <element value="use"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="t_id"/>
              <element value="use"/>
              <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="id"/>
            <source>
              <context value="src"/>
              <element value="id"/>
              <variable value="uuid"/>
            </source>
            <target>
              <context value="t_id"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="uuid"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="period"/>
            <source>
              <context value="s_id"/>
              <element value="period"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="t_id"/>
              <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="type"/>
            <source>
              <context value="s_id"/>
              <element value="type"/>
              <variable value="st"/>
            </source>
            <target>
              <context value="t_id"/>
              <element value="type"/>
              <variable value="tt"/>
            </target>
            <rule>
              <name value="coding"/>
              <source>
                <context value="st"/>
                <element value="coding"/>
              </source>
              <target>
                <context value="tt"/>
                <element value="coding"/>
                <variable value="tt"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="CodeableConcept"/>
                </parameter>
              </target>
              <target>
                <context value="tt"/>
                <element value="system"/>
                <transform value="copy"/>
                <parameter>
                  <valueString
                               value="https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"/>
                </parameter>
              </target>
              <target>
                <context value="tt"/>
                <element value="code"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="fhir-id"/>
                </parameter>
              </target>
              <target>
                <context value="tt"/>
                <element value="display"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="FHIR Id"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="SetFixedIdentifierSystem"/>
            <source>
              <context value="s_id"/>
            </source>
            <target>
              <context value="t_id"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"/>
              </parameter>
            </target>
          </rule>
        </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="name"/>
          <source>
            <context value="src"/>
            <element value="name"/>
            <listMode value="first"/>
            <variable value="s"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="name"/>
            <variable value="t"/>
          </target>
          <dependent>
            <name value="SGHIHumanNameMap"/>
            <parameter>
              <valueId value="s"/>
            </parameter>
            <parameter>
              <valueId value="t"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="telecom"/>
          <source>
            <context value="src"/>
            <element value="telecom"/>
            <variable value="s"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="telecom"/>
            <variable value="t"/>
          </target>
          <dependent>
            <name value="SGHIContactPointMap"/>
            <parameter>
              <valueId value="s"/>
            </parameter>
            <parameter>
              <valueId value="t"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="mapgender"/>
          <source>
            <context value="src"/>
            <element value="gender"/>
            <variable value="v"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="gender"/>
            <transform value="translate"/>
            <parameter>
              <valueId value="v"/>
            </parameter>
            <parameter>
              <valueString
                           value="http://hl7.org/fhir/uv/xver/ConceptMap/pat.gender-4to5"/>
            </parameter>
            <parameter>
              <valueString value="code"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="birthDate"/>
          <source>
            <context value="src"/>
            <element value="birthDate"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="birthDate"/>
            <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="deceasedBoolean"/>
          <source>
            <context value="src"/>
            <type value="boolean"/>
            <element value="deceased"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="deceased"/>
            <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="deceasedDateTime"/>
          <source>
            <context value="src"/>
            <type value="dateTime"/>
            <element value="deceased"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="deceased"/>
            <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="multipleBirthBoolean"/>
          <source>
            <context value="src"/>
            <type value="boolean"/>
            <element value="multipleBirth"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="multipleBirth"/>
            <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="multipleBirthInteger"/>
          <source>
            <context value="src"/>
            <type value="integer"/>
            <element value="multipleBirth"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="multipleBirth"/>
            <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="address"/>
          <source>
            <context value="src"/>
            <element value="address"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="address"/>
            <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="photo"/>
          <source>
            <context value="src"/>
            <element value="photo"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="photo"/>
            <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="contact"/>
          <source>
            <context value="src"/>
            <element value="contact"/>
            <variable value="s"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="contact"/>
            <variable value="t"/>
          </target>
          <dependent>
            <name value="SGHIPatientContact"/>
            <parameter>
              <valueId value="s"/>
            </parameter>
            <parameter>
              <valueId value="t"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="communication"/>
          <source>
            <context value="src"/>
            <element value="communication"/>
            <variable value="s"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="communication"/>
            <variable value="t"/>
          </target>
          <dependent>
            <name value="PatientCommunication"/>
            <parameter>
              <valueId value="s"/>
            </parameter>
            <parameter>
              <valueId value="t"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="managingOrganization"/>
          <source>
            <context value="src"/>
            <element value="managingOrganization"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="managingOrganization"/>
            <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="generalPractitioner"/>
          <source>
            <context value="src"/>
            <element value="generalPractitioner"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="generalPractitioner"/>
            <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="link"/>
          <source>
            <context value="src"/>
            <element value="link"/>
            <variable value="s"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="link"/>
            <variable value="t"/>
          </target>
          <dependent>
            <name value="SGHIPatientLink"/>
            <parameter>
              <valueId value="s"/>
            </parameter>
            <parameter>
              <valueId value="t"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="createhardcodedtext"/>
          <source>
            <context value="src"/>
          </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="addprofiletometa"/>
          <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/patient"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </group>
      <group>
        <name value="TranslateLegacyIdentifier"/>
        <input>
          <name value="legacy_code"/>
          <type value="string"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="result"/>
          <type value="CodeableConcept"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="translatetocoding"/>
          <source>
            <context value="legacy_code"/>
          </source>
          <target>
            <context value="result"/>
            <element value="coding"/>
            <transform value="translate"/>
            <parameter>
              <valueId value="legacy_code"/>
            </parameter>
            <parameter>
              <valueString
                           value="https://fhir.slade360.co.ke/fhir/ConceptMap/LegacyIdentifierToSGHI"/>
            </parameter>
            <parameter>
              <valueString value="Coding"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="settext"/>
          <source>
            <context value="legacy_code"/>
          </source>
          <target>
            <context value="result"/>
            <element value="text"/>
          </target>
        </rule>
      </group>
      <group>
        <name value="SGHIHumanNameMap"/>
        <extends value="HumanName"/>
        <input>
          <name value="src"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="use"/>
          <source>
            <context value="src"/>
            <element value="use"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="use"/>
            <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="src"/>
            <element value="text"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="text"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="family"/>
          <source>
            <context value="src"/>
            <element value="family"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="family"/>
            <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="given"/>
          <source>
            <context value="src"/>
            <element value="given"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="given"/>
            <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="prefix"/>
          <source>
            <context value="src"/>
            <element value="prefix"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="prefix"/>
            <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="suffix"/>
          <source>
            <context value="src"/>
            <element value="suffix"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="suffix"/>
            <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>
      </group>
      <group>
        <name value="SGHIContactPointMap"/>
        <extends value="ContactPoint"/>
        <input>
          <name value="src"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <mode value="target"/>
        </input>
        <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>
        <rule>
          <name value="value"/>
          <source>
            <context value="src"/>
            <element value="value"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <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>
          <name value="use"/>
          <source>
            <context value="src"/>
            <element value="use"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="use"/>
            <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="rank"/>
          <source>
            <context value="src"/>
            <element value="rank"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="rank"/>
            <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>
      </group>
      <group>
        <name value="SGHICodeableConceptCopy"/>
        <extends value="CodeableConcept"/>
        <input>
          <name value="src"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="coding"/>
          <source>
            <context value="src"/>
            <element value="coding"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="coding"/>
            <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="src"/>
            <element value="text"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="text"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
      </group>
      <group>
        <name value="SGHIPatientContact"/>
        <extends value="BackboneElement"/>
        <input>
          <name value="src"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="relationship"/>
          <source>
            <context value="src"/>
            <element value="relationship"/>
            <variable value="r"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="relationship"/>
            <variable value="t"/>
          </target>
          <dependent>
            <name value="SGHICodeableConceptCopy"/>
            <parameter>
              <valueId value="r"/>
            </parameter>
            <parameter>
              <valueId value="t"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="name"/>
          <source>
            <context value="src"/>
            <element value="name"/>
            <variable value="n"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="name"/>
            <variable value="tn"/>
          </target>
          <dependent>
            <name value="SGHIHumanNameMap"/>
            <parameter>
              <valueId value="n"/>
            </parameter>
            <parameter>
              <valueId value="tn"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="telecom"/>
          <source>
            <context value="src"/>
            <element value="telecom"/>
            <listMode value="first"/>
            <variable value="c"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="telecom"/>
            <variable value="tc"/>
          </target>
          <dependent>
            <name value="SGHIContactPointMap"/>
            <parameter>
              <valueId value="c"/>
            </parameter>
            <parameter>
              <valueId value="tc"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="address"/>
          <source>
            <context value="src"/>
            <element value="address"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="address"/>
            <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="mapcontactgender"/>
          <source>
            <context value="src"/>
            <element value="gender"/>
            <variable value="v"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="gender"/>
            <transform value="translate"/>
            <parameter>
              <valueId value="v"/>
            </parameter>
            <parameter>
              <valueString
                           value="http://hl7.org/fhir/uv/xver/ConceptMap/pat.co.gender-4to5"/>
            </parameter>
            <parameter>
              <valueString value="code"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="organization"/>
          <source>
            <context value="src"/>
            <element value="organization"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="organization"/>
            <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>
      </group>
      <group>
        <name value="PatientCommunication"/>
        <extends value="BackboneElement"/>
        <input>
          <name value="src"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <mode value="target"/>
        </input>
        <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="preferred"/>
          <source>
            <context value="src"/>
            <element value="preferred"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="preferred"/>
            <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="SGHIPatientLink"/>
        <extends value="BackboneElement"/>
        <input>
          <name value="src"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="other"/>
          <source>
            <context value="src"/>
            <element value="other"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="other"/>
            <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="maplinktype"/>
          <source>
            <context value="src"/>
            <element value="type"/>
            <variable value="v"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="type"/>
            <transform value="translate"/>
            <parameter>
              <valueId value="v"/>
            </parameter>
            <parameter>
              <valueString
                           value="http://hl7.org/fhir/uv/xver/ConceptMap/pat.li.type-4to5"/>
            </parameter>
            <parameter>
              <valueString value="code"/>
            </parameter>
          </target>
        </rule>
      </group>
    </StructureMap>