WHO Clinical Care in Crisis Implementation Guide for Children
0.1.0 - ci-build

WHO Clinical Care in Crisis Implementation Guide for Children - Local Development build (v0.1.0). See the Directory of published versions

: che.b24.de06.second.temper - XML Representation

Active as of 2023-10-04

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="che.b24.de06.second.temper"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><pre>map &quot;https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureMap/che.b24.de06.second.temper&quot; = &quot;che.b24.de06.second.temper&quot;


uses &quot;http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse&quot; alias 'questionnaireResponse' as source
uses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; alias 'Bundle' as target
uses &quot;https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/observation&quot; alias 'Observation' as target
uses &quot;https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation&quot; alias 'CHE Observation' as produced

group bundletrans(source src : questionnaireResponse, target bundle : Bundle) {
  src -&gt; bundle.id = uuid() &quot;id&quot;;
  src -&gt; bundle.type = 'batch' &quot;type&quot;;
  src.item first as item where (linkId = 'CHE.B24.G.DE39') and answer.exists() then {
    src -&gt; bundle.entry as entry then {
      src -&gt;  entry.request as request,  request.method = 'POST',  uuid() as uuid,  request.url = append('/Observation/', uuid) &quot;b50ac4c5&quot;;
      src -&gt; entry.resource = create('Observation') as tgt then {
        src -&gt; tgt then cheobservationcheb24gde39(src, tgt) &quot;866cba39&quot;;
      } &quot;57cdfa7a&quot;;
    } &quot;8330e6e7&quot;;
  } &quot;49b43f38&quot;;
  src.item first as item where (linkId = 'CHE.B24.G.DE40') and answer.exists() then {
    src -&gt; bundle.entry as entry then {
      src -&gt;  entry.request as request,  request.method = 'POST',  uuid() as uuid,  request.url = append('/Observation/', uuid) &quot;b50ac4c5&quot;;
      src -&gt; entry.resource = create('Observation') as tgt then {
        src -&gt; tgt then cheobservationcheb24gde40(src, tgt) &quot;297a901f&quot;;
      } &quot;a4b017c6&quot;;
    } &quot;d7834417&quot;;
  } &quot;5d379969&quot;;
  src.item first as item where (linkId = 'CHE.B24.G.DE41') and answer.exists() then {
    src -&gt; bundle.entry as entry then {
      src -&gt;  entry.request as request,  request.method = 'POST',  uuid() as uuid,  request.url = append('/Observation/', uuid) &quot;b50ac4c5&quot;;
      src -&gt; entry.resource = create('Observation') as tgt then {
        src -&gt; tgt then cheobservationcheb24gde41(src, tgt) &quot;1e4185b0&quot;;
      } &quot;d39efd70&quot;;
    } &quot;84a3dc4b&quot;;
  } &quot;cb6ac395&quot;;
  src.item first as item where (linkId = 'CHE.B24.G.DE42') and answer.exists() then {
    src -&gt; bundle.entry as entry then {
      src -&gt;  entry.request as request,  request.method = 'POST',  uuid() as uuid,  request.url = append('/Observation/', uuid) &quot;b50ac4c5&quot;;
      src -&gt; entry.resource = create('Observation') as tgt then {
        src -&gt; tgt then cheobservationcheb24gde42(src, tgt) &quot;7b704f8b&quot;;
      } &quot;21aa74d5&quot;;
    } &quot;57daf351&quot;;
  } &quot;cccacbed&quot;;
  src.item first as item where (linkId = 'CHE.B24.G.DE43') and answer.exists() then {
    src -&gt; bundle.entry as entry then {
      src -&gt;  entry.request as request,  request.method = 'POST',  uuid() as uuid,  request.url = append('/Observation/', uuid) &quot;b50ac4c5&quot;;
      src -&gt; entry.resource = create('Observation') as tgt then {
        src -&gt; tgt then cheobservationcheb24gde43(src, tgt) &quot;0b7990fa&quot;;
      } &quot;869f035c&quot;;
    } &quot;9e13dac2&quot;;
  } &quot;28e740b3&quot;;
}

group cheobservationcheb24gde39(source src, target tgt) {
  src -&gt;  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() &quot;id-cheb24gde39&quot;;
  src.encounter as encounter -&gt; tgt.encounter = encounter &quot;35bc6b82&quot;;
  src.subject as subject -&gt;  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B24.G.DE39' &quot;code-cheb24gde39&quot;;
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -&gt; tgt.issued = val &quot;5af77f2c&quot;;
    } &quot;7f22f29f&quot;;
  } &quot;aae7a11d&quot;;
  src.subject as subject -&gt; tgt.subject = subject &quot;patient&quot;;
  src.item first as item where (linkId = 'CHE.B24.G.DE39') and answer.exists() then {
    item.answer first as a then {
      a.value as val -&gt;  tgt.value = val,  tgt.status = 'final' &quot;afa0ccc0&quot;;
    } &quot;d40466ff&quot;;
  } &quot;097f6a58&quot;;
}

group cheobservationcheb24gde40(source src, target tgt) {
  src -&gt;  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() &quot;id-cheb24gde40&quot;;
  src.encounter as encounter -&gt; tgt.encounter = encounter &quot;35bc6b82&quot;;
  src.subject as subject -&gt;  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B24.G.DE40' &quot;code-cheb24gde40&quot;;
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -&gt; tgt.issued = val &quot;5af77f2c&quot;;
    } &quot;7f22f29f&quot;;
  } &quot;aae7a11d&quot;;
  src.subject as subject -&gt; tgt.subject = subject &quot;patient&quot;;
  src.item first as item where (linkId = 'CHE.B24.G.DE40') and answer.exists() then {
    item.answer first as a then {
      a.value as val then {
        val where val.code = 'CHE.B24.G.DE40' -&gt;  tgt.status = 'final',  tgt.value = true &quot;292c4a79&quot;;
      } &quot;8271b135&quot;;
    } &quot;199216a4&quot;;
  } &quot;7f7c47ec&quot;;
}

group cheobservationcheb24gde41(source src, target tgt) {
  src -&gt;  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() &quot;id-cheb24gde41&quot;;
  src.encounter as encounter -&gt; tgt.encounter = encounter &quot;35bc6b82&quot;;
  src.subject as subject -&gt;  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B24.G.DE41' &quot;code-cheb24gde41&quot;;
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -&gt; tgt.issued = val &quot;5af77f2c&quot;;
    } &quot;7f22f29f&quot;;
  } &quot;aae7a11d&quot;;
  src.subject as subject -&gt; tgt.subject = subject &quot;patient&quot;;
  src.item first as item where (linkId = 'CHE.B24.G.DE41') and answer.exists() then {
    item.answer first as a then {
      a.value as val -&gt;  tgt.value = val,  tgt.status = 'final' &quot;afa0ccc0&quot;;
    } &quot;d40466ff&quot;;
  } &quot;8588d7a0&quot;;
}

group cheobservationcheb24gde42(source src, target tgt) {
  src -&gt;  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() &quot;id-cheobservationcheb24gde42&quot;;
  src.encounter as encounter -&gt; tgt.encounter = encounter &quot;35bc6b82&quot;;
  src.subject as subject -&gt;  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B24.G.DE42' &quot;code-cheobservationcheb24gde42&quot;;
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -&gt; tgt.issued = val &quot;5af77f2c&quot;;
    } &quot;7f22f29f&quot;;
  } &quot;aae7a11d&quot;;
  src.subject as subject -&gt; tgt.subject = subject &quot;patient&quot;;
  src.item first as item where (linkId = 'CHE.B24.G.DE42') and answer.exists() then {
    item.answer first as a then {
      a where value = 'Low' then {
        a -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = create('Coding') as c,  c.code = 'Low',  c.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  tgt.status = 'final' &quot;f9b4a56b&quot;;
      } &quot;70911ad5&quot;;
      a where value = 'Normal' then {
        a -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = create('Coding') as c,  c.code = 'Normal',  c.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  tgt.status = 'final' &quot;d4c7e2f1&quot;;
      } &quot;7673921d&quot;;
      a where value = 'High' then {
        a -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = create('Coding') as c,  c.code = 'High',  c.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  tgt.status = 'final' &quot;6a061bec&quot;;
      } &quot;a67e1fa8&quot;;
      a where value = 'Very High' then {
        a -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = create('Coding') as c,  c.code = 'Very High',  c.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  tgt.status = 'final' &quot;b6176e12&quot;;
      } &quot;c3a301f6&quot;;
    } &quot;dab04994&quot;;
  } &quot;de12f5db&quot;;
}

group cheobservationcheb24gde43(source src, target tgt) {
  src -&gt;  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() &quot;id-cheb24gde43&quot;;
  src.encounter as encounter -&gt; tgt.encounter = encounter &quot;35bc6b82&quot;;
  src.subject as subject -&gt;  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B24.G.DE43' &quot;code-cheb24gde43&quot;;
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -&gt; tgt.issued = val &quot;5af77f2c&quot;;
    } &quot;7f22f29f&quot;;
  } &quot;aae7a11d&quot;;
  src.subject as subject -&gt; tgt.subject = subject &quot;patient&quot;;
  src.item first as item where (linkId = 'CHE.B24.G.DE43') and answer.exists() then {
    item.answer first as a then {
      a.value as val then {
        val where val.code = 'CHE.B24.G.DE43' -&gt;  tgt.status = 'final',  tgt.value = true &quot;e0a426db&quot;;
      } &quot;e1ba65b0&quot;;
    } &quot;b567d9ca&quot;;
  } &quot;1cd8ee7f&quot;;
}

</pre></div>
  </text>
  <url
       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureMap/che.b24.de06.second.temper"/>
  <version value="0.1.0"/>
  <name value="che.b24.de06.second.temper"/>
  <status value="active"/>
  <date value="2023-10-04T12:32:21+00:00"/>
  <publisher value="WHO"/>
  <contact>
    <name value="WHO"/>
    <telecom>
      <system value="url"/>
      <value value="http://who.int"/>
    </telecom>
  </contact>
  <structure>
    <url
         value="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse"/>
    <mode value="source"/>
    <alias value="'questionnaireResponse'"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
    <mode value="target"/>
    <alias value="'Bundle'"/>
  </structure>
  <structure>
    <url
         value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/observation"/>
    <mode value="target"/>
    <alias value="'Observation'"/>
  </structure>
  <structure>
    <url
         value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation"/>
    <mode value="produced"/>
    <alias value="'CHE Observation'"/>
  </structure>
  <group>
    <name value="bundletrans"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="questionnaireResponse"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="bundle"/>
      <type value="Bundle"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </target>
    </rule>
    <rule>
      <name value="type"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="type"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="batch"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="49b43f38"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B24.G.DE39') and answer.exists()"/>
      </source>
      <rule>
        <name value="8330e6e7"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="entry"/>
        </target>
        <rule>
          <name value="b50ac4c5"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="POST"/>
            </parameter>
          </target>
          <target>
            <contextType value="variable"/>
            <variable value="uuid"/>
            <transform value="uuid"/>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="url"/>
            <transform value="append"/>
            <parameter>
              <valueString value="/Observation/"/>
            </parameter>
            <parameter>
              <valueId value="uuid"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="57cdfa7a"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="tgt"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Observation"/>
            </parameter>
          </target>
          <rule>
            <name value="866cba39"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb24gde39"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="5d379969"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B24.G.DE40') and answer.exists()"/>
      </source>
      <rule>
        <name value="d7834417"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="entry"/>
        </target>
        <rule>
          <name value="b50ac4c5"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="POST"/>
            </parameter>
          </target>
          <target>
            <contextType value="variable"/>
            <variable value="uuid"/>
            <transform value="uuid"/>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="url"/>
            <transform value="append"/>
            <parameter>
              <valueString value="/Observation/"/>
            </parameter>
            <parameter>
              <valueId value="uuid"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="a4b017c6"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="tgt"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Observation"/>
            </parameter>
          </target>
          <rule>
            <name value="297a901f"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb24gde40"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="cb6ac395"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B24.G.DE41') and answer.exists()"/>
      </source>
      <rule>
        <name value="84a3dc4b"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="entry"/>
        </target>
        <rule>
          <name value="b50ac4c5"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="POST"/>
            </parameter>
          </target>
          <target>
            <contextType value="variable"/>
            <variable value="uuid"/>
            <transform value="uuid"/>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="url"/>
            <transform value="append"/>
            <parameter>
              <valueString value="/Observation/"/>
            </parameter>
            <parameter>
              <valueId value="uuid"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="d39efd70"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="tgt"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Observation"/>
            </parameter>
          </target>
          <rule>
            <name value="1e4185b0"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb24gde41"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="cccacbed"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B24.G.DE42') and answer.exists()"/>
      </source>
      <rule>
        <name value="57daf351"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="entry"/>
        </target>
        <rule>
          <name value="b50ac4c5"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="POST"/>
            </parameter>
          </target>
          <target>
            <contextType value="variable"/>
            <variable value="uuid"/>
            <transform value="uuid"/>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="url"/>
            <transform value="append"/>
            <parameter>
              <valueString value="/Observation/"/>
            </parameter>
            <parameter>
              <valueId value="uuid"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="21aa74d5"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="tgt"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Observation"/>
            </parameter>
          </target>
          <rule>
            <name value="7b704f8b"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb24gde42"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="28e740b3"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B24.G.DE43') and answer.exists()"/>
      </source>
      <rule>
        <name value="9e13dac2"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="entry"/>
        </target>
        <rule>
          <name value="b50ac4c5"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="POST"/>
            </parameter>
          </target>
          <target>
            <contextType value="variable"/>
            <variable value="uuid"/>
            <transform value="uuid"/>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="url"/>
            <transform value="append"/>
            <parameter>
              <valueString value="/Observation/"/>
            </parameter>
            <parameter>
              <valueId value="uuid"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="869f035c"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="tgt"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Observation"/>
            </parameter>
          </target>
          <rule>
            <name value="0b7990fa"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb24gde43"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb24gde39"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb24gde39"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="CodeID"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Identifier"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="system"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="http://hl7.org/fhir/namingsystem-identifier-type"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="use"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="official"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="uuid"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </target>
    </rule>
    <rule>
      <name value="35bc6b82"/>
      <source>
        <context value="src"/>
        <element value="encounter"/>
        <variable value="encounter"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="encounter"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="encounter"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="code-cheb24gde39"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="subject"/>
        </parameter>
      </target>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="meta"/>
        <variable value="newMeta"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Meta"/>
        </parameter>
      </target>
      <target>
        <context value="newMeta"/>
        <contextType value="variable"/>
        <element value="profile"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation"/>
        </parameter>
      </target>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="code"/>
        <variable value="concept"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <target>
        <context value="concept"/>
        <contextType value="variable"/>
        <element value="coding"/>
        <variable value="coding"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Coding"/>
        </parameter>
      </target>
      <target>
        <context value="coding"/>
        <contextType value="variable"/>
        <element value="system"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes"/>
        </parameter>
      </target>
      <target>
        <context value="coding"/>
        <contextType value="variable"/>
        <element value="code"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="CHE.B24.G.DE39"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="aae7a11d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <variable value="itemtimestamp"/>
        <condition value="linkId = 'timestamp'"/>
      </source>
      <rule>
        <name value="7f22f29f"/>
        <source>
          <context value="itemtimestamp"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="atimestamp"/>
        </source>
        <rule>
          <name value="5af77f2c"/>
          <source>
            <context value="atimestamp"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="issued"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="patient"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="subject"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="097f6a58"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B24.G.DE39') and answer.exists()"/>
      </source>
      <rule>
        <name value="d40466ff"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="afa0ccc0"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="final"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb24gde40"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb24gde40"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="CodeID"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Identifier"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="system"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="http://hl7.org/fhir/namingsystem-identifier-type"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="use"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="official"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="uuid"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </target>
    </rule>
    <rule>
      <name value="35bc6b82"/>
      <source>
        <context value="src"/>
        <element value="encounter"/>
        <variable value="encounter"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="encounter"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="encounter"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="code-cheb24gde40"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="subject"/>
        </parameter>
      </target>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="meta"/>
        <variable value="newMeta"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Meta"/>
        </parameter>
      </target>
      <target>
        <context value="newMeta"/>
        <contextType value="variable"/>
        <element value="profile"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation"/>
        </parameter>
      </target>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="code"/>
        <variable value="concept"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <target>
        <context value="concept"/>
        <contextType value="variable"/>
        <element value="coding"/>
        <variable value="coding"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Coding"/>
        </parameter>
      </target>
      <target>
        <context value="coding"/>
        <contextType value="variable"/>
        <element value="system"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes"/>
        </parameter>
      </target>
      <target>
        <context value="coding"/>
        <contextType value="variable"/>
        <element value="code"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="CHE.B24.G.DE40"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="aae7a11d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <variable value="itemtimestamp"/>
        <condition value="linkId = 'timestamp'"/>
      </source>
      <rule>
        <name value="7f22f29f"/>
        <source>
          <context value="itemtimestamp"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="atimestamp"/>
        </source>
        <rule>
          <name value="5af77f2c"/>
          <source>
            <context value="atimestamp"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="issued"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="patient"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="subject"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="7f7c47ec"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B24.G.DE40') and answer.exists()"/>
      </source>
      <rule>
        <name value="199216a4"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="8271b135"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="292c4a79"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'CHE.B24.G.DE40'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueBoolean value="true"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb24gde41"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb24gde41"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="CodeID"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Identifier"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="system"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="http://hl7.org/fhir/namingsystem-identifier-type"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="use"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="official"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="uuid"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </target>
    </rule>
    <rule>
      <name value="35bc6b82"/>
      <source>
        <context value="src"/>
        <element value="encounter"/>
        <variable value="encounter"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="encounter"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="encounter"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="code-cheb24gde41"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="subject"/>
        </parameter>
      </target>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="meta"/>
        <variable value="newMeta"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Meta"/>
        </parameter>
      </target>
      <target>
        <context value="newMeta"/>
        <contextType value="variable"/>
        <element value="profile"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation"/>
        </parameter>
      </target>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="code"/>
        <variable value="concept"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <target>
        <context value="concept"/>
        <contextType value="variable"/>
        <element value="coding"/>
        <variable value="coding"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Coding"/>
        </parameter>
      </target>
      <target>
        <context value="coding"/>
        <contextType value="variable"/>
        <element value="system"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes"/>
        </parameter>
      </target>
      <target>
        <context value="coding"/>
        <contextType value="variable"/>
        <element value="code"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="CHE.B24.G.DE41"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="aae7a11d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <variable value="itemtimestamp"/>
        <condition value="linkId = 'timestamp'"/>
      </source>
      <rule>
        <name value="7f22f29f"/>
        <source>
          <context value="itemtimestamp"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="atimestamp"/>
        </source>
        <rule>
          <name value="5af77f2c"/>
          <source>
            <context value="atimestamp"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="issued"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="patient"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="subject"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="8588d7a0"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B24.G.DE41') and answer.exists()"/>
      </source>
      <rule>
        <name value="d40466ff"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="afa0ccc0"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="final"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb24gde42"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb24gde42"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="CodeID"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Identifier"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="system"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="http://hl7.org/fhir/namingsystem-identifier-type"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="use"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="official"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="uuid"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </target>
    </rule>
    <rule>
      <name value="35bc6b82"/>
      <source>
        <context value="src"/>
        <element value="encounter"/>
        <variable value="encounter"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="encounter"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="encounter"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="code-cheobservationcheb24gde42"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="subject"/>
        </parameter>
      </target>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="meta"/>
        <variable value="newMeta"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Meta"/>
        </parameter>
      </target>
      <target>
        <context value="newMeta"/>
        <contextType value="variable"/>
        <element value="profile"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation"/>
        </parameter>
      </target>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="code"/>
        <variable value="concept"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <target>
        <context value="concept"/>
        <contextType value="variable"/>
        <element value="coding"/>
        <variable value="coding"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Coding"/>
        </parameter>
      </target>
      <target>
        <context value="coding"/>
        <contextType value="variable"/>
        <element value="system"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes"/>
        </parameter>
      </target>
      <target>
        <context value="coding"/>
        <contextType value="variable"/>
        <element value="code"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="CHE.B24.G.DE42"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="aae7a11d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <variable value="itemtimestamp"/>
        <condition value="linkId = 'timestamp'"/>
      </source>
      <rule>
        <name value="7f22f29f"/>
        <source>
          <context value="itemtimestamp"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="atimestamp"/>
        </source>
        <rule>
          <name value="5af77f2c"/>
          <source>
            <context value="atimestamp"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="issued"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="patient"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="subject"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="de12f5db"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B24.G.DE42') and answer.exists()"/>
      </source>
      <rule>
        <name value="dab04994"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="70911ad5"/>
          <source>
            <context value="a"/>
            <condition value="value = 'Low'"/>
          </source>
          <rule>
            <name value="f9b4a56b"/>
            <source>
              <context value="a"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <variable value="c"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Coding"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="code"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="Low"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
        <rule>
          <name value="7673921d"/>
          <source>
            <context value="a"/>
            <condition value="value = 'Normal'"/>
          </source>
          <rule>
            <name value="d4c7e2f1"/>
            <source>
              <context value="a"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <variable value="c"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Coding"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="code"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="Normal"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
        <rule>
          <name value="a67e1fa8"/>
          <source>
            <context value="a"/>
            <condition value="value = 'High'"/>
          </source>
          <rule>
            <name value="6a061bec"/>
            <source>
              <context value="a"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <variable value="c"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Coding"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="code"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="High"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
        <rule>
          <name value="c3a301f6"/>
          <source>
            <context value="a"/>
            <condition value="value = 'Very High'"/>
          </source>
          <rule>
            <name value="b6176e12"/>
            <source>
              <context value="a"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <variable value="c"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Coding"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="code"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="Very High"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb24gde43"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb24gde43"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="CodeID"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Identifier"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="system"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="http://hl7.org/fhir/namingsystem-identifier-type"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="use"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="official"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="uuid"/>
        </parameter>
      </target>
      <target>
        <context value="CodeID"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </target>
    </rule>
    <rule>
      <name value="35bc6b82"/>
      <source>
        <context value="src"/>
        <element value="encounter"/>
        <variable value="encounter"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="encounter"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="encounter"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="code-cheb24gde43"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="subject"/>
        </parameter>
      </target>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="meta"/>
        <variable value="newMeta"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Meta"/>
        </parameter>
      </target>
      <target>
        <context value="newMeta"/>
        <contextType value="variable"/>
        <element value="profile"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation"/>
        </parameter>
      </target>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="code"/>
        <variable value="concept"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <target>
        <context value="concept"/>
        <contextType value="variable"/>
        <element value="coding"/>
        <variable value="coding"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Coding"/>
        </parameter>
      </target>
      <target>
        <context value="coding"/>
        <contextType value="variable"/>
        <element value="system"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes"/>
        </parameter>
      </target>
      <target>
        <context value="coding"/>
        <contextType value="variable"/>
        <element value="code"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="CHE.B24.G.DE43"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="aae7a11d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <variable value="itemtimestamp"/>
        <condition value="linkId = 'timestamp'"/>
      </source>
      <rule>
        <name value="7f22f29f"/>
        <source>
          <context value="itemtimestamp"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="atimestamp"/>
        </source>
        <rule>
          <name value="5af77f2c"/>
          <source>
            <context value="atimestamp"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="issued"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="patient"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="subject"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="1cd8ee7f"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B24.G.DE43') and answer.exists()"/>
      </source>
      <rule>
        <name value="b567d9ca"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="e1ba65b0"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="e0a426db"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'CHE.B24.G.DE43'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueBoolean value="true"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
</StructureMap>