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.b10-14.symptoms.2m.p - XML Representation

Active as of 2023-10-04

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="che.b10-14.symptoms.2m.p"/>
  <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.b10-14.symptoms.2m.p&quot; = &quot;che.b10-14.symptoms.2m.p&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.B10S1.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 cheobservationcheb10s1de05(src, tgt) &quot;16f80267&quot;;
      } &quot;aabbed89&quot;;
    } &quot;4aa4f9c7&quot;;
  } &quot;4d50fec0&quot;;
  src.item first as item where (linkId = 'CHE.B10S1.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 cheobservationcheb10s1de06(src, tgt) &quot;7e19d918&quot;;
      } &quot;ad5259c7&quot;;
    } &quot;1e36b7fd&quot;;
  } &quot;7a01be9e&quot;;
  src.item first as item where (linkId = 'CHE.B10S1.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 cheobservationcheb10s1de01(src, tgt) &quot;40af8bb2&quot;;
      } &quot;7ee0c1c0&quot;;
    } &quot;bc62666d&quot;;
  } &quot;e1280339&quot;;
  src.item first as item where (linkId = 'CHE.B10S1.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 cheobservationcheb10s1de02(src, tgt) &quot;21524619&quot;;
      } &quot;c2ac448d&quot;;
    } &quot;9a06c70b&quot;;
  } &quot;2e88166e&quot;;
  src.item first as item where (linkId = 'CHE.B11S1.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 cheobservationcheb11s1de01(src, tgt) &quot;7232330d&quot;;
      } &quot;a89341fa&quot;;
    } &quot;e6a989d1&quot;;
  } &quot;8c0342e5&quot;;
  src.item first as item where (linkId = 'CHE.B11S1.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 cheobservationcheb11s1de02(src, tgt) &quot;6658b6e2&quot;;
      } &quot;84ade848&quot;;
    } &quot;15e3f7ee&quot;;
  } &quot;c5bcb6d8&quot;;
  src.item first as item where (linkId = 'CHE.B11S1.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 cheobservationcheb11s1de05(src, tgt) &quot;10883ce6&quot;;
      } &quot;2894841b&quot;;
    } &quot;f03ed8cf&quot;;
  } &quot;af84f0ca&quot;;
  src.item first as item where (linkId = 'CHE.B12S1.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 cheobservationcheb12s1de02(src, tgt) &quot;283aeb36&quot;;
      } &quot;85333360&quot;;
    } &quot;63860c5d&quot;;
  } &quot;795f9ae0&quot;;
  src.item first as item where (linkId = 'CHE.B12S1.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 cheobservationcheb12s1de03(src, tgt) &quot;38461f82&quot;;
      } &quot;f66c9b3c&quot;;
    } &quot;c34568ae&quot;;
  } &quot;5a7de3e1&quot;;
  src.item first as item where (linkId = 'CHE.B12S1.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 cheobservationcheb12s1de06(src, tgt) &quot;57a73cc0&quot;;
      } &quot;7c496a1f&quot;;
    } &quot;4a58aa21&quot;;
  } &quot;00f4590f&quot;;
  src where src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE09') then {
    src.item first as item where (linkId = 'CHE.B12S1.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 then cheobservationcheb12s1de09t(src, tgt) &quot;79cd37ec&quot;;
        } &quot;2f2a6793&quot;;
      } &quot;d0bf98f3&quot;;
    } &quot;5806be37&quot;;
  } &quot;643167f6&quot;;
  src where src.item.where(linkId = 'CHE.B12S1.DE08').exists() and src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE09').empty() then {
    src.item first as item where (linkId = 'CHE.B12S1.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 then cheobservationcheb12s1de09f(src, tgt) &quot;8f15b438&quot;;
        } &quot;f9cc2b0b&quot;;
      } &quot;983b6c47&quot;;
    } &quot;c7a9eca8&quot;;
  } &quot;79fbf09a&quot;;
  src where src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE10') then {
    src.item first as item where (linkId = 'CHE.B12S1.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 then cheobservationcheb12s1de10t(src, tgt) &quot;8a93b04c&quot;;
        } &quot;818ebf1b&quot;;
      } &quot;03f17ddc&quot;;
    } &quot;3651c69d&quot;;
  } &quot;a567b94b&quot;;
  src where src.item.where(linkId = 'CHE.B12S1.DE08').exists() and src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE10').empty() then {
    src.item first as item where (linkId = 'CHE.B12S1.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 then cheobservationcheb12s1de10f(src, tgt) &quot;4a3029fd&quot;;
        } &quot;fc43c7cb&quot;;
      } &quot;8eefcfb5&quot;;
    } &quot;b9250512&quot;;
  } &quot;d42d336b&quot;;
  src where src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE11') then {
    src.item first as item where (linkId = 'CHE.B12S1.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 then cheobservationcheb12s1de11t(src, tgt) &quot;967b17fd&quot;;
        } &quot;fb6a49c5&quot;;
      } &quot;6ce09c94&quot;;
    } &quot;1f300184&quot;;
  } &quot;8d7d04f3&quot;;
  src where src.item.where(linkId = 'CHE.B12S1.DE08').exists() and src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE11').empty() then {
    src.item first as item where (linkId = 'CHE.B12S1.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 then cheobservationcheb12s1de11f(src, tgt) &quot;6434cdd4&quot;;
        } &quot;d2113ca8&quot;;
      } &quot;38e97246&quot;;
    } &quot;b45b3035&quot;;
  } &quot;4788737a&quot;;
  src where src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE12') then {
    src.item first as item where (linkId = 'CHE.B12S1.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 then cheobservationcheb12s1de12t(src, tgt) &quot;58ecb44b&quot;;
        } &quot;68280d07&quot;;
      } &quot;abaed0a5&quot;;
    } &quot;1032f806&quot;;
  } &quot;7062ee74&quot;;
  src where src.item.where(linkId = 'CHE.B12S1.DE08').exists() and src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE12').empty() then {
    src.item first as item where (linkId = 'CHE.B12S1.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 then cheobservationcheb12s1de12f(src, tgt) &quot;2c849047&quot;;
        } &quot;d2ded83b&quot;;
      } &quot;b46d0f91&quot;;
    } &quot;b7840725&quot;;
  } &quot;836ce9ab&quot;;
  src where src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE13') then {
    src.item first as item where (linkId = 'CHE.B12S1.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 then cheobservationcheb12s1de13t(src, tgt) &quot;3aaa48d0&quot;;
        } &quot;3a3f575b&quot;;
      } &quot;7bdf00d8&quot;;
    } &quot;e764c90c&quot;;
  } &quot;e9f6cf8a&quot;;
  src where src.item.where(linkId = 'CHE.B12S1.DE08').exists() and src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE13').empty() then {
    src.item first as item where (linkId = 'CHE.B12S1.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 then cheobservationcheb12s1de13f(src, tgt) &quot;7bd09f91&quot;;
        } &quot;3c42beb6&quot;;
      } &quot;6b56699b&quot;;
    } &quot;f0a4cb8b&quot;;
  } &quot;a241f2f8&quot;;
  src where src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE14') then {
    src.item first as item where (linkId = 'CHE.B12S1.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 then cheobservationcheb12s1de14t(src, tgt) &quot;12f1f76f&quot;;
        } &quot;6d1c50d7&quot;;
      } &quot;1c1d0c2f&quot;;
    } &quot;1585be65&quot;;
  } &quot;6880c464&quot;;
  src where src.item.where(linkId = 'CHE.B12S1.DE08').exists() and src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE14').empty() then {
    src.item first as item where (linkId = 'CHE.B12S1.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 then cheobservationcheb12s1de14f(src, tgt) &quot;b1b23040&quot;;
        } &quot;6980241f&quot;;
      } &quot;d82de7e9&quot;;
    } &quot;0f9207cd&quot;;
  } &quot;be827b5a&quot;;
  src.item first as item where (linkId = 'CHE.B12S1.DE15') and answer.exists() then {
    src -&gt; bundle.entry as entry then {
      src -&gt;  entry.request as request,  request.method = 'POST',  uuid() as uuid,  request.url = append('/Observation/', uuid) &quot;b50ac4c5&quot;;
      src -&gt; entry.resource = create('Observation') as tgt then {
        src -&gt; tgt then cheobservationcheb12s1de15(src, tgt) &quot;99638bce&quot;;
      } &quot;f8e3de25&quot;;
    } &quot;47469d4a&quot;;
  } &quot;146d4ccc&quot;;
  src.item first as item where (linkId = 'CHE.B12S1.DE19') 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 cheobservationcheb12s1de19(src, tgt) &quot;e774de1b&quot;;
      } &quot;f3513d5a&quot;;
    } &quot;d27ba0ad&quot;;
  } &quot;f4e4441d&quot;;
  src.item first as item where (linkId = 'CHE.B13S1.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 cheobservationcheb13s1de01(src, tgt) &quot;9dbeb3fa&quot;;
      } &quot;f61be0b2&quot;;
    } &quot;8640d472&quot;;
  } &quot;b3067aff&quot;;
  src.item first as item where (linkId = 'CHE.B13S1.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 cheobservationcheb13s1de02(src, tgt) &quot;07a28e4c&quot;;
      } &quot;fcd941cb&quot;;
    } &quot;5178713a&quot;;
  } &quot;1fd89885&quot;;
  src.item first as item where (linkId = 'CHE.B13S1.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 cheobservationcheb13s1de03(src, tgt) &quot;cbb1734e&quot;;
      } &quot;e8c2d4b7&quot;;
    } &quot;29444236&quot;;
  } &quot;66aa7e6d&quot;;
  src.item first as item where (linkId = 'CHE.B13S1.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 cheobservationcheb13s1de04(src, tgt) &quot;9a29f903&quot;;
      } &quot;75b05fa1&quot;;
    } &quot;eeff75e2&quot;;
  } &quot;309587dd&quot;;
  src.item first as item where (linkId = 'CHE.B14S1.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 cheobservationcheb14s1de01(src, tgt) &quot;ac5b621f&quot;;
      } &quot;a132a907&quot;;
    } &quot;5f1c4f9f&quot;;
  } &quot;44a570bb&quot;;
  src.item first as item where (linkId = 'CHE.B14S1.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 cheobservationcheb14s1de02(src, tgt) &quot;e283e352&quot;;
      } &quot;f40c62a7&quot;;
    } &quot;4d10c025&quot;;
  } &quot;3d4e6b10&quot;;
}

group cheobservationcheb10s1de05(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-cheb10s1de05&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.B10S1.DE05' &quot;code-cheb10s1de05&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.B10S1.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-cheb10s1de05&quot;;
      a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb10s1de05&quot;;
    } &quot;bdab9370&quot;;
  } &quot;8a75ae5b&quot;;
}

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

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

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

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

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

group cheobservationcheb11s1de05(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-cheb11s1de05&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.B11S1.DE05' &quot;code-cheb11s1de05&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.B11S1.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-cheb11s1de05&quot;;
      a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb11s1de05&quot;;
    } &quot;bdab9370&quot;;
  } &quot;8de4b24e&quot;;
}

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

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

group cheobservationcheb12s1de06(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-cheb12s1de06&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.B12S1.DE06' &quot;code-cheb12s1de06&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.B12S1.DE06') and answer.exists() then {
    item.answer first as a then {
      a where a.value = true -&gt;  tgt.status = 'final',  tgt.value = true &quot;final-cheb12s1de06&quot;;
      a where a.value = false -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;notfound-cheb12s1de06&quot;;
    } &quot;bdab9370&quot;;
  } &quot;3f7c2dd7&quot;;
}

group cheobservationcheb12s1de09t(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-cheobservationcheb12s1de09t&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.B12S1.DE09' &quot;code-cheobservationcheb12s1de09t&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 -&gt;  tgt.status = 'final',  tgt.value = true &quot;e9d639e1&quot;;
}

group cheobservationcheb12s1de09f(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-cheobservationcheb12s1de09f&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.B12S1.DE09' &quot;code-cheobservationcheb12s1de09f&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 -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;f21d6e36&quot;;
}

group cheobservationcheb12s1de10t(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-cheobservationcheb12s1de10t&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.B12S1.DE10' &quot;code-cheobservationcheb12s1de10t&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 -&gt;  tgt.status = 'final',  tgt.value = true &quot;e9d639e1&quot;;
}

group cheobservationcheb12s1de10f(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-cheobservationcheb12s1de10f&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.B12S1.DE10' &quot;code-cheobservationcheb12s1de10f&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 -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;f21d6e36&quot;;
}

group cheobservationcheb12s1de11t(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-cheobservationcheb12s1de11t&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.B12S1.DE11' &quot;code-cheobservationcheb12s1de11t&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 -&gt;  tgt.status = 'final',  tgt.value = true &quot;e9d639e1&quot;;
}

group cheobservationcheb12s1de11f(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-cheobservationcheb12s1de11f&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.B12S1.DE11' &quot;code-cheobservationcheb12s1de11f&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 -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;f21d6e36&quot;;
}

group cheobservationcheb12s1de12t(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-cheobservationcheb12s1de12t&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.B12S1.DE12' &quot;code-cheobservationcheb12s1de12t&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 -&gt;  tgt.status = 'final',  tgt.value = true &quot;e9d639e1&quot;;
}

group cheobservationcheb12s1de12f(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-cheobservationcheb12s1de12f&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.B12S1.DE12' &quot;code-cheobservationcheb12s1de12f&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 -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;f21d6e36&quot;;
}

group cheobservationcheb12s1de13t(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-cheobservationcheb12s1de13t&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.B12S1.DE13' &quot;code-cheobservationcheb12s1de13t&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 -&gt;  tgt.status = 'final',  tgt.value = true &quot;e9d639e1&quot;;
}

group cheobservationcheb12s1de13f(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-cheobservationcheb12s1de13f&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.B12S1.DE13' &quot;code-cheobservationcheb12s1de13f&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 -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;f21d6e36&quot;;
}

group cheobservationcheb12s1de14t(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-cheobservationcheb12s1de14t&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.B12S1.DE14' &quot;code-cheobservationcheb12s1de14t&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 -&gt;  tgt.status = 'final',  tgt.value = true &quot;e9d639e1&quot;;
}

group cheobservationcheb12s1de14f(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-cheobservationcheb12s1de14f&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.B12S1.DE14' &quot;code-cheobservationcheb12s1de14f&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 -&gt;  tgt.status = 'cancelled',  tgt.value = false &quot;f21d6e36&quot;;
}

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

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

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

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

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

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

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

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

</pre></div>
  </text>
  <url
       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureMap/che.b10-14.symptoms.2m.p"/>
  <version value="0.1.0"/>
  <name value="che.b10-14.symptoms.2m.p"/>
  <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="4d50fec0"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B10S1.DE05') and answer.exists()"/>
      </source>
      <rule>
        <name value="4aa4f9c7"/>
        <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="aabbed89"/>
          <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="16f80267"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb10s1de05"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="7a01be9e"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B10S1.DE06') and answer.exists()"/>
      </source>
      <rule>
        <name value="1e36b7fd"/>
        <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="ad5259c7"/>
          <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="7e19d918"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb10s1de06"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="e1280339"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B10S1.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="bc62666d"/>
        <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="7ee0c1c0"/>
          <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="40af8bb2"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb10s1de01"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="2e88166e"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B10S1.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="9a06c70b"/>
        <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="c2ac448d"/>
          <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="21524619"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb10s1de02"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="8c0342e5"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B11S1.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="e6a989d1"/>
        <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="a89341fa"/>
          <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="7232330d"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb11s1de01"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="c5bcb6d8"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B11S1.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="15e3f7ee"/>
        <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="84ade848"/>
          <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="6658b6e2"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb11s1de02"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="af84f0ca"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B11S1.DE05') and answer.exists()"/>
      </source>
      <rule>
        <name value="f03ed8cf"/>
        <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="2894841b"/>
          <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="10883ce6"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb11s1de05"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="795f9ae0"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B12S1.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="63860c5d"/>
        <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="85333360"/>
          <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="283aeb36"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb12s1de02"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="5a7de3e1"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B12S1.DE03') and answer.exists()"/>
      </source>
      <rule>
        <name value="c34568ae"/>
        <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="f66c9b3c"/>
          <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="38461f82"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb12s1de03"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="00f4590f"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B12S1.DE06') and answer.exists()"/>
      </source>
      <rule>
        <name value="4a58aa21"/>
        <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="7c496a1f"/>
          <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="57a73cc0"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb12s1de06"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="643167f6"/>
      <source>
        <context value="src"/>
        <condition
                   value="src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE09')"/>
      </source>
      <rule>
        <name value="5806be37"/>
        <source>
          <context value="src"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B12S1.DE08') and answer.exists()"/>
        </source>
        <rule>
          <name value="d0bf98f3"/>
          <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="2f2a6793"/>
            <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="79cd37ec"/>
              <source>
                <context value="src"/>
              </source>
              <dependent>
                <name value="cheobservationcheb12s1de09t"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="79fbf09a"/>
      <source>
        <context value="src"/>
        <condition
                   value="src.item.where(linkId = 'CHE.B12S1.DE08').exists() and src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE09').empty()"/>
      </source>
      <rule>
        <name value="c7a9eca8"/>
        <source>
          <context value="src"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B12S1.DE08') and answer.exists()"/>
        </source>
        <rule>
          <name value="983b6c47"/>
          <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="f9cc2b0b"/>
            <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="8f15b438"/>
              <source>
                <context value="src"/>
              </source>
              <dependent>
                <name value="cheobservationcheb12s1de09f"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="a567b94b"/>
      <source>
        <context value="src"/>
        <condition
                   value="src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE10')"/>
      </source>
      <rule>
        <name value="3651c69d"/>
        <source>
          <context value="src"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B12S1.DE08') and answer.exists()"/>
        </source>
        <rule>
          <name value="03f17ddc"/>
          <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="818ebf1b"/>
            <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="8a93b04c"/>
              <source>
                <context value="src"/>
              </source>
              <dependent>
                <name value="cheobservationcheb12s1de10t"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="d42d336b"/>
      <source>
        <context value="src"/>
        <condition
                   value="src.item.where(linkId = 'CHE.B12S1.DE08').exists() and src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE10').empty()"/>
      </source>
      <rule>
        <name value="b9250512"/>
        <source>
          <context value="src"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B12S1.DE08') and answer.exists()"/>
        </source>
        <rule>
          <name value="8eefcfb5"/>
          <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="fc43c7cb"/>
            <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="4a3029fd"/>
              <source>
                <context value="src"/>
              </source>
              <dependent>
                <name value="cheobservationcheb12s1de10f"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="8d7d04f3"/>
      <source>
        <context value="src"/>
        <condition
                   value="src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE11')"/>
      </source>
      <rule>
        <name value="1f300184"/>
        <source>
          <context value="src"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B12S1.DE08') and answer.exists()"/>
        </source>
        <rule>
          <name value="6ce09c94"/>
          <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="fb6a49c5"/>
            <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="967b17fd"/>
              <source>
                <context value="src"/>
              </source>
              <dependent>
                <name value="cheobservationcheb12s1de11t"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="4788737a"/>
      <source>
        <context value="src"/>
        <condition
                   value="src.item.where(linkId = 'CHE.B12S1.DE08').exists() and src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE11').empty()"/>
      </source>
      <rule>
        <name value="b45b3035"/>
        <source>
          <context value="src"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B12S1.DE08') and answer.exists()"/>
        </source>
        <rule>
          <name value="38e97246"/>
          <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="d2113ca8"/>
            <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="6434cdd4"/>
              <source>
                <context value="src"/>
              </source>
              <dependent>
                <name value="cheobservationcheb12s1de11f"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="7062ee74"/>
      <source>
        <context value="src"/>
        <condition
                   value="src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE12')"/>
      </source>
      <rule>
        <name value="1032f806"/>
        <source>
          <context value="src"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B12S1.DE08') and answer.exists()"/>
        </source>
        <rule>
          <name value="abaed0a5"/>
          <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="68280d07"/>
            <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="58ecb44b"/>
              <source>
                <context value="src"/>
              </source>
              <dependent>
                <name value="cheobservationcheb12s1de12t"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="836ce9ab"/>
      <source>
        <context value="src"/>
        <condition
                   value="src.item.where(linkId = 'CHE.B12S1.DE08').exists() and src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE12').empty()"/>
      </source>
      <rule>
        <name value="b7840725"/>
        <source>
          <context value="src"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B12S1.DE08') and answer.exists()"/>
        </source>
        <rule>
          <name value="b46d0f91"/>
          <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="d2ded83b"/>
            <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="2c849047"/>
              <source>
                <context value="src"/>
              </source>
              <dependent>
                <name value="cheobservationcheb12s1de12f"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="e9f6cf8a"/>
      <source>
        <context value="src"/>
        <condition
                   value="src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE13')"/>
      </source>
      <rule>
        <name value="e764c90c"/>
        <source>
          <context value="src"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B12S1.DE08') and answer.exists()"/>
        </source>
        <rule>
          <name value="7bdf00d8"/>
          <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="3a3f575b"/>
            <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="3aaa48d0"/>
              <source>
                <context value="src"/>
              </source>
              <dependent>
                <name value="cheobservationcheb12s1de13t"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="a241f2f8"/>
      <source>
        <context value="src"/>
        <condition
                   value="src.item.where(linkId = 'CHE.B12S1.DE08').exists() and src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE13').empty()"/>
      </source>
      <rule>
        <name value="f0a4cb8b"/>
        <source>
          <context value="src"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B12S1.DE08') and answer.exists()"/>
        </source>
        <rule>
          <name value="6b56699b"/>
          <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="3c42beb6"/>
            <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="7bd09f91"/>
              <source>
                <context value="src"/>
              </source>
              <dependent>
                <name value="cheobservationcheb12s1de13f"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="6880c464"/>
      <source>
        <context value="src"/>
        <condition
                   value="src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE14')"/>
      </source>
      <rule>
        <name value="1585be65"/>
        <source>
          <context value="src"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B12S1.DE08') and answer.exists()"/>
        </source>
        <rule>
          <name value="1c1d0c2f"/>
          <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="6d1c50d7"/>
            <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="12f1f76f"/>
              <source>
                <context value="src"/>
              </source>
              <dependent>
                <name value="cheobservationcheb12s1de14t"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="be827b5a"/>
      <source>
        <context value="src"/>
        <condition
                   value="src.item.where(linkId = 'CHE.B12S1.DE08').exists() and src.item.where(linkId = 'CHE.B12S1.DE08').answer.where(value.code = 'CHE.B12S1.DE14').empty()"/>
      </source>
      <rule>
        <name value="0f9207cd"/>
        <source>
          <context value="src"/>
          <element value="item"/>
          <listMode value="first"/>
          <variable value="item"/>
          <condition value="(linkId = 'CHE.B12S1.DE08') and answer.exists()"/>
        </source>
        <rule>
          <name value="d82de7e9"/>
          <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="6980241f"/>
            <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="b1b23040"/>
              <source>
                <context value="src"/>
              </source>
              <dependent>
                <name value="cheobservationcheb12s1de14f"/>
                <variable value="src"/>
                <variable value="tgt"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="146d4ccc"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B12S1.DE15') and answer.exists()"/>
      </source>
      <rule>
        <name value="47469d4a"/>
        <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="f8e3de25"/>
          <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="99638bce"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb12s1de15"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="f4e4441d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B12S1.DE19') and answer.exists()"/>
      </source>
      <rule>
        <name value="d27ba0ad"/>
        <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="f3513d5a"/>
          <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="e774de1b"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb12s1de19"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="b3067aff"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B13S1.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="8640d472"/>
        <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="f61be0b2"/>
          <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="9dbeb3fa"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb13s1de01"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="1fd89885"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B13S1.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="5178713a"/>
        <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="fcd941cb"/>
          <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="07a28e4c"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb13s1de02"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="66aa7e6d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B13S1.DE03') and answer.exists()"/>
      </source>
      <rule>
        <name value="29444236"/>
        <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="e8c2d4b7"/>
          <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="cbb1734e"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb13s1de03"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="309587dd"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B13S1.DE04') and answer.exists()"/>
      </source>
      <rule>
        <name value="eeff75e2"/>
        <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="75b05fa1"/>
          <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="9a29f903"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb13s1de04"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="44a570bb"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B14S1.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="5f1c4f9f"/>
        <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="a132a907"/>
          <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="ac5b621f"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb14s1de01"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="3d4e6b10"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B14S1.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="4d10c025"/>
        <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="f40c62a7"/>
          <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="e283e352"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="tgt"/>
              </parameter>
            </target>
            <dependent>
              <name value="cheobservationcheb14s1de02"/>
              <variable value="src"/>
              <variable value="tgt"/>
            </dependent>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb10s1de05"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb10s1de05"/>
      <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-cheb10s1de05"/>
      <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.B10S1.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="8a75ae5b"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B10S1.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-cheb10s1de05"/>
          <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-cheb10s1de05"/>
          <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="cheobservationcheb10s1de06"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb10s1de06"/>
      <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-cheb10s1de06"/>
      <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.B10S1.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="8d2e125f"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B10S1.DE06') and answer.exists()"/>
      </source>
      <rule>
        <name value="7c587a4b"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="4ca9082e"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="8ab1d7a5"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cancelled"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="a1050460"/>
            <source>
              <context value="val"/>
              <condition value="val.code != 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="val"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb10s1de01"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb10s1de01"/>
      <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-cheb10s1de01"/>
      <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.B10S1.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="92ed9fac"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B10S1.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="bdab9370"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="final-cheb10s1de01"/>
          <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-cheb10s1de01"/>
          <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="cheobservationcheb10s1de02"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb10s1de02"/>
      <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-cheb10s1de02"/>
      <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.B10S1.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="034b706b"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B10S1.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="7c587a4b"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="4ca9082e"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="8ab1d7a5"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cancelled"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="a1050460"/>
            <source>
              <context value="val"/>
              <condition value="val.code != 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="val"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb11s1de01"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb11s1de01"/>
      <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-cheb11s1de01"/>
      <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.B11S1.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="ef4c3c1a"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B11S1.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="bdab9370"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="final-cheb11s1de01"/>
          <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-cheb11s1de01"/>
          <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="cheobservationcheb11s1de02"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb11s1de02"/>
      <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-cheb11s1de02"/>
      <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.B11S1.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="8d01e149"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B11S1.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="7c587a4b"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="4ca9082e"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="8ab1d7a5"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cancelled"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="a1050460"/>
            <source>
              <context value="val"/>
              <condition value="val.code != 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="val"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb11s1de05"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb11s1de05"/>
      <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-cheb11s1de05"/>
      <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.B11S1.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="8de4b24e"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B11S1.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-cheb11s1de05"/>
          <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-cheb11s1de05"/>
          <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="cheobservationcheb12s1de02"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb12s1de02"/>
      <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-cheb12s1de02"/>
      <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.B12S1.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="d5b6d7ee"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B12S1.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="bdab9370"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="final-cheb12s1de02"/>
          <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-cheb12s1de02"/>
          <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="cheobservationcheb12s1de03"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb12s1de03"/>
      <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-cheb12s1de03"/>
      <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.B12S1.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="35c52583"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B12S1.DE03') and answer.exists()"/>
      </source>
      <rule>
        <name value="7c587a4b"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="4ca9082e"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="8ab1d7a5"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cancelled"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="a1050460"/>
            <source>
              <context value="val"/>
              <condition value="val.code != 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="val"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb12s1de06"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb12s1de06"/>
      <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-cheb12s1de06"/>
      <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.B12S1.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="3f7c2dd7"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B12S1.DE06') and answer.exists()"/>
      </source>
      <rule>
        <name value="bdab9370"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="final-cheb12s1de06"/>
          <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-cheb12s1de06"/>
          <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="cheobservationcheb12s1de09t"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb12s1de09t"/>
      <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-cheobservationcheb12s1de09t"/>
      <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.B12S1.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="e9d639e1"/>
      <source>
        <context value="src"/>
      </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>
  </group>
  <group>
    <name value="cheobservationcheb12s1de09f"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb12s1de09f"/>
      <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-cheobservationcheb12s1de09f"/>
      <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.B12S1.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="f21d6e36"/>
      <source>
        <context value="src"/>
      </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>
  </group>
  <group>
    <name value="cheobservationcheb12s1de10t"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb12s1de10t"/>
      <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-cheobservationcheb12s1de10t"/>
      <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.B12S1.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="e9d639e1"/>
      <source>
        <context value="src"/>
      </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>
  </group>
  <group>
    <name value="cheobservationcheb12s1de10f"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb12s1de10f"/>
      <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-cheobservationcheb12s1de10f"/>
      <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.B12S1.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="f21d6e36"/>
      <source>
        <context value="src"/>
      </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>
  </group>
  <group>
    <name value="cheobservationcheb12s1de11t"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb12s1de11t"/>
      <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-cheobservationcheb12s1de11t"/>
      <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.B12S1.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="e9d639e1"/>
      <source>
        <context value="src"/>
      </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>
  </group>
  <group>
    <name value="cheobservationcheb12s1de11f"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb12s1de11f"/>
      <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-cheobservationcheb12s1de11f"/>
      <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.B12S1.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="f21d6e36"/>
      <source>
        <context value="src"/>
      </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>
  </group>
  <group>
    <name value="cheobservationcheb12s1de12t"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb12s1de12t"/>
      <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-cheobservationcheb12s1de12t"/>
      <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.B12S1.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="e9d639e1"/>
      <source>
        <context value="src"/>
      </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>
  </group>
  <group>
    <name value="cheobservationcheb12s1de12f"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb12s1de12f"/>
      <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-cheobservationcheb12s1de12f"/>
      <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.B12S1.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="f21d6e36"/>
      <source>
        <context value="src"/>
      </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>
  </group>
  <group>
    <name value="cheobservationcheb12s1de13t"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb12s1de13t"/>
      <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-cheobservationcheb12s1de13t"/>
      <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.B12S1.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="e9d639e1"/>
      <source>
        <context value="src"/>
      </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>
  </group>
  <group>
    <name value="cheobservationcheb12s1de13f"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb12s1de13f"/>
      <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-cheobservationcheb12s1de13f"/>
      <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.B12S1.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="f21d6e36"/>
      <source>
        <context value="src"/>
      </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>
  </group>
  <group>
    <name value="cheobservationcheb12s1de14t"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb12s1de14t"/>
      <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-cheobservationcheb12s1de14t"/>
      <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.B12S1.DE14"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="aae7a11d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <variable value="itemtimestamp"/>
        <condition value="linkId = 'timestamp'"/>
      </source>
      <rule>
        <name value="7f22f29f"/>
        <source>
          <context value="itemtimestamp"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="atimestamp"/>
        </source>
        <rule>
          <name value="5af77f2c"/>
          <source>
            <context value="atimestamp"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="issued"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="patient"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="subject"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="e9d639e1"/>
      <source>
        <context value="src"/>
      </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>
  </group>
  <group>
    <name value="cheobservationcheb12s1de14f"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheobservationcheb12s1de14f"/>
      <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-cheobservationcheb12s1de14f"/>
      <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.B12S1.DE14"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="aae7a11d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <variable value="itemtimestamp"/>
        <condition value="linkId = 'timestamp'"/>
      </source>
      <rule>
        <name value="7f22f29f"/>
        <source>
          <context value="itemtimestamp"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="atimestamp"/>
        </source>
        <rule>
          <name value="5af77f2c"/>
          <source>
            <context value="atimestamp"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="issued"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="patient"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="subject"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="f21d6e36"/>
      <source>
        <context value="src"/>
      </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>
  </group>
  <group>
    <name value="cheobservationcheb12s1de15"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb12s1de15"/>
      <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-cheb12s1de15"/>
      <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.B12S1.DE15"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="aae7a11d"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <variable value="itemtimestamp"/>
        <condition value="linkId = 'timestamp'"/>
      </source>
      <rule>
        <name value="7f22f29f"/>
        <source>
          <context value="itemtimestamp"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="atimestamp"/>
        </source>
        <rule>
          <name value="5af77f2c"/>
          <source>
            <context value="atimestamp"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="issued"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="val"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="patient"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="subject"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="subject"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="cb39867b"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B12S1.DE15') and answer.exists()"/>
      </source>
      <rule>
        <name value="7c587a4b"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="4ca9082e"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="8ab1d7a5"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cancelled"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="a1050460"/>
            <source>
              <context value="val"/>
              <condition value="val.code != 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="val"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb12s1de19"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb12s1de19"/>
      <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-cheb12s1de19"/>
      <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.B12S1.DE19"/>
        </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="ad8627ab"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B12S1.DE19') 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-cheb12s1de19"/>
          <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-cheb12s1de19"/>
          <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="cheobservationcheb13s1de01"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb13s1de01"/>
      <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-cheb13s1de01"/>
      <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.B13S1.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="9ab58024"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B13S1.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="bdab9370"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="final-cheb13s1de01"/>
          <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-cheb13s1de01"/>
          <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="cheobservationcheb13s1de02"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb13s1de02"/>
      <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-cheb13s1de02"/>
      <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.B13S1.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="527ebab0"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B13S1.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="bdab9370"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="final-cheb13s1de02"/>
          <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-cheb13s1de02"/>
          <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="cheobservationcheb13s1de03"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb13s1de03"/>
      <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-cheb13s1de03"/>
      <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.B13S1.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="d91156a3"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B13S1.DE03') and answer.exists()"/>
      </source>
      <rule>
        <name value="7c587a4b"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="4ca9082e"/>
          <source>
            <context value="a"/>
            <element value="value"/>
            <variable value="val"/>
          </source>
          <rule>
            <name value="8ab1d7a5"/>
            <source>
              <context value="val"/>
              <condition value="val.code = 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="cancelled"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="a1050460"/>
            <source>
              <context value="val"/>
              <condition value="val.code != 'none'"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="value"/>
              <variable value="cc"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
            <target>
              <context value="cc"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="val"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="status"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="final"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="cheobservationcheb13s1de04"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb13s1de04"/>
      <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-cheb13s1de04"/>
      <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.B13S1.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="a242c946"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B13S1.DE04') 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-cheb13s1de04"/>
          <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-cheb13s1de04"/>
          <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="cheobservationcheb14s1de01"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb14s1de01"/>
      <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-cheb14s1de01"/>
      <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.B14S1.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="01f7d2cd"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B14S1.DE01') and answer.exists()"/>
      </source>
      <rule>
        <name value="bdab9370"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="final-cheb14s1de01"/>
          <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-cheb14s1de01"/>
          <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="cheobservationcheb14s1de02"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id-cheb14s1de02"/>
      <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-cheb14s1de02"/>
      <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.B14S1.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="7d623434"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <listMode value="first"/>
        <variable value="item"/>
        <condition value="(linkId = 'CHE.B14S1.DE02') and answer.exists()"/>
      </source>
      <rule>
        <name value="bdab9370"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="a"/>
        </source>
        <rule>
          <name value="final-cheb14s1de02"/>
          <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-cheb14s1de02"/>
          <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>
</StructureMap>