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.b6.measurements - XML Representation

Active as of 2023-10-04

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="che.b6.measurements"/>
  <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.b6.measurements&quot; = &quot;che.b6.measurements&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.B6.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 cheobservationcheb6de01(src, tgt) &quot;759c506c&quot;;
      } &quot;b050dbe4&quot;;
    } &quot;36acd5b8&quot;;
  } &quot;96688536&quot;;
  src.item first as item where (linkId = 'CHE.B6.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 cheobservationcheb6de02(src, tgt) &quot;64a6f17a&quot;;
      } &quot;7912f7f5&quot;;
    } &quot;2cd30c67&quot;;
  } &quot;fcf951dc&quot;;
  src.item first as item where (linkId = 'CHE.B6.DE03') 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 cheobservationcheb6de03(src, tgt) &quot;f1a0d13e&quot;;
      } &quot;963d6b43&quot;;
    } &quot;6550236e&quot;;
  } &quot;bcbb958a&quot;;
  src.item first as item where (linkId = 'CHE.B6.DE03A') 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 cheobservationcheb6de03a(src, tgt) &quot;8a611902&quot;;
      } &quot;7dc45b09&quot;;
    } &quot;53e61c12&quot;;
  } &quot;063dcb5f&quot;;
  src.item first as item where (linkId = 'CHE.B6.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 cheobservationcheb6de04(src, tgt) &quot;d6b2dbd7&quot;;
      } &quot;c472389d&quot;;
    } &quot;77b15e86&quot;;
  } &quot;e4378a0b&quot;;
  src.item first as item where (linkId = 'CHE.B6.DE05') 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 cheobservationcheb6de05(src, tgt) &quot;be427d6c&quot;;
      } &quot;75b9474f&quot;;
    } &quot;68ab0cf3&quot;;
  } &quot;bdc41345&quot;;
  src.item first as item where (linkId = 'CHE.B6.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 cheobservationcheb6de06(src, tgt) &quot;b2756ffd&quot;;
      } &quot;d583084c&quot;;
    } &quot;16b8c4e2&quot;;
  } &quot;a93983c1&quot;;
  src.item first as item where (linkId = 'CHE.B6.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 cheobservationcheb6de07(src, tgt) &quot;cf5bb18a&quot;;
      } &quot;88b3c48c&quot;;
    } &quot;40fe4f2b&quot;;
  } &quot;75349866&quot;;
  src.item first as item where (linkId = 'CHE.B6.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 cheobservationcheb6de08(src, tgt) &quot;48fc44ae&quot;;
      } &quot;02a2ad76&quot;;
    } &quot;ca4936d1&quot;;
  } &quot;6fa035c2&quot;;
  src.item first as itm1 where linkId = 'nan' then {
    itm1.item first as item where (linkId = 'CHE.B6.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 cheobservationcheb6de09(src, tgt) &quot;2c910c1d&quot;;
        } &quot;ac688541&quot;;
      } &quot;1b83dcb0&quot;;
    } &quot;7eb2f39f&quot;;
  } &quot;db6b24d1&quot;;
  src.item first as itm1 where linkId = 'nan' then {
    itm1.item first as item where (linkId = 'CHE.B6.DE10') 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 cheobservationcheb6de10(src, tgt) &quot;645ace98&quot;;
        } &quot;2c4726b5&quot;;
      } &quot;67463bf3&quot;;
    } &quot;99bf65e4&quot;;
  } &quot;b8235762&quot;;
  src.item first as itm1 where linkId = 'nan' then {
    itm1.item first as item where (linkId = 'CHE.B6.DE11') 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 cheobservationcheb6de11(src, tgt) &quot;00f97bed&quot;;
        } &quot;54590134&quot;;
      } &quot;53d167be&quot;;
    } &quot;f4f971be&quot;;
  } &quot;e3c37bc1&quot;;
  src.item first as itm1 where linkId = 'nan' then {
    itm1.item first as item where (linkId = 'CHE.B6.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 cheobservationcheb6de12(src, tgt) &quot;ebd17f2c&quot;;
        } &quot;bed3131b&quot;;
      } &quot;3cbb4018&quot;;
    } &quot;b7f2c387&quot;;
  } &quot;ef1f3db1&quot;;
  src.item first as itm1 where linkId = 'nan' then {
    itm1.item first as item where (linkId = 'CHE.B6.DE12a') 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 cheobservationcheb6de12a(src, tgt) &quot;0381f656&quot;;
        } &quot;d1760cb0&quot;;
      } &quot;b9ac835e&quot;;
    } &quot;268ceea5&quot;;
  } &quot;f354f065&quot;;
  src.item first as itm1 where linkId = 'nan' then {
    itm1.item first as item where (linkId = 'CHE.B6.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 cheobservationcheb6de13(src, tgt) &quot;dee81779&quot;;
        } &quot;dae1657f&quot;;
      } &quot;3f3880d4&quot;;
    } &quot;9cba2822&quot;;
  } &quot;9e911c64&quot;;
  src.item first as item where (linkId = 'CHE.B6.DE17') 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 cheobservationcheb6de17(src, tgt) &quot;4e58daa5&quot;;
      } &quot;eea540a9&quot;;
    } &quot;235e401b&quot;;
  } &quot;dbf656f7&quot;;
}

group cheobservationcheb6de01(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-cheb6de01&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.B6.DE01' &quot;code-cheb6de01&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.B6.DE01') and answer.exists() then {
    item.answer first as a then {
      a.value as val -&gt;  tgt.value = val,  tgt.status = 'final' &quot;afa0ccc0&quot;;
    } &quot;d40466ff&quot;;
  } &quot;05e38595&quot;;
}

group cheobservationcheb6de02(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-cheb6de02&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.B6.DE02' &quot;code-cheb6de02&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.B6.DE02') and answer.exists() then {
    item.answer first as a then {
      a.value as val then {
        val where val.code = 'CHE.B6.DE02' -&gt;  tgt.status = 'final',  tgt.value = true &quot;4c455bee&quot;;
      } &quot;7eb43d9f&quot;;
    } &quot;80862475&quot;;
  } &quot;fb38120a&quot;;
}

group cheobservationcheb6de03(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-cheb6de03&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.B6.DE03' &quot;code-cheb6de03&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.B6.DE03') and answer.exists() then {
    item.answer first as a then {
      a.value as val -&gt;  tgt.value = val,  tgt.status = 'final' &quot;afa0ccc0&quot;;
    } &quot;d40466ff&quot;;
  } &quot;7e4bcec7&quot;;
}

group cheobservationcheb6de03a(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-cheobservationcheb6de03a&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.B6.DE03A' &quot;code-cheobservationcheb6de03a&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.B6.DE03A') and answer.exists() then {
    item.answer first as a then {
      a where value = 'Low' then {
        a -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = create('Coding') as c,  c.code = 'Low',  c.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  tgt.status = 'final' &quot;f9b4a56b&quot;;
      } &quot;70911ad5&quot;;
      a where value = 'Normal' then {
        a -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = create('Coding') as c,  c.code = 'Normal',  c.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  tgt.status = 'final' &quot;d4c7e2f1&quot;;
      } &quot;7673921d&quot;;
      a where value = 'High' then {
        a -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = create('Coding') as c,  c.code = 'High',  c.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  tgt.status = 'final' &quot;6a061bec&quot;;
      } &quot;a67e1fa8&quot;;
      a where value = 'Very High' then {
        a -&gt;  tgt.value = create('CodeableConcept') as cc,  cc.coding = create('Coding') as c,  c.code = 'Very High',  c.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  tgt.status = 'final' &quot;b6176e12&quot;;
      } &quot;c3a301f6&quot;;
    } &quot;dab04994&quot;;
  } &quot;b2cf95fc&quot;;
}

group cheobservationcheb6de04(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-cheb6de04&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.B6.DE04' &quot;code-cheb6de04&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.B6.DE04') and answer.exists() then {
    item.answer first as a then {
      a.value as val then {
        val where val.code = 'CHE.B6.DE04' -&gt;  tgt.status = 'final',  tgt.value = true &quot;082a5a5b&quot;;
      } &quot;a1569413&quot;;
    } &quot;79f2356f&quot;;
  } &quot;e10475e2&quot;;
}

group cheobservationcheb6de05(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-cheb6de05&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.B6.DE05' &quot;code-cheb6de05&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.B6.DE05') and answer.exists() then {
    item.answer first as a then {
      a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb6de05&quot;;
      a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb6de05&quot;;
    } &quot;bdab9370&quot;;
  } &quot;2b7bfcfb&quot;;
}

group cheobservationcheb6de06(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-cheb6de06&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.B6.DE06' &quot;code-cheb6de06&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.B6.DE06') and answer.exists() then {
    item.answer first as a then {
      a.value as val -&gt;  tgt.value = val,  tgt.status = 'final' &quot;afa0ccc0&quot;;
    } &quot;d40466ff&quot;;
  } &quot;7fb9e270&quot;;
}

group cheobservationcheb6de07(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-cheb6de07&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.B6.DE07' &quot;code-cheb6de07&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.B6.DE07') and answer.exists() then {
    item.answer first as a then {
      a.value as val then {
        val where val.code = 'CHE.B6.DE07' -&gt;  tgt.status = 'final',  tgt.value = true &quot;7244c96c&quot;;
      } &quot;14a0e441&quot;;
    } &quot;a0df1df0&quot;;
  } &quot;d420551b&quot;;
}

group cheobservationcheb6de08(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-cheb6de08&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.B6.DE08' &quot;code-cheb6de08&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.B6.DE08') and answer.exists() then {
    item.answer first as a then {
      a.value as val -&gt;  tgt.value = val,  tgt.status = 'final' &quot;afa0ccc0&quot;;
    } &quot;d40466ff&quot;;
  } &quot;9d5ae717&quot;;
}

group cheobservationcheb6de09(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-cheb6de09&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.B6.DE09' &quot;code-cheb6de09&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 = 'nan' then {
    itm1.item first as item where (linkId = 'CHE.B6.DE09') and answer.exists() then {
      item.answer first as a then {
        a.value as val -&gt;  tgt.value = val,  tgt.status = 'final' &quot;afa0ccc0&quot;;
      } &quot;d40466ff&quot;;
    } &quot;00bc55d3&quot;;
  } &quot;c2a32317&quot;;
}

group cheobservationcheb6de10(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-cheb6de10&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.B6.DE10' &quot;code-cheb6de10&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 = 'nan' then {
    itm1.item first as item where (linkId = 'CHE.B6.DE10') and answer.exists() then {
      item.answer first as a then {
        a.value as val then {
          val where val.code = 'CHE.B6.DE10' -&gt;  tgt.status = 'final',  tgt.value = true &quot;2cd83909&quot;;
        } &quot;030ed792&quot;;
      } &quot;ea3fb971&quot;;
    } &quot;63d668d5&quot;;
  } &quot;2eb69970&quot;;
}

group cheobservationcheb6de11(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-cheb6de11&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.B6.DE11' &quot;code-cheb6de11&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 = 'nan' then {
    itm1.item first as item where (linkId = 'CHE.B6.DE11') and answer.exists() then {
      item.answer first as a then {
        a.value as val then {
          val where val.code = 'CHE.B6.DE11' -&gt;  tgt.status = 'final',  tgt.value = true &quot;f6021a2f&quot;;
        } &quot;acf546ac&quot;;
      } &quot;7f1a42c4&quot;;
    } &quot;87e070ed&quot;;
  } &quot;a542c74d&quot;;
}

group cheobservationcheb6de12(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-cheb6de12&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.B6.DE12' &quot;code-cheb6de12&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 = 'nan' then {
    itm1.item first as item where (linkId = 'CHE.B6.DE12') and answer.exists() then {
      item.answer first as a then {
        a.value as val -&gt;  tgt.value = val,  tgt.status = 'final' &quot;afa0ccc0&quot;;
      } &quot;d40466ff&quot;;
    } &quot;5d6fd97e&quot;;
  } &quot;8291c0aa&quot;;
}

group cheobservationcheb6de12a(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-cheb6de12a&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.B6.DE12a' &quot;code-cheb6de12a&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 = 'nan' then {
    itm1.item first as item where (linkId = 'CHE.B6.DE12a') and answer.exists() then {
      item.answer first as a then {
        a.value as val then {
          val where val.code = 'CHE.B6.DE12a' -&gt;  tgt.status = 'final',  tgt.value = true &quot;ed79a8dc&quot;;
        } &quot;0af43c26&quot;;
      } &quot;c69413aa&quot;;
    } &quot;c98bbe8a&quot;;
  } &quot;76aa2893&quot;;
}

group cheobservationcheb6de13(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-cheb6de13&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.B6.DE13' &quot;code-cheb6de13&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 = 'nan' then {
    itm1.item first as item where (linkId = 'CHE.B6.DE13') and answer.exists() then {
      item.answer first as a then {
        a.value as val then {
          val where val.code = 'CHE.B6.DE13' -&gt;  tgt.status = 'final',  tgt.value = true &quot;87dd52a6&quot;;
        } &quot;00cf19b6&quot;;
      } &quot;35ef5c53&quot;;
    } &quot;5150a99c&quot;;
  } &quot;c4bfe5ef&quot;;
}

group cheobservationcheb6de17(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-cheb6de17&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.B6.DE17' &quot;code-cheb6de17&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.B6.DE17') and answer.exists() then {
    item.answer first as a then {
      a.value as val -&gt;  tgt.value = val,  tgt.status = 'final' &quot;afa0ccc0&quot;;
    } &quot;d40466ff&quot;;
  } &quot;d57c5745&quot;;
}

</pre></div>
  </text>
  <url
       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureMap/che.b6.measurements"/>
  <version value="0.1.0"/>
  <name value="che.b6.measurements"/>
  <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="96688536"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="36acd5b8"/>
        <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="b050dbe4"/>
          <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="759c506c"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb6de01"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="fcf951dc"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="2cd30c67"/>
        <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="7912f7f5"/>
          <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="64a6f17a"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb6de02"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="bcbb958a"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE03') and answer.exists()"/>
      </source>
      <rule>
        <name value="6550236e"/>
        <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="963d6b43"/>
          <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="f1a0d13e"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb6de03"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="063dcb5f"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE03A') and answer.exists()"/>
      </source>
      <rule>
        <name value="53e61c12"/>
        <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="7dc45b09"/>
          <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="8a611902"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb6de03a"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="e4378a0b"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE04') and answer.exists()"/>
      </source>
      <rule>
        <name value="77b15e86"/>
        <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="c472389d"/>
          <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="d6b2dbd7"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb6de04"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="bdc41345"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE05') and answer.exists()"/>
      </source>
      <rule>
        <name value="68ab0cf3"/>
        <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="75b9474f"/>
          <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="be427d6c"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb6de05"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="a93983c1"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE06') and answer.exists()"/>
      </source>
      <rule>
        <name value="16b8c4e2"/>
        <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="d583084c"/>
          <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="b2756ffd"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb6de06"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="75349866"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE07') and answer.exists()"/>
      </source>
      <rule>
        <name value="40fe4f2b"/>
        <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="88b3c48c"/>
          <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="cf5bb18a"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb6de07"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="6fa035c2"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE08') and answer.exists()"/>
      </source>
      <rule>
        <name value="ca4936d1"/>
        <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="02a2ad76"/>
          <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="48fc44ae"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb6de08"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="db6b24d1"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'nan'"/>
      </source>
      <rule>
        <name value="7eb2f39f"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B6.DE09') and answer.exists()"/>
        </source>
        <rule>
          <name value="1b83dcb0"/>
          <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="ac688541"/>
            <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="2c910c1d"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <contextType value="variable"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="tgt"/>
                </parameter>
              </target>
              <dependent>
                <name value="cheobservationcheb6de09"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="b8235762"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'nan'"/>
      </source>
      <rule>
        <name value="99bf65e4"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B6.DE10') and answer.exists()"/>
        </source>
        <rule>
          <name value="67463bf3"/>
          <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="2c4726b5"/>
            <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="645ace98"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <contextType value="variable"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="tgt"/>
                </parameter>
              </target>
              <dependent>
                <name value="cheobservationcheb6de10"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="e3c37bc1"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'nan'"/>
      </source>
      <rule>
        <name value="f4f971be"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B6.DE11') and answer.exists()"/>
        </source>
        <rule>
          <name value="53d167be"/>
          <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="54590134"/>
            <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="00f97bed"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <contextType value="variable"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="tgt"/>
                </parameter>
              </target>
              <dependent>
                <name value="cheobservationcheb6de11"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="ef1f3db1"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'nan'"/>
      </source>
      <rule>
        <name value="b7f2c387"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B6.DE12') and answer.exists()"/>
        </source>
        <rule>
          <name value="3cbb4018"/>
          <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="bed3131b"/>
            <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="ebd17f2c"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <contextType value="variable"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="tgt"/>
                </parameter>
              </target>
              <dependent>
                <name value="cheobservationcheb6de12"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="f354f065"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'nan'"/>
      </source>
      <rule>
        <name value="268ceea5"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B6.DE12a') and answer.exists()"/>
        </source>
        <rule>
          <name value="b9ac835e"/>
          <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="d1760cb0"/>
            <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="0381f656"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <contextType value="variable"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="tgt"/>
                </parameter>
              </target>
              <dependent>
                <name value="cheobservationcheb6de12a"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="9e911c64"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'nan'"/>
      </source>
      <rule>
        <name value="9cba2822"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B6.DE13') and answer.exists()"/>
        </source>
        <rule>
          <name value="3f3880d4"/>
          <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="dae1657f"/>
            <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="dee81779"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <contextType value="variable"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="tgt"/>
                </parameter>
              </target>
              <dependent>
                <name value="cheobservationcheb6de13"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="dbf656f7"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE17') and answer.exists()"/>
      </source>
      <rule>
        <name value="235e401b"/>
        <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="eea540a9"/>
          <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="4e58daa5"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb6de17"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de01"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de01"/>
      <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-cheb6de01"/>
      <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.B6.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="05e38595"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="d40466ff"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="afa0ccc0"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="final"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de02"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de02"/>
      <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-cheb6de02"/>
      <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.B6.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="fb38120a"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="80862475"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="7eb43d9f"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="4c455bee"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'CHE.B6.DE02'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueBoolean value="true"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de03"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de03"/>
      <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-cheb6de03"/>
      <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.B6.DE03"/>
        </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="7e4bcec7"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE03') and answer.exists()"/>
      </source>
      <rule>
        <name value="d40466ff"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="afa0ccc0"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="final"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de03a"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb6de03a"/>
      <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-cheobservationcheb6de03a"/>
      <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.B6.DE03A"/>
        </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="b2cf95fc"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE03A') and answer.exists()"/>
      </source>
      <rule>
        <name value="dab04994"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="70911ad5"/>
          <source>
            <context value="a"/>
            <condition value="value = 'Low'"/>
          </source>
          <rule>
            <name value="f9b4a56b"/>
            <source>
              <context value="a"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <variable value="c"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Coding"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="code"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="Low"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
        <rule>
          <name value="7673921d"/>
          <source>
            <context value="a"/>
            <condition value="value = 'Normal'"/>
          </source>
          <rule>
            <name value="d4c7e2f1"/>
            <source>
              <context value="a"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <variable value="c"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Coding"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="code"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="Normal"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
        <rule>
          <name value="a67e1fa8"/>
          <source>
            <context value="a"/>
            <condition value="value = 'High'"/>
          </source>
          <rule>
            <name value="6a061bec"/>
            <source>
              <context value="a"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <variable value="c"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Coding"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="code"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="High"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
        <rule>
          <name value="c3a301f6"/>
          <source>
            <context value="a"/>
            <condition value="value = 'Very High'"/>
          </source>
          <rule>
            <name value="b6176e12"/>
            <source>
              <context value="a"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <variable value="c"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Coding"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="code"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="Very High"/>
              </parameter>
            </target>
            <target>
              <context value="c"/>
              <contextType value="variable"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de04"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de04"/>
      <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-cheb6de04"/>
      <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.B6.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="e10475e2"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE04') and answer.exists()"/>
      </source>
      <rule>
        <name value="79f2356f"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="a1569413"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="082a5a5b"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'CHE.B6.DE04'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueBoolean value="true"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de05"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de05"/>
      <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-cheb6de05"/>
      <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.B6.DE05"/>
        </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="2b7bfcfb"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE05') 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-cheb6de05"/>
          <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-cheb6de05"/>
          <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="cheobservationcheb6de06"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de06"/>
      <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-cheb6de06"/>
      <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.B6.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="7fb9e270"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE06') and answer.exists()"/>
      </source>
      <rule>
        <name value="d40466ff"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="afa0ccc0"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="final"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de07"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de07"/>
      <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-cheb6de07"/>
      <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.B6.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="d420551b"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE07') and answer.exists()"/>
      </source>
      <rule>
        <name value="a0df1df0"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="14a0e441"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="7244c96c"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'CHE.B6.DE07'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueBoolean value="true"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de08"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de08"/>
      <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-cheb6de08"/>
      <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.B6.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="9d5ae717"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE08') and answer.exists()"/>
      </source>
      <rule>
        <name value="d40466ff"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="afa0ccc0"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="final"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de09"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de09"/>
      <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-cheb6de09"/>
      <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.B6.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="c2a32317"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'nan'"/>
      </source>
      <rule>
        <name value="00bc55d3"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B6.DE09') and answer.exists()"/>
        </source>
        <rule>
          <name value="d40466ff"/>
          <source>
            <context value="item"/>
            <element value="answer"/>
            <listMode value="first"/>
            <variable value="a"/>
          </source>
          <rule>
            <name value="afa0ccc0"/>
            <source>
              <context value="a"/>
              <element value="value"/>
              <variable value="val"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="val"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de10"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de10"/>
      <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-cheb6de10"/>
      <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.B6.DE10"/>
        </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="2eb69970"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'nan'"/>
      </source>
      <rule>
        <name value="63d668d5"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B6.DE10') and answer.exists()"/>
        </source>
        <rule>
          <name value="ea3fb971"/>
          <source>
            <context value="item"/>
            <element value="answer"/>
            <listMode value="first"/>
            <variable value="a"/>
          </source>
          <rule>
            <name value="030ed792"/>
            <source>
              <context value="a"/>
              <element value="value"/>
              <variable value="val"/>
            </source>
            <rule>
              <name value="2cd83909"/>
              <source>
                <context value="val"/>
                <condition value="val.code = 'CHE.B6.DE10'"/>
              </source>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="status"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="final"/>
                </parameter>
              </target>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueBoolean value="true"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de11"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de11"/>
      <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-cheb6de11"/>
      <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.B6.DE11"/>
        </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="a542c74d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'nan'"/>
      </source>
      <rule>
        <name value="87e070ed"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B6.DE11') and answer.exists()"/>
        </source>
        <rule>
          <name value="7f1a42c4"/>
          <source>
            <context value="item"/>
            <element value="answer"/>
            <listMode value="first"/>
            <variable value="a"/>
          </source>
          <rule>
            <name value="acf546ac"/>
            <source>
              <context value="a"/>
              <element value="value"/>
              <variable value="val"/>
            </source>
            <rule>
              <name value="f6021a2f"/>
              <source>
                <context value="val"/>
                <condition value="val.code = 'CHE.B6.DE11'"/>
              </source>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="status"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="final"/>
                </parameter>
              </target>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueBoolean value="true"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de12"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de12"/>
      <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-cheb6de12"/>
      <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.B6.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="8291c0aa"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'nan'"/>
      </source>
      <rule>
        <name value="5d6fd97e"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B6.DE12') and answer.exists()"/>
        </source>
        <rule>
          <name value="d40466ff"/>
          <source>
            <context value="item"/>
            <element value="answer"/>
            <listMode value="first"/>
            <variable value="a"/>
          </source>
          <rule>
            <name value="afa0ccc0"/>
            <source>
              <context value="a"/>
              <element value="value"/>
              <variable value="val"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="val"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de12a"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de12a"/>
      <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-cheb6de12a"/>
      <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.B6.DE12a"/>
        </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="76aa2893"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'nan'"/>
      </source>
      <rule>
        <name value="c98bbe8a"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B6.DE12a') and answer.exists()"/>
        </source>
        <rule>
          <name value="c69413aa"/>
          <source>
            <context value="item"/>
            <element value="answer"/>
            <listMode value="first"/>
            <variable value="a"/>
          </source>
          <rule>
            <name value="0af43c26"/>
            <source>
              <context value="a"/>
              <element value="value"/>
              <variable value="val"/>
            </source>
            <rule>
              <name value="ed79a8dc"/>
              <source>
                <context value="val"/>
                <condition value="val.code = 'CHE.B6.DE12a'"/>
              </source>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="status"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="final"/>
                </parameter>
              </target>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueBoolean value="true"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de13"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de13"/>
      <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-cheb6de13"/>
      <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.B6.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="c4bfe5ef"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="itm1"/>
        <condition value="linkId = 'nan'"/>
      </source>
      <rule>
        <name value="5150a99c"/>
        <source>
          <context value="itm1"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B6.DE13') and answer.exists()"/>
        </source>
        <rule>
          <name value="35ef5c53"/>
          <source>
            <context value="item"/>
            <element value="answer"/>
            <listMode value="first"/>
            <variable value="a"/>
          </source>
          <rule>
            <name value="00cf19b6"/>
            <source>
              <context value="a"/>
              <element value="value"/>
              <variable value="val"/>
            </source>
            <rule>
              <name value="87dd52a6"/>
              <source>
                <context value="val"/>
                <condition value="val.code = 'CHE.B6.DE13'"/>
              </source>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="status"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="final"/>
                </parameter>
              </target>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueBoolean value="true"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb6de17"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb6de17"/>
      <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-cheb6de17"/>
      <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.B6.DE17"/>
        </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="d57c5745"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B6.DE17') and answer.exists()"/>
      </source>
      <rule>
        <name value="d40466ff"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="afa0ccc0"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="final"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
</StructureMap>