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

Active as of 2026-04-27

Raw ttl | Download

    @prefix fhir: <http://hl7.org/fhir/> .
    @prefix owl: <http://www.w3.org/2002/07/owl#> .
    @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

    # - resource -------------------------------------------------------------------

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