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 - JSON Representation

Active as of 2026-04-27

Raw json | Download

    {
      "resourceType" : "StructureMap",
      "id" : "Patient4toSGHI5",
      "text" : {
        "status" : "generated",
        "div" : "<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\">\r\n<span style=\"color: #cc00cc\">/// <b>url</b> = </span><span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/StructureMap/Patient4toSGHI5'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'Patient4toSGHI5'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'Patient Transforms: R4 → SGHI R5'</span>\r\n<span style=\"color: #cc00cc\">/// <b>status</b> = </span><span style=\"color: blue\">'active'</span>\r\n\r\n<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>\r\n<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>\r\n<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>\r\n<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>\r\n<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>\r\n<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>\r\n\r\n<b>imports</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/StructureMap/*4to5<span style=\"color: navy\">&quot;\r\n</span>\r\n<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\"> {\r\n</span>  src.text<span style=\"color: navy\"><b> -&gt; </b></span>tgt.text<span style=\"color: navy\">;</span>\r\n  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\"> {\r\n</span>    s.use<span style=\"color: navy\"><b> -&gt; </b></span>t.use <i>&quot;copyuse&quot;</i><span style=\"color: navy\">;</span>\r\n    s.value<span style=\"color: navy\"><b> -&gt; </b></span>t.value <i>&quot;copyvalue&quot;</i><span style=\"color: navy\">;</span>\r\n    s.period<span style=\"color: navy\"><b> -&gt; </b></span>t.period <i>&quot;copyperiod&quot;</i><span style=\"color: navy\">;</span>\r\n    s.type<b> as </b><span style=\"color: maroon\">ty</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      ty.coding first<b> as </b><span style=\"color: maroon\">cf</span><b> then</b><span style=\"color: navy\"> {\r\n</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>\r\n      <span style=\"color: navy\">}</span> <i>&quot;whensourcehascoding&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;mapidentifiertype&quot;</i><span style=\"color: navy\">;</span>\r\n    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>\r\n    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\"> {\r\n</span>      mo.reference<span style=\"color: navy\"><b> -&gt; </b></span>t_assigner.reference <i>&quot;setassignerreffrommo&quot;</i><span style=\"color: navy\">;</span>\r\n      mo.display<span style=\"color: navy\"><b> -&gt; </b></span>t_assigner.display <i>&quot;setassignerdisplayfrommo&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;createandpopulateassigner&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;processoneidentifier&quot;</i><span style=\"color: navy\">;</span>\r\n  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\"> {\r\n</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>\r\n    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>\r\n    s_id.period<span style=\"color: navy\"><b> -&gt; </b></span>t_id.period<span style=\"color: navy\">;</span>\r\n    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\"> {\r\n</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>\r\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n    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>\r\n  <span style=\"color: navy\">}</span> <i>&quot;create the default FHIR ID identifier type&quot;</i><span style=\"color: navy\">;</span>\r\n  src.active<span style=\"color: navy\"><b> -&gt; </b></span>tgt.active<span style=\"color: navy\">;</span>\r\n  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>\r\n  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>\r\n  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>\r\n  src.birthDate<span style=\"color: navy\"><b> -&gt; </b></span>tgt.birthDate<span style=\"color: navy\">;</span>\r\n  src.deceased<span style=\"color: navy\"> : </span>boolean<span style=\"color: navy\"><b> -&gt; </b></span>tgt.deceased<span style=\"color: navy\">;</span>\r\n  src.deceased<span style=\"color: navy\"> : </span>dateTime<span style=\"color: navy\"><b> -&gt; </b></span>tgt.deceased<span style=\"color: navy\">;</span>\r\n  src.multipleBirth<span style=\"color: navy\"> : </span>boolean<span style=\"color: navy\"><b> -&gt; </b></span>tgt.multipleBirth<span style=\"color: navy\">;</span>\r\n  src.multipleBirth<span style=\"color: navy\"> : </span>integer<span style=\"color: navy\"><b> -&gt; </b></span>tgt.multipleBirth<span style=\"color: navy\">;</span>\r\n  src.address<span style=\"color: navy\"><b> -&gt; </b></span>tgt.address<span style=\"color: navy\">;</span>\r\n  src.photo<span style=\"color: navy\"><b> -&gt; </b></span>tgt.photo<span style=\"color: navy\">;</span>\r\n  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>\r\n  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>\r\n  src.managingOrganization<span style=\"color: navy\"><b> -&gt; </b></span>tgt.managingOrganization<span style=\"color: navy\">;</span>\r\n  src.generalPractitioner<span style=\"color: navy\"><b> -&gt; </b></span>tgt.generalPractitioner<span style=\"color: navy\">;</span>\r\n  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>\r\n  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\"> {\r\n</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>\r\n    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>\r\n  <span style=\"color: navy\">}</span> <i>&quot;createhardcodedtext&quot;</i><span style=\"color: navy\">;</span>\r\n  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\"> {\r\n</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>\r\n  <span style=\"color: navy\">}</span> <i>&quot;addprofiletometa&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</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\"> {\r\n</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>\r\n  legacy_code<span style=\"color: navy\"><b> -&gt; </b></span>result.text <i>&quot;settext&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</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\"> {\r\n</span>  src.use<span style=\"color: navy\"><b> -&gt; </b></span>tgt.use<span style=\"color: navy\">;</span>\r\n  src.text<span style=\"color: navy\"><b> -&gt; </b></span>tgt.text<span style=\"color: navy\">;</span>\r\n  src.family<span style=\"color: navy\"><b> -&gt; </b></span>tgt.family<span style=\"color: navy\">;</span>\r\n  src.given<span style=\"color: navy\"><b> -&gt; </b></span>tgt.given<span style=\"color: navy\">;</span>\r\n  src.prefix<span style=\"color: navy\"><b> -&gt; </b></span>tgt.prefix<span style=\"color: navy\">;</span>\r\n  src.suffix<span style=\"color: navy\"><b> -&gt; </b></span>tgt.suffix<span style=\"color: navy\">;</span>\r\n  src.period<span style=\"color: navy\"><b> -&gt; </b></span>tgt.period<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</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\"> {\r\n</span>  src.system<span style=\"color: navy\"><b> -&gt; </b></span>tgt.system<span style=\"color: navy\">;</span>\r\n  src.value<span style=\"color: navy\"><b> -&gt; </b></span>tgt.value<span style=\"color: navy\">;</span>\r\n  src.use<span style=\"color: navy\"><b> -&gt; </b></span>tgt.use<span style=\"color: navy\">;</span>\r\n  src.rank<span style=\"color: navy\"><b> -&gt; </b></span>tgt.rank<span style=\"color: navy\">;</span>\r\n  src.period<span style=\"color: navy\"><b> -&gt; </b></span>tgt.period<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</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\"> {\r\n</span>  src.coding<span style=\"color: navy\"><b> -&gt; </b></span>tgt.coding<span style=\"color: navy\">;</span>\r\n  src.text<span style=\"color: navy\"><b> -&gt; </b></span>tgt.text<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</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\"> {\r\n</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>\r\n  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>\r\n  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>\r\n  src.address<span style=\"color: navy\"><b> -&gt; </b></span>tgt.address<span style=\"color: navy\">;</span>\r\n  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>\r\n  src.organization<span style=\"color: navy\"><b> -&gt; </b></span>tgt.organization<span style=\"color: navy\">;</span>\r\n  src.period<span style=\"color: navy\"><b> -&gt; </b></span>tgt.period<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</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\"> {\r\n</span>  src.language<span style=\"color: navy\"><b> -&gt; </b></span>tgt.language<span style=\"color: navy\">;</span>\r\n  src.preferred<span style=\"color: navy\"><b> -&gt; </b></span>tgt.preferred<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</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\"> {\r\n</span>  src.other<span style=\"color: navy\"><b> -&gt; </b></span>tgt.other<span style=\"color: navy\">;</span>\r\n  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>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
      },
      "url" : "https://fhir.slade360.co.ke/fhir/StructureMap/Patient4toSGHI5",
      "version" : "0.1.0",
      "name" : "Patient4toSGHI5",
      "title" : "Patient Transforms: R4 → SGHI R5",
      "status" : "active",
      "date" : "2026-04-27T09:21:43+00:00",
      "publisher" : "Kathurima Kimathi",
      "contact" : [
        {
          "name" : "Kathurima Kimathi",
          "telecom" : [
            {
              "system" : "url",
              "value" : "https://www.linkedin.com/in/kathurima-kimathi/"
            },
            {
              "system" : "email",
              "value" : "kathurimakimathi415@gmail.com"
            }
          ]
        },
        {
          "name" : "Oscar John",
          "telecom" : [
            {
              "system" : "email",
              "value" : "oscarjohnotieno@gmail.com",
              "use" : "work"
            }
          ]
        },
        {
          "name" : "Kennedy Omondi",
          "telecom" : [
            {
              "system" : "email",
              "value" : "kennankole@gmail.com",
              "use" : "work"
            }
          ]
        }
      ],
      "description" : "PatientTransformsR4SGHIR5",
      "structure" : [
        {
          "url" : "http://hl7.org/fhir/4.0/StructureDefinition/Patient",
          "mode" : "source",
          "alias" : "PatientR4"
        },
        {
          "url" : "https://fhir.slade360.co.ke/fhir/StructureDefinition/patient",
          "mode" : "target",
          "alias" : "SGHIPatient"
        },
        {
          "url" : "https://fhir.slade360.co.ke/fhir/StructureDefinition/human-name",
          "mode" : "produced",
          "alias" : "SGHIHumanName"
        },
        {
          "url" : "https://fhir.slade360.co.ke/fhir/StructureDefinition/contact-point",
          "mode" : "produced",
          "alias" : "SGHIContactPoint"
        },
        {
          "url" : "https://fhir.slade360.co.ke/fhir/StructureDefinition/codeableconcept",
          "mode" : "produced",
          "alias" : "SGHICodeableConcept"
        },
        {
          "url" : "https://fhir.slade360.co.ke/fhir/StructureDefinition/reference",
          "mode" : "produced",
          "alias" : "SGHIReference"
        }
      ],
      "import" : [
        "http://hl7.org/fhir/StructureMap/*4to5"
      ],
      "group" : [
        {
          "name" : "SGHIPatient",
          "extends" : "DomainResource",
          "typeMode" : "type-and-types",
          "input" : [
            {
              "name" : "src",
              "type" : "PatientR4",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "type" : "SGHIPatient",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "text",
              "source" : [
                {
                  "context" : "src",
                  "element" : "text",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "text",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "processoneidentifier",
              "source" : [
                {
                  "context" : "src",
                  "element" : "identifier",
                  "variable" : "s",
                  "condition" : "(s.system != 'healthcloud.msisdn') and s.value.exists()"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "identifier",
                  "variable" : "t"
                }
              ],
              "rule" : [
                {
                  "name" : "copyuse",
                  "source" : [
                    {
                      "context" : "s",
                      "element" : "use",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t",
                      "element" : "use",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "DefaultMappingGroupAnonymousAlias",
                      "parameter" : [
                        {
                          "valueId" : "vvv"
                        },
                        {
                          "valueId" : "vvv"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "copyvalue",
                  "source" : [
                    {
                      "context" : "s",
                      "element" : "value",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t",
                      "element" : "value",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "DefaultMappingGroupAnonymousAlias",
                      "parameter" : [
                        {
                          "valueId" : "vvv"
                        },
                        {
                          "valueId" : "vvv"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "copyperiod",
                  "source" : [
                    {
                      "context" : "s",
                      "element" : "period",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t",
                      "element" : "period",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "DefaultMappingGroupAnonymousAlias",
                      "parameter" : [
                        {
                          "valueId" : "vvv"
                        },
                        {
                          "valueId" : "vvv"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "mapidentifiertype",
                  "source" : [
                    {
                      "context" : "s",
                      "element" : "type",
                      "variable" : "ty"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "whensourcehascoding",
                      "source" : [
                        {
                          "context" : "ty",
                          "element" : "coding",
                          "listMode" : "first",
                          "variable" : "cf"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "calltranslator",
                          "source" : [
                            {
                              "context" : "cf",
                              "element" : "system",
                              "variable" : "legacy"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "t",
                              "element" : "type",
                              "variable" : "result"
                            }
                          ],
                          "dependent" : [
                            {
                              "name" : "TranslateLegacyIdentifier",
                              "parameter" : [
                                {
                                  "valueId" : "legacy"
                                },
                                {
                                  "valueId" : "result"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "SetFixedIdentifierSystem",
                  "source" : [
                    {
                      "context" : "s"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t",
                      "element" : "system",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "createandpopulateassigner",
                  "source" : [
                    {
                      "context" : "src",
                      "element" : "managingOrganization",
                      "variable" : "mo"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t",
                      "element" : "assigner",
                      "variable" : "t_assigner",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "setassignerreffrommo",
                      "source" : [
                        {
                          "context" : "mo",
                          "element" : "reference",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "t_assigner",
                          "element" : "reference",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "DefaultMappingGroupAnonymousAlias",
                          "parameter" : [
                            {
                              "valueId" : "vvv"
                            },
                            {
                              "valueId" : "vvv"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "setassignerdisplayfrommo",
                      "source" : [
                        {
                          "context" : "mo",
                          "element" : "display",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "t_assigner",
                          "element" : "display",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "DefaultMappingGroupAnonymousAlias",
                          "parameter" : [
                            {
                              "valueId" : "vvv"
                            },
                            {
                              "valueId" : "vvv"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "create the default FHIR ID identifier type",
              "source" : [
                {
                  "context" : "src",
                  "element" : "identifier",
                  "variable" : "s_id"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "identifier",
                  "variable" : "t_id"
                }
              ],
              "rule" : [
                {
                  "name" : "copyuse",
                  "source" : [
                    {
                      "context" : "s_id",
                      "element" : "use",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_id",
                      "element" : "use",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "DefaultMappingGroupAnonymousAlias",
                      "parameter" : [
                        {
                          "valueId" : "vvv"
                        },
                        {
                          "valueId" : "vvv"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "id",
                  "source" : [
                    {
                      "context" : "src",
                      "element" : "id",
                      "variable" : "uuid"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_id",
                      "element" : "value",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "uuid"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "period",
                  "source" : [
                    {
                      "context" : "s_id",
                      "element" : "period",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_id",
                      "element" : "period",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "DefaultMappingGroupAnonymousAlias",
                      "parameter" : [
                        {
                          "valueId" : "vvv"
                        },
                        {
                          "valueId" : "vvv"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "type",
                  "source" : [
                    {
                      "context" : "s_id",
                      "element" : "type",
                      "variable" : "st"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_id",
                      "element" : "type",
                      "variable" : "tt"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "coding",
                      "source" : [
                        {
                          "context" : "st",
                          "element" : "coding"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tt",
                          "element" : "coding",
                          "variable" : "tt",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "CodeableConcept"
                            }
                          ]
                        },
                        {
                          "context" : "tt",
                          "element" : "system",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"
                            }
                          ]
                        },
                        {
                          "context" : "tt",
                          "element" : "code",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "fhir-id"
                            }
                          ]
                        },
                        {
                          "context" : "tt",
                          "element" : "display",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "FHIR Id"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "SetFixedIdentifierSystem",
                  "source" : [
                    {
                      "context" : "s_id"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_id",
                      "element" : "system",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "active",
              "source" : [
                {
                  "context" : "src",
                  "element" : "active",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "active",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "name",
              "source" : [
                {
                  "context" : "src",
                  "element" : "name",
                  "listMode" : "first",
                  "variable" : "s"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "name",
                  "variable" : "t"
                }
              ],
              "dependent" : [
                {
                  "name" : "SGHIHumanNameMap",
                  "parameter" : [
                    {
                      "valueId" : "s"
                    },
                    {
                      "valueId" : "t"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "telecom",
              "source" : [
                {
                  "context" : "src",
                  "element" : "telecom",
                  "variable" : "s"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "telecom",
                  "variable" : "t"
                }
              ],
              "dependent" : [
                {
                  "name" : "SGHIContactPointMap",
                  "parameter" : [
                    {
                      "valueId" : "s"
                    },
                    {
                      "valueId" : "t"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "mapgender",
              "source" : [
                {
                  "context" : "src",
                  "element" : "gender",
                  "variable" : "v"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "gender",
                  "transform" : "translate",
                  "parameter" : [
                    {
                      "valueId" : "v"
                    },
                    {
                      "valueString" : "http://hl7.org/fhir/uv/xver/ConceptMap/pat.gender-4to5"
                    },
                    {
                      "valueString" : "code"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "birthDate",
              "source" : [
                {
                  "context" : "src",
                  "element" : "birthDate",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "birthDate",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "deceasedBoolean",
              "source" : [
                {
                  "context" : "src",
                  "type" : "boolean",
                  "element" : "deceased",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "deceased",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "deceasedDateTime",
              "source" : [
                {
                  "context" : "src",
                  "type" : "dateTime",
                  "element" : "deceased",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "deceased",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "multipleBirthBoolean",
              "source" : [
                {
                  "context" : "src",
                  "type" : "boolean",
                  "element" : "multipleBirth",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "multipleBirth",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "multipleBirthInteger",
              "source" : [
                {
                  "context" : "src",
                  "type" : "integer",
                  "element" : "multipleBirth",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "multipleBirth",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "address",
              "source" : [
                {
                  "context" : "src",
                  "element" : "address",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "address",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "photo",
              "source" : [
                {
                  "context" : "src",
                  "element" : "photo",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "photo",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "contact",
              "source" : [
                {
                  "context" : "src",
                  "element" : "contact",
                  "variable" : "s"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "contact",
                  "variable" : "t"
                }
              ],
              "dependent" : [
                {
                  "name" : "SGHIPatientContact",
                  "parameter" : [
                    {
                      "valueId" : "s"
                    },
                    {
                      "valueId" : "t"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "communication",
              "source" : [
                {
                  "context" : "src",
                  "element" : "communication",
                  "variable" : "s"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "communication",
                  "variable" : "t"
                }
              ],
              "dependent" : [
                {
                  "name" : "PatientCommunication",
                  "parameter" : [
                    {
                      "valueId" : "s"
                    },
                    {
                      "valueId" : "t"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "managingOrganization",
              "source" : [
                {
                  "context" : "src",
                  "element" : "managingOrganization",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "managingOrganization",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "generalPractitioner",
              "source" : [
                {
                  "context" : "src",
                  "element" : "generalPractitioner",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "generalPractitioner",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "link",
              "source" : [
                {
                  "context" : "src",
                  "element" : "link",
                  "variable" : "s"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "link",
                  "variable" : "t"
                }
              ],
              "dependent" : [
                {
                  "name" : "SGHIPatientLink",
                  "parameter" : [
                    {
                      "valueId" : "s"
                    },
                    {
                      "valueId" : "t"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "createhardcodedtext",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "text",
                  "variable" : "t_text",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Narrative"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "settextstatus",
                  "source" : [
                    {
                      "context" : "src"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_text",
                      "element" : "status",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "generated"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "settextdiv",
                  "source" : [
                    {
                      "context" : "src"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_text",
                      "element" : "div",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Generated text</h1></div>"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "addprofiletometa",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "meta",
                  "variable" : "t_meta"
                }
              ],
              "rule" : [
                {
                  "name" : "addprofile",
                  "source" : [
                    {
                      "context" : "src"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_meta",
                      "element" : "profile",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "https://fhir.slade360.co.ke/fhir/StructureDefinition/patient"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "TranslateLegacyIdentifier",
          "input" : [
            {
              "name" : "legacy_code",
              "type" : "string",
              "mode" : "source"
            },
            {
              "name" : "result",
              "type" : "CodeableConcept",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "translatetocoding",
              "source" : [
                {
                  "context" : "legacy_code"
                }
              ],
              "target" : [
                {
                  "context" : "result",
                  "element" : "coding",
                  "transform" : "translate",
                  "parameter" : [
                    {
                      "valueId" : "legacy_code"
                    },
                    {
                      "valueString" : "https://fhir.slade360.co.ke/fhir/ConceptMap/LegacyIdentifierToSGHI"
                    },
                    {
                      "valueString" : "Coding"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "settext",
              "source" : [
                {
                  "context" : "legacy_code"
                }
              ],
              "target" : [
                {
                  "context" : "result",
                  "element" : "text"
                }
              ]
            }
          ]
        },
        {
          "name" : "SGHIHumanNameMap",
          "extends" : "HumanName",
          "input" : [
            {
              "name" : "src",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "use",
              "source" : [
                {
                  "context" : "src",
                  "element" : "use",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "use",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "text",
              "source" : [
                {
                  "context" : "src",
                  "element" : "text",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "text",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "family",
              "source" : [
                {
                  "context" : "src",
                  "element" : "family",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "family",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "given",
              "source" : [
                {
                  "context" : "src",
                  "element" : "given",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "given",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "prefix",
              "source" : [
                {
                  "context" : "src",
                  "element" : "prefix",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "prefix",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "suffix",
              "source" : [
                {
                  "context" : "src",
                  "element" : "suffix",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "suffix",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "period",
              "source" : [
                {
                  "context" : "src",
                  "element" : "period",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "period",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "SGHIContactPointMap",
          "extends" : "ContactPoint",
          "input" : [
            {
              "name" : "src",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "system",
              "source" : [
                {
                  "context" : "src",
                  "element" : "system",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "system",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "value",
              "source" : [
                {
                  "context" : "src",
                  "element" : "value",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "value",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "use",
              "source" : [
                {
                  "context" : "src",
                  "element" : "use",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "use",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "rank",
              "source" : [
                {
                  "context" : "src",
                  "element" : "rank",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "rank",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "period",
              "source" : [
                {
                  "context" : "src",
                  "element" : "period",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "period",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "SGHICodeableConceptCopy",
          "extends" : "CodeableConcept",
          "input" : [
            {
              "name" : "src",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "src",
                  "element" : "coding",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "coding",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "text",
              "source" : [
                {
                  "context" : "src",
                  "element" : "text",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "text",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "SGHIPatientContact",
          "extends" : "BackboneElement",
          "input" : [
            {
              "name" : "src",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "relationship",
              "source" : [
                {
                  "context" : "src",
                  "element" : "relationship",
                  "variable" : "r"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "relationship",
                  "variable" : "t"
                }
              ],
              "dependent" : [
                {
                  "name" : "SGHICodeableConceptCopy",
                  "parameter" : [
                    {
                      "valueId" : "r"
                    },
                    {
                      "valueId" : "t"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "name",
              "source" : [
                {
                  "context" : "src",
                  "element" : "name",
                  "variable" : "n"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "name",
                  "variable" : "tn"
                }
              ],
              "dependent" : [
                {
                  "name" : "SGHIHumanNameMap",
                  "parameter" : [
                    {
                      "valueId" : "n"
                    },
                    {
                      "valueId" : "tn"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "telecom",
              "source" : [
                {
                  "context" : "src",
                  "element" : "telecom",
                  "listMode" : "first",
                  "variable" : "c"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "telecom",
                  "variable" : "tc"
                }
              ],
              "dependent" : [
                {
                  "name" : "SGHIContactPointMap",
                  "parameter" : [
                    {
                      "valueId" : "c"
                    },
                    {
                      "valueId" : "tc"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "address",
              "source" : [
                {
                  "context" : "src",
                  "element" : "address",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "address",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "mapcontactgender",
              "source" : [
                {
                  "context" : "src",
                  "element" : "gender",
                  "variable" : "v"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "gender",
                  "transform" : "translate",
                  "parameter" : [
                    {
                      "valueId" : "v"
                    },
                    {
                      "valueString" : "http://hl7.org/fhir/uv/xver/ConceptMap/pat.co.gender-4to5"
                    },
                    {
                      "valueString" : "code"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "organization",
              "source" : [
                {
                  "context" : "src",
                  "element" : "organization",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "organization",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "period",
              "source" : [
                {
                  "context" : "src",
                  "element" : "period",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "period",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "PatientCommunication",
          "extends" : "BackboneElement",
          "input" : [
            {
              "name" : "src",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "language",
              "source" : [
                {
                  "context" : "src",
                  "element" : "language",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "language",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "preferred",
              "source" : [
                {
                  "context" : "src",
                  "element" : "preferred",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "preferred",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "SGHIPatientLink",
          "extends" : "BackboneElement",
          "input" : [
            {
              "name" : "src",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "other",
              "source" : [
                {
                  "context" : "src",
                  "element" : "other",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "other",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "maplinktype",
              "source" : [
                {
                  "context" : "src",
                  "element" : "type",
                  "variable" : "v"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "type",
                  "transform" : "translate",
                  "parameter" : [
                    {
                      "valueId" : "v"
                    },
                    {
                      "valueString" : "http://hl7.org/fhir/uv/xver/ConceptMap/pat.li.type-4to5"
                    },
                    {
                      "valueString" : "code"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }