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

StructureMap: che.b18-2.signs.2.m.m

Official URL: https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureMap/che.b18-2.signs.2.m.m Version: 0.1.0
Active as of 2023-10-04 Computable Name: che.b18-2.signs.2.m.m
map "https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureMap/che.b18-2.signs.2.m.m" = "che.b18-2.signs.2.m.m"


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

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

group cheobservationcheb18s2de07(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb18s2de07";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B18S2.DE07' "code-cheb18s2de07";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as item where (linkId = 'CHE.B18S2.DE07') and answer.exists() then {
    item.answer first as a then {
      a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb18s2de07";
      a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb18s2de07";
    } "bdab9370";
  } "5ee0adbf";
}

group cheobservationcheb18s2de08(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb18s2de08";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B18S2.DE08' "code-cheb18s2de08";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as item where (linkId = 'CHE.B18S2.DE08') and answer.exists() then {
    item.answer first as a then {
      a.value as val then {
        val where val.code = 'none' -> tgt.status = 'cancelled' "8ab1d7a5";
        val where val.code != 'none' ->  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' "a1050460";
      } "4ca9082e";
    } "7c587a4b";
  } "fee2a645";
}

group cheobservationcheb18s2de12(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb18s2de12";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B18S2.DE12' "code-cheb18s2de12";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as item where (linkId = 'CHE.B18S2.DE12') and answer.exists() then {
    item.answer first as a then {
      a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb18s2de12";
      a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb18s2de12";
    } "bdab9370";
  } "f621ab4a";
}

group cheobservationcheb18s2de13(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb18s2de13";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B18S2.DE13' "code-cheb18s2de13";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as item where (linkId = 'CHE.B18S2.DE13') and answer.exists() then {
    item.answer first as a then {
      a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb18s2de13";
      a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb18s2de13";
    } "bdab9370";
  } "e95a060c";
}

group cheobservationcheb19s2de01(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb19s2de01";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B19S2.DE01' "code-cheb19s2de01";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as item where (linkId = 'CHE.B19S2.DE01') and answer.exists() then {
    item.answer first as a then {
      a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb19s2de01";
      a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb19s2de01";
    } "bdab9370";
  } "80f27969";
}

group cheobservationcheb19s2de02(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb19s2de02";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B19S2.DE02' "code-cheb19s2de02";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as item where (linkId = 'CHE.B19S2.DE02') and answer.exists() then {
    item.answer first as a then {
      a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb19s2de02";
      a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb19s2de02";
    } "bdab9370";
  } "c03fae10";
}

group cheobservationcheb19s2de04(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb19s2de04";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B19S2.DE04' "code-cheb19s2de04";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as item where (linkId = 'CHE.B19S2.DE04') and answer.exists() then {
    item.answer first as a then {
      a.value as val then {
        val where val.code = 'none' -> tgt.status = 'cancelled' "8ab1d7a5";
        val where val.code != 'none' ->  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' "a1050460";
      } "4ca9082e";
    } "7c587a4b";
  } "f5b28914";
}

group cheobservationcheb20s2de01(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb20s2de01";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B20S2.DE01' "code-cheb20s2de01";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'dhrea' then {
    itm1.item first as item where (linkId = 'CHE.B20S2.DE01') and answer.exists() then {
      item.answer first as a then {
        a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb20s2de01";
        a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb20s2de01";
      } "bdab9370";
    } "2dccf640";
  } "667c8fcc";
}

group cheobservationcheb20s2de02(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb20s2de02";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B20S2.DE02' "code-cheb20s2de02";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'dhrea' then {
    itm1.item first as item where (linkId = 'CHE.B20S2.DE02') and answer.exists() then {
      item.answer first as a then {
        a.value as val then {
          val where val.code = 'none' -> tgt.status = 'cancelled' "8ab1d7a5";
          val where val.code != 'none' ->  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' "a1050460";
        } "4ca9082e";
      } "7c587a4b";
    } "7c20c96c";
  } "ce1e6510";
}

group cheobservationcheb20s2de06(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb20s2de06";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B20S2.DE06' "code-cheb20s2de06";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'dhrea' then {
    itm1.item first as item where (linkId = 'CHE.B20S2.DE06') and answer.exists() then {
      item.answer first as a then {
        a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb20s2de06";
        a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb20s2de06";
      } "bdab9370";
    } "dcdddef6";
  } "f2e136dd";
}

group cheobservationcheb21s2de01(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de01";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE01' "code-cheb21s2de01";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as item where (linkId = 'CHE.B21S2.DE01') and answer.exists() then {
    item.answer first as a then {
      a.value as val then {
        val where val.code = 'none' -> tgt.status = 'cancelled' "8ab1d7a5";
        val where val.code != 'none' ->  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' "a1050460";
      } "4ca9082e";
    } "7c587a4b";
  } "111fe259";
}

group cheobservationcheb21s2de06(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de06";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE06' "code-cheb21s2de06";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'bf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE06') and answer.exists() then {
        item.answer first as a then {
          a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb21s2de06";
          a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb21s2de06";
        } "bdab9370";
      } "f4483b41";
    } "086306ea";
  } "c9f4024f";
}

group cheobservationcheb21s2de07(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de07";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE07' "code-cheb21s2de07";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'bf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE07') and answer.exists() then {
        item.answer first as a then {
          a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb21s2de07";
          a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb21s2de07";
        } "bdab9370";
      } "ac8b143d";
    } "4bcac4eb";
  } "f0040203";
}

group cheobservationcheb21s2de08(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de08";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE08' "code-cheb21s2de08";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'bf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE08') and answer.exists() then {
        item.answer first as a then {
          a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb21s2de08";
          a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb21s2de08";
        } "bdab9370";
      } "a4649541";
    } "5b9f25f0";
  } "eaac7444";
}

group cheobservationcheb21s2de09(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de09";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE09' "code-cheb21s2de09";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE09') and answer.exists() then {
        item.answer first as a then {
          a.value as val then {
            val where val.code = 'none' -> tgt.status = 'cancelled' "8ab1d7a5";
            val where val.code != 'none' ->  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' "a1050460";
          } "4ca9082e";
        } "7c587a4b";
      } "adbf5bbd";
    } "0b7591de";
  } "74b66daf";
}

group cheobservationcheb21s2de12(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de12";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE12' "code-cheb21s2de12";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE12') and answer.exists() then {
        item.answer first as a then {
          a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb21s2de12";
          a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb21s2de12";
        } "bdab9370";
      } "b7b04b56";
    } "b9611401";
  } "69100ab8";
}

group cheobservationcheb21s2de13(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de13";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE13' "code-cheb21s2de13";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE13') and answer.exists() then {
        item.answer first as a then {
          a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb21s2de13";
          a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb21s2de13";
        } "bdab9370";
      } "1200d0e6";
    } "3b187ae1";
  } "5b2b0b27";
}

group cheobservationcheb21s2de14(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de14";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE14' "code-cheb21s2de14";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE14') and answer.exists() then {
        item.answer first as a then {
          a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb21s2de14";
          a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb21s2de14";
        } "bdab9370";
      } "f7b76aba";
    } "b7d93803";
  } "45cba18d";
}

group cheobservationcheb21s2de15(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de15";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE15' "code-cheb21s2de15";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE15') and answer.exists() then {
        item.answer first as a then {
          a.value as val then {
            val where val.code = 'none' -> tgt.status = 'cancelled' "8ab1d7a5";
            val where val.code != 'none' ->  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' "a1050460";
          } "4ca9082e";
        } "7c587a4b";
      } "a1a28f4b";
    } "c1b76be3";
  } "af60327b";
}

group cheobservationcheb21s2de18(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de18";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE18' "code-cheb21s2de18";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE18') and answer.exists() then {
        item.answer first as a then {
          a.value as val then {
            val where val.code = 'none' -> tgt.status = 'cancelled' "8ab1d7a5";
            val where val.code != 'none' ->  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' "a1050460";
          } "4ca9082e";
        } "7c587a4b";
      } "6d05c082";
    } "46c38b26";
  } "99fd273f";
}

group cheobservationcheb21s2de21(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de21";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE21' "code-cheb21s2de21";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE21') and answer.exists() then {
        item.answer first as a then {
          a.value as val then {
            val where val.code = 'none' -> tgt.status = 'cancelled' "8ab1d7a5";
            val where val.code != 'none' ->  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' "a1050460";
          } "4ca9082e";
        } "7c587a4b";
      } "4c2ac59b";
    } "575cd038";
  } "50193ff4";
}

group cheobservationcheb21s2de24(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de24";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE24' "code-cheb21s2de24";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE24') and answer.exists() then {
        item.answer first as a then {
          a.value as val then {
            val where val.code = 'none' -> tgt.status = 'cancelled' "8ab1d7a5";
            val where val.code != 'none' ->  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' "a1050460";
          } "4ca9082e";
        } "7c587a4b";
      } "cc93afff";
    } "d84f2183";
  } "da2a4683";
}

group cheobservationcheb21s2de27(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de27";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE27' "code-cheb21s2de27";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as itm2 where linkId = 'ubf-asses' then {
      itm2.item first as item where (linkId = 'CHE.B21S2.DE27') and answer.exists() then {
        item.answer first as a then {
          a.value as val then {
            val where val.code = 'none' -> tgt.status = 'cancelled' "8ab1d7a5";
            val where val.code != 'none' ->  tgt.value = create('CodeableConcept') as cc,  cc.coding = val,  tgt.status = 'final' "a1050460";
          } "4ca9082e";
        } "7c587a4b";
      } "fe923a94";
    } "fac4f521";
  } "67b29315";
}

group cheobservationcheb21s2de30(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de30";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE30' "code-cheb21s2de30";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as item where (linkId = 'CHE.B21S2.DE30') and answer.exists() then {
      item.answer first as a then {
        a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb21s2de30";
        a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb21s2de30";
      } "bdab9370";
    } "d84b6a8b";
  } "1f15315a";
}

group cheobservationcheb21s2de31(source src, target tgt) {
  src ->  tgt.identifier = create('Identifier') as CodeID,  CodeID.system = 'http://hl7.org/fhir/namingsystem-identifier-type',  CodeID.use = 'official',  CodeID.value = 'uuid',  CodeID.id = uuid() "id-cheb21s2de31";
  src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
  src.subject as subject ->  tgt.subject = subject,  tgt.meta = create('Meta') as newMeta,  newMeta.profile = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/StructureDefinition/cheobservation',  tgt.code = create('CodeableConcept') as concept,  concept.coding = create('Coding') as coding,  coding.system = 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes',  coding.code = 'CHE.B21S2.DE31' "code-cheb21s2de31";
  src.item as itemtimestamp where linkId = 'timestamp' then {
    itemtimestamp.answer first as atimestamp then {
      atimestamp.value as val -> tgt.issued = val "5af77f2c";
    } "7f22f29f";
  } "aae7a11d";
  src.subject as subject -> tgt.subject = subject "patient";
  src.item first as itm1 where linkId = 'no-yi-sever-wo-dehydra' then {
    itm1.item first as item where (linkId = 'CHE.B21S2.DE31') and answer.exists() then {
      item.answer first as a then {
        a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-cheb21s2de31";
        a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-cheb21s2de31";
      } "bdab9370";
    } "1a309728";
  } "ed912153";
}