WHO Immunization Implementation Guide
0.1.0 - CI Build International flag

WHO Immunization Implementation Guide, 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-immunizations and changes regularly. See the Directory of published versions

StructureMap:

Official URL: http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD1LMToResources Version: 0.1.0
Draft as of 2024-05-30 Computable Name: IMMZD1LMToResources
map "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD1LMToResources" = "IMMZD1LMToResources"

uses "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD1ClientHistory" alias IMMZD1 as source
uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target

group IMMZD1ToBundle(source immz : IMMZD1, target bundle : Bundle) {
  immz -> bundle.type = 'collection' "SetCollection";
  immz.patient as patient then {
    immz.type as content ->  bundle.entry as entry,  entry.resource = create('Observation') as obs then {
      patient -> obs.subject = patient "SetPatient";
      content -> obs.code as code then {
        content -> code.coding as coding then {
          content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem";
          content -> coding.code = 'DE103' "SetObsCode";
        } "SetObsCoding";
      } "SetObsCode";
      content -> obs.valueCodeableConcept as code then {
        content -> code.coding = content "SetCoding";
      } "SetCodeableConcept";
    } "SetTypeObservation";
    immz.booster as content ->  bundle.entry as entry,  entry.resource = create('Observation') as obs then {
      patient -> obs.subject = patient "SetPatient";
      content -> obs.code as code then {
        content -> code.coding as coding then {
          content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem";
          content -> coding.code = 'DE102' "SetObsCode";
        } "SetObsCoding";
      } "SetObsCode";
      content -> obs.value = content "SetValue";
    } "SetBoosterObservation";
    immz.completedPrimarySeries as content ->  bundle.entry as entry,  entry.resource = create('Observation') as obs then {
      patient -> obs.subject = patient "SetPatient";
      content -> obs.code as code then {
        content -> code.coding as coding then {
          content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem";
          content -> coding.code = 'DE8' "SetObsCode";
        } "SetObsCoding";
      } "SetObsCode";
      content -> obs.value = content "SetValue";
    } "SetPrimarySeriesObservation";
    immz.dateSeriesCompleted as content ->  bundle.entry as entry,  entry.resource = create('Observation') as obs then {
      patient -> obs.subject = patient "SetPatient";
      content -> obs.code as code then {
        content -> code.coding as coding then {
          content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem";
          content -> coding.code = 'DE81' "SetObsCode";
        } "SetObsCoding";
      } "SetObsCode";
      content -> obs.value = content "SetValue";
    } "SetDateSeriesObservation";
    immz.hivStatus as content ->  bundle.entry as entry,  entry.resource = create('Observation') as obs then {
      patient -> obs.subject = patient "SetPatient";
      content -> obs.code as code then {
        content -> code.coding as coding then {
          content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem";
          content -> coding.code = 'DE10' "SetObsCode";
        } "SetObsCoding";
      } "SetObsCode";
      content -> obs.valueCodeableConcept as code then {
        content -> code.coding = content "SetCoding";
      } "SetCodeableConcept";
    } "SetHIVStatusObservation";
    immz.pretermBirth as content ->  bundle.entry as entry,  entry.resource = create('Observation') as obs then {
      patient -> obs.subject = patient "SetPatient";
      content -> obs.code as code then {
        content -> code.coding as coding then {
          content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem";
          content -> coding.code = 'DE15' "SetObsCode";
        } "SetObsCoding";
      } "SetObsCode";
      content -> obs.value = content "SetValue";
    } "SetPretermBirthObservation";
    immz.immunocompromised as content ->  bundle.entry as entry,  entry.resource = create('Observation') as obs then {
      patient -> obs.subject = patient "SetPatient";
      content -> obs.code as code then {
        content -> code.coding as coding then {
          content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem";
          content -> coding.code = 'DE16' "SetObsCode";
        } "SetObsCoding";
      } "SetObsCode";
      content -> obs.value = content "SetValue";
    } "SetImmunocompromisedObservation";
    immz.onART as content ->  bundle.entry as entry,  entry.resource = create('Observation') as obs then {
      patient -> obs.subject = patient "SetPatient";
      content -> obs.code as code then {
        content -> code.coding as coding then {
          content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem";
          content -> coding.code = 'DE17' "SetObsCode";
        } "SetObsCoding";
      } "SetObsCode";
      content -> obs.value = content "SetValue";
    } "SetOnARTObservation";
    immz.vaccineHistory as history ->  bundle.entry as entry,  entry.resource = create('Immunization') as imm then {
      patient -> imm.patient = patient "SetPatient";
      history -> imm.status = 'completed' "SetStatus";
      history.vaccineType as vaccine -> imm.vaccineCode as code then {
        vaccine -> code.coding = vaccine "SetVaccineCoding";
      } "SetVaccineType";
      history.vaccineDate as date -> imm.occurrence = cast(date, 'dateTime') "SetDate";
    } "SetVaccineHistoryObservation";
  } "GetPatient";
}