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: Ccca.registration.p

Official URL: https://smart.who.int/ccc/StructureMap/Ccca.registration.p | Version: 0.1.0
Active as of 2026-04-07 | Computable Name: Ccca.registration.p

    map "https://smart.who.int/ccc/StructureMap/Ccca.registration.p" = "Ccca.registration.p"

    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/patient" alias 'Patient' as target
    uses "https://smart.who.int/ccc/StructureDefinition/relatedperson" alias 'RelatedPerson' as target
    uses "https://smart.who.int/ccc/StructureDefinition/communicationrequest" alias 'CommunicationRequest' as target
    uses "https://smart.who.int/ccc/StructureDefinition/Cccpatient" alias 'Ccc Patient' as produced
    uses "https://smart.who.int/ccc/StructureDefinition/relatedperson" alias 'RelatedPerson' as produced
    uses "https://smart.who.int/ccc/StructureDefinition/communicationrequest" alias 'CommunicationRequest' as produced

    group bundletrans(source src : questionnaireResponse, target bundle : Bundle) {
      src -> bundle.id = uuid() "id";
      src -> bundle.type = 'batch' "type";
      src -> bundle.entry as entry then {
        src.subject as subject then {
          subject.id as idval ->  entry.request as request,  request.method = 'PUT',  request.url = append('/Patient/', idval) "1153aa45";
        } "cf5b2513";
        src -> entry.resource = create('Patient') as tgt then {
          src -> tgt then Cccpatient(src, tgt) "77f3ac03";
        } "75beb242";
      } "put-Cccpatient";
      src.item first as itm1 where linkId = 'Ccc.A.DE21.1' then {
        itm1.item first as item where (linkId = 'relatedpersonid') and answer.exists() then {
          src ->  bundle.entry as entry,  entry.request as request,  request.method = 'POST',  entry.resource = create('RelatedPerson') as tgt then {
            src -> tgt then relatedperson(src, tgt) "8f0b9602";
            item.answer first as a then {
              a.value as val -> request.url = append('/RelatedPerson/', val) "78d8bc69";
            } "eec70023";
          } "00574b8e";
        } "74cc3511";
      } "54daac33";
      src.item first as itm1 where linkId = 'Ccc.A.DE21.1' then {
        itm1.item first as item where (linkId = 'Ccc.A.DE38') and answer.exists() then {
          src -> bundle.entry as entry then {
            src ->  entry.request as request,  request.method = 'POST',  uuid() as uuid,  request.url = append('/CommunicationRequest/', uuid) "e5343f50";
            src -> entry.resource = create('CommunicationRequest') as tgt then {
              src -> tgt then communicationrequestCccade38(src, tgt) "82d8a873";
            } "33eeb100";
          } "d4cd942b";
        } "5ca7be0f";
      } "b78fbe33";
    }

    group SetOfficalGivenNameCccpatient(source src, target tgt) {
      src -> tgt.use = 'official' then {
        src.item first as item where (linkId = 'Ccc.A.DE06') and answer.exists() then {
          item.answer first as a then {
            a.value as val -> tgt.family = val "77d1bd4f";
          } "e0827d5d";
        } "607c4e16";
        src.item first as item where (linkId = 'Ccc.A.DE04') and answer.exists() then {
          item.answer first as a then {
            a.value as val -> tgt.given = val "5d3d44f6";
          } "18edd234";
        } "e9deb0f3";
        src.item first as item where (linkId = 'Ccc.A.DE05') and answer.exists() then {
          item.answer first as a then {
            a.value as val -> tgt.given = val "5d3d44f6";
          } "18edd234";
        } "d95279c0";
      } "ef0f6810";
    }

    group MapValueSetExtCodeCccade16(source src, target tgt) {
      src -> tgt then {
        src -> tgt then {
          src where value.code = 'Ccc.A.DE17' -> tgt.gender = 'female' "368f2e2a";
          src where value.code = 'Ccc.A.DE18' -> tgt.gender = 'male' "2ae3beca";
          src where value.code = 'Ccc.A.DE19' -> tgt.gender = 'unknown' "de22e8b7";
        } "mapbase";
      } "57676688";
    }

    group Cccpatient(source src : questionnaireResponse, target tgt : Patient) {
      src.item first as item where (linkId = 'Ccc.A.DE01') and answer.exists() then {
        item.answer first as a then {
          a.value as val -> tgt.identifier = create('Identifier') as identifier then {
            val ->  identifier.value = val,  identifier.use = 'official' "id";
          } "aCccade01";
        } "aCccade01";
      } "c243b020";
      src.item first as item where (linkId = 'Ccc.A.DE03') and answer.exists() then {
        item.answer first as a ->  tgt.extension = create('Extension') as ext,  ext.url = 'https://smart.who.int/ccc/StructureDefinition/anonymous',  ext.value = true "aCccade03";
      } "54d12495";
      src.item first as item where (linkId = 'Ccc.A.DE06') or (linkId = 'Ccc.A.DE04') or ((linkId = 'Ccc.A.DE05') and answer.exists()) then {
        src ->  tgt as target,  target.name as name then SetOfficalGivenNameCccpatient(src, name) "30643049";
      } "7483ae2e";
      src.item first as item where (linkId = 'Ccc.A.DE12') and answer.exists() then {
        item.answer first as a then {
          a.value as val ->  tgt.extension = create('Extension') as ext,  ext.url = 'https://smart.who.int/ccc/StructureDefinition/birthDateEstimator',  ext.value = val "aCccade12";
        } "aCccade12";
      } "c05cf203";
      src.item first as item where (linkId = 'Ccc.A.DE08') and answer.exists() then {
        item.answer first as a then {
          a.value as val -> tgt.birthDate = val "aCccade08";
        } "aCccade08";
      } "bded6ae8";
      src.item first as item where (linkId = 'Ccc.A.DE16') and answer.exists() then {
        item.answer first as a then MapValueSetExtCodeCccade16(a, tgt) "225baa79";
      } "bf4b35f0";
      src.item first as item where (linkId = 'Ccc.A.DE48') and answer.exists() then {
        item.answer first as a ->  tgt.extension = create('Extension') as ext,  ext.url = 'https://smart.who.int/ccc/StructureDefinition/primarycaregiver',  ext.value = create('Reference') as ref,  ref.reference = 'relatated-person-id' "aCccade48";
      } "04772b09";
      src.item first as itm1 where linkId = 'Ccc.A.DE21.1' then {
        itm1.item first as item where (linkId = 'Ccc.A.DE31') and answer.exists() then {
          item.answer first as a then {
            a.value as val ->  tgt.extension = create('Extension') as ext,  ext.url = 'https://smart.who.int/ccc/Extension/motherVitalStatus',  ext.value = val "aCccade31";
          } "aCccade31";
        } "7f408694";
      } "39f45e5d";
      src.item first as itm1 where linkId = 'Ccc.A.DE21.1' then {
        itm1.item first as item where (linkId = 'Ccc.A.DE32') and answer.exists() then {
          item.answer first as a then {
            a.value as val ->  tgt.extension = create('Extension') as ext,  ext.url = 'https://smart.who.int/ccc/Extension/fatherVitalStatus',  ext.value = val "aCccade32";
          } "aCccade32";
        } "06ec2524";
      } "f7424037";
    }

    group SetOfficalGivenNamerelatedperson(source src, target tgt) {
      src -> tgt.use = 'official' then {
        src.item first as itm1 where linkId = 'Ccc.A.DE21.1' then {
          itm1.item first as item where (linkId = 'Ccc.A.DE23') and answer.exists() then {
            item.answer first as a then {
              a.value as val -> tgt.family = val "77d1bd4f";
            } "e0827d5d";
          } "8c426238";
        } "4cc155ee";
        src.item first as itm1 where linkId = 'Ccc.A.DE21.1' then {
          itm1.item first as item where (linkId = 'Ccc.A.DE21') and answer.exists() then {
            item.answer first as a then {
              a.value as val -> tgt.given = val "5d3d44f6";
            } "18edd234";
          } "ad3fbc15";
        } "8bc880ed";
        src.item first as itm1 where linkId = 'Ccc.A.DE21.1' then {
          itm1.item first as item where (linkId = 'Ccc.A.DE22') and answer.exists() then {
            item.answer first as a then {
              a.value as val -> tgt.given = val "5d3d44f6";
            } "18edd234";
          } "e9ba83c8";
        } "17d8d988";
      } "f41b9847";
    }

    group MapValueSetExtCodeCccade24(source src, target tgt) {
      src -> tgt then {
        src ->  tgt.relationship = create('CodeableConcept') as cc,  cc.coding = create('Coding') as coding then {
          src where value.code = 'Ccc.A.DE25' ->  coding.code = 'MTH',  coding.system = 'http://terminology.hl7.org/CodeSystem/v3-RoleCode' "abd34a78";
          src where value.code = 'Ccc.A.DE26' ->  coding.code = 'FTH',  coding.system = 'http://terminology.hl7.org/CodeSystem/v3-RoleCode' "b53d1d15";
          src where value.code = 'Ccc.A.DE27' ->  coding.code = 'SIB',  coding.system = 'http://terminology.hl7.org/CodeSystem/v3-RoleCode' "949ee35f";
          src where value.code = 'Ccc.A.DE28' ->  coding.code = 'EXT',  coding.system = 'http://terminology.hl7.org/CodeSystem/v3-RoleCode' "7c5a4400";
          src where value.code = 'Ccc.A.DE29' ->  coding.code = 'PRNINLAW',  coding.system = 'http://terminology.hl7.org/CodeSystem/v3-RoleCode' "544df0cc";
          src where value.code = 'Ccc.A.DE30' ->  coding.code = 'U',  coding.system = 'http://terminology.hl7.org/CodeSystem/v2-0131' "8c2d96fc";
        } "4a251df5";
      } "1b7b6d7a";
    }

    group relatedperson(source src : questionnaireResponse, target tgt : RelatedPerson) {
      src.item first as item where (linkId = 'Cccrelatedpersoncaregiverid') and answer.exists() then {
        item.answer first as a then {
          a.value as val ->  tgt.extension = create('Extension') as ext,  ext.url = 'https://smart.who.int/ccc/StructureDefinition/primary-caregiver',  ext.value = create('Reference') as ref,  ref.reference = append('/RelatedPerson/', val) "aCccrelatedpersoncaregiverid";
        } "aCccrelatedpersoncaregiverid";
      } "04cd0ec2";
      src.item first as itm1 where linkId = 'Ccc.A.DE21.1' then {
        itm1.item first as item where (linkId = 'Ccc.A.DE23') or (linkId = 'Ccc.A.DE21') or ((linkId = 'Ccc.A.DE22') and answer.exists()) then {
          src ->  tgt as target,  target.name as name then SetOfficalGivenNamerelatedperson(src, name) "8e1455ea";
        } "18dc21d5";
      } "f0e6459e";
      src.item first as itm1 where linkId = 'Ccc.A.DE21.1' then {
        itm1.item first as item where (linkId = 'Ccc.A.DE35') and answer.exists() then {
          item.answer first as a then {
            a.value as val ->  tgt.telecom as tel,  tel.system = 'phone',  tel.use = 'mobile',  tel.value = val "aCccade35";
          } "aCccade35";
        } "9731ba92";
      } "30b90d37";
      src.item first as itm1 where linkId = 'Ccc.A.DE21.1' then {
        itm1.item first as item where (linkId = 'relatedpersonid') and answer.exists() then {
          item.answer first as a -> tgt then {
            src.subject as subject -> tgt.patient = subject "patient";
          } "arelatedpersonid";
        } "d79d72db";
      } "d50c1aed";
      src.item first as itm1 where linkId = 'Ccc.A.DE21.1' then {
        itm1.item first as item where (linkId = 'Ccc.A.DE24') and answer.exists() then {
          item.answer first as a then MapValueSetExtCodeCccade24(a, tgt) "24e5e488";
        } "6adb811a";
      } "92a0e955";
    }

    group communicationrequestCccade38(source src, target tgt) {
      src ->  tgt.category = create('CodeableConcept') as cc,  cc.coding = create('Coding') as c,  c.system = 'http://hl7.org/fhir/ValueSet/communication-category',  c.code = 'notification' "053233cd";
      src.questionnaire as q ->  tgt.about = create('Reference') as ref,  ref.type = 'Questionnaire',  ref.reference = q "quest";
      src.subject as subject -> tgt.subject = subject "fe3bec4d";
      src -> tgt.recipient = create('Reference') as ref then {
        src -> ref.type = 'RelatedPerson' "c26ab31f";
        src.item first as item where linkId = 'CccrelatedpersonCaregiveruuid' -> tgt then {
          item.answer first as a -> tgt then {
            a.value as val -> ref.reference = append('/RelatedPerson/', val) "25b16148";
          } "00b2016a";
        } "3c6c4c80";
      } "eaa7d3cf";
    }