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/feature/update-canonical and changes regularly. See the Directory of published versions

## StructureMap: Ccc.b22.bronchodilatortest

Official URL: https://smart.who.int/ccc/StructureMap/Ccc.b22.bronchodilatortest | Version: 0.1.0
Active as of 2026-04-07 | Computable Name: Ccc.b22.bronchodilatortest

    map "https://smart.who.int/ccc/StructureMap/Ccc.b22.bronchodilatortest" = "Ccc.b22.bronchodilatortest"

    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 where src.item.where(linkId = 'Ccc.B22.DE17').answer.where(value.code = 'Ccc.B22.DE18') then {
        src.item first as item where (linkId = 'Ccc.B22.DE17') 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 then CccobservationCccb22de17Cccb22de18t(src, tgt) "4b4e3882";
            } "a29f448d";
          } "8c5fbec1";
        } "b0f57b45";
      } "21951d21";
      src where src.item.where(linkId = 'Ccc.B22.DE17').exists() and src.item.where(linkId = 'Ccc.B22.DE17').answer.where(value.code = 'Ccc.B22.DE18').empty() then {
        src.item first as item where (linkId = 'Ccc.B22.DE17') 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 then CccobservationCccb22de17Cccb22de18f(src, tgt) "4fd23ec4";
            } "e477bbcc";
          } "c329f1a7";
        } "78424877";
      } "c5976cd7";
      src where src.item.where(linkId = 'Ccc.B22.DE17').answer.where(value.code = 'Ccc.B22.DE19') then {
        src.item first as item where (linkId = 'Ccc.B22.DE17') 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 then CccobservationCccb22de17Cccb22de19t(src, tgt) "832556c2";
            } "25d864fa";
          } "d659dd64";
        } "5b545a39";
      } "5e2e09fd";
      src where src.item.where(linkId = 'Ccc.B22.DE17').exists() and src.item.where(linkId = 'Ccc.B22.DE17').answer.where(value.code = 'Ccc.B22.DE19').empty() then {
        src.item first as item where (linkId = 'Ccc.B22.DE17') 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 then CccobservationCccb22de17Cccb22de19f(src, tgt) "917126ea";
            } "4d341549";
          } "7cf5a310";
        } "c89d7013";
      } "9e5f2bdb";
      src where src.item.where(linkId = 'Ccc.B22.DE17').answer.where(value.code = 'Ccc.B22.DE20') then {
        src.item first as item where (linkId = 'Ccc.B22.DE17') 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 then CccobservationCccb22de17Cccb22de20t(src, tgt) "178da581";
            } "1e80b046";
          } "d67193a2";
        } "59186280";
      } "f429fd81";
      src where src.item.where(linkId = 'Ccc.B22.DE17').exists() and src.item.where(linkId = 'Ccc.B22.DE17').answer.where(value.code = 'Ccc.B22.DE20').empty() then {
        src.item first as item where (linkId = 'Ccc.B22.DE17') 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 then CccobservationCccb22de17Cccb22de20f(src, tgt) "4fa88d49";
            } "30a84474";
          } "25416983";
        } "7552e3d3";
      } "8363b35b";
      src where src.item.where(linkId = 'Ccc.B22.DE17').answer.where(value.code = 'Ccc.B22.DE21') then {
        src.item first as item where (linkId = 'Ccc.B22.DE17') 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 then CccobservationCccb22de17Cccb22de21t(src, tgt) "628bfa1d";
            } "0bf9d78c";
          } "b0fa129e";
        } "913a00ce";
      } "1561f370";
      src where src.item.where(linkId = 'Ccc.B22.DE17').exists() and src.item.where(linkId = 'Ccc.B22.DE17').answer.where(value.code = 'Ccc.B22.DE21').empty() then {
        src.item first as item where (linkId = 'Ccc.B22.DE17') 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 then CccobservationCccb22de17Cccb22de21f(src, tgt) "f42ef3e7";
            } "65279195";
          } "954bbaec";
        } "f61383c6";
      } "530338c0";
      src where src.item.where(linkId = 'Ccc.B22.DE17').answer.where(value.code = 'Ccc.B22.DE22') then {
        src.item first as item where (linkId = 'Ccc.B22.DE17') 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 then CccobservationCccb22de17Cccb22de22t(src, tgt) "a1caf2e7";
            } "cea3f121";
          } "f3d4e5ff";
        } "119d61d2";
      } "ba871435";
      src where src.item.where(linkId = 'Ccc.B22.DE17').exists() and src.item.where(linkId = 'Ccc.B22.DE17').answer.where(value.code = 'Ccc.B22.DE22').empty() then {
        src.item first as item where (linkId = 'Ccc.B22.DE17') 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 then CccobservationCccb22de17Cccb22de22f(src, tgt) "df402cb9";
            } "a7736492";
          } "0fd648ea";
        } "cad5ab21";
      } "e57a3dc1";
      src.item first as item where (linkId = 'Ccc.B22.DE22') 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 CccobservationCccb22de22(src, tgt) "b9010fac";
          } "109bcf94";
        } "88ceffcd";
      } "88960ea0";
      src.item first as item where (linkId = 'Ccc.B22.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 CccobservationCccb22de21(src, tgt) "7c45409d";
          } "ec6cbc70";
        } "2bc763d0";
      } "86c6f66b";
    }

    group CccobservationCccb22de17Cccb22de18t(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-CccobservationCccb22de17Cccb22de18t";
      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.DE17&Ccc.B22.DE18' "code-CccobservationCccb22de17Cccb22de18t";
      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 ->  tgt.status = 'final',  tgt.value = true "e9d639e1";
    }

    group CccobservationCccb22de17Cccb22de18f(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-CccobservationCccb22de17Cccb22de18f";
      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.DE17&Ccc.B22.DE18' "code-CccobservationCccb22de17Cccb22de18f";
      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 ->  tgt.status = 'cancelled',  tgt.value = false "f21d6e36";
    }

    group CccobservationCccb22de17Cccb22de19t(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-CccobservationCccb22de17Cccb22de19t";
      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.DE17&Ccc.B22.DE19' "code-CccobservationCccb22de17Cccb22de19t";
      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 ->  tgt.status = 'final',  tgt.value = true "e9d639e1";
    }

    group CccobservationCccb22de17Cccb22de19f(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-CccobservationCccb22de17Cccb22de19f";
      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.DE17&Ccc.B22.DE19' "code-CccobservationCccb22de17Cccb22de19f";
      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 ->  tgt.status = 'cancelled',  tgt.value = false "f21d6e36";
    }

    group CccobservationCccb22de17Cccb22de20t(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-CccobservationCccb22de17Cccb22de20t";
      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.DE17&Ccc.B22.DE20' "code-CccobservationCccb22de17Cccb22de20t";
      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 ->  tgt.status = 'final',  tgt.value = true "e9d639e1";
    }

    group CccobservationCccb22de17Cccb22de20f(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-CccobservationCccb22de17Cccb22de20f";
      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.DE17&Ccc.B22.DE20' "code-CccobservationCccb22de17Cccb22de20f";
      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 ->  tgt.status = 'cancelled',  tgt.value = false "f21d6e36";
    }

    group CccobservationCccb22de17Cccb22de21t(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-CccobservationCccb22de17Cccb22de21t";
      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.DE17&Ccc.B22.DE21' "code-CccobservationCccb22de17Cccb22de21t";
      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 ->  tgt.status = 'final',  tgt.value = true "e9d639e1";
    }

    group CccobservationCccb22de17Cccb22de21f(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-CccobservationCccb22de17Cccb22de21f";
      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.DE17&Ccc.B22.DE21' "code-CccobservationCccb22de17Cccb22de21f";
      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 ->  tgt.status = 'cancelled',  tgt.value = false "f21d6e36";
    }

    group CccobservationCccb22de17Cccb22de22t(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-CccobservationCccb22de17Cccb22de22t";
      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.DE17&Ccc.B22.DE22' "code-CccobservationCccb22de17Cccb22de22t";
      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 ->  tgt.status = 'final',  tgt.value = true "e9d639e1";
    }

    group CccobservationCccb22de17Cccb22de22f(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-CccobservationCccb22de17Cccb22de22f";
      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.DE17&Ccc.B22.DE22' "code-CccobservationCccb22de17Cccb22de22f";
      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 ->  tgt.status = 'cancelled',  tgt.value = false "f21d6e36";
    }

    group CccobservationCccb22de22(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-Cccb22de22";
      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.DE22' "code-Cccb22de22";
      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.B22.DE22') 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";
      } "dd2a446b";
    }

    group CccobservationCccb22de21(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-Cccb22de21";
      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.DE21' "code-Cccb22de21";
      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.B22.DE21') and answer.exists() then {
        item.answer first as a then {
          a where a.value = true ->  tgt.status = 'final',  tgt.value = true "final-Cccb22de21";
          a where a.value = false ->  tgt.status = 'cancelled',  tgt.value = false "notfound-Cccb22de21";
        } "bdab9370";
      } "be0b9dbe";
    }