<?xml version="1.0" encoding="UTF-8"?>

<StructureMap xmlns="http://hl7.org/fhir">
  <id value="Flag-Alert"/>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap Flag-Alert</b></p><a name="Flag-Alert"> </a><a name="hcFlag-Alert"> </a><pre class="fml">
<b>map</b><span style="color: navy"> &quot;</span>https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureMap/Flag-Alert<span style="color: navy">&quot; = &quot;</span>FlagToAlert<span style="color: navy">&quot;

</span><b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-MODS-Flag.html" title="MODS Flag">https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/MODS-Flag</a><span style="color: navy">&quot; </span><b>alias </b>Flag <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-MODS-Alert.html" title="MODS Alert">https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/MODS-Alert</a><span style="color: navy">&quot; </span><b>alias </b>Alert <b>as </b><b>target</b>

<b>group </b>Alert<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>Flag, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>Alert<span style="color: navy">)</span><span style="color: navy"> {
</span>  src<span style="color: navy"><b> -&gt; </b></span>tgt.id = evaluate<span style="color: navy">(</span>src<span style="color: navy">, </span>id<span style="color: navy">)</span> <i>&quot;c0fcca6c-950a-4f90-9e6f-fa29e64db905&quot;</i><span style="color: navy">;</span>
  src<span style="color: navy"><b> -&gt; </b></span> tgt.meta<b> as </b><span style="color: maroon">meta</span><span style="color: navy">, </span> meta.dataClass<b> as </b><span style="color: maroon">dataClass</span><b> then</b><span style="color: navy"> {
</span>    src<span style="color: navy"><b> -&gt; </b></span>dataClass.name = <span style="color: blue">'Alert'</span> <i>&quot;576b6ce6-40e5-47e6-aff3-6fbf0d0ef447&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;setDataClassName&quot;</i><span style="color: navy">;</span>
  src.subject<b> as </b><span style="color: maroon">subject</span><b> then</b><span style="color: navy"> {
</span>    src<span style="color: navy"><b> -&gt; </b></span>tgt.subjectOfCare<b> as </b><span style="color: maroon">subjectOfCare</span><b> then</b><span style="color: navy"> {
</span>      src<span style="color: navy"><b> -&gt; </b></span>subjectOfCare.id = evaluate<span style="color: navy">(</span>subject<span style="color: navy">, </span>reference.replace('Patient/','')<span style="color: navy">)</span> <i>&quot;5d2ea79e-7d68-4b50-a0f3-e33471c0449b&quot;</i><span style="color: navy">;</span>
      src<span style="color: navy"><b> -&gt; </b></span>subjectOfCare.type = <span style="color: blue">'SubjectOfCare'</span> <i>&quot;d2c51a86-1eb5-4883-9b3f-0d605248ff31&quot;</i><span style="color: navy">;</span>
      src<span style="color: navy"><b> -&gt; </b></span>subjectOfCare.display = evaluate<span style="color: navy">(</span>subject<span style="color: navy">, </span>display<span style="color: navy">)</span> <i>&quot;3f51cd07-77ff-4ad0-b238-0d689c53efae&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;3dc9e53e-25d7-434c-9d2c-6b069b0d9854&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;setAlertSubject&quot;</i><span style="color: navy">;</span>
  src.status<b> as </b><span style="color: maroon">status</span><b> then</b><span style="color: navy"> {
</span>    src<span style="color: navy"><b> -&gt; </b></span>src.statusCode<b> as </b><span style="color: maroon">statusCode</span><b> then</b><span style="color: navy"> {
</span>      src<span style="color: navy"><b> -&gt; </b></span>statusCode.code = <span style="color: maroon">status</span> <i>&quot;947b98f0-d6f1-4d35-8182-6319719455ba&quot;</i><span style="color: navy">;</span>
      src<span style="color: navy"><b> -&gt; </b></span>statusCode.system = <span style="color: blue">'http://hl7.org/fhir/flag-status'</span> <i>&quot;f7cd9c45-4358-4f38-83fb-e11d23ad96d7&quot;</i><span style="color: navy">;</span>
      src<span style="color: navy"><b> -&gt; </b></span>tgt.status = <b>translate</b><span style="color: navy">(</span><span style="color: maroon">statusCode</span><span style="color: navy">, </span><span style="color: blue">'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/ConceptMap/MODS-FHIRStatus-1'</span><span style="color: navy">, </span><span style="color: blue">'Coding'</span><span style="color: navy">)</span> <i>&quot;d1cf7d9c-bcf7-4ae1-b03d-033b4411a7dc&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setAlertStatus&quot;</i><span style="color: navy">;</span>
    src.category<b> as </b><span style="color: maroon">category</span><span style="color: navy"><b> -&gt; </b></span>src.cats<b> as </b><span style="color: maroon">cats</span><b> then</b><span style="color: navy"> {
</span>      cats<b> as </b><span style="color: maroon">c</span><b> then</b><span style="color: navy"> {
</span>        category<span style="color: navy"><b> -&gt; </b></span>c.code = evaluate<span style="color: navy">(</span>category<span style="color: navy">, </span>coding.code<span style="color: navy">)</span> <i>&quot;5bff2e81-dfb6-448e-9cf8-7a58b6cfeaaf&quot;</i><span style="color: navy">;</span>
        category<span style="color: navy"><b> -&gt; </b></span>c.display = evaluate<span style="color: navy">(</span>category<span style="color: navy">, </span>coding.display<span style="color: navy">)</span> <i>&quot;f6e8c484-b76a-487b-a1e1-b055e0e15f7f&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;854bf53c-950f-45e7-9145-b973d81da837&quot;</i><span style="color: navy">;</span>
      cats<span style="color: navy"><b> -&gt; </b></span>tgt.category <i>&quot;73e8c8ed-67c6-4155-b052-50b4c67be23b&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setAlertCategory&quot;</i><span style="color: navy">;</span>
    src.extension<b> as </b><span style="color: maroon">participantsExt</span><b> where </b>$this.url='https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-ParticipantCareActor'<span style="color: navy"><b> -&gt; </b></span>tgt.informed<b> as </b><span style="color: maroon">informed</span><b> then</b><span style="color: navy"> {
</span>      participantsExt.extension<b> as </b><span style="color: maroon">informedParticipants</span><b> where </b>$this.url='participantRole'and$this.valueCode='informed'<b> then</b><span style="color: navy"> {
</span>        participantsExt.extension<b> as </b><span style="color: maroon">informedParticipantReferences</span><b> where </b>$this.url='participantReference'<b> then</b><span style="color: navy"> {
</span>          informedParticipantReferences.valueReference<b> as </b><span style="color: maroon">informedParticipantRef</span><b> then</b><span style="color: navy"> {
</span>            src<span style="color: navy"><b> -&gt; </b></span>informed.id = evaluate<span style="color: navy">(</span>informedParticipantRef<span style="color: navy">, </span>reference.replace('Practitioner/','')<span style="color: navy">)</span> <i>&quot;7533ea08-2f0b-43b4-897c-590ee042debb&quot;</i><span style="color: navy">;</span>
            src<span style="color: navy"><b> -&gt; </b></span>informed.type = <span style="color: blue">'CareWorker'</span> <i>&quot;383f91f1-4568-475a-b826-3dedc62863c6&quot;</i><span style="color: navy">;</span>
            src<span style="color: navy"><b> -&gt; </b></span>informed.display = evaluate<span style="color: navy">(</span>informedParticipantRef<span style="color: navy">, </span>display<span style="color: navy">)</span> <i>&quot;c5262397-1ecc-4e04-8f67-f5772f20b289&quot;</i><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><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setAlertInformed&quot;</i><span style="color: navy">;</span>
    src.code<b> as </b><span style="color: maroon">code</span><b> then</b><span style="color: navy"> {
</span>      src<span style="color: navy"><b> -&gt; </b></span>tgt.text = evaluate<span style="color: navy">(</span>src<span style="color: navy">, </span>code.text<span style="color: navy">)</span> <i>&quot;d4d20b11-e4b0-4a91-8e1b-1543a23c7e72&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setAlertCodedText&quot;</i><span style="color: navy">;</span>
    src.period<b> as </b><span style="color: maroon">period</span><b> then</b><span style="color: navy"> {
</span>      period.start<b> as </b><span style="color: maroon">start</span><b> then</b><span style="color: navy"> {
</span>        src<span style="color: navy"><b> -&gt; </b></span>tgt.startDate = evaluate<span style="color: navy">(</span>period<span style="color: navy">, </span>start<span style="color: navy">)</span> <i>&quot;c85f9689-b541-482d-8007-c37e250b56f3&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span><span style="color: navy">;</span>
      period.end<b> as </b><span style="color: maroon">end</span><b> then</b><span style="color: navy"> {
</span>        src<span style="color: navy"><b> -&gt; </b></span>tgt.endDate = evaluate<span style="color: navy">(</span>period<span style="color: navy">, </span>end<span style="color: navy">)</span> <i>&quot;0015de12-b08e-49a2-8863-d96cc44eef6e&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setAlertStartEndDates&quot;</i><span style="color: navy">;</span>
    src.extension<b> as </b><span style="color: maroon">participantsExt</span><b> where </b>$this.url='https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-ParticipantCareActor'<span style="color: navy"><b> -&gt; </b></span>tgt.involved<b> as </b><span style="color: maroon">involved</span><b> then</b><span style="color: navy"> {
</span>      participantsExt.extension<b> as </b><span style="color: maroon">involvedParticipants</span><b> where </b>$this.url='participantRole'and$this.valueCode='involved'<b> then</b><span style="color: navy"> {
</span>        participantsExt.extension<b> as </b><span style="color: maroon">involvedParticipantReferences</span><b> where </b>$this.url='participantReference'<b> then</b><span style="color: navy"> {
</span>          involvedParticipantReferences.valueReference<b> as </b><span style="color: maroon">involvedParticipantRef</span><b> then</b><span style="color: navy"> {
</span>            src<span style="color: navy"><b> -&gt; </b></span>involved.id = evaluate<span style="color: navy">(</span>involvedParticipantRef<span style="color: navy">, </span>reference.replace('Practitioner/','')<span style="color: navy">)</span> <i>&quot;c32f149a-eeb4-4ca7-ac27-23e50a0b9190&quot;</i><span style="color: navy">;</span>
            src<span style="color: navy"><b> -&gt; </b></span>involved.type = <span style="color: blue">'CareWorker'</span> <i>&quot;401b1e0f-6655-4376-a7e7-0585af85a2c7&quot;</i><span style="color: navy">;</span>
            src<span style="color: navy"><b> -&gt; </b></span>involved.display = evaluate<span style="color: navy">(</span>involvedParticipantRef<span style="color: navy">, </span>display<span style="color: navy">)</span> <i>&quot;252c06fa-3f77-4f40-8b96-6d7bf5bfd1f8&quot;</i><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><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setAlertInvolved&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span><span style="color: navy">;</span>
<span style="color: navy">}

</span></pre></div>
  </text>
  <url value="https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureMap/Flag-Alert"/>
  <version value="0.1.0"/>
  <name value="FlagToAlert"/>
  <status value="draft"/>
  <date value="2026-03-24T16:18:08+00:00"/>
  <publisher value="Synanetics Ltd on behalf of DHSC/Social Care Interoperability Platform"/>
  <contact>
    <name value="Synanetics Ltd on behalf of DHSC/Social Care Interoperability Platform"/>
    <telecom>
      <system value="url"/>
      <value value="https://synanetics.com"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="info@synanetics.com"/>
    </telecom>
  </contact>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="GB"/>
      <display value="United Kingdom of Great Britain and Northern Ireland"/>
    </coding>
  </jurisdiction>
  <structure>
    <url value="https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/MODS-Flag"/>
    <mode value="source"/>
    <alias value="Flag"/>
  </structure>
  <structure>
    <url value="https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/MODS-Alert"/>
    <mode value="target"/>
    <alias value="Alert"/>
  </structure>
  <group>
    <name value="Alert"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="Flag"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="Alert"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="c0fcca6c-950a-4f90-9e6f-fa29e64db905"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="evaluate"/>
        <parameter>
          <valueId value="src"/>
        </parameter>
        <parameter>
          <valueString value="id"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="setDataClassName"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="meta"/>
        <variable value="meta"/>
      </target>
      <target>
        <context value="meta"/>
        <contextType value="variable"/>
        <element value="dataClass"/>
        <variable value="dataClass"/>
      </target>
      <rule>
        <name value="576b6ce6-40e5-47e6-aff3-6fbf0d0ef447"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="dataClass"/>
          <contextType value="variable"/>
          <element value="name"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="Alert"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="setAlertSubject"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <rule>
        <name value="3dc9e53e-25d7-434c-9d2c-6b069b0d9854"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="subjectOfCare"/>
          <variable value="subjectOfCare"/>
        </target>
        <rule>
          <name value="5d2ea79e-7d68-4b50-a0f3-e33471c0449b"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="subjectOfCare"/>
            <contextType value="variable"/>
            <element value="id"/>
            <transform value="evaluate"/>
            <parameter>
              <valueId value="subject"/>
            </parameter>
            <parameter>
              <valueString value="reference.replace('Patient/','')"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="d2c51a86-1eb5-4883-9b3f-0d605248ff31"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="subjectOfCare"/>
            <contextType value="variable"/>
            <element value="type"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="SubjectOfCare"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="3f51cd07-77ff-4ad0-b238-0d689c53efae"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="subjectOfCare"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="evaluate"/>
            <parameter>
              <valueId value="subject"/>
            </parameter>
            <parameter>
              <valueString value="display"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="status"/>
      <source>
        <context value="src"/>
        <element value="status"/>
        <variable value="status"/>
      </source>
      <rule>
        <name value="setAlertStatus"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="src"/>
          <contextType value="variable"/>
          <element value="statusCode"/>
          <variable value="statusCode"/>
        </target>
        <rule>
          <name value="947b98f0-d6f1-4d35-8182-6319719455ba"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="statusCode"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="status"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="f7cd9c45-4358-4f38-83fb-e11d23ad96d7"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="statusCode"/>
            <contextType value="variable"/>
            <element value="system"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="http://hl7.org/fhir/flag-status"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="d1cf7d9c-bcf7-4ae1-b03d-033b4411a7dc"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="translate"/>
            <parameter>
              <valueId value="statusCode"/>
            </parameter>
            <parameter>
              <valueString value="https://metadata.phase2.scip.synanetics.cloud/fhir/r4/ConceptMap/MODS-FHIRStatus-1"/>
            </parameter>
            <parameter>
              <valueString value="Coding"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="setAlertCategory"/>
        <source>
          <context value="src"/>
          <element value="category"/>
          <variable value="category"/>
        </source>
        <target>
          <context value="src"/>
          <contextType value="variable"/>
          <element value="cats"/>
          <variable value="cats"/>
        </target>
        <rule>
          <name value="854bf53c-950f-45e7-9145-b973d81da837"/>
          <source>
            <context value="cats"/>
            <variable value="c"/>
          </source>
          <rule>
            <name value="5bff2e81-dfb6-448e-9cf8-7a58b6cfeaaf"/>
            <source>
              <context value="category"/>
            </source>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="code"/>
              <transform value="evaluate"/>
              <parameter>
                <valueId value="category"/>
              </parameter>
              <parameter>
                <valueString value="coding.code"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="f6e8c484-b76a-487b-a1e1-b055e0e15f7f"/>
            <source>
              <context value="category"/>
            </source>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="display"/>
              <transform value="evaluate"/>
              <parameter>
                <valueId value="category"/>
              </parameter>
              <parameter>
                <valueString value="coding.display"/>
              </parameter>
            </target>
          </rule>
        </rule>
        <rule>
          <name value="73e8c8ed-67c6-4155-b052-50b4c67be23b"/>
          <source>
            <context value="cats"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="category"/>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="setAlertInformed"/>
        <source>
          <context value="src"/>
          <element value="extension"/>
          <variable value="participantsExt"/>
          <condition value="$this.url='https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-ParticipantCareActor'"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="informed"/>
          <variable value="informed"/>
        </target>
        <rule>
          <name value="extension"/>
          <source>
            <context value="participantsExt"/>
            <element value="extension"/>
            <variable value="informedParticipants"/>
            <condition value="$this.url='participantRole'and$this.valueCode='informed'"/>
          </source>
          <rule>
            <name value="extension"/>
            <source>
              <context value="participantsExt"/>
              <element value="extension"/>
              <variable value="informedParticipantReferences"/>
              <condition value="$this.url='participantReference'"/>
            </source>
            <rule>
              <name value="valueReference"/>
              <source>
                <context value="informedParticipantReferences"/>
                <element value="valueReference"/>
                <variable value="informedParticipantRef"/>
              </source>
              <rule>
                <name value="7533ea08-2f0b-43b4-897c-590ee042debb"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="informed"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueId value="informedParticipantRef"/>
                  </parameter>
                  <parameter>
                    <valueString value="reference.replace('Practitioner/','')"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="383f91f1-4568-475a-b826-3dedc62863c6"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="informed"/>
                  <contextType value="variable"/>
                  <element value="type"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="CareWorker"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="c5262397-1ecc-4e04-8f67-f5772f20b289"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="informed"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueId value="informedParticipantRef"/>
                  </parameter>
                  <parameter>
                    <valueString value="display"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="setAlertCodedText"/>
        <source>
          <context value="src"/>
          <element value="code"/>
          <variable value="code"/>
        </source>
        <rule>
          <name value="d4d20b11-e4b0-4a91-8e1b-1543a23c7e72"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="text"/>
            <transform value="evaluate"/>
            <parameter>
              <valueId value="src"/>
            </parameter>
            <parameter>
              <valueString value="code.text"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="setAlertStartEndDates"/>
        <source>
          <context value="src"/>
          <element value="period"/>
          <variable value="period"/>
        </source>
        <rule>
          <name value="start"/>
          <source>
            <context value="period"/>
            <element value="start"/>
            <variable value="start"/>
          </source>
          <rule>
            <name value="c85f9689-b541-482d-8007-c37e250b56f3"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="startDate"/>
              <transform value="evaluate"/>
              <parameter>
                <valueId value="period"/>
              </parameter>
              <parameter>
                <valueString value="start"/>
              </parameter>
            </target>
          </rule>
        </rule>
        <rule>
          <name value="end"/>
          <source>
            <context value="period"/>
            <element value="end"/>
            <variable value="end"/>
          </source>
          <rule>
            <name value="0015de12-b08e-49a2-8863-d96cc44eef6e"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="endDate"/>
              <transform value="evaluate"/>
              <parameter>
                <valueId value="period"/>
              </parameter>
              <parameter>
                <valueString value="end"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="setAlertInvolved"/>
        <source>
          <context value="src"/>
          <element value="extension"/>
          <variable value="participantsExt"/>
          <condition value="$this.url='https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-ParticipantCareActor'"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="involved"/>
          <variable value="involved"/>
        </target>
        <rule>
          <name value="extension"/>
          <source>
            <context value="participantsExt"/>
            <element value="extension"/>
            <variable value="involvedParticipants"/>
            <condition value="$this.url='participantRole'and$this.valueCode='involved'"/>
          </source>
          <rule>
            <name value="extension"/>
            <source>
              <context value="participantsExt"/>
              <element value="extension"/>
              <variable value="involvedParticipantReferences"/>
              <condition value="$this.url='participantReference'"/>
            </source>
            <rule>
              <name value="valueReference"/>
              <source>
                <context value="involvedParticipantReferences"/>
                <element value="valueReference"/>
                <variable value="involvedParticipantRef"/>
              </source>
              <rule>
                <name value="c32f149a-eeb4-4ca7-ac27-23e50a0b9190"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="involved"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueId value="involvedParticipantRef"/>
                  </parameter>
                  <parameter>
                    <valueString value="reference.replace('Practitioner/','')"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="401b1e0f-6655-4376-a7e7-0585af85a2c7"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="involved"/>
                  <contextType value="variable"/>
                  <element value="type"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="CareWorker"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="252c06fa-3f77-4f40-8b96-6d7bf5bfd1f8"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="involved"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueId value="involvedParticipantRef"/>
                  </parameter>
                  <parameter>
                    <valueString value="display"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
</StructureMap>