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

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

Active as of 2026-05-21

Raw xml | Download

    <StructureMap xmlns="http://hl7.org/fhir">
      <id value="ConsenttoSGHI5"/>
      <text>
        <status value="generated"/>
        <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap ConsenttoSGHI5</b></p><a name="ConsenttoSGHI5"> </a><a name="hcConsenttoSGHI5"> </a><pre class="fml">
    <span style="color: #cc00cc">/// <b>url</b> = </span><span style="color: blue">'https://fhir.slade360.co.ke/fhir/StructureMap/ConsenttoSGHI5'</span>
    <span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'ConsenttoSGHI5'</span>
    <span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'Consent Transforms: R4 → SGHI R5'</span>
    <span style="color: #cc00cc">/// <b>status</b> = </span><span style="color: blue">'active'</span>

    <b>uses</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/4.0/StructureDefinition/Consent<span style="color: navy">&quot; </span><b>alias </b>ConsentR4 <b>as </b><b>source</b>
    <b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-consent.html" title="SGHI Consent">https://fhir.slade360.co.ke/fhir/StructureDefinition/consent</a><span style="color: navy">&quot; </span><b>alias </b>SGHIConsent <b>as </b><b>target</b>

    <b>imports</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/StructureMap/*4to5<span style="color: navy">&quot;
    </span>
    <b>group </b>SGHIConsent<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>ConsentR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>SGHIConsent<span style="color: navy">)</span><b> extends </b>DomainResource<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
    </span>  src.id<span style="color: navy"><b> -&gt; </b></span>tgt.id<span style="color: navy">;</span>
      src.active<span style="color: navy"><b> -&gt; </b></span>tgt.active = <span style="color: blue">'true'</span><span style="color: navy">;</span>
      src.language<span style="color: navy"><b> -&gt; </b></span>tgt.language<span style="color: navy">;</span>
      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"> {
    </span>    src<span style="color: navy"><b> -&gt; </b></span>tgt_n.status = <span style="color: blue">'generated'</span> <i>&quot;settextstatus&quot;</i><span style="color: navy">;</span>
        src<span style="color: navy"><b> -&gt; </b></span>tgt_n.div = <span style="color: blue">'&lt;div xmlns=\&quot;http://www.w3.org/1999/xhtml\&quot;&gt;&lt;h1&gt;Generated text&lt;/h1&gt;&lt;/div&gt;'</span> <i>&quot;settextdiv&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;createhardcodedtext&quot;</i><span style="color: navy">;</span>
      src.text<b> as </b><span style="color: maroon">st</span><span style="color: navy"><b> -&gt; </b></span>tgt.text<b> as </b><span style="color: maroon">tt</span><b> then</b><span style="color: navy"> {
    </span>    st.status<span style="color: navy"><b> -&gt; </b></span>tt.status<span style="color: navy">;</span>
        st.div<span style="color: navy"><b> -&gt; </b></span>tt.div<span style="color: navy">;</span>
      <span style="color: navy">}</span><span style="color: navy">;</span>
      src<b> as </b><span style="color: maroon">sc</span><b> where </b>identifier.exists().not()<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">tt_id</span><b> then</b><span style="color: navy"> {
    </span>    src.id<b> as </b><span style="color: maroon">uuid</span><span style="color: navy"><b> -&gt; </b></span>tt_id.value = <span style="color: maroon">uuid</span> <i>&quot;creating id&quot;</i><span style="color: navy">;</span>
        src<span style="color: navy"><b> -&gt; </b></span>tt_id.use = <span style="color: blue">'official'</span> <i>&quot;creating use&quot;</i><span style="color: navy">;</span>
        src<span style="color: navy"><b> -&gt; </b></span>tt_id.type<b> as </b><span style="color: maroon">ty</span><b> then</b><span style="color: navy"> {
    </span>      src<span style="color: navy"><b> -&gt; </b></span>ty.coding = <b>create</b><span style="color: navy">(</span><span style="color: blue">'CodeableConcept'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">ty_c</span><b> then</b><span style="color: navy"> {
    </span>        src<span style="color: navy"><b> -&gt; </b></span>ty_c.system = <span style="color: blue">'https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem'</span> <i>&quot;creating coding&quot;</i><span style="color: navy">;</span>
            src<span style="color: navy"><b> -&gt; </b></span>ty_c.code = <span style="color: blue">'fhir-id'</span> <i>&quot;creating code&quot;</i><span style="color: navy">;</span>
            src<span style="color: navy"><b> -&gt; </b></span>ty_c.display = <span style="color: blue">'FHIR Id'</span> <i>&quot;creating display&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;creating identifier type&quot;</i><span style="color: navy">;</span>
          src<span style="color: navy"><b> -&gt; </b></span>tt_id.system = <span style="color: blue">'https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem'</span> <i>&quot;creating system&quot;</i><span style="color: navy">;</span>
          src.meta<b> as </b><span style="color: maroon">sm</span><b> then</b><span style="color: navy"> {
    </span>        sm.tag first<b> as </b><span style="color: maroon">sm</span><span style="color: navy"><b> -&gt; </b></span>tt_id.assigner = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Reference'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">t_assigner</span><b> then </b>TransformAssigner<span style="color: navy">(</span><span style="color: maroon">sm</span><span style="color: navy">, </span><span style="color: maroon">t_assigner</span><span style="color: navy">)</span><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;setting owner&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">creating identifier assigner</span>
        <span style="color: navy">}</span> <i>&quot;setting identifier type&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setting identifier&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Create identifier</span>
      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"> {
    </span>    s_meta.lastUpdated<span style="color: navy"><b> -&gt; </b></span>t_meta.lastUpdated<span style="color: navy">;</span>
        s_meta.language<span style="color: navy"><b> -&gt; </b></span>t_meta.language<span style="color: navy">;</span>
        s_meta.tags<span style="color: navy"><b> -&gt; </b></span>t_meta.tags<span style="color: navy">;</span>
        src.meta<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/consent'</span> <i>&quot;setprofileinmeta&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;set profile in meta&quot;</i><span style="color: navy">;</span>
      src.status<span style="color: navy"><b> -&gt; </b></span>tgt.status<span style="color: navy">;</span>
      src.category<b> as </b><span style="color: maroon">sc</span><span style="color: navy"><b> -&gt; </b></span>tgt.category<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>
      src.patient<b> as </b><span style="color: maroon">sp</span><span style="color: navy"><b> -&gt; </b></span>tgt.subject<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> <span style="color: navy">// </span><span style="color: green">Patient has been translated to subject in R5</span>
      src.dateTime<span style="color: navy"><b> -&gt; </b></span>tgt.date<span style="color: navy">;</span>
      src.provision<b> as </b><span style="color: maroon">spr</span><span style="color: navy"><b> -&gt; </b></span>tgt.provision<b> as </b><span style="color: maroon">tpr</span><b> then</b><span style="color: navy"> {
    </span>    spr.data<b> as </b><span style="color: maroon">sd</span><span style="color: navy"><b> -&gt; </b></span>tpr.data<b> as </b><span style="color: maroon">td</span><b> then</b><span style="color: navy"> {
    </span>      sd.meaning<span style="color: navy"><b> -&gt; </b></span>td.meaning<span style="color: navy">;</span>
          sd.reference<b> as </b><span style="color: maroon">sf</span><span style="color: navy"><b> -&gt; </b></span>td.reference<b> as </b><span style="color: maroon">tf</span><b> then </b>TransformReference<span style="color: navy">(</span><span style="color: maroon">sf</span><span style="color: navy">, </span><span style="color: maroon">tf</span><span style="color: navy">)</span><span style="color: navy">;</span>
        <span style="color: navy">}</span><span style="color: navy">;</span>
      <span style="color: navy">}</span><span style="color: navy">;</span>
      src.performer<b> as </b><span style="color: maroon">sp</span><b> where </b>performer.exists()<span style="color: navy"><b> -&gt; </b></span>tgt.grantee<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> <span style="color: navy">// </span><span style="color: green">Performer has been translated to grantee in R5</span>
      src<b> where </b>performer.exists().not()<b> then</b><span style="color: navy"> {
    </span>    src.patient<b> as </b><span style="color: maroon">sp</span><span style="color: navy"><b> -&gt; </b></span>tgt.grantee<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>
        src.patient<b> as </b><span style="color: maroon">sp</span><span style="color: navy"><b> -&gt; </b></span>tgt.grantor<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>
      <span style="color: navy">}</span> <i>&quot;populating grantee with patient details&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Handles cases where performer does not exists in legacy R4 data</span>
      src.organization<b> as </b><span style="color: maroon">so</span><b> where </b>organization.exists()<span style="color: navy"><b> -&gt; </b></span>tgt.manager<b> as </b><span style="color: maroon">tm</span><b> then </b>TransformReference<span style="color: navy">(</span><span style="color: maroon">so</span><span style="color: navy">, </span><span style="color: maroon">tm</span><span style="color: navy">)</span><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">handles cases where organization exists in legacy R4 data</span>
      src.organization<b> as </b><span style="color: maroon">so</span><b> where </b>organization.exists()<span style="color: navy"><b> -&gt; </b></span>tgt.controller<b> as </b><span style="color: maroon">tm</span><b> then </b>TransformReference<span style="color: navy">(</span><span style="color: maroon">so</span><span style="color: navy">, </span><span style="color: maroon">tm</span><span style="color: navy">)</span><span style="color: navy">;</span>
      src<b> where </b>organization.exists().not()<b> then</b><span style="color: navy"> {
    </span>    src.meta<b> as </b><span style="color: maroon">sm</span><b> then</b><span style="color: navy"> {
    </span>      sm.tag first<b> as </b><span style="color: maroon">st</span><span style="color: navy"><b> -&gt; </b></span>tgt.manager<b> as </b><span style="color: maroon">tp</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">tp</span><span style="color: navy">)</span><span style="color: navy">;</span>
          sm.tag first<b> as </b><span style="color: maroon">st</span><span style="color: navy"><b> -&gt; </b></span>tgt.controller<b> as </b><span style="color: maroon">tp</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">tp</span><span style="color: navy">)</span><span style="color: navy">;</span>
        <span style="color: navy">}</span><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setting manager and controller&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">handles cases where organization does not exists in legacy R4 data</span>
      src.policyRule<b> as </b><span style="color: maroon">sr</span><b> where </b>text.exists()<span style="color: navy"><b> -&gt; </b></span>tgt.regulatoryBasis = <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">tr</span><b> then</b><span style="color: navy"> {
    </span>    sr.text<span style="color: navy"><b> -&gt; </b></span>tr.text<span style="color: navy">;</span>
        src<span style="color: navy"><b> -&gt; </b></span> tr.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">tcc</span><span style="color: navy">, </span> tcc.system = <span style="color: blue">'https://hl7.org/fhir/R4/codesystem-consent-policy.html'</span><span style="color: navy">, </span> tcc.code = <span style="color: blue">'cric'</span><span style="color: navy">, </span> tcc.display = <span style="color: blue">'Common Rule Informed Consent'</span> <i>&quot;setting coding&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setting rule policy&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Policyrule has been translated to regulatoryBasis in R4</span>
      src<b> where </b>verification.exists().not()<span style="color: navy"><b> -&gt; </b></span>tgt.verification = <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"> {
    </span>    src<span style="color: navy"><b> -&gt; </b></span>tb.verified = <span style="color: blue">'true'</span> <i>&quot;setting verified status&quot;</i><span style="color: navy">;</span>
        src<span style="color: navy"><b> -&gt; </b></span>tb.verificationDate = <span style="color: blue">'2025-06-16'</span> <i>&quot;setting verification date&quot;</i><span style="color: navy">;</span>
        src.meta<b> as </b><span style="color: maroon">sm</span><b> then</b><span style="color: navy"> {
    </span>      sm.tag last<b> as </b><span style="color: maroon">st</span><span style="color: navy"><b> -&gt; </b></span>tb.verifiedBy = <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">tf</span><b> then</b><span style="color: navy"> {
    </span>        st.code<b> as </b><span style="color: maroon">org</span><span style="color: navy"><b> -&gt; </b></span>tf.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Organization/'</span><span style="color: navy">, </span><span style="color: maroon">org</span><span style="color: navy">)</span><span style="color: navy">;</span>
            st.display<span style="color: navy"><b> -&gt; </b></span>tf.display<span style="color: navy">;</span>
            st.display<b> where </b>display.exists().not()<span style="color: navy"><b> -&gt; </b></span>tf.display = <span style="color: blue">'Unknown display'</span><span style="color: navy">;</span>
            st.code<span style="color: navy"><b> -&gt; </b></span>tf.id<span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;setting verified by&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;setting verify by&quot;</i><span style="color: navy">;</span>
        src.patient<b> as </b><span style="color: maroon">sp</span><span style="color: navy"><b> -&gt; </b></span>tb.verifiedWith = <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> <i>&quot;setting reference&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setting verification&quot;</i><span style="color: navy">;</span>
      src.category<b> as </b><span style="color: maroon">sc</span><span style="color: navy"><b> -&gt; </b></span>tgt.category<b> as </b><span style="color: maroon">tc</span><b> then</b><span style="color: navy"> {
    </span>    sc.text<span style="color: navy"><b> -&gt; </b></span>tc.text<span style="color: navy">;</span>
        sc.coding<b> as </b><span style="color: maroon">scc</span><span style="color: navy"><b> -&gt; </b></span>tc.coding<b> as </b><span style="color: maroon">tcc</span><b> then </b>TransformCoding<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>
      <span style="color: navy">}</span><span style="color: navy">;</span>
      src.provision<b> as </b><span style="color: maroon">sp</span><b> then</b><span style="color: navy"> {
    </span>    sp.type<span style="color: navy"><b> -&gt; </b></span>tgt.decision<span style="color: navy">;</span>
      <span style="color: navy">}</span><span style="color: navy">;</span>
      src.dateTime<b> as </b><span style="color: maroon">sdt</span><b> where </b>dateTime.exists()<span style="color: navy"><b> -&gt; </b></span>tgt.date = <span style="color: maroon">sdt</span><span style="color: navy">;</span>
      src<span style="color: navy"><b> -&gt; </b></span>tgt.date = <span style="color: blue">'2025-06-16'</span> <i>&quot;setting consent date&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}

    </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"> {
    </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>
      src<b> where </b>display.exists().not()<span style="color: navy"><b> -&gt; </b></span>tgt.display = <span style="color: blue">'Unknown display'</span> <i>&quot;setting default display&quot;</i><span style="color: navy">;</span>
      src.display<span style="color: navy"><b> -&gt; </b></span>tgt.display<span style="color: navy">;</span>
      src.code<span style="color: navy"><b> -&gt; </b></span>tgt.id<span style="color: navy">;</span>
    <span style="color: navy">}

    </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"> {
    </span>  src.id<span style="color: navy"><b> -&gt; </b></span>tgt.id<span style="color: navy">;</span>
      src.reference<span style="color: navy"><b> -&gt; </b></span>tgt.reference<span style="color: navy">;</span>
      src.display<span style="color: navy"><b> -&gt; </b></span>tgt.display<span style="color: navy">;</span>
      src<b> where </b>display.exists().not()<span style="color: navy"><b> -&gt; </b></span>tgt.display = <span style="color: blue">'Unknown display'</span> <i>&quot;setting display&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}

    </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"> {
    </span>  src.system<span style="color: navy"><b> -&gt; </b></span>tgt.system<span style="color: navy">;</span>
      src.code<span style="color: navy"><b> -&gt; </b></span>tgt.code<span style="color: navy">;</span>
      src.display<span style="color: navy"><b> -&gt; </b></span>tgt.display<span style="color: navy">;</span>
    <span style="color: navy">}

    </span></pre></div>
      </text>
      <url value="https://fhir.slade360.co.ke/fhir/StructureMap/ConsenttoSGHI5"/>
      <version value="0.1.0"/>
      <name value="ConsenttoSGHI5"/>
      <title value="Consent Transforms: R4 → SGHI R5"/>
      <status value="active"/>
      <date value="2026-05-21T09:38:13+00:00"/>
      <publisher value="Kathurima Kimathi"/>
      <contact>
        <name value="Kathurima Kimathi"/>
        <telecom>
          <system value="url"/>
          <value value="https://www.linkedin.com/in/kathurima-kimathi/"/>
        </telecom>
        <telecom>
          <system value="email"/>
          <value value="kathurimakimathi415@gmail.com"/>
        </telecom>
      </contact>
      <contact>
        <name value="Oscar John"/>
        <telecom>
          <system value="email"/>
          <value value="oscarjohnotieno@gmail.com"/>
          <use value="work"/>
        </telecom>
      </contact>
      <contact>
        <name value="Kennedy Omondi"/>
        <telecom>
          <system value="email"/>
          <value value="kennankole@gmail.com"/>
          <use value="work"/>
        </telecom>
      </contact>
      <description value="ConsentTransformsR4SGHIR5"/>
      <structure>
        <url value="http://hl7.org/fhir/4.0/StructureDefinition/Consent"/>
        <mode value="source"/>
        <alias value="ConsentR4"/>
      </structure>
      <structure>
        <url
             value="https://fhir.slade360.co.ke/fhir/StructureDefinition/consent"/>
        <mode value="target"/>
        <alias value="SGHIConsent"/>
      </structure>
      <import value="http://hl7.org/fhir/StructureMap/*4to5"/>
      <group>
        <name value="SGHIConsent"/>
        <extends value="DomainResource"/>
        <typeMode value="type-and-types"/>
        <input>
          <name value="src"/>
          <type value="ConsentR4"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <type value="SGHIConsent"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="id"/>
          <source>
            <context value="src"/>
            <element value="id"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="id"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="active"/>
          <source>
            <context value="src"/>
            <element value="active"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="active"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="true"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="language"/>
          <source>
            <context value="src"/>
            <element value="language"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="language"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="createhardcodedtext"/>
          <source>
            <context value="src"/>
            <condition value="text.exists().not()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="text"/>
            <variable value="tgt_n"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Narrative"/>
            </parameter>
          </target>
          <rule>
            <name value="settextstatus"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="tgt_n"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="generated"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="settextdiv"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="tgt_n"/>
              <element value="div"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;h1&gt;Generated text&lt;/h1&gt;&lt;/div&gt;"/>
              </parameter>
            </target>
          </rule>
        </rule>
        <rule>
          <name value="text"/>
          <source>
            <context value="src"/>
            <element value="text"/>
            <variable value="st"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="text"/>
            <variable value="tt"/>
          </target>
          <rule>
            <name value="status"/>
            <source>
              <context value="st"/>
              <element value="status"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="tt"/>
              <element value="status"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
            <dependent>
              <name value="DefaultMappingGroupAnonymousAlias"/>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
            </dependent>
          </rule>
          <rule>
            <name value="div"/>
            <source>
              <context value="st"/>
              <element value="div"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="tt"/>
              <element value="div"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
            <dependent>
              <name value="DefaultMappingGroupAnonymousAlias"/>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
            </dependent>
          </rule>
        </rule>
        <rule>
          <name value="setting identifier"/>
          <source>
            <context value="src"/>
            <variable value="sc"/>
            <condition value="identifier.exists().not()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="identifier"/>
            <variable value="tt_id"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Identifier"/>
            </parameter>
          </target>
          <rule>
            <name value="creating id"/>
            <source>
              <context value="src"/>
              <element value="id"/>
              <variable value="uuid"/>
            </source>
            <target>
              <context value="tt_id"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="uuid"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="creating use"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="tt_id"/>
              <element value="use"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="official"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="setting identifier type"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="tt_id"/>
              <element value="type"/>
              <variable value="ty"/>
            </target>
            <rule>
              <name value="creating identifier type"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <context value="ty"/>
                <element value="coding"/>
                <variable value="ty_c"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="CodeableConcept"/>
                </parameter>
              </target>
              <rule>
                <name value="creating coding"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="ty_c"/>
                  <element value="system"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString
                                 value="https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="creating code"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="ty_c"/>
                  <element value="code"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="fhir-id"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="creating display"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="ty_c"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="FHIR Id"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <rule>
              <name value="creating system"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <context value="tt_id"/>
                <element value="system"/>
                <transform value="copy"/>
                <parameter>
                  <valueString
                               value="https://fhir.slade360.co.ke/fhir/CodeSystem/identifier-codesystem"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="setting owner"/>
              <source>
                <context value="src"/>
                <element value="meta"/>
                <variable value="sm"/>
              </source>
              <rule>
                <name value="tag"/>
                <source>
                  <context value="sm"/>
                  <element value="tag"/>
                  <listMode value="first"/>
                  <variable value="sm"/>
                </source>
                <target>
                  <context value="tt_id"/>
                  <element value="assigner"/>
                  <variable value="t_assigner"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="TransformAssigner"/>
                  <parameter>
                    <valueId value="sm"/>
                  </parameter>
                  <parameter>
                    <valueId value="t_assigner"/>
                  </parameter>
                </dependent>
              </rule>
              <documentation value="creating identifier assigner"/>
            </rule>
          </rule>
          <documentation value="Create identifier"/>
        </rule>
        <rule>
          <name value="set profile in meta"/>
          <source>
            <context value="src"/>
            <element value="meta"/>
            <variable value="s_meta"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="meta"/>
            <variable value="t_meta"/>
          </target>
          <rule>
            <name value="lastUpdated"/>
            <source>
              <context value="s_meta"/>
              <element value="lastUpdated"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="t_meta"/>
              <element value="lastUpdated"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
            <dependent>
              <name value="DefaultMappingGroupAnonymousAlias"/>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
            </dependent>
          </rule>
          <rule>
            <name value="language"/>
            <source>
              <context value="s_meta"/>
              <element value="language"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="t_meta"/>
              <element value="language"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
            <dependent>
              <name value="DefaultMappingGroupAnonymousAlias"/>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
            </dependent>
          </rule>
          <rule>
            <name value="tags"/>
            <source>
              <context value="s_meta"/>
              <element value="tags"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="t_meta"/>
              <element value="tags"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
            <dependent>
              <name value="DefaultMappingGroupAnonymousAlias"/>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
            </dependent>
          </rule>
          <rule>
            <name value="setprofileinmeta"/>
            <source>
              <context value="src"/>
              <element value="meta"/>
              <condition value="profile.exists().not()"/>
            </source>
            <target>
              <context value="t_meta"/>
              <element value="profile"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.slade360.co.ke/fhir/StructureDefinition/consent"/>
              </parameter>
            </target>
          </rule>
        </rule>
        <rule>
          <name value="status"/>
          <source>
            <context value="src"/>
            <element value="status"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="status"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="category"/>
          <source>
            <context value="src"/>
            <element value="category"/>
            <variable value="sc"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="category"/>
            <variable value="tc"/>
          </target>
          <dependent>
            <name value="TransformCoding"/>
            <parameter>
              <valueId value="sc"/>
            </parameter>
            <parameter>
              <valueId value="tc"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="patient"/>
          <source>
            <context value="src"/>
            <element value="patient"/>
            <variable value="sp"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="subject"/>
            <variable value="tp"/>
          </target>
          <dependent>
            <name value="TransformReference"/>
            <parameter>
              <valueId value="sp"/>
            </parameter>
            <parameter>
              <valueId value="tp"/>
            </parameter>
          </dependent>
          <documentation value="Patient has been translated to subject in R5"/>
        </rule>
        <rule>
          <name value="dateTime"/>
          <source>
            <context value="src"/>
            <element value="dateTime"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="date"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="provision"/>
          <source>
            <context value="src"/>
            <element value="provision"/>
            <variable value="spr"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="provision"/>
            <variable value="tpr"/>
          </target>
          <rule>
            <name value="data"/>
            <source>
              <context value="spr"/>
              <element value="data"/>
              <variable value="sd"/>
            </source>
            <target>
              <context value="tpr"/>
              <element value="data"/>
              <variable value="td"/>
            </target>
            <rule>
              <name value="meaning"/>
              <source>
                <context value="sd"/>
                <element value="meaning"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="td"/>
                <element value="meaning"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
              <dependent>
                <name value="DefaultMappingGroupAnonymousAlias"/>
                <parameter>
                  <valueId value="vvv"/>
                </parameter>
                <parameter>
                  <valueId value="vvv"/>
                </parameter>
              </dependent>
            </rule>
            <rule>
              <name value="reference"/>
              <source>
                <context value="sd"/>
                <element value="reference"/>
                <variable value="sf"/>
              </source>
              <target>
                <context value="td"/>
                <element value="reference"/>
                <variable value="tf"/>
              </target>
              <dependent>
                <name value="TransformReference"/>
                <parameter>
                  <valueId value="sf"/>
                </parameter>
                <parameter>
                  <valueId value="tf"/>
                </parameter>
              </dependent>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="performer"/>
          <source>
            <context value="src"/>
            <element value="performer"/>
            <variable value="sp"/>
            <condition value="performer.exists()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="grantee"/>
            <variable value="tp"/>
          </target>
          <dependent>
            <name value="TransformReference"/>
            <parameter>
              <valueId value="sp"/>
            </parameter>
            <parameter>
              <valueId value="tp"/>
            </parameter>
          </dependent>
          <documentation value="Performer has been translated to grantee in R5"/>
        </rule>
        <rule>
          <name value="populating grantee with patient details"/>
          <source>
            <context value="src"/>
            <condition value="performer.exists().not()"/>
          </source>
          <rule>
            <name value="patient"/>
            <source>
              <context value="src"/>
              <element value="patient"/>
              <variable value="sp"/>
            </source>
            <target>
              <context value="tgt"/>
              <element value="grantee"/>
              <variable value="tp"/>
            </target>
            <dependent>
              <name value="TransformReference"/>
              <parameter>
                <valueId value="sp"/>
              </parameter>
              <parameter>
                <valueId value="tp"/>
              </parameter>
            </dependent>
          </rule>
          <rule>
            <name value="patient"/>
            <source>
              <context value="src"/>
              <element value="patient"/>
              <variable value="sp"/>
            </source>
            <target>
              <context value="tgt"/>
              <element value="grantor"/>
              <variable value="tp"/>
            </target>
            <dependent>
              <name value="TransformReference"/>
              <parameter>
                <valueId value="sp"/>
              </parameter>
              <parameter>
                <valueId value="tp"/>
              </parameter>
            </dependent>
          </rule>
          <documentation
                         value="Handles cases where performer does not exists in legacy R4 data"/>
        </rule>
        <rule>
          <name value="organization"/>
          <source>
            <context value="src"/>
            <element value="organization"/>
            <variable value="so"/>
            <condition value="organization.exists()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="manager"/>
            <variable value="tm"/>
          </target>
          <dependent>
            <name value="TransformReference"/>
            <parameter>
              <valueId value="so"/>
            </parameter>
            <parameter>
              <valueId value="tm"/>
            </parameter>
          </dependent>
          <documentation
                         value="handles cases where organization exists in legacy R4 data"/>
        </rule>
        <rule>
          <name value="organization"/>
          <source>
            <context value="src"/>
            <element value="organization"/>
            <variable value="so"/>
            <condition value="organization.exists()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="controller"/>
            <variable value="tm"/>
          </target>
          <dependent>
            <name value="TransformReference"/>
            <parameter>
              <valueId value="so"/>
            </parameter>
            <parameter>
              <valueId value="tm"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="setting manager and controller"/>
          <source>
            <context value="src"/>
            <condition value="organization.exists().not()"/>
          </source>
          <rule>
            <name value="meta"/>
            <source>
              <context value="src"/>
              <element value="meta"/>
              <variable value="sm"/>
            </source>
            <rule>
              <name value="tag"/>
              <source>
                <context value="sm"/>
                <element value="tag"/>
                <listMode value="first"/>
                <variable value="st"/>
              </source>
              <target>
                <context value="tgt"/>
                <element value="manager"/>
                <variable value="tp"/>
              </target>
              <dependent>
                <name value="TransformAssigner"/>
                <parameter>
                  <valueId value="st"/>
                </parameter>
                <parameter>
                  <valueId value="tp"/>
                </parameter>
              </dependent>
            </rule>
            <rule>
              <name value="tag"/>
              <source>
                <context value="sm"/>
                <element value="tag"/>
                <listMode value="first"/>
                <variable value="st"/>
              </source>
              <target>
                <context value="tgt"/>
                <element value="controller"/>
                <variable value="tp"/>
              </target>
              <dependent>
                <name value="TransformAssigner"/>
                <parameter>
                  <valueId value="st"/>
                </parameter>
                <parameter>
                  <valueId value="tp"/>
                </parameter>
              </dependent>
            </rule>
          </rule>
          <documentation
                         value="handles cases where organization does not exists in legacy R4 data"/>
        </rule>
        <rule>
          <name value="setting rule policy"/>
          <source>
            <context value="src"/>
            <element value="policyRule"/>
            <variable value="sr"/>
            <condition value="text.exists()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="regulatoryBasis"/>
            <variable value="tr"/>
            <transform value="create"/>
            <parameter>
              <valueString value="CodeableConcept"/>
            </parameter>
          </target>
          <rule>
            <name value="text"/>
            <source>
              <context value="sr"/>
              <element value="text"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="tr"/>
              <element value="text"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
            <dependent>
              <name value="DefaultMappingGroupAnonymousAlias"/>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
            </dependent>
          </rule>
          <rule>
            <name value="setting coding"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="tr"/>
              <element value="coding"/>
              <variable value="tcc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Coding"/>
              </parameter>
            </target>
            <target>
              <context value="tcc"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://hl7.org/fhir/R4/codesystem-consent-policy.html"/>
              </parameter>
            </target>
            <target>
              <context value="tcc"/>
              <element value="code"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cric"/>
              </parameter>
            </target>
            <target>
              <context value="tcc"/>
              <element value="display"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="Common Rule Informed Consent"/>
              </parameter>
            </target>
          </rule>
          <documentation
                         value="Policyrule has been translated to regulatoryBasis in R4"/>
        </rule>
        <rule>
          <name value="setting verification"/>
          <source>
            <context value="src"/>
            <condition value="verification.exists().not()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="verification"/>
            <variable value="tb"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <rule>
            <name value="setting verified status"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="tb"/>
              <element value="verified"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="true"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="setting verification date"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="tb"/>
              <element value="verificationDate"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="2025-06-16"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="setting verify by"/>
            <source>
              <context value="src"/>
              <element value="meta"/>
              <variable value="sm"/>
            </source>
            <rule>
              <name value="setting verified by"/>
              <source>
                <context value="sm"/>
                <element value="tag"/>
                <listMode value="last"/>
                <variable value="st"/>
              </source>
              <target>
                <context value="tb"/>
                <element value="verifiedBy"/>
                <variable value="tf"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Reference"/>
                </parameter>
              </target>
              <rule>
                <name value="code"/>
                <source>
                  <context value="st"/>
                  <element value="code"/>
                  <variable value="org"/>
                </source>
                <target>
                  <context value="tf"/>
                  <element value="reference"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="Organization/"/>
                  </parameter>
                  <parameter>
                    <valueId value="org"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="display"/>
                <source>
                  <context value="st"/>
                  <element value="display"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="tf"/>
                  <element value="display"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
                <dependent>
                  <name value="DefaultMappingGroupAnonymousAlias"/>
                  <parameter>
                    <valueId value="vvv"/>
                  </parameter>
                  <parameter>
                    <valueId value="vvv"/>
                  </parameter>
                </dependent>
              </rule>
              <rule>
                <name value="display"/>
                <source>
                  <context value="st"/>
                  <element value="display"/>
                  <condition value="display.exists().not()"/>
                </source>
                <target>
                  <context value="tf"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="Unknown display"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="st"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="tf"/>
                  <element value="id"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
                <dependent>
                  <name value="DefaultMappingGroupAnonymousAlias"/>
                  <parameter>
                    <valueId value="vvv"/>
                  </parameter>
                  <parameter>
                    <valueId value="vvv"/>
                  </parameter>
                </dependent>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="setting reference"/>
            <source>
              <context value="src"/>
              <element value="patient"/>
              <variable value="sp"/>
            </source>
            <target>
              <context value="tb"/>
              <element value="verifiedWith"/>
              <variable value="trf"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <dependent>
              <name value="TransformReference"/>
              <parameter>
                <valueId value="sp"/>
              </parameter>
              <parameter>
                <valueId value="trf"/>
              </parameter>
            </dependent>
          </rule>
        </rule>
        <rule>
          <name value="category"/>
          <source>
            <context value="src"/>
            <element value="category"/>
            <variable value="sc"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="category"/>
            <variable value="tc"/>
          </target>
          <rule>
            <name value="text"/>
            <source>
              <context value="sc"/>
              <element value="text"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="tc"/>
              <element value="text"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
            <dependent>
              <name value="DefaultMappingGroupAnonymousAlias"/>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
            </dependent>
          </rule>
          <rule>
            <name value="coding"/>
            <source>
              <context value="sc"/>
              <element value="coding"/>
              <variable value="scc"/>
            </source>
            <target>
              <context value="tc"/>
              <element value="coding"/>
              <variable value="tcc"/>
            </target>
            <dependent>
              <name value="TransformCoding"/>
              <parameter>
                <valueId value="scc"/>
              </parameter>
              <parameter>
                <valueId value="tcc"/>
              </parameter>
            </dependent>
          </rule>
        </rule>
        <rule>
          <name value="provision"/>
          <source>
            <context value="src"/>
            <element value="provision"/>
            <variable value="sp"/>
          </source>
          <rule>
            <name value="type"/>
            <source>
              <context value="sp"/>
              <element value="type"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="tgt"/>
              <element value="decision"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
            <dependent>
              <name value="DefaultMappingGroupAnonymousAlias"/>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
              <parameter>
                <valueId value="vvv"/>
              </parameter>
            </dependent>
          </rule>
        </rule>
        <rule>
          <name value="dateTime"/>
          <source>
            <context value="src"/>
            <element value="dateTime"/>
            <variable value="sdt"/>
            <condition value="dateTime.exists()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="date"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="sdt"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="setting consent date"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="date"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="2025-06-16"/>
            </parameter>
          </target>
        </rule>
      </group>
      <group>
        <name value="TransformAssigner"/>
        <typeMode value="types"/>
        <input>
          <name value="src"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="code"/>
          <source>
            <context value="src"/>
            <element value="code"/>
            <variable value="code"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="reference"/>
            <transform value="append"/>
            <parameter>
              <valueString value="Organization/"/>
            </parameter>
            <parameter>
              <valueId value="code"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="setting default display"/>
          <source>
            <context value="src"/>
            <condition value="display.exists().not()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Unknown display"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="display"/>
          <source>
            <context value="src"/>
            <element value="display"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="display"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="code"/>
          <source>
            <context value="src"/>
            <element value="code"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="id"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
      </group>
      <group>
        <name value="TransformReference"/>
        <typeMode value="types"/>
        <input>
          <name value="src"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="id"/>
          <source>
            <context value="src"/>
            <element value="id"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="id"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="reference"/>
          <source>
            <context value="src"/>
            <element value="reference"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="reference"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="display"/>
          <source>
            <context value="src"/>
            <element value="display"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="display"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="setting display"/>
          <source>
            <context value="src"/>
            <condition value="display.exists().not()"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Unknown display"/>
            </parameter>
          </target>
        </rule>
      </group>
      <group>
        <name value="TransformCoding"/>
        <typeMode value="types"/>
        <input>
          <name value="src"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgt"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="system"/>
          <source>
            <context value="src"/>
            <element value="system"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="system"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="code"/>
          <source>
            <context value="src"/>
            <element value="code"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="code"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
        <rule>
          <name value="display"/>
          <source>
            <context value="src"/>
            <element value="display"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="display"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
          <dependent>
            <name value="DefaultMappingGroupAnonymousAlias"/>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
            <parameter>
              <valueId value="vvv"/>
            </parameter>
          </dependent>
        </rule>
      </group>
    </StructureMap>