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

## : Appointment 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 "AppointmentSGHI5"] ; #
      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 AppointmentSGHI5</b></p><a name=\"AppointmentSGHI5\"> </a><a name=\"hcAppointmentSGHI5\"> </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/AppointmentSGHI5'</span>#xD;\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'AppointmentSGHI5'</span>#xD;\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'Appointment 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/Appointment<span style=\"color: navy\">\" </span><b>alias </b>AppointmentR4 <b>as </b><b>source</b>#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"StructureDefinition-appointment.html\" title=\"SGHI Appointment Profile\">https://fhir.slade360.co.ke/fhir/StructureDefinition/appointment</a><span style=\"color: navy\">\" </span><b>alias </b>SGHIAppointment <b>as </b><b>target</b>#xD;\n#xD;\n<b>imports</b><span style=\"color: navy\"> \"</span>http://hl7.org/fhir/StructureMap/*4to5<span style=\"color: navy\">\"#xD;\n</span>#xD;\n<b>group </b>SGHIAppointment<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>AppointmentR4, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>SGHIAppointment<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: navy\">;</span>#xD;\n  src.language<span style=\"color: navy\"><b> -&gt; </b></span>tgt.language<span style=\"color: navy\">;</span>#xD;\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.meta<b> as </b><span style=\"color: maroon\">t_meta</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    src<span style=\"color: navy\"><b> -&gt; </b></span>t_meta.profile = <span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/StructureDefinition/appointment'</span> <i>\"addprofile\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"addtometa\"</i><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\">t_text</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    src<span style=\"color: navy\"><b> -&gt; </b></span>t_text.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>t_text.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>#xD;\n  src.verificationStatus<b> as </b><span style=\"color: maroon\">sv</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.verificationStatus<b> as </b><span style=\"color: maroon\">tv</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    sv.coding<b> as </b><span style=\"color: maroon\">sc</span><span style=\"color: navy\"><b> -&gt; </b></span>tv.coding<b> as </b><span style=\"color: maroon\">tc</span><b> then </b>TransformCoding<span style=\"color: navy\">(</span><span style=\"color: maroon\">sc</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tc</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>#xD;\n    sv.text<span style=\"color: navy\"><b> -&gt; </b></span>tv.text<span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>#xD;\n  src<b> where </b>created.exists()<b> then</b><span style=\"color: navy\"> {#xD;\n</span>    src.created<b> as </b><span style=\"color: maroon\">sd</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.created = <span style=\"color: maroon\">sd</span><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"settingcreated\"</i><span style=\"color: navy\">;</span>#xD;\n  src<b> where </b>created.exists().not()<b> then</b><span style=\"color: navy\"> {#xD;\n</span>    src.start<b> as </b><span style=\"color: maroon\">sd</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.created = <span style=\"color: maroon\">sd</span><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"settingcreated\"</i><span style=\"color: navy\">;</span>#xD;\n  src.start<span style=\"color: navy\"><b> -&gt; </b></span>tgt.start<span style=\"color: navy\">;</span>#xD;\n  src.end<span style=\"color: navy\"><b> -&gt; </b></span>tgt.end<span style=\"color: navy\">;</span>#xD;\n  src<b> where </b>participant.exists().not()<span style=\"color: navy\"><b> -&gt; </b></span>tgt.participant = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'BackboneElement'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">tb</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    src.patient<b> as </b><span style=\"color: maroon\">sp</span><span style=\"color: navy\"><b> -&gt; </b></span>tb.actor = <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\">trf</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\">trf</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"setting participant\"</i><span style=\"color: navy\">;</span>#xD;\n  src.participant<b> as </b><span style=\"color: maroon\">sp</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    sp.actor<b> as </b><span style=\"color: maroon\">sa</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.subject = <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\">trf</span><b> then </b>TransformReference<span style=\"color: navy\">(</span><span style=\"color: maroon\">sa</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">trf</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  src.participant<b> as </b><span style=\"color: maroon\">sp</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.participant<b> as </b><span style=\"color: maroon\">tp</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    sp.actor<b> as </b><span style=\"color: maroon\">sa</span><span style=\"color: navy\"><b> -&gt; </b></span>tp.actor<b> as </b><span style=\"color: maroon\">ta</span><b> then </b>TransformReference<span style=\"color: navy\">(</span><span style=\"color: maroon\">sa</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">ta</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>#xD;\n    sp.status<span style=\"color: navy\"><b> -&gt; </b></span>tp.status<span style=\"color: navy\">;</span>#xD;\n    sp<b> where </b>status.exists().not()<span style=\"color: navy\"><b> -&gt; </b></span>tp.status = <span style=\"color: blue\">'needs-action'</span> <i>\"settingparticipantstatus\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>#xD;\n  src<b> where </b>reasonCode.exists().not()<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\">tcf</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    src<span style=\"color: navy\"><b> -&gt; </b></span>tcf.concept = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Concept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">tcc</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>      src.reasonCode<b> as </b><span style=\"color: maroon\">sc</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>        sc.coding<b> as </b><span style=\"color: maroon\">scode</span><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>          scode.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/CIELtoLOINCObservationMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>#xD;\n          scode.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/CIELtoLOINCObservationMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'system'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>#xD;\n          scode.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/CIELtoLOINCObservationMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'display'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>#xD;\n          scode.code<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>tcc.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/CIELtoLOINCObservationMap'</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    <span style=\"color: navy\">}</span> <i>\"settingconcept\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"setting reason code\"</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\">tcrf</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    src.reasonCode<b> as </b><span style=\"color: maroon\">sc</span><span style=\"color: navy\"><b> -&gt; </b></span>tcrf.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><span style=\"color: navy\"> {#xD;\n</span>      sc.coding<b> as </b><span style=\"color: maroon\">scode</span><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>        scode.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/CIELtoLOINCObservationMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>#xD;\n        scode.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/CIELtoLOINCObservationMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'system'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>#xD;\n        scode.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/CIELtoLOINCObservationMap'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'display'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>#xD;\n        scode.code<b> as </b><span style=\"color: maroon\">d</span><span style=\"color: navy\"><b> -&gt; </b></span>tcc.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/CIELtoLOINCObservationMap'</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  <span style=\"color: navy\">}</span> <i>\"settingappointmenttype\"</i><span style=\"color: navy\">;</span>#xD;\n  src.status<span style=\"color: navy\"><b> -&gt; </b></span>tgt.status<span style=\"color: navy\">;</span>#xD;\n  src.specialty<span style=\"color: navy\"><b> -&gt; </b></span>tgt.specialty<span style=\"color: navy\">;</span>#xD;\n  src<b> where </b>specialty.exists().not()<b> then</b><span style=\"color: navy\"> {#xD;\n</span>    src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.specialty = <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><span style=\"color: navy\"> {#xD;\n</span>      src<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\">tc</span><span style=\"color: navy\">, </span> tc.system = <span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/CodeSystem/specialtycodesystem'</span><span style=\"color: navy\">, </span> tc.code = <span style=\"color: blue\">'general-practitioner'</span><span style=\"color: navy\">, </span> tc.display = <span style=\"color: blue\">'General Practitioner'</span> <i>\"setspecialtycoding\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"settingspeciality\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"settingdefaultspecialty\"</i><span style=\"color: navy\">;</span>#xD;\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.priority = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/v3-ActPriority'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'R'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'routine'</span><span style=\"color: navy\">)</span> <i>\"setpriority\"</i><span style=\"color: navy\">;</span>#xD;\n  src.appointmentType<span style=\"color: navy\"><b> -&gt; </b></span>tgt.appointmentType<span style=\"color: navy\">;</span>#xD;\n  src<b> where </b>appointmentType.exists().not()<span style=\"color: navy\"><b> -&gt; </b></span>tgt.appointmentType = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/v2-0276'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'ROUTINE'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Routine appointment - default if not valued'</span><span style=\"color: navy\">)</span> <i>\"setting appointment type\"</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<span style=\"color: navy\"><b> -&gt; </b></span>tgt.display<span style=\"color: navy\">;</span>#xD;\n  src.code<span style=\"color: navy\"><b> -&gt; </b></span>tgt.id<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<span style=\"color: navy\"><b> -&gt; </b></span>tgt.id<span style=\"color: navy\">;</span>#xD;\n  src.reference<span style=\"color: navy\"><b> -&gt; </b></span>tgt.reference<span style=\"color: navy\">;</span>#xD;\n  src.display<span style=\"color: navy\"><b> -&gt; </b></span>tgt.display<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>TransformCoding<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<span style=\"color: navy\"><b> -&gt; </b></span>tgt.code<span style=\"color: navy\">;</span>#xD;\n  src.display<span style=\"color: navy\"><b> -&gt; </b></span>tgt.display<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>\"settingdefaultdisplay\"</i><span style=\"color: navy\">;</span>#xD;\n  src.system<span style=\"color: navy\"><b> -&gt; </b></span>tgt.system<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/AppointmentSGHI5"^^xsd:anyURI ;
    fhir:l <https://fhir.slade360.co.ke/fhir/StructureMap/AppointmentSGHI5>
      ] ; #
      fhir:version [ fhir:v "0.1.0"] ; #
      fhir:name [ fhir:v "AppointmentSGHI5"] ; #
      fhir:title [ fhir:v "Appointment 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 "AppointmentTransformsR4SGHIR5"] ; #
      fhir:structure ( [
    fhir:url [
    fhir:v "http://hl7.org/fhir/4.0/StructureDefinition/Appointment"^^xsd:anyURI ;
    fhir:l <http://hl7.org/fhir/4.0/StructureDefinition/Appointment>     ] ;
    fhir:mode [ fhir:v "source" ] ;
    fhir:alias [ fhir:v "AppointmentR4" ]
      ] [
    fhir:url [
    fhir:v "https://fhir.slade360.co.ke/fhir/StructureDefinition/appointment"^^xsd:anyURI ;
    fhir:l <https://fhir.slade360.co.ke/fhir/StructureDefinition/appointment>     ] ;
    fhir:mode [ fhir:v "target" ] ;
    fhir:alias [ fhir:v "SGHIAppointment" ]
      ] ) ; #
      fhir:import ( [
    fhir:v "http://hl7.org/fhir/StructureMap/*4to5"^^xsd:anyURI ;
    fhir:l <http://hl7.org/fhir/StructureMap/*4to5>
      ] ) ; #
      fhir:group ( [
    fhir:name [ fhir:v "SGHIAppointment" ] ;
    fhir:typeMode [ fhir:v "type-and-types" ] ;
        ( fhir:input [
    fhir:name [ fhir:v "src" ] ;
    fhir:type [ fhir:v "AppointmentR4" ] ;
    fhir:mode [ fhir:v "source" ]     ] [
    fhir:name [ fhir:v "tgt" ] ;
    fhir:type [ fhir:v "SGHIAppointment" ] ;
    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:variable [ fhir:v "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "active" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "language" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "language" ] ;
    fhir:variable [ fhir:v "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "language" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "addtometa" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "meta" ] ;
    fhir:variable [ fhir:v "t_meta" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "addprofile" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "src" ]         ] ) ;
            ( 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/appointment"             ]           ] )         ] )       ] )     ] [
    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 "t_text" ] ;
    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 "t_text" ] ;
    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 "t_text" ] ;
    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:name [ fhir:v "verificationStatus" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "verificationStatus" ] ;
    fhir:variable [ fhir:v "sv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "verificationStatus" ] ;
    fhir:variable [ fhir:v "tv" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "coding" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "sv" ] ;
    fhir:element [ fhir:v "coding" ] ;
    fhir:variable [ fhir:v "sc" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tv" ] ;
    fhir:element [ fhir:v "coding" ] ;
    fhir:variable [ fhir:v "tc" ]         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "TransformCoding" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "sc"             ]           ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "tc"             ]           ] )         ] )       ] [
    fhir:name [ fhir:v "text" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "sv" ] ;
    fhir:element [ fhir:v "text" ] ;
    fhir:variable [ fhir:v "vvv" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tv" ] ;
    fhir:element [ fhir:v "text" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"             ]           ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"             ]           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "settingcreated" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:condition [ fhir:v "created.exists()" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "created" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "created" ] ;
    fhir:variable [ fhir:v "sd" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "created" ] ;
    fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "sd"             ]           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "settingcreated" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:condition [ fhir:v "created.exists().not()" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "start" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "start" ] ;
    fhir:variable [ fhir:v "sd" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "created" ] ;
    fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "sd"             ]           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "start" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "start" ] ;
    fhir:variable [ fhir:v "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "start" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "end" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "end" ] ;
    fhir:variable [ fhir:v "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "end" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "setting participant" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:condition [ fhir:v "participant.exists().not()" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "participant" ] ;
    fhir:variable [ fhir:v "tb" ] ;
    fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "BackboneElement"           ]         ] )       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "patient" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "patient" ] ;
    fhir:variable [ fhir:v "sp" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tb" ] ;
    fhir:element [ fhir:v "actor" ] ;
    fhir:variable [ fhir:v "trf" ] ;
    fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "Reference"             ]           ] )         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "TransformReference" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "sp"             ]           ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "trf"             ]           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "participant" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "participant" ] ;
    fhir:variable [ fhir:v "sp" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "actor" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "sp" ] ;
    fhir:element [ fhir:v "actor" ] ;
    fhir:variable [ fhir:v "sa" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "subject" ] ;
    fhir:variable [ fhir:v "trf" ] ;
    fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "Reference"             ]           ] )         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "TransformReference" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "sa"             ]           ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "trf"             ]           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "participant" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "participant" ] ;
    fhir:variable [ fhir:v "sp" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "participant" ] ;
    fhir:variable [ fhir:v "tp" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "actor" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "sp" ] ;
    fhir:element [ fhir:v "actor" ] ;
    fhir:variable [ fhir:v "sa" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tp" ] ;
    fhir:element [ fhir:v "actor" ] ;
    fhir:variable [ fhir:v "ta" ]         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "TransformReference" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "sa"             ]           ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "ta"             ]           ] )         ] )       ] [
    fhir:name [ fhir:v "status" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "sp" ] ;
    fhir:element [ fhir:v "status" ] ;
    fhir:variable [ fhir:v "vvv" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tp" ] ;
    fhir:element [ fhir:v "status" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"             ]           ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"             ]           ] )         ] )       ] [
    fhir:name [ fhir:v "settingparticipantstatus" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "sp" ] ;
    fhir:condition [ fhir:v "status.exists().not()" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tp" ] ;
    fhir:element [ fhir:v "status" ] ;
    fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "needs-action"             ]           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "setting reason code" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:condition [ fhir:v "reasonCode.exists().not()" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "reason" ] ;
    fhir:variable [ fhir:v "tcf" ] ;
    fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "CodeableReference"           ]         ] )       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "settingconcept" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "src" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tcf" ] ;
    fhir:element [ fhir:v "concept" ] ;
    fhir:variable [ fhir:v "tcc" ] ;
    fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "Concept"             ]           ] )         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "reasonCode" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "reasonCode" ] ;
    fhir:variable [ fhir:v "sc" ]           ] ) ;
              ( fhir:rule [
    fhir:name [ fhir:v "coding" ] ;
                ( fhir:source [
    fhir:context [ fhir:v "sc" ] ;
    fhir:element [ fhir:v "coding" ] ;
    fhir:variable [ fhir:v "scode" ]             ] ) ;
                ( 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 "scode" ] ;
    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/CIELtoLOINCObservationMap"                   ]                 ] [
    fhir:value [
    a fhir:String ;
    fhir:v "code"                   ]                 ] )               ] )             ] [
    fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
    fhir:context [ fhir:v "scode" ] ;
    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/CIELtoLOINCObservationMap"                   ]                 ] [
    fhir:value [
    a fhir:String ;
    fhir:v "system"                   ]                 ] )               ] )             ] [
    fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
    fhir:context [ fhir:v "scode" ] ;
    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/CIELtoLOINCObservationMap"                   ]                 ] [
    fhir:value [
    a fhir:String ;
    fhir:v "display"                   ]                 ] )               ] )             ] [
    fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
    fhir:context [ fhir:v "scode" ] ;
    fhir:element [ fhir:v "code" ] ;
    fhir:variable [ fhir:v "d" ]               ] ) ;
                  ( fhir:target [
    fhir:context [ fhir:v "tcc" ] ;
    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/CIELtoLOINCObservationMap"                   ]                 ] [
    fhir:value [
    a fhir:String ;
    fhir:v "display"                   ]                 ] )               ] )             ] )           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "settingappointmenttype" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "reason" ] ;
    fhir:variable [ fhir:v "tcrf" ] ;
    fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "CodeableReference"           ]         ] )       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "reasonCode" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "reasonCode" ] ;
    fhir:variable [ fhir:v "sc" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tcrf" ] ;
    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:rule [
    fhir:name [ fhir:v "coding" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "sc" ] ;
    fhir:element [ fhir:v "coding" ] ;
    fhir:variable [ fhir:v "scode" ]           ] ) ;
              ( 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 "scode" ] ;
    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/CIELtoLOINCObservationMap"                 ]               ] [
    fhir:value [
    a fhir:String ;
    fhir:v "code"                 ]               ] )             ] )           ] [
    fhir:name [ fhir:v "code" ] ;
                ( fhir:source [
    fhir:context [ fhir:v "scode" ] ;
    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/CIELtoLOINCObservationMap"                 ]               ] [
    fhir:value [
    a fhir:String ;
    fhir:v "system"                 ]               ] )             ] )           ] [
    fhir:name [ fhir:v "code" ] ;
                ( fhir:source [
    fhir:context [ fhir:v "scode" ] ;
    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/CIELtoLOINCObservationMap"                 ]               ] [
    fhir:value [
    a fhir:String ;
    fhir:v "display"                 ]               ] )             ] )           ] [
    fhir:name [ fhir:v "code" ] ;
                ( fhir:source [
    fhir:context [ fhir:v "scode" ] ;
    fhir:element [ fhir:v "code" ] ;
    fhir:variable [ fhir:v "d" ]             ] ) ;
                ( fhir:target [
    fhir:context [ fhir:v "tcc" ] ;
    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/CIELtoLOINCObservationMap"                 ]               ] [
    fhir:value [
    a fhir:String ;
    fhir:v "display"                 ]               ] )             ] )           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "status" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "status" ] ;
    fhir:variable [ fhir:v "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "status" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "specialty" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "specialty" ] ;
    fhir:variable [ fhir:v "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "specialty" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "settingdefaultspecialty" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:condition [ fhir:v "specialty.exists().not()" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "settingspeciality" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "src" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "specialty" ] ;
    fhir:variable [ fhir:v "tcc" ] ;
    fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "CodeableConcept"             ]           ] )         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "setspecialtycoding" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "src" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "tcc" ] ;
    fhir:element [ fhir:v "coding" ] ;
    fhir:variable [ fhir:v "tc" ] ;
    fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "Coding"               ]             ] )           ] [
    fhir:context [ fhir:v "tc" ] ;
    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/specialtycodesystem"               ]             ] )           ] [
    fhir:context [ fhir:v "tc" ] ;
    fhir:element [ fhir:v "code" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "general-practitioner"               ]             ] )           ] [
    fhir:context [ fhir:v "tc" ] ;
    fhir:element [ fhir:v "display" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "General Practitioner"               ]             ] )           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "setpriority" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "priority" ] ;
    fhir:transform [ fhir:v "cc" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "http://terminology.hl7.org/CodeSystem/v3-ActPriority"           ]         ] [
    fhir:value [
    a fhir:String ;
    fhir:v "R"           ]         ] [
    fhir:value [
    a fhir:String ;
    fhir:v "routine"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "appointmentType" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "appointmentType" ] ;
    fhir:variable [ fhir:v "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "appointmentType" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "setting appointment type" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:condition [ fhir:v "appointmentType.exists().not()" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "appointmentType" ] ;
    fhir:transform [ fhir:v "cc" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "http://terminology.hl7.org/CodeSystem/v2-0276"           ]         ] [
    fhir:value [
    a fhir:String ;
    fhir:v "ROUTINE"           ]         ] [
    fhir:value [
    a fhir:String ;
    fhir:v "Routine appointment - default if not valued"           ]         ] )       ] )     ] )
      ] [
    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 "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "display" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "code" ] ;
    fhir:variable [ fhir:v "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "id" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] )
      ] [
    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 "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "id" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "reference" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "reference" ] ;
    fhir:variable [ fhir:v "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "reference" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "display" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "display" ] ;
    fhir:variable [ fhir:v "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "display" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] [
    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 "TransformCoding" ] ;
    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 "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "code" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "display" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "display" ] ;
    fhir:variable [ fhir:v "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "display" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "settingdefaultdisplay" ] ;
          ( 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 "system" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "system" ] ;
    fhir:variable [ fhir:v "vvv" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:element [ fhir:v "system" ] ;
    fhir:variable [ fhir:v "vvv" ] ;
    fhir:transform [ fhir:v "create" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "vvv"           ]         ] )       ] )     ] )
      ] ) . #