WHO FHIR Implementation Guide (IG): Integrated Management of Childhood Illness (IMCI) in emergencies
0.1.0 - release
WHO FHIR Implementation Guide (IG): Integrated Management of Childhood Illness (IMCI) in emergencies, published by World Health Organization (WHO). This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/WorldHealthOrganization/smart-emcare/tree/main and changes regularly. See the Directory of published versions
Built from commit 750268bd.
| Official URL: https://smart.who.int/ccc/StructureMap/Ccc.b7.lti-dangersigns | Version: 0.1.0 | |||
| Active as of 2026-04-07 | Computable Name: Ccc.b7.lti-dangersigns | |||
map "https://smart.who.int/ccc/StructureMap/Ccc.b7.lti-dangersigns" = "Ccc.b7.lti-dangersigns"
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://smart.who.int/ccc/StructureDefinition/observation" alias 'Observation' as target
uses "https://smart.who.int/ccc/StructureDefinition/Cccobservation" alias 'Ccc 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 = 'Ccc.B7.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 CccobservationCccb7de02(src, tgt) "004b4d1e";
} "92e7f5f9";
} "402826af";
} "8c26175a";
src.item first as item where (linkId = 'Ccc.B7-B8-B9.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 CccobservationCccb7b8b9de01(src, tgt) "ff2fa2ef";
} "a8c4cecd";
} "cab32791";
} "8f0ade51";
src.item first as itm1 where linkId = 'stable-child' then {
itm1.item first as item where (linkId = 'Ccc.B7.DE03') 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 CccobservationCccb7de03(src, tgt) "f2e89805";
} "8dded58a";
} "6d815194";
} "b1580360";
} "f9ff931c";
src.item first as itm1 where linkId = 'stable-child' then {
itm1.item first as item where (linkId = 'Ccc.B7.DE08b') 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 CccobservationCccb7de08b(src, tgt) "7c424dce";
} "090c71e8";
} "366ba7ba";
} "65aaf8e5";
} "340cad6a";
src.item first as itm1 where linkId = 'stable-child' then {
itm1.item first as item where (linkId = 'Ccc.B7.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 CccobservationCccb7de08(src, tgt) "279d6969";
} "20cc88b6";
} "3f40ba3d";
} "350d6fc4";
} "eaa550b2";
src.item first as itm1 where linkId = 'stable-child' then {
itm1.item first as item where (linkId = 'Ccc.B7.DE08a') 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 CccobservationCccb7de08a(src, tgt) "d2861aff";
} "7be6660a";
} "bd06a10d";
} "1343a39a";
} "d8ac86b0";
src.item first as itm1 where linkId = 'stable-child' then {
itm1.item first as item where (linkId = 'Ccc.B7.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 CccobservationCccb7de09(src, tgt) "3f6a9726";
} "2c4ac41f";
} "98869034";
} "0ea146b2";
} "dd9b5c52";
src.item first as itm1 where linkId = 'stable-child' then {
itm1.item first as item where (linkId = 'Ccc.B7.DE10') 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 CccobservationCccb7de10(src, tgt) "1fe53b0d";
} "0fb952bc";
} "980ae740";
} "5b813bca";
} "492052bb";
src.item first as itm1 where linkId = 'stable-child' then {
itm1.item first as itm2 where linkId = 'Ccc.B22.FluidTest' then {
itm2.item first as item where (linkId = 'Ccc.B22.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 CccobservationCccb22de08(src, tgt) "d34db40c";
} "bd8403a6";
} "09eb3e1a";
} "5b2cdf2b";
} "147ec831";
} "e1f072a2";
src.item first as itm1 where linkId = 'stable-child' then {
itm1.item first as itm2 where linkId = 'Ccc.B22.FluidTest' then {
itm2.item first as item where (linkId = 'Ccc.B22.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 CccobservationCccb22de14(src, tgt) "128f555c";
} "2cba61ee";
} "1eb502ac";
} "9758fd8e";
} "680dcb34";
} "8bc21454";
src.item first as itm1 where linkId = 'stable-child' then {
itm1.item first as itm2 where linkId = 'Ccc.B22.FluidTest' then {
itm2.item first as item where (linkId = 'Ccc.B22.DE14a') 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 CccobservationCccb22de14a(src, tgt) "7b46291c";
} "17f1508c";
} "64f82f5e";
} "d955cd1e";
} "29fc59e7";
} "5a220c96";
src.item first as itm1 where linkId = 'stable-child' then {
itm1.item first as itm2 where linkId = 'Ccc.B22.FluidTest' then {
itm2.item first as item where (linkId = 'Ccc.B22.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 CccobservationCccb22de15(src, tgt) "0d25d61c";
} "49095bbf";
} "7ffa5829";
} "408d099b";
} "f64298f5";
} "28f93c51";
src.item first as itm1 where linkId = 'stable-child' then {
itm1.item first as itm2 where linkId = 'Ccc.B22.FluidTest' then {
itm2.item first as item where (linkId = 'Ccc.B22.DE16') 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 CccobservationCccb22de16(src, tgt) "2bef72fa";
} "f426fdde";
} "f53bf22c";
} "756331ed";
} "bc80f5f5";
} "0636116b";
}
group CccobservationCccb7de02(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-Cccb7de02";
src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
src.subject as subject -> tgt.subject = subject, tgt.meta = create('Meta') as newMeta, newMeta.profile = 'https://smart.who.int/ccc/StructureDefinition/Cccobservation', tgt.code = create('CodeableConcept') as concept, concept.coding = create('Coding') as coding, coding.system = 'https://smart.who.int/ccc/CodeSystem/Ccc-custom-codes', coding.code = 'Ccc.B7.DE02' "code-Cccb7de02";
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 = 'Ccc.B7.DE02') and answer.exists() then {
item.answer first as a then {
a where a.value = true -> tgt.status = 'final', tgt.value = true "final-Cccb7de02";
a where a.value = false -> tgt.status = 'cancelled', tgt.value = false "notfound-Cccb7de02";
} "bdab9370";
} "25c89b41";
}
group CccobservationCccb7b8b9de01(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-Cccb7b8b9de01";
src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
src.subject as subject -> tgt.subject = subject, tgt.meta = create('Meta') as newMeta, newMeta.profile = 'https://smart.who.int/ccc/StructureDefinition/Cccobservation', tgt.code = create('CodeableConcept') as concept, concept.coding = create('Coding') as coding, coding.system = 'https://smart.who.int/ccc/CodeSystem/Ccc-custom-codes', coding.code = 'Ccc.B7-B8-B9.DE01' "code-Cccb7b8b9de01";
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 = 'Ccc.B7-B8-B9.DE01') and answer.exists() then {
item.answer first as a then {
a.value as val then {
val where val.code = 'none' -> tgt.swrapin_entry_createtatus = 'cancelled' "d0a13fda";
val where val.code != 'none' -> tgt.value = create('CodeableConcept') as cc, cc.coding = val, tgt.status = 'final' "a1050460";
} "310f4b1f";
} "6af9bfcc";
} "1deb5925";
}
group CccobservationCccb7de03(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-Cccb7de03";
src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
src.subject as subject -> tgt.subject = subject, tgt.meta = create('Meta') as newMeta, newMeta.profile = 'https://smart.who.int/ccc/StructureDefinition/Cccobservation', tgt.code = create('CodeableConcept') as concept, concept.coding = create('Coding') as coding, coding.system = 'https://smart.who.int/ccc/CodeSystem/Ccc-custom-codes', coding.code = 'Ccc.B7.DE03' "code-Cccb7de03";
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 = 'stable-child' then {
itm1.item first as item where (linkId = 'Ccc.B7.DE03') and answer.exists() then {
item.answer first as a then {
a where a.value = true -> tgt.status = 'final', tgt.value = true "final-Cccb7de03";
a where a.value = false -> tgt.status = 'cancelled', tgt.value = false "notfound-Cccb7de03";
} "bdab9370";
} "a2c65533";
} "06440f2e";
}
group CccobservationCccb7de08b(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-Cccb7de08b";
src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
src.subject as subject -> tgt.subject = subject, tgt.meta = create('Meta') as newMeta, newMeta.profile = 'https://smart.who.int/ccc/StructureDefinition/Cccobservation', tgt.code = create('CodeableConcept') as concept, concept.coding = create('Coding') as coding, coding.system = 'https://smart.who.int/ccc/CodeSystem/Ccc-custom-codes', coding.code = 'Ccc.B7.DE08b' "code-Cccb7de08b";
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 = 'stable-child' then {
itm1.item first as item where (linkId = 'Ccc.B7.DE08b') and answer.exists() then {
item.answer first as a then {
a where a.value = true -> tgt.status = 'final', tgt.value = true "final-Cccb7de08b";
a where a.value = false -> tgt.status = 'cancelled', tgt.value = false "notfound-Cccb7de08b";
} "bdab9370";
} "9b1cc305";
} "5c09828f";
}
group CccobservationCccb7de08(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-Cccb7de08";
src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
src.subject as subject -> tgt.subject = subject, tgt.meta = create('Meta') as newMeta, newMeta.profile = 'https://smart.who.int/ccc/StructureDefinition/Cccobservation', tgt.code = create('CodeableConcept') as concept, concept.coding = create('Coding') as coding, coding.system = 'https://smart.who.int/ccc/CodeSystem/Ccc-custom-codes', coding.code = 'Ccc.B7.DE08' "code-Cccb7de08";
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 = 'stable-child' then {
itm1.item first as item where (linkId = 'Ccc.B7.DE08') and answer.exists() then {
item.answer first as a then {
a where a.value = true -> tgt.status = 'final', tgt.value = true "final-Cccb7de08";
a where a.value = false -> tgt.status = 'cancelled', tgt.value = false "notfound-Cccb7de08";
} "bdab9370";
} "2bfe418a";
} "899ae4be";
}
group CccobservationCccb7de08a(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-Cccb7de08a";
src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
src.subject as subject -> tgt.subject = subject, tgt.meta = create('Meta') as newMeta, newMeta.profile = 'https://smart.who.int/ccc/StructureDefinition/Cccobservation', tgt.code = create('CodeableConcept') as concept, concept.coding = create('Coding') as coding, coding.system = 'https://smart.who.int/ccc/CodeSystem/Ccc-custom-codes', coding.code = 'Ccc.B7.DE08a' "code-Cccb7de08a";
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 = 'stable-child' then {
itm1.item first as item where (linkId = 'Ccc.B7.DE08a') and answer.exists() then {
item.answer first as a then {
a where a.value = true -> tgt.status = 'final', tgt.value = true "final-Cccb7de08a";
a where a.value = false -> tgt.status = 'cancelled', tgt.value = false "notfound-Cccb7de08a";
} "bdab9370";
} "f01cf4cb";
} "dffa204b";
}
group CccobservationCccb7de09(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-Cccb7de09";
src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
src.subject as subject -> tgt.subject = subject, tgt.meta = create('Meta') as newMeta, newMeta.profile = 'https://smart.who.int/ccc/StructureDefinition/Cccobservation', tgt.code = create('CodeableConcept') as concept, concept.coding = create('Coding') as coding, coding.system = 'https://smart.who.int/ccc/CodeSystem/Ccc-custom-codes', coding.code = 'Ccc.B7.DE09' "code-Cccb7de09";
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 = 'stable-child' then {
itm1.item first as item where (linkId = 'Ccc.B7.DE09') and answer.exists() then {
item.answer first as a then {
a where a.value = true -> tgt.status = 'final', tgt.value = true "final-Cccb7de09";
a where a.value = false -> tgt.status = 'cancelled', tgt.value = false "notfound-Cccb7de09";
} "bdab9370";
} "d2857a7f";
} "9311a6c3";
}
group CccobservationCccb7de10(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-Cccb7de10";
src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
src.subject as subject -> tgt.subject = subject, tgt.meta = create('Meta') as newMeta, newMeta.profile = 'https://smart.who.int/ccc/StructureDefinition/Cccobservation', tgt.code = create('CodeableConcept') as concept, concept.coding = create('Coding') as coding, coding.system = 'https://smart.who.int/ccc/CodeSystem/Ccc-custom-codes', coding.code = 'Ccc.B7.DE10' "code-Cccb7de10";
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 = 'stable-child' then {
itm1.item first as item where (linkId = 'Ccc.B7.DE10') and answer.exists() then {
item.answer first as a then {
a where a.value = true -> tgt.status = 'final', tgt.value = true "final-Cccb7de10";
a where a.value = false -> tgt.status = 'cancelled', tgt.value = false "notfound-Cccb7de10";
} "bdab9370";
} "86a60301";
} "d7b8fbb0";
}
group CccobservationCccb22de08(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-Cccb22de08";
src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
src.subject as subject -> tgt.subject = subject, tgt.meta = create('Meta') as newMeta, newMeta.profile = 'https://smart.who.int/ccc/StructureDefinition/Cccobservation', tgt.code = create('CodeableConcept') as concept, concept.coding = create('Coding') as coding, coding.system = 'https://smart.who.int/ccc/CodeSystem/Ccc-custom-codes', coding.code = 'Ccc.B22.DE08' "code-Cccb22de08";
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 = 'stable-child' then {
itm1.item first as itm2 where linkId = 'Ccc.B22.FluidTest' then {
itm2.item first as item where (linkId = 'Ccc.B22.DE08') and answer.exists() then {
item.answer first as a then {
a.value as val then {
val where val.code = 'none' -> tgt.swrapin_entry_createtatus = 'cancelled' "d0a13fda";
val where val.code != 'none' -> tgt.value = create('CodeableConcept') as cc, cc.coding = val, tgt.status = 'final' "a1050460";
} "310f4b1f";
} "6af9bfcc";
} "217a0abc";
} "1ebe5f9b";
} "4113c5c7";
}
group CccobservationCccb22de14(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-Cccb22de14";
src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
src.subject as subject -> tgt.subject = subject, tgt.meta = create('Meta') as newMeta, newMeta.profile = 'https://smart.who.int/ccc/StructureDefinition/Cccobservation', tgt.code = create('CodeableConcept') as concept, concept.coding = create('Coding') as coding, coding.system = 'https://smart.who.int/ccc/CodeSystem/Ccc-custom-codes', coding.code = 'Ccc.B22.DE14' "code-Cccb22de14";
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 = 'stable-child' then {
itm1.item first as itm2 where linkId = 'Ccc.B22.FluidTest' then {
itm2.item first as item where (linkId = 'Ccc.B22.DE14') and answer.exists() then {
item.answer first as a then {
a.value as val then {
val where val.code = 'true' -> tgt.status = 'final', tgt.value = true "8a65aaa5";
} "26c2c8c7";
} "721205d5";
} "b72aac92";
} "e7d47de7";
} "0204726e";
}
group CccobservationCccb22de14a(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-Cccb22de14a";
src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
src.subject as subject -> tgt.subject = subject, tgt.meta = create('Meta') as newMeta, newMeta.profile = 'https://smart.who.int/ccc/StructureDefinition/Cccobservation', tgt.code = create('CodeableConcept') as concept, concept.coding = create('Coding') as coding, coding.system = 'https://smart.who.int/ccc/CodeSystem/Ccc-custom-codes', coding.code = 'Ccc.B22.DE14a' "code-Cccb22de14a";
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 = 'stable-child' then {
itm1.item first as itm2 where linkId = 'Ccc.B22.FluidTest' then {
itm2.item first as item where (linkId = 'Ccc.B22.DE14a') and answer.exists() then {
item.answer first as a then {
a where a.value = true -> tgt.status = 'final', tgt.value = true "final-Cccb22de14a";
a where a.value = false -> tgt.status = 'cancelled', tgt.value = false "notfound-Cccb22de14a";
} "bdab9370";
} "120b0bc5";
} "ffa20ee2";
} "e1505882";
}
group CccobservationCccb22de15(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-Cccb22de15";
src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
src.subject as subject -> tgt.subject = subject, tgt.meta = create('Meta') as newMeta, newMeta.profile = 'https://smart.who.int/ccc/StructureDefinition/Cccobservation', tgt.code = create('CodeableConcept') as concept, concept.coding = create('Coding') as coding, coding.system = 'https://smart.who.int/ccc/CodeSystem/Ccc-custom-codes', coding.code = 'Ccc.B22.DE15' "code-Cccb22de15";
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 = 'stable-child' then {
itm1.item first as itm2 where linkId = 'Ccc.B22.FluidTest' then {
itm2.item first as item where (linkId = 'Ccc.B22.DE15') and answer.exists() then {
item.answer first as a then {
a where a.value = true -> tgt.status = 'final', tgt.value = true "final-Cccb22de15";
a where a.value = false -> tgt.status = 'cancelled', tgt.value = false "notfound-Cccb22de15";
} "bdab9370";
} "f886f65c";
} "0ff7ff35";
} "455546fc";
}
group CccobservationCccb22de16(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-Cccb22de16";
src.encounter as encounter -> tgt.encounter = encounter "35bc6b82";
src.subject as subject -> tgt.subject = subject, tgt.meta = create('Meta') as newMeta, newMeta.profile = 'https://smart.who.int/ccc/StructureDefinition/Cccobservation', tgt.code = create('CodeableConcept') as concept, concept.coding = create('Coding') as coding, coding.system = 'https://smart.who.int/ccc/CodeSystem/Ccc-custom-codes', coding.code = 'Ccc.B22.DE16' "code-Cccb22de16";
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 = 'stable-child' then {
itm1.item first as itm2 where linkId = 'Ccc.B22.FluidTest' then {
itm2.item first as item where (linkId = 'Ccc.B22.DE16') and answer.exists() then {
item.answer first as a then {
a.value as val then {
val where val.code = 'none' -> tgt.swrapin_entry_createtatus = 'cancelled' "d0a13fda";
val where val.code != 'none' -> tgt.value = create('CodeableConcept') as cc, cc.coding = val, tgt.status = 'final' "a1050460";
} "310f4b1f";
} "6af9bfcc";
} "56e7c54b";
} "270c6d04";
} "1b98a048";
}