WHO SMART Guidelines - Measles Immunization
0.1.0 - ci-build

WHO SMART Guidelines - Measles Immunization, published by 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-example-immz/ and changes regularly. See the Directory of published versions

StructureMap:

Official URL: http://smart.who.int/immunizations-measles/StructureMap/IMMZCQRToPatient Version: 0.1.0
Draft as of 2024-09-21 Computable Name: IMMZCQRToPatient

Immunization Client Registry - Extract QuestionnaireResponse to Patient resources

Generated Narrative: StructureMap IMMZCQRToPatient

map "http://smart.who.int/immunizations-measles/StructureMap/IMMZCQRToPatient" = "IMMZCQRToPatient"

// Immunization Client Registry - Extract QuestionnaireResponse to Patient resources

uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source
uses "http://smart.who.int/immunizations-measles/StructureDefinition/IMMZCRegisterClient" alias IMMZC as source
uses "http://hl7.org/fhir/StructureDefinition/Bundle" as target
uses "http://hl7.org/fhir/StructureDefinition/Patient" as target

imports "http://smart.who.int/immunizations-measles/StructureMap/IMMZCQRToLM"
imports "http://smart.who.int/immunizations-measles/StructureMap/IMMZCLMToPatient"

group QRestToIMMZC(source qr : QResp, target bundle : Bundle) {
  qr -> bundle.id = uuid() "ruleBundleId";
  qr -> bundle.type = 'collection' "ruleBundleType";
  qr ->  bundle.entry as entry,  entry.resource = create('Patient') as patient,  create('http://smart.who.int/immunizations-measles/StructureDefinition/IMMZCRegisterClient') as model then {
    qr -> model then QRespToIMMZC(qr, model) "QRtoLM";
    qr -> patient then IMMZCToPatient(model, patient) "LMtoPatient";
    qr -> patient.active = true "rulePatientActive";
  } "QRtoPatient";
}