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

## : ServiceRequest Transforms: R4 → SGHI R5 - JSON Representation

Active as of 2026-04-27

Raw json | Download

    {
      "resourceType" : "StructureMap",
      "id" : "ServiceRequestSGHI5",
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap ServiceRequestSGHI5</b></p><a name=\"ServiceRequestSGHI5\"> </a><a name=\"hcServiceRequestSGHI5\"> </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/ServiceRequestSGHI5'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'ServiceRequestSGHI5'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'ServiceRequest 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/ServiceRequest<span style=\"color: navy\">&quot; </span><b>alias </b>ServiceRequestR4 <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-servicerequest.html\" title=\"SGHI ServiceRequest\">https://fhir.slade360.co.ke/fhir/StructureDefinition/servicerequest</a><span style=\"color: navy\">&quot; </span><b>alias </b>SGHIServiceRequest <b>as </b><b>target</b>\r\n\r\n<b>group </b>SGHIServiceRequest<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>ServiceRequestR4, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>SGHIServiceRequest<span style=\"color: navy\">)</span><b> &lt;&lt;type+&gt;&gt;</b><span style=\"color: navy\"> {\r\n</span>  src.id<b> as </b><span style=\"color: maroon\">uuid</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.id = <span style=\"color: maroon\">uuid</span><span style=\"color: navy\">;</span>\r\n  src.active<span style=\"color: navy\"><b> -&gt; </b></span>tgt.active = <span style=\"color: blue\">'true'</span><span style=\"color: navy\">;</span>\r\n  src.language<b> as </b><span style=\"color: maroon\">sl</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.language = <span style=\"color: maroon\">sl</span><span style=\"color: navy\">;</span>\r\n  src.authoredOn<b> as </b><span style=\"color: maroon\">sa</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.authoredOn = <span style=\"color: maroon\">sa</span><span style=\"color: navy\">;</span>\r\n  src<b> where </b>text.exists().not()<span style=\"color: navy\"><b> -&gt; </b></span>tgt.text = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Narrative'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">tgt_n</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    src<span style=\"color: navy\"><b> -&gt; </b></span>tgt_n.status = <span style=\"color: blue\">'generated'</span> <i>&quot;settextstatus&quot;</i><span style=\"color: navy\">;</span>\r\n    src<span style=\"color: navy\"><b> -&gt; </b></span>tgt_n.div = <span style=\"color: blue\">'&lt;div xmlns=\\&quot;http://www.w3.org/1999/xhtml\\&quot;&gt;&lt;h1&gt;Generated text&lt;/h1&gt;&lt;/div&gt;'</span> <i>&quot;settextdiv&quot;</i><span style=\"color: navy\">;</span>\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.text = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Narrative'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ttt</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    src.text<b> as </b><span style=\"color: maroon\">st</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      st.status<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>ttt.status = <span style=\"color: maroon\">s</span><span style=\"color: navy\">;</span>\r\n      st.div<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>ttt.div = <span style=\"color: navy\">(</span>'&lt;div xmlns=\\&quot;http://www.w3.org/1999/xhtml\\&quot;&gt;&lt;p&gt;' + d + '&lt;/p&gt;&lt;/div&gt;'<span style=\"color: navy\">)</span> <i>&quot;wraptextinhtml&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;setting text&quot;</i><span style=\"color: navy\">;</span>\r\n  src.id<b> as </b><span style=\"color: maroon\">s_id</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.identifier = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Identifier'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">t_ident</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    s_id<b> as </b><span style=\"color: maroon\">uuid</span><span style=\"color: navy\"><b> -&gt; </b></span>t_ident.value = <span style=\"color: maroon\">uuid</span> <i>&quot;copyid&quot;</i><span style=\"color: navy\">;</span>\r\n    src<span style=\"color: navy\"><b> -&gt; </b></span>t_ident.use = <span style=\"color: blue\">'official'</span> <i>&quot;setuse&quot;</i><span style=\"color: navy\">;</span>\r\n    src<span style=\"color: navy\"><b> -&gt; </b></span>t_ident.system = <span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem'</span> <i>&quot;setsystem&quot;</i><span style=\"color: navy\">;</span>\r\n    src<span style=\"color: navy\"><b> -&gt; </b></span>t_ident.type = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">t_type</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      src<span style=\"color: navy\"><b> -&gt; </b></span>t_type.coding = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">t_code</span><b> then</b><span style=\"color: navy\"> {\r\n</span>        src<span style=\"color: navy\"><b> -&gt; </b></span>t_code.system = <span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem'</span> <i>&quot;typesystem&quot;</i><span style=\"color: navy\">;</span>\r\n        src<span style=\"color: navy\"><b> -&gt; </b></span>t_code.code = <span style=\"color: blue\">'fhir-id'</span> <i>&quot;typecode&quot;</i><span style=\"color: navy\">;</span>\r\n        src<span style=\"color: navy\"><b> -&gt; </b></span>t_code.display = <span style=\"color: blue\">'FHIR Id'</span> <i>&quot;typedisplay&quot;</i><span style=\"color: navy\">;</span>\r\n      <span style=\"color: navy\">}</span> <i>&quot;initcoding&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;inittype&quot;</i><span style=\"color: navy\">;</span>\r\n    src.meta<b> as </b><span style=\"color: maroon\">sm</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      sm.tag last<b> as </b><span style=\"color: maroon\">st</span><span style=\"color: navy\"><b> -&gt; </b></span>t_ident.assigner = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ta</span><b> then </b>TransformAssigner<span style=\"color: navy\">(</span><span style=\"color: maroon\">st</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">ta</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;setting owner&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;addfhirididentifier&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Create identifier</span>\r\n  src.meta<b> as </b><span style=\"color: maroon\">s_meta</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.meta<b> as </b><span style=\"color: maroon\">t_meta</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    s_meta.lastUpdated<b> as </b><span style=\"color: maroon\">sl</span><span style=\"color: navy\"><b> -&gt; </b></span>t_meta.lastUpdated = <span style=\"color: maroon\">sl</span><span style=\"color: navy\">;</span>\r\n    s_meta.language<b> as </b><span style=\"color: maroon\">sl</span><span style=\"color: navy\"><b> -&gt; </b></span>t_meta.language = <span style=\"color: maroon\">sl</span><span style=\"color: navy\">;</span>\r\n    s_meta.tags<b> as </b><span style=\"color: maroon\">st</span><span style=\"color: navy\"><b> -&gt; </b></span>t_meta.tags = <span style=\"color: maroon\">st</span><span style=\"color: navy\">;</span>\r\n    src.meta<b> as </b><span style=\"color: maroon\">sp</span><b> where </b>profile.exists().not()<span style=\"color: navy\"><b> -&gt; </b></span>t_meta.profile = <span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/StructureDefinition/servicerequest'</span> <i>&quot;setprofileinmeta&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set profile in meta&quot;</i><span style=\"color: navy\">;</span>\r\n  src<b> where </b>status != 'finished'<b> then</b><span style=\"color: navy\"> {\r\n</span>    src.status<b> as </b><span style=\"color: maroon\">sd</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.status = <span style=\"color: maroon\">sd</span><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;coppying status&quot;</i><span style=\"color: navy\">;</span>\r\n  src<b> where </b>status = 'finished'<span style=\"color: navy\"><b> -&gt; </b></span>tgt.status = <span style=\"color: blue\">'completed'</span> <i>&quot;settingR5status&quot;</i><span style=\"color: navy\">;</span>\r\n  src.dateTime<b> as </b><span style=\"color: maroon\">sd</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.date = <span style=\"color: maroon\">sd</span><span style=\"color: navy\">;</span>\r\n  src.basedOn<b> as </b><span style=\"color: maroon\">sb</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.basedOn<b> as </b><span style=\"color: maroon\">tb</span><b> then </b>TransformReference<span style=\"color: navy\">(</span><span style=\"color: maroon\">sb</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tb</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  src.category<b> as </b><span style=\"color: maroon\">scat</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.category<b> as </b><span style=\"color: maroon\">tcat</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    scat.coding<b> as </b><span style=\"color: maroon\">d</span><b> where </b>d.system.exists().not()<span style=\"color: navy\"><b> -&gt; </b></span>tcat.coding = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">d</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoFHIRCategoryCodeBindingsMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n    scat.coding<b> as </b><span style=\"color: maroon\">d</span><b> where </b>d.system.exists()<span style=\"color: navy\"><b> -&gt; </b></span>tcat.coding = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">tcoding</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      d.code<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>tcoding.code = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">d</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoFHIRCategoryCodeBindingsMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n      d.code<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>tcoding.system = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">d</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoFHIRCategoryCodeBindingsMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'system'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n      d.code<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>tcoding.display = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">d</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoFHIRCategoryCodeBindingsMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'display'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n      d.code<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>tcat.text = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">d</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoFHIRCategoryCodeBindingsMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'display'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  src.encounter<b> as </b><span style=\"color: maroon\">se</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.encounter<b> as </b><span style=\"color: maroon\">te</span><b> then </b>TransformReference<span style=\"color: navy\">(</span><span style=\"color: maroon\">se</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">te</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  src.requester<b> as </b><span style=\"color: maroon\">sr</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.requester<b> as </b><span style=\"color: maroon\">tr</span><b> then </b>TransformReference<span style=\"color: navy\">(</span><span style=\"color: maroon\">sr</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tr</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  src.subject<b> as </b><span style=\"color: maroon\">sbb</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.subject<b> as </b><span style=\"color: maroon\">tbb</span><b> then </b>TransformReference<span style=\"color: navy\">(</span><span style=\"color: maroon\">sbb</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tbb</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  src.performer<b> as </b><span style=\"color: maroon\">sp</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.performer<b> as </b><span style=\"color: maroon\">tp</span><b> then </b>TransformReference<span style=\"color: navy\">(</span><span style=\"color: maroon\">sp</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tp</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  src<b> where </b>performer.exists().not()<b> then</b><span style=\"color: navy\"> {\r\n</span>    src.meta<b> as </b><span style=\"color: maroon\">sm</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      sm.tag last<b> as </b><span style=\"color: maroon\">sp</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.performer = <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\">tp</span><b> then </b>TransformAssigner<span style=\"color: navy\">(</span><span style=\"color: maroon\">sp</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tp</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;setting performer&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;settingperformer&quot;</i><span style=\"color: navy\">;</span>\r\n  src<b> where </b>requester.exists().not()<b> then</b><span style=\"color: navy\"> {\r\n</span>    src.meta<b> as </b><span style=\"color: maroon\">sm</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      sm.tag last<b> as </b><span style=\"color: maroon\">sr</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.requester = <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\">tr</span><b> then </b>TransformAssigner<span style=\"color: navy\">(</span><span style=\"color: maroon\">sr</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tr</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;setting requester&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;settingrequester&quot;</i><span style=\"color: navy\">;</span>\r\n  src.priority<b> as </b><span style=\"color: maroon\">sp</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.priority = <span style=\"color: maroon\">sp</span><span style=\"color: navy\">;</span>\r\n  src.intent<b> as </b><span style=\"color: maroon\">sti</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.intent = <span style=\"color: maroon\">sti</span><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.code = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableReference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">trf</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    src.code<b> as </b><span style=\"color: maroon\">scc</span><span style=\"color: navy\"><b> -&gt; </b></span>trf.concept = <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\">tcc</span><b> then </b>TranslateCoding<span style=\"color: navy\">(</span><span style=\"color: maroon\">scc</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tcc</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;translate codeableConcept to CodeableReference in R5&quot;</i><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.reason = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableReference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">tr</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    src.code<b> as </b><span style=\"color: maroon\">scc</span><span style=\"color: navy\"><b> -&gt; </b></span>tr.concept = <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\">tcc</span><b> then </b>TranslateCoding<span style=\"color: navy\">(</span><span style=\"color: maroon\">scc</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tcc</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;setting reason&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>TransformAssigner<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span><b> &lt;&lt;types&gt;&gt;</b><span style=\"color: navy\"> {\r\n</span>  src.code<b> as </b><span style=\"color: maroon\">code</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Organization/'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">code</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  src<b> where </b>display.exists().not()<span style=\"color: navy\"><b> -&gt; </b></span>tgt.display = <span style=\"color: blue\">'Unknown display'</span> <i>&quot;setting default display&quot;</i><span style=\"color: navy\">;</span>\r\n  src.display<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.display = <span style=\"color: maroon\">d</span><span style=\"color: navy\">;</span>\r\n  src.code<b> as </b><span style=\"color: maroon\">dc</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.id = <span style=\"color: maroon\">dc</span><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>TransformReference<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span><b> &lt;&lt;types&gt;&gt;</b><span style=\"color: navy\"> {\r\n</span>  src.id<b> as </b><span style=\"color: maroon\">sid</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.id = <span style=\"color: maroon\">sid</span><span style=\"color: navy\">;</span>\r\n  src.reference<b> as </b><span style=\"color: maroon\">sf</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.reference = <span style=\"color: maroon\">sf</span><span style=\"color: navy\">;</span>\r\n  src.display<b> as </b><span style=\"color: maroon\">sd</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.display = <span style=\"color: maroon\">sd</span><span style=\"color: navy\">;</span>\r\n  src<b> where </b>display.exists().not()<span style=\"color: navy\"><b> -&gt; </b></span>tgt.display = <span style=\"color: blue\">'Unknown display'</span> <i>&quot;setting display&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>TranslateCoding<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">scc</span>, <b>target</b> <span style=\"color: maroon\">tcc</span><span style=\"color: navy\">)</span><b> &lt;&lt;types&gt;&gt;</b><span style=\"color: navy\"> {\r\n</span>  scc.coding<b> as </b><span style=\"color: maroon\">d</span><b> where </b>d.system.exists().not()<span style=\"color: navy\"><b> -&gt; </b></span>tcc.coding = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">d</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoLOINCServiceRequestMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  scc.coding<b> as </b><span style=\"color: maroon\">scode</span><b> where </b>(scode.code = '1271').exists() and (scode.display = 'Pap smear/cytology')<span style=\"color: navy\"><b> -&gt; </b></span>tcc.coding<b> as </b><span style=\"color: maroon\">tcode</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.code = <span style=\"color: blue\">'LA16047-5'</span> <i>&quot;override code&quot;</i><span style=\"color: navy\">;</span>\r\n    scode.display<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>tcode.display = <span style=\"color: maroon\">d</span><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>&quot;overriedsystem&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  scc.coding<b> as </b><span style=\"color: maroon\">scode</span><b> where </b>(scode.code = '1271').exists() and (scode.display = 'HPV')<span style=\"color: navy\"><b> -&gt; </b></span>tcc.coding<b> as </b><span style=\"color: maroon\">tcode</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.code = <span style=\"color: blue\">'LP14836-8'</span> <i>&quot;override code&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.display = <span style=\"color: blue\">'Human papilloma virus'</span> <i>&quot;settinghpvdisplay&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>&quot;overriedsystem&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  scc.coding<b> as </b><span style=\"color: maroon\">scode</span><b> where </b>(scode.code = '1271').exists() and (scode.display = 'Mammogram')<span style=\"color: navy\"><b> -&gt; </b></span>tcc.coding<b> as </b><span style=\"color: maroon\">tcode</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.code = <span style=\"color: blue\">'LA16046-7'</span> <i>&quot;override code&quot;</i><span style=\"color: navy\">;</span>\r\n    scode.display<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>tcode.display = <span style=\"color: maroon\">d</span><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>&quot;overriedsystem&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  scc.coding<b> as </b><span style=\"color: maroon\">scode</span><b> where </b>(scode.code = '1271').exists() and (scode.display = 'VIA')<span style=\"color: navy\"><b> -&gt; </b></span>tcc.coding<b> as </b><span style=\"color: maroon\">tcode</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.code = <span style=\"color: blue\">'LP404404-8'</span> <i>&quot;override code&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.display = <span style=\"color: blue\">'Screening techniques | Cervix or Vagina | Cytology'</span> <i>&quot;settingdisplay&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>&quot;overriedsystem&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  scc.coding<b> as </b><span style=\"color: maroon\">scode</span><b> where </b>(scode.code = '1271').exists() and (scode.display = 'Biopsy')<span style=\"color: navy\"><b> -&gt; </b></span>tcc.coding<b> as </b><span style=\"color: maroon\">tcode</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.code = <span style=\"color: blue\">'LA15393-4'</span> <i>&quot;override code&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.display = <span style=\"color: blue\">'Biopsy'</span> <i>&quot;settingdisplay&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>&quot;overriedsystem&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  scc.coding<b> as </b><span style=\"color: maroon\">scode</span><b> where </b>(scode.code = '1271').exists() and (scode.display = 'Ultrasound')<span style=\"color: navy\"><b> -&gt; </b></span>tcc.coding<b> as </b><span style=\"color: maroon\">tcode</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.code = <span style=\"color: blue\">'24630-6'</span> <i>&quot;override code&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.display = <span style=\"color: blue\">'US Chest'</span> <i>&quot;settingdisplay&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>&quot;overriedsystem&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  scc.coding<b> as </b><span style=\"color: maroon\">scode</span><b> where </b>(scode.code = '1271').exists() and (scode.display = 'MRI')<span style=\"color: navy\"><b> -&gt; </b></span>tcc.coding<b> as </b><span style=\"color: maroon\">tcode</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.code = <span style=\"color: blue\">'30794-2'</span> <i>&quot;override code&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.display = <span style=\"color: blue\">'MR Breast'</span> <i>&quot;settingdisplay&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>&quot;overriedsystem&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  scc.coding<b> as </b><span style=\"color: maroon\">scode</span><b> where </b>(scode.code = '1271').exists() and (scode.display = 'Prostate Specific Antigen - Serum')<span style=\"color: navy\"><b> -&gt; </b></span>tcc.coding<b> as </b><span style=\"color: maroon\">tcode</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.code = <span style=\"color: blue\">'32465-7'</span> <i>&quot;override code&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.display = <span style=\"color: blue\">'Physical findings of Prostate'</span> <i>&quot;settingdisplay&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>&quot;overriedsystem&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  scc.coding<b> as </b><span style=\"color: maroon\">scode</span><b> where </b>(scode.code = '1271').exists() and (scode.display = 'Prostate Specific Antigen - Whole Blood')<span style=\"color: navy\"><b> -&gt; </b></span>tcc.coding<b> as </b><span style=\"color: maroon\">tcode</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.code = <span style=\"color: blue\">'LP15247-7'</span> <i>&quot;override code&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.display = <span style=\"color: blue\">'Whole Blood'</span> <i>&quot;settingdisplay&quot;</i><span style=\"color: navy\">;</span>\r\n    scode<span style=\"color: navy\"><b> -&gt; </b></span>tcode.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>&quot;overriedsystem&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  scc.coding<b> as </b><span style=\"color: maroon\">d</span><b> where </b>d.system.exists()<span style=\"color: navy\"><b> -&gt; </b></span>tcc.coding = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">tcoding</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    d.code<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>tcoding.code = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">d</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoLOINCServiceRequestMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n    d.code<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>tcoding.system = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">d</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoLOINCServiceRequestMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'system'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n    d.code<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>tcoding.display = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">d</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoLOINCServiceRequestMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'display'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n    d.code<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>tcoding.text = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">d</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoLOINCServiceRequestMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'display'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><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/ServiceRequestSGHI5",
      "version" : "0.1.0",
      "name" : "ServiceRequestSGHI5",
      "title" : "ServiceRequest 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" : "ServiceRequestTransformsR4SGHIR5",
      "structure" : [
        {
          "url" : "http://hl7.org/fhir/4.0/StructureDefinition/ServiceRequest",
          "mode" : "source",
          "alias" : "ServiceRequestR4"
        },
        {
          "url" : "https://fhir.slade360.co.ke/fhir/StructureDefinition/servicerequest",
          "mode" : "target",
          "alias" : "SGHIServiceRequest"
        }
      ],
      "group" : [
        {
          "name" : "SGHIServiceRequest",
          "typeMode" : "type-and-types",
          "input" : [
            {
              "name" : "src",
              "type" : "ServiceRequestR4",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "type" : "SGHIServiceRequest",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "id",
              "source" : [
                {
                  "context" : "src",
                  "element" : "id",
                  "variable" : "uuid"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "id",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "uuid"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "active",
              "source" : [
                {
                  "context" : "src",
                  "element" : "active"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "active",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "true"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "language",
              "source" : [
                {
                  "context" : "src",
                  "element" : "language",
                  "variable" : "sl"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "language",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "sl"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "authoredOn",
              "source" : [
                {
                  "context" : "src",
                  "element" : "authoredOn",
                  "variable" : "sa"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "authoredOn",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "sa"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "createhardcodedtext",
              "source" : [
                {
                  "context" : "src",
                  "condition" : "text.exists().not()"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "text",
                  "variable" : "tgt_n",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Narrative"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "settextstatus",
                  "source" : [
                    {
                      "context" : "src"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt_n",
                      "element" : "status",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "generated"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "settextdiv",
                  "source" : [
                    {
                      "context" : "src"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt_n",
                      "element" : "div",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Generated text</h1></div>"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "setting text",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "text",
                  "variable" : "ttt",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Narrative"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "text",
                  "source" : [
                    {
                      "context" : "src",
                      "element" : "text",
                      "variable" : "st"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "status",
                      "source" : [
                        {
                          "context" : "st",
                          "element" : "status",
                          "variable" : "s"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ttt",
                          "element" : "status",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "s"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "wraptextinhtml",
                      "source" : [
                        {
                          "context" : "st",
                          "element" : "div",
                          "variable" : "d"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ttt",
                          "element" : "div",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "'<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>' + d + '</p></div>'"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "addfhirididentifier",
              "source" : [
                {
                  "context" : "src",
                  "element" : "id",
                  "variable" : "s_id"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "identifier",
                  "variable" : "t_ident",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Identifier"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "copyid",
                  "source" : [
                    {
                      "context" : "s_id",
                      "variable" : "uuid"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_ident",
                      "element" : "value",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "uuid"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "setuse",
                  "source" : [
                    {
                      "context" : "src"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_ident",
                      "element" : "use",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "official"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "setsystem",
                  "source" : [
                    {
                      "context" : "src"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_ident",
                      "element" : "system",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "inittype",
                  "source" : [
                    {
                      "context" : "src"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_ident",
                      "element" : "type",
                      "variable" : "t_type",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "CodeableConcept"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "initcoding",
                      "source" : [
                        {
                          "context" : "src"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "t_type",
                          "element" : "coding",
                          "variable" : "t_code",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Coding"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "typesystem",
                          "source" : [
                            {
                              "context" : "src"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "t_code",
                              "element" : "system",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "typecode",
                          "source" : [
                            {
                              "context" : "src"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "t_code",
                              "element" : "code",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "fhir-id"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "typedisplay",
                          "source" : [
                            {
                              "context" : "src"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "t_code",
                              "element" : "display",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "FHIR Id"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "setting owner",
                  "source" : [
                    {
                      "context" : "src",
                      "element" : "meta",
                      "variable" : "sm"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "tag",
                      "source" : [
                        {
                          "context" : "sm",
                          "element" : "tag",
                          "listMode" : "last",
                          "variable" : "st"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "t_ident",
                          "element" : "assigner",
                          "variable" : "ta",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "TransformAssigner",
                          "parameter" : [
                            {
                              "valueId" : "st"
                            },
                            {
                              "valueId" : "ta"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "Create identifier"
            },
            {
              "name" : "set profile in meta",
              "source" : [
                {
                  "context" : "src",
                  "element" : "meta",
                  "variable" : "s_meta"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "meta",
                  "variable" : "t_meta"
                }
              ],
              "rule" : [
                {
                  "name" : "lastUpdated",
                  "source" : [
                    {
                      "context" : "s_meta",
                      "element" : "lastUpdated",
                      "variable" : "sl"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_meta",
                      "element" : "lastUpdated",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "sl"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "language",
                  "source" : [
                    {
                      "context" : "s_meta",
                      "element" : "language",
                      "variable" : "sl"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_meta",
                      "element" : "language",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "sl"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "tags",
                  "source" : [
                    {
                      "context" : "s_meta",
                      "element" : "tags",
                      "variable" : "st"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_meta",
                      "element" : "tags",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "st"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "setprofileinmeta",
                  "source" : [
                    {
                      "context" : "src",
                      "element" : "meta",
                      "variable" : "sp",
                      "condition" : "profile.exists().not()"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t_meta",
                      "element" : "profile",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "https://fhir.slade360.co.ke/fhir/StructureDefinition/servicerequest"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coppying status",
              "source" : [
                {
                  "context" : "src",
                  "condition" : "status != 'finished'"
                }
              ],
              "rule" : [
                {
                  "name" : "status",
                  "source" : [
                    {
                      "context" : "src",
                      "element" : "status",
                      "variable" : "sd"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "element" : "status",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "sd"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "settingR5status",
              "source" : [
                {
                  "context" : "src",
                  "condition" : "status = 'finished'"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "completed"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "dateTime",
              "source" : [
                {
                  "context" : "src",
                  "element" : "dateTime",
                  "variable" : "sd"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "date",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "sd"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "basedOn",
              "source" : [
                {
                  "context" : "src",
                  "element" : "basedOn",
                  "variable" : "sb"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "basedOn",
                  "variable" : "tb"
                }
              ],
              "dependent" : [
                {
                  "name" : "TransformReference",
                  "parameter" : [
                    {
                      "valueId" : "sb"
                    },
                    {
                      "valueId" : "tb"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "category",
              "source" : [
                {
                  "context" : "src",
                  "element" : "category",
                  "variable" : "scat"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "category",
                  "variable" : "tcat"
                }
              ],
              "rule" : [
                {
                  "name" : "coding",
                  "source" : [
                    {
                      "context" : "scat",
                      "element" : "coding",
                      "variable" : "d",
                      "condition" : "d.system.exists().not()"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcat",
                      "element" : "coding",
                      "transform" : "translate",
                      "parameter" : [
                        {
                          "valueId" : "d"
                        },
                        {
                          "valueString" : "https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoFHIRCategoryCodeBindingsMap"
                        },
                        {
                          "valueString" : "Coding"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "coding",
                  "source" : [
                    {
                      "context" : "scat",
                      "element" : "coding",
                      "variable" : "d",
                      "condition" : "d.system.exists()"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcat",
                      "element" : "coding",
                      "variable" : "tcoding",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Coding"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "d",
                          "element" : "code",
                          "variable" : "d"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tcoding",
                          "element" : "code",
                          "transform" : "translate",
                          "parameter" : [
                            {
                              "valueId" : "d"
                            },
                            {
                              "valueString" : "https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoFHIRCategoryCodeBindingsMap"
                            },
                            {
                              "valueString" : "code"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "d",
                          "element" : "code",
                          "variable" : "d"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tcoding",
                          "element" : "system",
                          "transform" : "translate",
                          "parameter" : [
                            {
                              "valueId" : "d"
                            },
                            {
                              "valueString" : "https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoFHIRCategoryCodeBindingsMap"
                            },
                            {
                              "valueString" : "system"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "d",
                          "element" : "code",
                          "variable" : "d"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tcoding",
                          "element" : "display",
                          "transform" : "translate",
                          "parameter" : [
                            {
                              "valueId" : "d"
                            },
                            {
                              "valueString" : "https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoFHIRCategoryCodeBindingsMap"
                            },
                            {
                              "valueString" : "display"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "d",
                          "element" : "code",
                          "variable" : "d"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tcat",
                          "element" : "text",
                          "transform" : "translate",
                          "parameter" : [
                            {
                              "valueId" : "d"
                            },
                            {
                              "valueString" : "https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoFHIRCategoryCodeBindingsMap"
                            },
                            {
                              "valueString" : "display"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "encounter",
              "source" : [
                {
                  "context" : "src",
                  "element" : "encounter",
                  "variable" : "se"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "encounter",
                  "variable" : "te"
                }
              ],
              "dependent" : [
                {
                  "name" : "TransformReference",
                  "parameter" : [
                    {
                      "valueId" : "se"
                    },
                    {
                      "valueId" : "te"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "requester",
              "source" : [
                {
                  "context" : "src",
                  "element" : "requester",
                  "variable" : "sr"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "requester",
                  "variable" : "tr"
                }
              ],
              "dependent" : [
                {
                  "name" : "TransformReference",
                  "parameter" : [
                    {
                      "valueId" : "sr"
                    },
                    {
                      "valueId" : "tr"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "subject",
              "source" : [
                {
                  "context" : "src",
                  "element" : "subject",
                  "variable" : "sbb"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "subject",
                  "variable" : "tbb"
                }
              ],
              "dependent" : [
                {
                  "name" : "TransformReference",
                  "parameter" : [
                    {
                      "valueId" : "sbb"
                    },
                    {
                      "valueId" : "tbb"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "performer",
              "source" : [
                {
                  "context" : "src",
                  "element" : "performer",
                  "variable" : "sp"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "performer",
                  "variable" : "tp"
                }
              ],
              "dependent" : [
                {
                  "name" : "TransformReference",
                  "parameter" : [
                    {
                      "valueId" : "sp"
                    },
                    {
                      "valueId" : "tp"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "settingperformer",
              "source" : [
                {
                  "context" : "src",
                  "condition" : "performer.exists().not()"
                }
              ],
              "rule" : [
                {
                  "name" : "setting performer",
                  "source" : [
                    {
                      "context" : "src",
                      "element" : "meta",
                      "variable" : "sm"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "tag",
                      "source" : [
                        {
                          "context" : "sm",
                          "element" : "tag",
                          "listMode" : "last",
                          "variable" : "sp"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "element" : "performer",
                          "variable" : "tp",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "TransformAssigner",
                          "parameter" : [
                            {
                              "valueId" : "sp"
                            },
                            {
                              "valueId" : "tp"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "settingrequester",
              "source" : [
                {
                  "context" : "src",
                  "condition" : "requester.exists().not()"
                }
              ],
              "rule" : [
                {
                  "name" : "setting requester",
                  "source" : [
                    {
                      "context" : "src",
                      "element" : "meta",
                      "variable" : "sm"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "tag",
                      "source" : [
                        {
                          "context" : "sm",
                          "element" : "tag",
                          "listMode" : "last",
                          "variable" : "sr"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "element" : "requester",
                          "variable" : "tr",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "TransformAssigner",
                          "parameter" : [
                            {
                              "valueId" : "sr"
                            },
                            {
                              "valueId" : "tr"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "priority",
              "source" : [
                {
                  "context" : "src",
                  "element" : "priority",
                  "variable" : "sp"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "priority",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "sp"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "intent",
              "source" : [
                {
                  "context" : "src",
                  "element" : "intent",
                  "variable" : "sti"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "intent",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "sti"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "translate codeableConcept to CodeableReference in R5",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "code",
                  "variable" : "trf",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "CodeableReference"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "code",
                  "source" : [
                    {
                      "context" : "src",
                      "element" : "code",
                      "variable" : "scc"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "trf",
                      "element" : "concept",
                      "variable" : "tcc",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "CodeableConcept"
                        }
                      ]
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "TranslateCoding",
                      "parameter" : [
                        {
                          "valueId" : "scc"
                        },
                        {
                          "valueId" : "tcc"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "setting reason",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "reason",
                  "variable" : "tr",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "CodeableReference"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "code",
                  "source" : [
                    {
                      "context" : "src",
                      "element" : "code",
                      "variable" : "scc"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tr",
                      "element" : "concept",
                      "variable" : "tcc",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "CodeableConcept"
                        }
                      ]
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "TranslateCoding",
                      "parameter" : [
                        {
                          "valueId" : "scc"
                        },
                        {
                          "valueId" : "tcc"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "TransformAssigner",
          "typeMode" : "types",
          "input" : [
            {
              "name" : "src",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "code",
              "source" : [
                {
                  "context" : "src",
                  "element" : "code",
                  "variable" : "code"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "reference",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "Organization/"
                    },
                    {
                      "valueId" : "code"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "setting default display",
              "source" : [
                {
                  "context" : "src",
                  "condition" : "display.exists().not()"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "display",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "Unknown display"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "display",
              "source" : [
                {
                  "context" : "src",
                  "element" : "display",
                  "variable" : "d"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "display",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "d"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "code",
              "source" : [
                {
                  "context" : "src",
                  "element" : "code",
                  "variable" : "dc"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "id",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "dc"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "TransformReference",
          "typeMode" : "types",
          "input" : [
            {
              "name" : "src",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "id",
              "source" : [
                {
                  "context" : "src",
                  "element" : "id",
                  "variable" : "sid"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "id",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "sid"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "src",
                  "element" : "reference",
                  "variable" : "sf"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "reference",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "sf"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "display",
              "source" : [
                {
                  "context" : "src",
                  "element" : "display",
                  "variable" : "sd"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "display",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "sd"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "setting display",
              "source" : [
                {
                  "context" : "src",
                  "condition" : "display.exists().not()"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "display",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "Unknown display"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "TranslateCoding",
          "typeMode" : "types",
          "input" : [
            {
              "name" : "scc",
              "mode" : "source"
            },
            {
              "name" : "tcc",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "scc",
                  "element" : "coding",
                  "variable" : "d",
                  "condition" : "d.system.exists().not()"
                }
              ],
              "target" : [
                {
                  "context" : "tcc",
                  "element" : "coding",
                  "transform" : "translate",
                  "parameter" : [
                    {
                      "valueId" : "d"
                    },
                    {
                      "valueString" : "https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoLOINCServiceRequestMap"
                    },
                    {
                      "valueString" : "Coding"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "scc",
                  "element" : "coding",
                  "variable" : "scode",
                  "condition" : "(scode.code = '1271').exists() and (scode.display = 'Pap smear/cytology')"
                }
              ],
              "target" : [
                {
                  "context" : "tcc",
                  "element" : "coding",
                  "variable" : "tcode"
                }
              ],
              "rule" : [
                {
                  "name" : "override code",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "code",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "LA16047-5"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "display",
                  "source" : [
                    {
                      "context" : "scode",
                      "element" : "display",
                      "variable" : "d"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "display",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "d"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "overriedsystem",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "system",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "http://loinc.org"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "scc",
                  "element" : "coding",
                  "variable" : "scode",
                  "condition" : "(scode.code = '1271').exists() and (scode.display = 'HPV')"
                }
              ],
              "target" : [
                {
                  "context" : "tcc",
                  "element" : "coding",
                  "variable" : "tcode"
                }
              ],
              "rule" : [
                {
                  "name" : "override code",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "code",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "LP14836-8"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "settinghpvdisplay",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "display",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "Human papilloma virus"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "overriedsystem",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "system",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "http://loinc.org"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "scc",
                  "element" : "coding",
                  "variable" : "scode",
                  "condition" : "(scode.code = '1271').exists() and (scode.display = 'Mammogram')"
                }
              ],
              "target" : [
                {
                  "context" : "tcc",
                  "element" : "coding",
                  "variable" : "tcode"
                }
              ],
              "rule" : [
                {
                  "name" : "override code",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "code",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "LA16046-7"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "display",
                  "source" : [
                    {
                      "context" : "scode",
                      "element" : "display",
                      "variable" : "d"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "display",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "d"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "overriedsystem",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "system",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "http://loinc.org"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "scc",
                  "element" : "coding",
                  "variable" : "scode",
                  "condition" : "(scode.code = '1271').exists() and (scode.display = 'VIA')"
                }
              ],
              "target" : [
                {
                  "context" : "tcc",
                  "element" : "coding",
                  "variable" : "tcode"
                }
              ],
              "rule" : [
                {
                  "name" : "override code",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "code",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "LP404404-8"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "settingdisplay",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "display",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "Screening techniques | Cervix or Vagina | Cytology"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "overriedsystem",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "system",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "http://loinc.org"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "scc",
                  "element" : "coding",
                  "variable" : "scode",
                  "condition" : "(scode.code = '1271').exists() and (scode.display = 'Biopsy')"
                }
              ],
              "target" : [
                {
                  "context" : "tcc",
                  "element" : "coding",
                  "variable" : "tcode"
                }
              ],
              "rule" : [
                {
                  "name" : "override code",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "code",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "LA15393-4"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "settingdisplay",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "display",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "Biopsy"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "overriedsystem",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "system",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "http://loinc.org"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "scc",
                  "element" : "coding",
                  "variable" : "scode",
                  "condition" : "(scode.code = '1271').exists() and (scode.display = 'Ultrasound')"
                }
              ],
              "target" : [
                {
                  "context" : "tcc",
                  "element" : "coding",
                  "variable" : "tcode"
                }
              ],
              "rule" : [
                {
                  "name" : "override code",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "code",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "24630-6"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "settingdisplay",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "display",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "US Chest"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "overriedsystem",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "system",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "http://loinc.org"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "scc",
                  "element" : "coding",
                  "variable" : "scode",
                  "condition" : "(scode.code = '1271').exists() and (scode.display = 'MRI')"
                }
              ],
              "target" : [
                {
                  "context" : "tcc",
                  "element" : "coding",
                  "variable" : "tcode"
                }
              ],
              "rule" : [
                {
                  "name" : "override code",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "code",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "30794-2"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "settingdisplay",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "display",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "MR Breast"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "overriedsystem",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "system",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "http://loinc.org"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "scc",
                  "element" : "coding",
                  "variable" : "scode",
                  "condition" : "(scode.code = '1271').exists() and (scode.display = 'Prostate Specific Antigen - Serum')"
                }
              ],
              "target" : [
                {
                  "context" : "tcc",
                  "element" : "coding",
                  "variable" : "tcode"
                }
              ],
              "rule" : [
                {
                  "name" : "override code",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "code",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "32465-7"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "settingdisplay",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "display",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "Physical findings of Prostate"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "overriedsystem",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "system",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "http://loinc.org"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "scc",
                  "element" : "coding",
                  "variable" : "scode",
                  "condition" : "(scode.code = '1271').exists() and (scode.display = 'Prostate Specific Antigen - Whole Blood')"
                }
              ],
              "target" : [
                {
                  "context" : "tcc",
                  "element" : "coding",
                  "variable" : "tcode"
                }
              ],
              "rule" : [
                {
                  "name" : "override code",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "code",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "LP15247-7"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "settingdisplay",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "display",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "Whole Blood"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "overriedsystem",
                  "source" : [
                    {
                      "context" : "scode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcode",
                      "element" : "system",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "http://loinc.org"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "scc",
                  "element" : "coding",
                  "variable" : "d",
                  "condition" : "d.system.exists()"
                }
              ],
              "target" : [
                {
                  "context" : "tcc",
                  "element" : "coding",
                  "variable" : "tcoding",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Coding"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "code",
                  "source" : [
                    {
                      "context" : "d",
                      "element" : "code",
                      "variable" : "d"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcoding",
                      "element" : "code",
                      "transform" : "translate",
                      "parameter" : [
                        {
                          "valueId" : "d"
                        },
                        {
                          "valueString" : "https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoLOINCServiceRequestMap"
                        },
                        {
                          "valueString" : "code"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "code",
                  "source" : [
                    {
                      "context" : "d",
                      "element" : "code",
                      "variable" : "d"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcoding",
                      "element" : "system",
                      "transform" : "translate",
                      "parameter" : [
                        {
                          "valueId" : "d"
                        },
                        {
                          "valueString" : "https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoLOINCServiceRequestMap"
                        },
                        {
                          "valueString" : "system"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "code",
                  "source" : [
                    {
                      "context" : "d",
                      "element" : "code",
                      "variable" : "d"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcoding",
                      "element" : "display",
                      "transform" : "translate",
                      "parameter" : [
                        {
                          "valueId" : "d"
                        },
                        {
                          "valueString" : "https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoLOINCServiceRequestMap"
                        },
                        {
                          "valueString" : "display"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "code",
                  "source" : [
                    {
                      "context" : "d",
                      "element" : "code",
                      "variable" : "d"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tcoding",
                      "element" : "text",
                      "transform" : "translate",
                      "parameter" : [
                        {
                          "valueId" : "d"
                        },
                        {
                          "valueString" : "https://fhir.slade360.co.ke/fhir/ConceptMap/CIELtoLOINCServiceRequestMap"
                        },
                        {
                          "valueString" : "display"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }