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.b18-2.signs.2.m.m - XML Representation

Active as of 2023-10-04

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="che.b18-2.signs.2.m.m"/>
  <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.b18-2.signs.2.m.m&quot; = &quot;che.b18-2.signs.2.m.m&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.B18S2.DE07') 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 cheobservationcheb18s2de07(src, tgt) &quot;e582e0b9&quot;;
      } &quot;1ee7a050&quot;;
    } &quot;9f56cf48&quot;;
  } &quot;05810fa2&quot;;
  src.item first as item where (linkId = 'CHE.B18S2.DE08') 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 cheobservationcheb18s2de08(src, tgt) &quot;b8001cf1&quot;;
      } &quot;fcf4253f&quot;;
    } &quot;7b57b925&quot;;
  } &quot;82560c96&quot;;
  src.item first as item where (linkId = 'CHE.B18S2.DE12') 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 cheobservationcheb18s2de12(src, tgt) &quot;f4331e54&quot;;
      } &quot;f7fe72e5&quot;;
    } &quot;5fa3c1c5&quot;;
  } &quot;1026a3f9&quot;;
  src.item first as item where (linkId = 'CHE.B18S2.DE13') 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 cheobservationcheb18s2de13(src, tgt) &quot;8d6a37d7&quot;;
      } &quot;0892d76b&quot;;
    } &quot;6d339a30&quot;;
  } &quot;76dfb08a&quot;;
  src.item first as item where (linkId = 'CHE.B19S2.DE01') 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 cheobservationcheb19s2de01(src, tgt) &quot;784e6306&quot;;
      } &quot;2c28d884&quot;;
    } &quot;a1b2690f&quot;;
  } &quot;77862ebc&quot;;
  src.item first as item where (linkId = 'CHE.B19S2.DE02') 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 cheobservationcheb19s2de02(src, tgt) &quot;a57a6dd7&quot;;
      } &quot;60e23396&quot;;
    } &quot;fe62bb79&quot;;
  } &quot;c834ff0e&quot;;
  src.item first as item where (linkId = 'CHE.B19S2.DE04') 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 cheobservationcheb19s2de04(src, tgt) &quot;16b30f5e&quot;;
      } &quot;ef84f06f&quot;;
    } &quot;bb9b80f8&quot;;
  } &quot;be74ce8b&quot;;
  src.item first as itm1 where linkId = 'dhrea' then {
    itm1.item first as item where (linkId = 'CHE.B20S2.DE01') 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 cheobservationcheb20s2de01(src, tgt) &quot;d468f5e8&quot;;
        } &quot;329279b0&quot;;
      } &quot;1c436de1&quot;;
    } &quot;fc7f67af&quot;;
  } &quot;5fee0c3d&quot;;
  src.item first as itm1 where linkId = 'dhrea' then {
    itm1.item first as item where (linkId = 'CHE.B20S2.DE02') 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 cheobservationcheb20s2de02(src, tgt) &quot;22e93849&quot;;
        } &quot;77a9c987&quot;;
      } &quot;7d6283fe&quot;;
    } &quot;d3d20d24&quot;;
  } &quot;b6b75956&quot;;
  src.item first as itm1 where linkId = 'dhrea' then {
    itm1.item first as item where (linkId = 'CHE.B20S2.DE06') 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 cheobservationcheb20s2de06(src, tgt) &quot;6079602e&quot;;
        } &quot;14dbf931&quot;;
      } &quot;501edb8e&quot;;
    } &quot;41ce297f&quot;;
  } &quot;4cd409e6&quot;;
  src.item first as item where (linkId = 'CHE.B21S2.DE01') 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 cheobservationcheb21s2de01(src, tgt) &quot;3912ee88&quot;;
      } &quot;94071a1c&quot;;
    } &quot;5c23c9b2&quot;;
  } &quot;741c22bf&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'bf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE06') 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 cheobservationcheb21s2de06(src, tgt) &quot;817890dc&quot;;
          } &quot;144447d2&quot;;
        } &quot;f96a4245&quot;;
      } &quot;e020911f&quot;;
    } &quot;d5ffcaf7&quot;;
  } &quot;66bdb05e&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'bf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE07') 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 cheobservationcheb21s2de07(src, tgt) &quot;cfc45175&quot;;
          } &quot;a6f259fe&quot;;
        } &quot;ed817847&quot;;
      } &quot;589fb06a&quot;;
    } &quot;cc368068&quot;;
  } &quot;337c98b6&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'bf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE08') 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 cheobservationcheb21s2de08(src, tgt) &quot;66256bfa&quot;;
          } &quot;1e48386a&quot;;
        } &quot;2300c415&quot;;
      } &quot;0fd172ee&quot;;
    } &quot;c12105c0&quot;;
  } &quot;65e93a2d&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE09') 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 cheobservationcheb21s2de09(src, tgt) &quot;c85971b8&quot;;
          } &quot;d97ca3e5&quot;;
        } &quot;efd8f6c5&quot;;
      } &quot;7c2a54d2&quot;;
    } &quot;8c3eb8c4&quot;;
  } &quot;f23e257f&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE12') 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 cheobservationcheb21s2de12(src, tgt) &quot;2b6596aa&quot;;
          } &quot;9a748011&quot;;
        } &quot;d735c8b6&quot;;
      } &quot;f58ac637&quot;;
    } &quot;77a23ca2&quot;;
  } &quot;8de8517c&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE13') 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 cheobservationcheb21s2de13(src, tgt) &quot;d7e5231e&quot;;
          } &quot;0151a371&quot;;
        } &quot;7a3c2afb&quot;;
      } &quot;0a4444ec&quot;;
    } &quot;7e469457&quot;;
  } &quot;338dc83c&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE14') 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 cheobservationcheb21s2de14(src, tgt) &quot;4c0547ec&quot;;
          } &quot;989b9d7f&quot;;
        } &quot;d38be4fe&quot;;
      } &quot;0a4baee0&quot;;
    } &quot;5a53b047&quot;;
  } &quot;57145662&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE15') 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 cheobservationcheb21s2de15(src, tgt) &quot;3bea1333&quot;;
          } &quot;c5c6ec82&quot;;
        } &quot;d76c6c23&quot;;
      } &quot;4383ecd8&quot;;
    } &quot;09507078&quot;;
  } &quot;bb01a3da&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE18') 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 cheobservationcheb21s2de18(src, tgt) &quot;9346a6d4&quot;;
          } &quot;8b7e5a05&quot;;
        } &quot;d501b755&quot;;
      } &quot;f376b1e5&quot;;
    } &quot;2e76cb64&quot;;
  } &quot;298da156&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE21') 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 cheobservationcheb21s2de21(src, tgt) &quot;07a684f3&quot;;
          } &quot;34603ba5&quot;;
        } &quot;371779dd&quot;;
      } &quot;5a77c834&quot;;
    } &quot;36ef8575&quot;;
  } &quot;74e25833&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE24') 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 cheobservationcheb21s2de24(src, tgt) &quot;0f560338&quot;;
          } &quot;6adc009a&quot;;
        } &quot;e0b5b2b7&quot;;
      } &quot;4ae9cd12&quot;;
    } &quot;5825319f&quot;;
  } &quot;d2badc76&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE27') 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 cheobservationcheb21s2de27(src, tgt) &quot;d5592341&quot;;
          } &quot;a5671618&quot;;
        } &quot;f138d765&quot;;
      } &quot;95a839f9&quot;;
    } &quot;c6cd61eb&quot;;
  } &quot;73da8bc2&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as item where (linkId = 'CHE.B21S2.DE30') 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 cheobservationcheb21s2de30(src, tgt) &quot;4f31e76b&quot;;
        } &quot;19a5b2c3&quot;;
      } &quot;d9c721ae&quot;;
    } &quot;22a1ce69&quot;;
  } &quot;4a9d20fe&quot;;
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as item where (linkId = 'CHE.B21S2.DE31') 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 cheobservationcheb21s2de31(src, tgt) &quot;428fc0b8&quot;;
        } &quot;c5e9eb0d&quot;;
      } &quot;46816398&quot;;
    } &quot;88408c79&quot;;
  } &quot;2445c06d&quot;;
}

group cheobservationcheb18s2de07(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-cheb18s2de07&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.B18S2.DE07' &quot;code-cheb18s2de07&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.B18S2.DE07') and answer.exists() then {
    item.answer first as a then {
      a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb18s2de07&quot;;
      a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb18s2de07&quot;;
    } &quot;bdab9370&quot;;
  } &quot;5ee0adbf&quot;;
}

group cheobservationcheb18s2de08(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-cheb18s2de08&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.B18S2.DE08' &quot;code-cheb18s2de08&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.B18S2.DE08') and answer.exists() then {
    item.answer first as a then {
      a.value as val then {
        val where val.code = 'none' -&gt; tgt.status = 'cancelled' &quot;8ab1d7a5&quot;;
        val where val.code != 'none' -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' &quot;a1050460&quot;;
      } &quot;4ca9082e&quot;;
    } &quot;7c587a4b&quot;;
  } &quot;fee2a645&quot;;
}

group cheobservationcheb18s2de12(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-cheb18s2de12&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.B18S2.DE12' &quot;code-cheb18s2de12&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.B18S2.DE12') and answer.exists() then {
    item.answer first as a then {
      a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb18s2de12&quot;;
      a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb18s2de12&quot;;
    } &quot;bdab9370&quot;;
  } &quot;f621ab4a&quot;;
}

group cheobservationcheb18s2de13(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-cheb18s2de13&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.B18S2.DE13' &quot;code-cheb18s2de13&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.B18S2.DE13') and answer.exists() then {
    item.answer first as a then {
      a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb18s2de13&quot;;
      a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb18s2de13&quot;;
    } &quot;bdab9370&quot;;
  } &quot;e95a060c&quot;;
}

group cheobservationcheb19s2de01(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-cheb19s2de01&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.B19S2.DE01' &quot;code-cheb19s2de01&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.B19S2.DE01') and answer.exists() then {
    item.answer first as a then {
      a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb19s2de01&quot;;
      a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb19s2de01&quot;;
    } &quot;bdab9370&quot;;
  } &quot;80f27969&quot;;
}

group cheobservationcheb19s2de02(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-cheb19s2de02&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.B19S2.DE02' &quot;code-cheb19s2de02&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.B19S2.DE02') and answer.exists() then {
    item.answer first as a then {
      a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb19s2de02&quot;;
      a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb19s2de02&quot;;
    } &quot;bdab9370&quot;;
  } &quot;c03fae10&quot;;
}

group cheobservationcheb19s2de04(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-cheb19s2de04&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.B19S2.DE04' &quot;code-cheb19s2de04&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.B19S2.DE04') and answer.exists() then {
    item.answer first as a then {
      a.value as val then {
        val where val.code = 'none' -&gt; tgt.status = 'cancelled' &quot;8ab1d7a5&quot;;
        val where val.code != 'none' -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' &quot;a1050460&quot;;
      } &quot;4ca9082e&quot;;
    } &quot;7c587a4b&quot;;
  } &quot;f5b28914&quot;;
}

group cheobservationcheb20s2de01(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-cheb20s2de01&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.B20S2.DE01' &quot;code-cheb20s2de01&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 itm1 where linkId = 'dhrea' then {
    itm1.item first as item where (linkId = 'CHE.B20S2.DE01') and answer.exists() then {
      item.answer first as a then {
        a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb20s2de01&quot;;
        a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb20s2de01&quot;;
      } &quot;bdab9370&quot;;
    } &quot;2dccf640&quot;;
  } &quot;667c8fcc&quot;;
}

group cheobservationcheb20s2de02(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-cheb20s2de02&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.B20S2.DE02' &quot;code-cheb20s2de02&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 itm1 where linkId = 'dhrea' then {
    itm1.item first as item where (linkId = 'CHE.B20S2.DE02') and answer.exists() then {
      item.answer first as a then {
        a.value as val then {
          val where val.code = 'none' -&gt; tgt.status = 'cancelled' &quot;8ab1d7a5&quot;;
          val where val.code != 'none' -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' &quot;a1050460&quot;;
        } &quot;4ca9082e&quot;;
      } &quot;7c587a4b&quot;;
    } &quot;7c20c96c&quot;;
  } &quot;ce1e6510&quot;;
}

group cheobservationcheb20s2de06(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-cheb20s2de06&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.B20S2.DE06' &quot;code-cheb20s2de06&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 itm1 where linkId = 'dhrea' then {
    itm1.item first as item where (linkId = 'CHE.B20S2.DE06') and answer.exists() then {
      item.answer first as a then {
        a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb20s2de06&quot;;
        a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb20s2de06&quot;;
      } &quot;bdab9370&quot;;
    } &quot;dcdddef6&quot;;
  } &quot;f2e136dd&quot;;
}

group cheobservationcheb21s2de01(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-cheb21s2de01&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.B21S2.DE01' &quot;code-cheb21s2de01&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.B21S2.DE01') and answer.exists() then {
    item.answer first as a then {
      a.value as val then {
        val where val.code = 'none' -&gt; tgt.status = 'cancelled' &quot;8ab1d7a5&quot;;
        val where val.code != 'none' -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' &quot;a1050460&quot;;
      } &quot;4ca9082e&quot;;
    } &quot;7c587a4b&quot;;
  } &quot;111fe259&quot;;
}

group cheobservationcheb21s2de06(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-cheb21s2de06&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.B21S2.DE06' &quot;code-cheb21s2de06&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'bf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE06') and answer.exists() then {
        item.answer first as a then {
          a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb21s2de06&quot;;
          a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb21s2de06&quot;;
        } &quot;bdab9370&quot;;
      } &quot;f4483b41&quot;;
    } &quot;086306ea&quot;;
  } &quot;c9f4024f&quot;;
}

group cheobservationcheb21s2de07(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-cheb21s2de07&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.B21S2.DE07' &quot;code-cheb21s2de07&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'bf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE07') and answer.exists() then {
        item.answer first as a then {
          a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb21s2de07&quot;;
          a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb21s2de07&quot;;
        } &quot;bdab9370&quot;;
      } &quot;ac8b143d&quot;;
    } &quot;4bcac4eb&quot;;
  } &quot;f0040203&quot;;
}

group cheobservationcheb21s2de08(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-cheb21s2de08&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.B21S2.DE08' &quot;code-cheb21s2de08&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'bf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE08') and answer.exists() then {
        item.answer first as a then {
          a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb21s2de08&quot;;
          a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb21s2de08&quot;;
        } &quot;bdab9370&quot;;
      } &quot;a4649541&quot;;
    } &quot;5b9f25f0&quot;;
  } &quot;eaac7444&quot;;
}

group cheobservationcheb21s2de09(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-cheb21s2de09&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.B21S2.DE09' &quot;code-cheb21s2de09&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE09') and answer.exists() then {
        item.answer first as a then {
          a.value as val then {
            val where val.code = 'none' -&gt; tgt.status = 'cancelled' &quot;8ab1d7a5&quot;;
            val where val.code != 'none' -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' &quot;a1050460&quot;;
          } &quot;4ca9082e&quot;;
        } &quot;7c587a4b&quot;;
      } &quot;adbf5bbd&quot;;
    } &quot;0b7591de&quot;;
  } &quot;74b66daf&quot;;
}

group cheobservationcheb21s2de12(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-cheb21s2de12&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.B21S2.DE12' &quot;code-cheb21s2de12&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE12') and answer.exists() then {
        item.answer first as a then {
          a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb21s2de12&quot;;
          a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb21s2de12&quot;;
        } &quot;bdab9370&quot;;
      } &quot;b7b04b56&quot;;
    } &quot;b9611401&quot;;
  } &quot;69100ab8&quot;;
}

group cheobservationcheb21s2de13(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-cheb21s2de13&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.B21S2.DE13' &quot;code-cheb21s2de13&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE13') and answer.exists() then {
        item.answer first as a then {
          a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb21s2de13&quot;;
          a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb21s2de13&quot;;
        } &quot;bdab9370&quot;;
      } &quot;1200d0e6&quot;;
    } &quot;3b187ae1&quot;;
  } &quot;5b2b0b27&quot;;
}

group cheobservationcheb21s2de14(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-cheb21s2de14&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.B21S2.DE14' &quot;code-cheb21s2de14&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE14') and answer.exists() then {
        item.answer first as a then {
          a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb21s2de14&quot;;
          a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb21s2de14&quot;;
        } &quot;bdab9370&quot;;
      } &quot;f7b76aba&quot;;
    } &quot;b7d93803&quot;;
  } &quot;45cba18d&quot;;
}

group cheobservationcheb21s2de15(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-cheb21s2de15&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.B21S2.DE15' &quot;code-cheb21s2de15&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE15') and answer.exists() then {
        item.answer first as a then {
          a.value as val then {
            val where val.code = 'none' -&gt; tgt.status = 'cancelled' &quot;8ab1d7a5&quot;;
            val where val.code != 'none' -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' &quot;a1050460&quot;;
          } &quot;4ca9082e&quot;;
        } &quot;7c587a4b&quot;;
      } &quot;a1a28f4b&quot;;
    } &quot;c1b76be3&quot;;
  } &quot;af60327b&quot;;
}

group cheobservationcheb21s2de18(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-cheb21s2de18&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.B21S2.DE18' &quot;code-cheb21s2de18&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE18') and answer.exists() then {
        item.answer first as a then {
          a.value as val then {
            val where val.code = 'none' -&gt; tgt.status = 'cancelled' &quot;8ab1d7a5&quot;;
            val where val.code != 'none' -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' &quot;a1050460&quot;;
          } &quot;4ca9082e&quot;;
        } &quot;7c587a4b&quot;;
      } &quot;6d05c082&quot;;
    } &quot;46c38b26&quot;;
  } &quot;99fd273f&quot;;
}

group cheobservationcheb21s2de21(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-cheb21s2de21&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.B21S2.DE21' &quot;code-cheb21s2de21&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE21') and answer.exists() then {
        item.answer first as a then {
          a.value as val then {
            val where val.code = 'none' -&gt; tgt.status = 'cancelled' &quot;8ab1d7a5&quot;;
            val where val.code != 'none' -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' &quot;a1050460&quot;;
          } &quot;4ca9082e&quot;;
        } &quot;7c587a4b&quot;;
      } &quot;4c2ac59b&quot;;
    } &quot;575cd038&quot;;
  } &quot;50193ff4&quot;;
}

group cheobservationcheb21s2de24(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-cheb21s2de24&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.B21S2.DE24' &quot;code-cheb21s2de24&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE24') and answer.exists() then {
        item.answer first as a then {
          a.value as val then {
            val where val.code = 'none' -&gt; tgt.status = 'cancelled' &quot;8ab1d7a5&quot;;
            val where val.code != 'none' -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' &quot;a1050460&quot;;
          } &quot;4ca9082e&quot;;
        } &quot;7c587a4b&quot;;
      } &quot;cc93afff&quot;;
    } &quot;d84f2183&quot;;
  } &quot;da2a4683&quot;;
}

group cheobservationcheb21s2de27(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-cheb21s2de27&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.B21S2.DE27' &quot;code-cheb21s2de27&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE27') and answer.exists() then {
        item.answer first as a then {
          a.value as val then {
            val where val.code = 'none' -&gt; tgt.status = 'cancelled' &quot;8ab1d7a5&quot;;
            val where val.code != 'none' -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' &quot;a1050460&quot;;
          } &quot;4ca9082e&quot;;
        } &quot;7c587a4b&quot;;
      } &quot;fe923a94&quot;;
    } &quot;fac4f521&quot;;
  } &quot;67b29315&quot;;
}

group cheobservationcheb21s2de30(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-cheb21s2de30&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.B21S2.DE30' &quot;code-cheb21s2de30&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as item where (linkId = 'CHE.B21S2.DE30') and answer.exists() then {
      item.answer first as a then {
        a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb21s2de30&quot;;
        a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb21s2de30&quot;;
      } &quot;bdab9370&quot;;
    } &quot;d84b6a8b&quot;;
  } &quot;1f15315a&quot;;
}

group cheobservationcheb21s2de31(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-cheb21s2de31&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.B21S2.DE31' &quot;code-cheb21s2de31&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 itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as item where (linkId = 'CHE.B21S2.DE31') and answer.exists() then {
      item.answer first as a then {
        a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb21s2de31&quot;;
        a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb21s2de31&quot;;
      } &quot;bdab9370&quot;;
    } &quot;1a309728&quot;;
  } &quot;ed912153&quot;;
}

</pre></div>
  </text>
  <url
       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureMap/che.b18-2.signs.2.m.m"/>
  <version value="0.1.0"/>
  <name value="che.b18-2.signs.2.m.m"/>
  <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="05810fa2"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B18S2.DE07') and answer.exists()"/>
      </source>
      <rule>
        <name value="9f56cf48"/>
        <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="1ee7a050"/>
          <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="e582e0b9"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb18s2de07"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="82560c96"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B18S2.DE08') and answer.exists()"/>
      </source>
      <rule>
        <name value="7b57b925"/>
        <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="fcf4253f"/>
          <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="b8001cf1"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb18s2de08"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="1026a3f9"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B18S2.DE12') and answer.exists()"/>
      </source>
      <rule>
        <name value="5fa3c1c5"/>
        <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="f7fe72e5"/>
          <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="f4331e54"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb18s2de12"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="76dfb08a"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B18S2.DE13') and answer.exists()"/>
      </source>
      <rule>
        <name value="6d339a30"/>
        <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="0892d76b"/>
          <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="8d6a37d7"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb18s2de13"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="77862ebc"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B19S2.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="a1b2690f"/>
        <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="2c28d884"/>
          <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="784e6306"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb19s2de01"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="c834ff0e"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B19S2.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="fe62bb79"/>
        <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="60e23396"/>
          <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="a57a6dd7"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb19s2de02"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="be74ce8b"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B19S2.DE04') and answer.exists()"/>
      </source>
      <rule>
        <name value="bb9b80f8"/>
        <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="ef84f06f"/>
          <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="16b30f5e"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb19s2de04"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="5fee0c3d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'dhrea'"/>
      </source>
      <rule>
        <name value="fc7f67af"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B20S2.DE01') and answer.exists()"/>
        </source>
        <rule>
          <name value="1c436de1"/>
          <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="329279b0"/>
            <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="d468f5e8"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <contextType value="variable"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="tgt"/>
                </parameter>
              </target>
              <dependent>
                <name value="cheobservationcheb20s2de01"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="b6b75956"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'dhrea'"/>
      </source>
      <rule>
        <name value="d3d20d24"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B20S2.DE02') and answer.exists()"/>
        </source>
        <rule>
          <name value="7d6283fe"/>
          <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="77a9c987"/>
            <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="22e93849"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <contextType value="variable"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="tgt"/>
                </parameter>
              </target>
              <dependent>
                <name value="cheobservationcheb20s2de02"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="4cd409e6"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'dhrea'"/>
      </source>
      <rule>
        <name value="41ce297f"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B20S2.DE06') and answer.exists()"/>
        </source>
        <rule>
          <name value="501edb8e"/>
          <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="14dbf931"/>
            <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="6079602e"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <contextType value="variable"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="tgt"/>
                </parameter>
              </target>
              <dependent>
                <name value="cheobservationcheb20s2de06"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="741c22bf"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B21S2.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="5c23c9b2"/>
        <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="94071a1c"/>
          <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="3912ee88"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb21s2de01"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="66bdb05e"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="d5ffcaf7"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'bf-asses'"/>
        </source>
        <rule>
          <name value="e020911f"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE06') and answer.exists()"/>
          </source>
          <rule>
            <name value="f96a4245"/>
            <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="144447d2"/>
              <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="817890dc"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <contextType value="variable"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="tgt"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="cheobservationcheb21s2de06"/>
                  <variable value="src"/>
                  <variable value="tgt"/>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="337c98b6"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="cc368068"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'bf-asses'"/>
        </source>
        <rule>
          <name value="589fb06a"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE07') and answer.exists()"/>
          </source>
          <rule>
            <name value="ed817847"/>
            <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="a6f259fe"/>
              <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="cfc45175"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <contextType value="variable"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="tgt"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="cheobservationcheb21s2de07"/>
                  <variable value="src"/>
                  <variable value="tgt"/>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="65e93a2d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="c12105c0"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'bf-asses'"/>
        </source>
        <rule>
          <name value="0fd172ee"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE08') and answer.exists()"/>
          </source>
          <rule>
            <name value="2300c415"/>
            <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="1e48386a"/>
              <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="66256bfa"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <contextType value="variable"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="tgt"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="cheobservationcheb21s2de08"/>
                  <variable value="src"/>
                  <variable value="tgt"/>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="f23e257f"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="8c3eb8c4"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="7c2a54d2"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE09') and answer.exists()"/>
          </source>
          <rule>
            <name value="efd8f6c5"/>
            <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="d97ca3e5"/>
              <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="c85971b8"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <contextType value="variable"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="tgt"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="cheobservationcheb21s2de09"/>
                  <variable value="src"/>
                  <variable value="tgt"/>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="8de8517c"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="77a23ca2"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="f58ac637"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE12') and answer.exists()"/>
          </source>
          <rule>
            <name value="d735c8b6"/>
            <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="9a748011"/>
              <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="2b6596aa"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <contextType value="variable"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="tgt"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="cheobservationcheb21s2de12"/>
                  <variable value="src"/>
                  <variable value="tgt"/>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="338dc83c"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="7e469457"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="0a4444ec"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE13') and answer.exists()"/>
          </source>
          <rule>
            <name value="7a3c2afb"/>
            <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="0151a371"/>
              <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="d7e5231e"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <contextType value="variable"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="tgt"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="cheobservationcheb21s2de13"/>
                  <variable value="src"/>
                  <variable value="tgt"/>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="57145662"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="5a53b047"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="0a4baee0"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE14') and answer.exists()"/>
          </source>
          <rule>
            <name value="d38be4fe"/>
            <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="989b9d7f"/>
              <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="4c0547ec"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <contextType value="variable"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="tgt"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="cheobservationcheb21s2de14"/>
                  <variable value="src"/>
                  <variable value="tgt"/>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="bb01a3da"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="09507078"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="4383ecd8"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE15') and answer.exists()"/>
          </source>
          <rule>
            <name value="d76c6c23"/>
            <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="c5c6ec82"/>
              <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="3bea1333"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <contextType value="variable"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="tgt"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="cheobservationcheb21s2de15"/>
                  <variable value="src"/>
                  <variable value="tgt"/>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="298da156"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="2e76cb64"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="f376b1e5"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE18') and answer.exists()"/>
          </source>
          <rule>
            <name value="d501b755"/>
            <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="8b7e5a05"/>
              <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="9346a6d4"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <contextType value="variable"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="tgt"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="cheobservationcheb21s2de18"/>
                  <variable value="src"/>
                  <variable value="tgt"/>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="74e25833"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="36ef8575"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="5a77c834"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE21') and answer.exists()"/>
          </source>
          <rule>
            <name value="371779dd"/>
            <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="34603ba5"/>
              <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="07a684f3"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <contextType value="variable"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="tgt"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="cheobservationcheb21s2de21"/>
                  <variable value="src"/>
                  <variable value="tgt"/>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="d2badc76"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="5825319f"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="4ae9cd12"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE24') and answer.exists()"/>
          </source>
          <rule>
            <name value="e0b5b2b7"/>
            <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="6adc009a"/>
              <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="0f560338"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <contextType value="variable"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="tgt"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="cheobservationcheb21s2de24"/>
                  <variable value="src"/>
                  <variable value="tgt"/>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="73da8bc2"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="c6cd61eb"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="95a839f9"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE27') and answer.exists()"/>
          </source>
          <rule>
            <name value="f138d765"/>
            <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="a5671618"/>
              <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="d5592341"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <contextType value="variable"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="tgt"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="cheobservationcheb21s2de27"/>
                  <variable value="src"/>
                  <variable value="tgt"/>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="4a9d20fe"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="22a1ce69"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B21S2.DE30') and answer.exists()"/>
        </source>
        <rule>
          <name value="d9c721ae"/>
          <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="19a5b2c3"/>
            <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="4f31e76b"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <contextType value="variable"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="tgt"/>
                </parameter>
              </target>
              <dependent>
                <name value="cheobservationcheb21s2de30"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="2445c06d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="88408c79"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B21S2.DE31') and answer.exists()"/>
        </source>
        <rule>
          <name value="46816398"/>
          <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="c5e9eb0d"/>
            <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="428fc0b8"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <contextType value="variable"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="tgt"/>
                </parameter>
              </target>
              <dependent>
                <name value="cheobservationcheb21s2de31"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb18s2de07"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb18s2de07"/>
      <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-cheb18s2de07"/>
      <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.B18S2.DE07"/>
        </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="5ee0adbf"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B18S2.DE07') and answer.exists()"/>
      </source>
      <rule>
        <name value="bdab9370"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="final-cheb18s2de07"/>
          <source>
            <context value="a"/>
            <condition value="a.value = true"/>
          </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>
          <name value="notfound-cheb18s2de07"/>
          <source>
            <context value="a"/>
            <condition value="a.value = false"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="cancelled"/>
            </parameter>
          </target>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueBoolean value="false"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb18s2de08"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb18s2de08"/>
      <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-cheb18s2de08"/>
      <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.B18S2.DE08"/>
        </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="fee2a645"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B18S2.DE08') and answer.exists()"/>
      </source>
      <rule>
        <name value="7c587a4b"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="4ca9082e"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="8ab1d7a5"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cancelled"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="a1050460"/>
            <source>
              <context value="val"/>
              <condition value="val.code != 'none'"/>
            </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"/>
              <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>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb18s2de12"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb18s2de12"/>
      <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-cheb18s2de12"/>
      <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.B18S2.DE12"/>
        </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="f621ab4a"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B18S2.DE12') and answer.exists()"/>
      </source>
      <rule>
        <name value="bdab9370"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="final-cheb18s2de12"/>
          <source>
            <context value="a"/>
            <condition value="a.value = true"/>
          </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>
          <name value="notfound-cheb18s2de12"/>
          <source>
            <context value="a"/>
            <condition value="a.value = false"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="cancelled"/>
            </parameter>
          </target>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueBoolean value="false"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb18s2de13"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb18s2de13"/>
      <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-cheb18s2de13"/>
      <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.B18S2.DE13"/>
        </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="e95a060c"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B18S2.DE13') and answer.exists()"/>
      </source>
      <rule>
        <name value="bdab9370"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="final-cheb18s2de13"/>
          <source>
            <context value="a"/>
            <condition value="a.value = true"/>
          </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>
          <name value="notfound-cheb18s2de13"/>
          <source>
            <context value="a"/>
            <condition value="a.value = false"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="cancelled"/>
            </parameter>
          </target>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueBoolean value="false"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb19s2de01"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb19s2de01"/>
      <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-cheb19s2de01"/>
      <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.B19S2.DE01"/>
        </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="80f27969"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B19S2.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="bdab9370"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="final-cheb19s2de01"/>
          <source>
            <context value="a"/>
            <condition value="a.value = true"/>
          </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>
          <name value="notfound-cheb19s2de01"/>
          <source>
            <context value="a"/>
            <condition value="a.value = false"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="cancelled"/>
            </parameter>
          </target>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueBoolean value="false"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb19s2de02"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb19s2de02"/>
      <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-cheb19s2de02"/>
      <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.B19S2.DE02"/>
        </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="c03fae10"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B19S2.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="bdab9370"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="final-cheb19s2de02"/>
          <source>
            <context value="a"/>
            <condition value="a.value = true"/>
          </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>
          <name value="notfound-cheb19s2de02"/>
          <source>
            <context value="a"/>
            <condition value="a.value = false"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="cancelled"/>
            </parameter>
          </target>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueBoolean value="false"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb19s2de04"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb19s2de04"/>
      <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-cheb19s2de04"/>
      <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.B19S2.DE04"/>
        </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="f5b28914"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B19S2.DE04') and answer.exists()"/>
      </source>
      <rule>
        <name value="7c587a4b"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="4ca9082e"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="8ab1d7a5"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cancelled"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="a1050460"/>
            <source>
              <context value="val"/>
              <condition value="val.code != 'none'"/>
            </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"/>
              <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>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb20s2de01"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb20s2de01"/>
      <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-cheb20s2de01"/>
      <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.B20S2.DE01"/>
        </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="667c8fcc"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'dhrea'"/>
      </source>
      <rule>
        <name value="2dccf640"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B20S2.DE01') and answer.exists()"/>
        </source>
        <rule>
          <name value="bdab9370"/>
          <source>
            <context value="item"/>
            <element value="answer"/>
            <listMode value="first"/>
            <variable value="a"/>
          </source>
          <rule>
            <name value="final-cheb20s2de01"/>
            <source>
              <context value="a"/>
              <condition value="a.value = true"/>
            </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>
            <name value="notfound-cheb20s2de01"/>
            <source>
              <context value="a"/>
              <condition value="a.value = false"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cancelled"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueBoolean value="false"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb20s2de02"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb20s2de02"/>
      <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-cheb20s2de02"/>
      <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.B20S2.DE02"/>
        </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="ce1e6510"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'dhrea'"/>
      </source>
      <rule>
        <name value="7c20c96c"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B20S2.DE02') and answer.exists()"/>
        </source>
        <rule>
          <name value="7c587a4b"/>
          <source>
            <context value="item"/>
            <element value="answer"/>
            <listMode value="first"/>
            <variable value="a"/>
          </source>
          <rule>
            <name value="4ca9082e"/>
            <source>
              <context value="a"/>
              <element value="value"/>
              <variable value="val"/>
            </source>
            <rule>
              <name value="8ab1d7a5"/>
              <source>
                <context value="val"/>
                <condition value="val.code = 'none'"/>
              </source>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="status"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="cancelled"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="a1050460"/>
              <source>
                <context value="val"/>
                <condition value="val.code != 'none'"/>
              </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"/>
                <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>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb20s2de06"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb20s2de06"/>
      <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-cheb20s2de06"/>
      <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.B20S2.DE06"/>
        </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="f2e136dd"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'dhrea'"/>
      </source>
      <rule>
        <name value="dcdddef6"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B20S2.DE06') and answer.exists()"/>
        </source>
        <rule>
          <name value="bdab9370"/>
          <source>
            <context value="item"/>
            <element value="answer"/>
            <listMode value="first"/>
            <variable value="a"/>
          </source>
          <rule>
            <name value="final-cheb20s2de06"/>
            <source>
              <context value="a"/>
              <condition value="a.value = true"/>
            </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>
            <name value="notfound-cheb20s2de06"/>
            <source>
              <context value="a"/>
              <condition value="a.value = false"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cancelled"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueBoolean value="false"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de01"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de01"/>
      <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-cheb21s2de01"/>
      <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.B21S2.DE01"/>
        </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="111fe259"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B21S2.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="7c587a4b"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="4ca9082e"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="8ab1d7a5"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cancelled"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="a1050460"/>
            <source>
              <context value="val"/>
              <condition value="val.code != 'none'"/>
            </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"/>
              <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>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de06"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de06"/>
      <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-cheb21s2de06"/>
      <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.B21S2.DE06"/>
        </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="c9f4024f"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="086306ea"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'bf-asses'"/>
        </source>
        <rule>
          <name value="f4483b41"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE06') and answer.exists()"/>
          </source>
          <rule>
            <name value="bdab9370"/>
            <source>
              <context value="item"/>
              <element value="answer"/>
              <listMode value="first"/>
              <variable value="a"/>
            </source>
            <rule>
              <name value="final-cheb21s2de06"/>
              <source>
                <context value="a"/>
                <condition value="a.value = true"/>
              </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>
              <name value="notfound-cheb21s2de06"/>
              <source>
                <context value="a"/>
                <condition value="a.value = false"/>
              </source>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="status"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="cancelled"/>
                </parameter>
              </target>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueBoolean value="false"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de07"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de07"/>
      <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-cheb21s2de07"/>
      <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.B21S2.DE07"/>
        </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="f0040203"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="4bcac4eb"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'bf-asses'"/>
        </source>
        <rule>
          <name value="ac8b143d"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE07') and answer.exists()"/>
          </source>
          <rule>
            <name value="bdab9370"/>
            <source>
              <context value="item"/>
              <element value="answer"/>
              <listMode value="first"/>
              <variable value="a"/>
            </source>
            <rule>
              <name value="final-cheb21s2de07"/>
              <source>
                <context value="a"/>
                <condition value="a.value = true"/>
              </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>
              <name value="notfound-cheb21s2de07"/>
              <source>
                <context value="a"/>
                <condition value="a.value = false"/>
              </source>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="status"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="cancelled"/>
                </parameter>
              </target>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueBoolean value="false"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de08"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de08"/>
      <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-cheb21s2de08"/>
      <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.B21S2.DE08"/>
        </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="eaac7444"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="5b9f25f0"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'bf-asses'"/>
        </source>
        <rule>
          <name value="a4649541"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE08') and answer.exists()"/>
          </source>
          <rule>
            <name value="bdab9370"/>
            <source>
              <context value="item"/>
              <element value="answer"/>
              <listMode value="first"/>
              <variable value="a"/>
            </source>
            <rule>
              <name value="final-cheb21s2de08"/>
              <source>
                <context value="a"/>
                <condition value="a.value = true"/>
              </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>
              <name value="notfound-cheb21s2de08"/>
              <source>
                <context value="a"/>
                <condition value="a.value = false"/>
              </source>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="status"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="cancelled"/>
                </parameter>
              </target>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueBoolean value="false"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de09"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de09"/>
      <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-cheb21s2de09"/>
      <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.B21S2.DE09"/>
        </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="74b66daf"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="0b7591de"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="adbf5bbd"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE09') and answer.exists()"/>
          </source>
          <rule>
            <name value="7c587a4b"/>
            <source>
              <context value="item"/>
              <element value="answer"/>
              <listMode value="first"/>
              <variable value="a"/>
            </source>
            <rule>
              <name value="4ca9082e"/>
              <source>
                <context value="a"/>
                <element value="value"/>
                <variable value="val"/>
              </source>
              <rule>
                <name value="8ab1d7a5"/>
                <source>
                  <context value="val"/>
                  <condition value="val.code = 'none'"/>
                </source>
                <target>
                  <context value="tgt"/>
                  <contextType value="variable"/>
                  <element value="status"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="cancelled"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="a1050460"/>
                <source>
                  <context value="val"/>
                  <condition value="val.code != 'none'"/>
                </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"/>
                  <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>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de12"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de12"/>
      <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-cheb21s2de12"/>
      <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.B21S2.DE12"/>
        </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="69100ab8"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="b9611401"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="b7b04b56"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE12') and answer.exists()"/>
          </source>
          <rule>
            <name value="bdab9370"/>
            <source>
              <context value="item"/>
              <element value="answer"/>
              <listMode value="first"/>
              <variable value="a"/>
            </source>
            <rule>
              <name value="final-cheb21s2de12"/>
              <source>
                <context value="a"/>
                <condition value="a.value = true"/>
              </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>
              <name value="notfound-cheb21s2de12"/>
              <source>
                <context value="a"/>
                <condition value="a.value = false"/>
              </source>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="status"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="cancelled"/>
                </parameter>
              </target>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueBoolean value="false"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de13"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de13"/>
      <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-cheb21s2de13"/>
      <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.B21S2.DE13"/>
        </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="5b2b0b27"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="3b187ae1"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="1200d0e6"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE13') and answer.exists()"/>
          </source>
          <rule>
            <name value="bdab9370"/>
            <source>
              <context value="item"/>
              <element value="answer"/>
              <listMode value="first"/>
              <variable value="a"/>
            </source>
            <rule>
              <name value="final-cheb21s2de13"/>
              <source>
                <context value="a"/>
                <condition value="a.value = true"/>
              </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>
              <name value="notfound-cheb21s2de13"/>
              <source>
                <context value="a"/>
                <condition value="a.value = false"/>
              </source>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="status"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="cancelled"/>
                </parameter>
              </target>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueBoolean value="false"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de14"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de14"/>
      <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-cheb21s2de14"/>
      <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.B21S2.DE14"/>
        </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="45cba18d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="b7d93803"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="f7b76aba"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE14') and answer.exists()"/>
          </source>
          <rule>
            <name value="bdab9370"/>
            <source>
              <context value="item"/>
              <element value="answer"/>
              <listMode value="first"/>
              <variable value="a"/>
            </source>
            <rule>
              <name value="final-cheb21s2de14"/>
              <source>
                <context value="a"/>
                <condition value="a.value = true"/>
              </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>
              <name value="notfound-cheb21s2de14"/>
              <source>
                <context value="a"/>
                <condition value="a.value = false"/>
              </source>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="status"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="cancelled"/>
                </parameter>
              </target>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueBoolean value="false"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de15"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de15"/>
      <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-cheb21s2de15"/>
      <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.B21S2.DE15"/>
        </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="af60327b"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="c1b76be3"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="a1a28f4b"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE15') and answer.exists()"/>
          </source>
          <rule>
            <name value="7c587a4b"/>
            <source>
              <context value="item"/>
              <element value="answer"/>
              <listMode value="first"/>
              <variable value="a"/>
            </source>
            <rule>
              <name value="4ca9082e"/>
              <source>
                <context value="a"/>
                <element value="value"/>
                <variable value="val"/>
              </source>
              <rule>
                <name value="8ab1d7a5"/>
                <source>
                  <context value="val"/>
                  <condition value="val.code = 'none'"/>
                </source>
                <target>
                  <context value="tgt"/>
                  <contextType value="variable"/>
                  <element value="status"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="cancelled"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="a1050460"/>
                <source>
                  <context value="val"/>
                  <condition value="val.code != 'none'"/>
                </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"/>
                  <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>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de18"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de18"/>
      <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-cheb21s2de18"/>
      <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.B21S2.DE18"/>
        </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="99fd273f"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="46c38b26"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="6d05c082"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE18') and answer.exists()"/>
          </source>
          <rule>
            <name value="7c587a4b"/>
            <source>
              <context value="item"/>
              <element value="answer"/>
              <listMode value="first"/>
              <variable value="a"/>
            </source>
            <rule>
              <name value="4ca9082e"/>
              <source>
                <context value="a"/>
                <element value="value"/>
                <variable value="val"/>
              </source>
              <rule>
                <name value="8ab1d7a5"/>
                <source>
                  <context value="val"/>
                  <condition value="val.code = 'none'"/>
                </source>
                <target>
                  <context value="tgt"/>
                  <contextType value="variable"/>
                  <element value="status"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="cancelled"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="a1050460"/>
                <source>
                  <context value="val"/>
                  <condition value="val.code != 'none'"/>
                </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"/>
                  <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>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de21"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de21"/>
      <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-cheb21s2de21"/>
      <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.B21S2.DE21"/>
        </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="50193ff4"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="575cd038"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="4c2ac59b"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE21') and answer.exists()"/>
          </source>
          <rule>
            <name value="7c587a4b"/>
            <source>
              <context value="item"/>
              <element value="answer"/>
              <listMode value="first"/>
              <variable value="a"/>
            </source>
            <rule>
              <name value="4ca9082e"/>
              <source>
                <context value="a"/>
                <element value="value"/>
                <variable value="val"/>
              </source>
              <rule>
                <name value="8ab1d7a5"/>
                <source>
                  <context value="val"/>
                  <condition value="val.code = 'none'"/>
                </source>
                <target>
                  <context value="tgt"/>
                  <contextType value="variable"/>
                  <element value="status"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="cancelled"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="a1050460"/>
                <source>
                  <context value="val"/>
                  <condition value="val.code != 'none'"/>
                </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"/>
                  <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>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de24"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de24"/>
      <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-cheb21s2de24"/>
      <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.B21S2.DE24"/>
        </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="da2a4683"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="d84f2183"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="cc93afff"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE24') and answer.exists()"/>
          </source>
          <rule>
            <name value="7c587a4b"/>
            <source>
              <context value="item"/>
              <element value="answer"/>
              <listMode value="first"/>
              <variable value="a"/>
            </source>
            <rule>
              <name value="4ca9082e"/>
              <source>
                <context value="a"/>
                <element value="value"/>
                <variable value="val"/>
              </source>
              <rule>
                <name value="8ab1d7a5"/>
                <source>
                  <context value="val"/>
                  <condition value="val.code = 'none'"/>
                </source>
                <target>
                  <context value="tgt"/>
                  <contextType value="variable"/>
                  <element value="status"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="cancelled"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="a1050460"/>
                <source>
                  <context value="val"/>
                  <condition value="val.code != 'none'"/>
                </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"/>
                  <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>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de27"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de27"/>
      <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-cheb21s2de27"/>
      <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.B21S2.DE27"/>
        </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="67b29315"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="fac4f521"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="itm2"/>
          <condition value="linkId = 'ubf-asses'"/>
        </source>
        <rule>
          <name value="fe923a94"/>
          <source>
            <context value="itm2"/>
            <element value="item"/>
            <listMode value="first"/>
            <variable value="item"/>
            <condition
                       value="(linkId = 'CHE.B21S2.DE27') and answer.exists()"/>
          </source>
          <rule>
            <name value="7c587a4b"/>
            <source>
              <context value="item"/>
              <element value="answer"/>
              <listMode value="first"/>
              <variable value="a"/>
            </source>
            <rule>
              <name value="4ca9082e"/>
              <source>
                <context value="a"/>
                <element value="value"/>
                <variable value="val"/>
              </source>
              <rule>
                <name value="8ab1d7a5"/>
                <source>
                  <context value="val"/>
                  <condition value="val.code = 'none'"/>
                </source>
                <target>
                  <context value="tgt"/>
                  <contextType value="variable"/>
                  <element value="status"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="cancelled"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="a1050460"/>
                <source>
                  <context value="val"/>
                  <condition value="val.code != 'none'"/>
                </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"/>
                  <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>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de30"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de30"/>
      <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-cheb21s2de30"/>
      <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.B21S2.DE30"/>
        </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="1f15315a"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="d84b6a8b"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B21S2.DE30') and answer.exists()"/>
        </source>
        <rule>
          <name value="bdab9370"/>
          <source>
            <context value="item"/>
            <element value="answer"/>
            <listMode value="first"/>
            <variable value="a"/>
          </source>
          <rule>
            <name value="final-cheb21s2de30"/>
            <source>
              <context value="a"/>
              <condition value="a.value = true"/>
            </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>
            <name value="notfound-cheb21s2de30"/>
            <source>
              <context value="a"/>
              <condition value="a.value = false"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cancelled"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueBoolean value="false"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb21s2de31"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb21s2de31"/>
      <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-cheb21s2de31"/>
      <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.B21S2.DE31"/>
        </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="ed912153"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'no-yi-sever-wo-dehydra'"/>
      </source>
      <rule>
        <name value="1a309728"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B21S2.DE31') and answer.exists()"/>
        </source>
        <rule>
          <name value="bdab9370"/>
          <source>
            <context value="item"/>
            <element value="answer"/>
            <listMode value="first"/>
            <variable value="a"/>
          </source>
          <rule>
            <name value="final-cheb21s2de31"/>
            <source>
              <context value="a"/>
              <condition value="a.value = true"/>
            </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>
            <name value="notfound-cheb21s2de31"/>
            <source>
              <context value="a"/>
              <condition value="a.value = false"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cancelled"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueBoolean value="false"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
</StructureMap>