IMMZ.Helpers
type: StructureMap
node role: treeRoot
id:
  v: IMMZ.Helpers
text:
  status:
    v: generated
  div:
    v: Generated Narrative: StructureMap IMMZ.Helpers #xD; map "http://smart.who.int/immunizations/StructureMap/IMMZ.Helpers" = "IMMZ.Helpers"#xD; #xD; // Immunization - Transform QuestionnaireResponse to Logical Model Helper groups#xD; #xD; uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source#xD; uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target#xD; #xD; group ItemToValue(source item, target field) {#xD; item.answer first as answer then {#xD; answer.value as content -> field.value = content "SetValue";#xD; } "FirstAnswer";#xD; }#xD; #xD; group ItemToCode(source item, target field) {#xD; item.answer first as answer then {#xD; answer.value as coding then {#xD; coding.code as content -> field.value = content "SetCode";#xD; } "Coding";#xD; } "FirstAnswer";#xD; }#xD; #xD; group ItemToCoding(source item, target field) {#xD; item.answer first as answer then {#xD; answer.value as coding then {#xD; coding.code as code -> field.code = code "SetCode";#xD; coding.system as system -> field.system = system "SetSystem";#xD; coding.display as display -> field.display = display "SetDisplay";#xD; } "Coding";#xD; } "FirstAnswer";#xD; }#xD; #xD; group D1andD13Questions(source qr : QResp, target immz) {#xD; qr.item as item where linkId = 'birthDose' -> immz.birthDose as field then ItemToValue(item, field) "birthDose";#xD; qr.item as item where linkId = 'typeOfDose' -> immz.typeOfDose as field then ItemToCoding(item, field) "typeOfDose";#xD; qr.item as item where linkId = 'completedThePrimaryVaccinationSeries' -> immz.completedThePrimaryVaccinationSeries as field then ItemToValue(item, field) "completedThePrimaryVaccinationSeries";#xD; qr.item as item where linkId = 'completedTheBoosterSeries' -> immz.completedTheBoosterSeries as field then ItemToValue(item, field) "completedTheBoosterSeries";#xD; qr.item as item where linkId = 'dateWhenPrimaryVaccinationSeriesWasCompleted' -> immz.dateWhenPrimaryVaccinationSeriesWasCompleted as …
url:
  v: http://smart.who.int/immunizations/StructureMap/IMMZ.Helpers
  l: IMMZ.Helpers
version:
  v: 0.2.0
name:
  v: IMMZ.Helpers
status:
  v: draft
date:
  v: 2026-03-25T23:30:34+00:00
publisher:
  v: WHO
contact:
  name:
    v: WHO
  telecom:
    system:
      v: url
    value:
      v: http://who.int
description:
  v: Immunization - Transform QuestionnaireResponse to Logical Model Helper groups
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse
    l: QuestionnaireResponse
  mode:
    v: source
  alias:
    v: QResp
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Bundle
    l: Bundle
  mode:
    v: target
  alias:
    v: Bundle
group:
  name:
    v: ItemToValue
  type mode:
    v: none
  input:
    name:
      v: item
    mode:
      v: source
  input:
    name:
      v: field
    mode:
      v: target
  rule:
    name:
      v: FirstAnswer
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: answer
    rule:
      name:
        v: SetValue
group:
  name:
    v: ItemToCode
  type mode:
    v: none
  input:
    name:
      v: item
    mode:
      v: source
  input:
    name:
      v: field
    mode:
      v: target
  rule:
    name:
      v: FirstAnswer
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: answer
    rule:
      name:
        v: Coding
group:
  name:
    v: ItemToCoding
  type mode:
    v: none
  input:
    name:
      v: item
    mode:
      v: source
  input:
    name:
      v: field
    mode:
      v: target
  rule:
    name:
      v: FirstAnswer
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: answer
    rule:
      name:
        v: Coding
group:
  name:
    v: D1andD13Questions
  type mode:
    v: none
  input:
    name:
      v: qr
    type:
      v: QResp
    mode:
      v: source
  input:
    name:
      v: immz
    mode:
      v: target
  rule:
    name:
      v: birthDose
    source:
      context:
        v: qr
      element:
        v: item
      variable:
        v: item
      condition:
        v: linkId = 'birthDose'
    target:
      context:
        v: immz
      context type:
        v: variable
      element:
        v: birthDose
      variable:
        v: field
    dependent:
      name:
        v: ItemToValue
      variable:
        v: item
      variable:
        v: field
  rule:
    name:
      v: typeOfDose
    source:
      context:
        v: qr
      element:
        v: item
      variable:
        v: item
      condition:
        v: linkId = 'typeOfDose'
    target:
      context:
        v: immz
      context type:
        v: variable
      element:
        v: typeOfDose
      variable:
        v: field

v: answer

v: value

v: content

v: field

v: variable

v: value

v: copy

value: Id
  v: content

v: answer

v: value

v: coding

v: SetCode

context:
  v: coding
element:
  v: code
variable:
  v: content

context:
  v: field
context type:
  v: variable
element:
  v: value
transform:
  v: copy
parameter:
  value: Id
    v: content

v: answer

v: value

v: coding

v: SetCode

context:
  v: coding
element:
  v: code
variable:
  v: code

context:
  v: field
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value: Id
    v: code

v: SetSystem

context:
  v: coding
element:
  v: system
variable:
  v: system

context:
  v: field
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value: Id
    v: system

v: SetDisplay

context:
  v: coding
element:
  v: display
variable:
  v: display

context:
  v: field
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value: Id
    v: display

name:
  v: ItemToCoding
variable:
  v: item
variable:
  v: field

name:
  v: completedThePrimaryVaccinationSeries
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'completedThePrimaryVaccinationSeries'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: completedThePrimaryVaccinationSeries
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: completedTheBoosterSeries
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'completedTheBoosterSeries'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: completedTheBoosterSeries
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: dateWhenPrimaryVaccinationSeriesWasCompleted
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'dateWhenPrimaryVaccinationSeriesWasCompleted'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: dateWhenPrimaryVaccinationSeriesWasCompleted
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: hivStatus
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'hivStatus'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: hivStatus
  variable:
    v: field
dependent:
  name:
    v: ItemToCoding
  variable:
    v: item
  variable:
    v: field

name:
  v: typeOfPoliovirusDose
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'typeOfPoliovirusDose'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: typeOfPoliovirusDose
  variable:
    v: field
dependent:
  name:
    v: ItemToCoding
  variable:
    v: item
  variable:
    v: field

name:
  v: typeOfJeDose
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'typeOfJeDose'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: typeOfJeDose
  variable:
    v: field
dependent:
  name:
    v: ItemToCoding
  variable:
    v: item
  variable:
    v: field

name:
  v: typeOfTbeDose
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'typeOfTbeDose'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: typeOfTbeDose
  variable:
    v: field
dependent:
  name:
    v: ItemToCoding
  variable:
    v: item
  variable:
    v: field

name:
  v: typeOfTyphoidDose
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'typeOfTyphoidDose'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: typeOfTyphoidDose
  variable:
    v: field
dependent:
  name:
    v: ItemToCoding
  variable:
    v: item
  variable:
    v: field

name:
  v: typeOfCholeraDose
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'typeOfCholeraDose'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: typeOfCholeraDose
  variable:
    v: field
dependent:
  name:
    v: ItemToCoding
  variable:
    v: item
  variable:
    v: field

name:
  v: typeOfMeningococcalDose
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'typeOfMeningococcalDose'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: typeOfMeningococcalDose
  variable:
    v: field
dependent:
  name:
    v: ItemToCoding
  variable:
    v: item
  variable:
    v: field

name:
  v: typeOfHepatitisADose
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'typeOfHepatitisADose'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: typeOfHepatitisADose
  variable:
    v: field
dependent:
  name:
    v: ItemToCoding
  variable:
    v: item
  variable:
    v: field

name:
  v: typeOfHepatitisBDose
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'typeOfHepatitisBDose'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: typeOfHepatitisBDose
  variable:
    v: field
dependent:
  name:
    v: ItemToCoding
  variable:
    v: item
  variable:
    v: field

name:
  v: vaccineType
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'vaccineType'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: vaccineType
  variable:
    v: field
dependent:
  name:
    v: ItemToCoding
  variable:
    v: item
  variable:
    v: field

name:
  v: dateAndTimeOfVaccination
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'dateAndTimeOfVaccination'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: dateAndTimeOfVaccination
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: contactDate
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'contactDate'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: contactDate
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: ancContactNumber
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'ancContactNumber'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: ancContactNumber
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: doseNumber
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'doseNumber'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: doseNumber
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: D1Questions
type mode:
  v: none
input:
  name:
    v: qr
  type:
    v: QResp
  mode:
    v: source
input:
  name:
    v: immz
  mode:
    v: target
rule:
  name:
    v: pretermBirth
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'pretermBirth'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: pretermBirth
    variable:
      v: field
  dependent:
    name:
      v: ItemToValue
    variable:
      v: item
    variable:
      v: field
rule:
  name:
    v: immunocompromised
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'immunocompromised'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: immunocompromised
    variable:
      v: field
  dependent:
    name:
      v: ItemToValue
    variable:
      v: item
    variable:
      v: field
rule:
  name:
    v: currentlyOnArt
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'currentlyOnArt'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: currentlyOnArt
    variable:
      v: field
  dependent:
    name:
      v: ItemToValue
    variable:
      v: item
    variable:
      v: field
rule:
  name:
    v: currentlyOnArt
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'currentlyOnArt'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: currentlyOnArt
    variable:
      v: field
  dependent:
    name:
      v: ItemToValue
    variable:
      v: item
    variable:
      v: field
rule:
  name:
    v: typeOfTbInfectionTestPerformed
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'typeOfTbInfectionTestPerformed'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: typeOfTbInfectionTestPerformed
    variable:
      v: field
  dependent:
    name:
      v: ItemToCoding
    variable:
      v: item
    variable:
      v: field
rule:
  name:
    v: tbInfectionTestResult
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'tbInfectionTestResult'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: tbInfectionTestResult
    variable:
      v: field
  dependent:
    name:
      v: ItemToCoding
    variable:
      v: item
    variable:
      v: field
rule:
  name:
    v: immunologicallyStable
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'immunologicallyStable'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: immunologicallyStable

v: field

name:
  v: ItemToValue
variable:
  v: item
variable:
  v: field

name:
  v: clinicallyWell
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'clinicallyWell'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: clinicallyWell
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: birthWeightInGrams
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'birthWeightInGrams'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: birthWeightInGrams
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: artStartDate
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'artStartDate'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: artStartDate
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: highRiskOfPneumococcalInfection
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'highRiskOfPneumococcalInfection'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: highRiskOfPneumococcalInfection
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: ageInMonthsWhenClientReceivedFirstMeningococcalDose
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'ageInMonthsWhenClientReceivedFirstMeningococcalDose'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: ageInMonthsWhenClientReceivedFirstMeningococcalDose
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: vnaLevel
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'vnaLevel'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: vnaLevel
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: riskOfOccupationalExposureToRabiesVirus
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'riskOfOccupationalExposureToRabiesVirus'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: riskOfOccupationalExposureToRabiesVirus
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: dengueSerostatus
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'dengueSerostatus'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: dengueSerostatus
  variable:
    v: field
dependent:
  name:
    v: ItemToCoding
  variable:
    v: item
  variable:
    v: field

name:
  v: D13Questions
type mode:
  v: none
input:
  name:
    v: qr
  type:
    v: QResp
  mode:
    v: source
input:
  name:
    v: immz
  mode:
    v: target
rule:
  name:
    v: immunizationEventStatus
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'immunizationEventStatus'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: immunizationEventStatus
    variable:
      v: field
  dependent:
    name:
      v: ItemToCoding
    variable:
      v: item
    variable:
      v: field
rule:
  name:
    v: reasonVaccineWasNotAdministered
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'reasonVaccineWasNotAdministered'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: reasonVaccineWasNotAdministered
    variable:
      v: field
  dependent:
    name:
      v: ItemToCoding
    variable:
      v: item
    variable:
      v: field
rule:
  name:
    v: vaccineBrand
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'vaccineBrand'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: vaccineBrand
    variable:
      v: field
  dependent:
    name:
      v: ItemToCoding
    variable:
      v: item
    variable:
      v: field
rule:
  name:
    v: liveVaccine
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'liveVaccine'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: liveVaccine
    variable:
      v: field
  dependent:
    name:
      v: ItemToValue
    variable:
      v: item
    variable:
      v: field
rule:
  name:
    v: countryOfVaccination
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'countryOfVaccination'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: countryOfVaccination
    variable:
      v: field
  dependent:
    name:
      v: ItemToCoding
    variable:
      v: item
    variable:
      v: field
rule:
  name:
    v: administrativeArea
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'administrativeArea'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: administrativeArea
    variable:
      v: field
  dependent:
    name:
      v: ItemToCoding
    variable:
      v: item
    variable:
      v: field
rule:
  name:
    v: vaccineManufacturer
  source:
    context:
      v: qr
    element:
      v: item
    variable:
      v: item
    condition:
      v: linkId = 'vaccineManufacturer'
  target:
    context:
      v: immz
    context type:
      v: variable
    element:
      v: vaccineManufacturer

v: field

name:
  v: ItemToCoding
variable:
  v: item
variable:
  v: field

name:
  v: vaccineBatchNumber
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'vaccineBatchNumber'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: vaccineBatchNumber
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: vaccineMarketAuthorizationHolder
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'vaccineMarketAuthorizationHolder'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: vaccineMarketAuthorizationHolder
  variable:
    v: field
dependent:
  name:
    v: ItemToCoding
  variable:
    v: item
  variable:
    v: field

name:
  v: expirationDate
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'expirationDate'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: expirationDate
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: doseQuantity
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'doseQuantity'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: doseQuantity
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: healthWorkerIdentifier
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'healthWorkerIdentifier'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: healthWorkerIdentifier
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: totalDosesInSeries
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'totalDosesInSeries'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: totalDosesInSeries
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: diseaseTargeted
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'diseaseTargeted'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: diseaseTargeted
  variable:
    v: field
dependent:
  name:
    v: ItemToCoding
  variable:
    v: item
  variable:
    v: field

name:
  v: dueDateOfNextDose
source:
  context:
    v: qr
  element:
    v: item
  variable:
    v: item
  condition:
    v: linkId = 'dueDateOfNextDose'
target:
  context:
    v: immz
  context type:
    v: variable
  element:
    v: dueDateOfNextDose
  variable:
    v: field
dependent:
  name:
    v: ItemToValue
  variable:
    v: item
  variable:
    v: field

name:
  v: MakeImmzObservation
type mode:
  v: none
input:
  name:
    v: patient
  type:
    v: Reference
  mode:
    v: source
input:
  name:
    v: immid
  mode:
    v: source
input:
  name:
    v: code
  type:
    v: Coding
  mode:
    v: source
input:
  name:
    v: cat
  type:
    v: Coding
  mode:
    v: source
input:
  name:
    v: value
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: CreateObservation
  source:
    context:
      v: value
  target:
    context type:
      v: variable
    variable:
      v: oid
    transform:
      v: uuid
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: entry
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: String
        v: urn:uuid:
    parameter:
      value: Id
        v: oid
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: request
    variable:
      v: request
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: method
    transform:
      v: copy
    parameter:
      value: String
        v: PUT
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: url
    transform:
      v: append
    parameter:
      value: String
        v: Observation/
    parameter:
      value: Id
        v: oid
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: obs
    transform:
      v: create
    parameter:
      value: String
        v: Observation
  rule:
    name:
      v: SetId
    source:
      context:
        v: value
    target:
      context:
        v: obs
      context type:
        v: variable
      element:
        v: id
      transform:
        v: copy
      parameter:
        value: Id
  rule:
    name:
      v: SetPartOf
    source:
      context:
        v: immid
    target:
      context:
        v: obs
      context type:
        v: variable
      element:
        v: partOf
      variable:
        v: partOf
    target:
      context:
        v: partOf
      context type:
        v: variable
      element:
        v: reference
      transform:
        v: append
      parameter:
        value: String
      parameter:
        value: Id
  rule:
    name:
      v: SetSubject
    source:
      context:
        v: patient
    target:
      context:
        v: obs
      context type:
        v: variable
      element:
        v: subject
      transform:
        v: copy
      parameter:
        value: Id
  rule:
    name:
      v: SetCode
    source:
      context:
        v: code
    target:
      context:
        v: obs
      context type:
        v: variable
      element:
        v: code

Id
v: oid

String
v: urn:uuid:

Id
v: immid

Id
v: patient

v: copy

value: Id
  v: code

name:
  v: SetValue
source:
  context:
    v: value
target:
  context:
    v: obs
  context type:
    v: variable
  element:
    v: value
  transform:
    v: copy
  parameter:
    value: Id
      v: value

name:
  v: SetCategory
source:
  context:
    v: cat
target:
  context:
    v: obs
  context type:
    v: variable
  element:
    v: category
  transform:
    v: copy
  parameter:
    value: Id
      v: cat

name:
  v: MakeObservation
type mode:
  v: none
input:
  name:
    v: patient
  type:
    v: Reference
  mode:
    v: source
input:
  name:
    v: code
  type:
    v: Coding
  mode:
    v: source
input:
  name:
    v: cat
  type:
    v: Coding
  mode:
    v: source
input:
  name:
    v: value
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: CreateObservation
  source:
    context:
      v: value
  target:
    context type:
      v: variable
    variable:
      v: oid
    transform:
      v: uuid
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: entry
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: String
        v: urn:uuid:
    parameter:
      value: Id
        v: oid
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: request
    variable:
      v: request
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: method
    transform:
      v: copy
    parameter:
      value: String
        v: PUT
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: url
    transform:
      v: append
    parameter:
      value: String
        v: Observation/
    parameter:
      value: Id
        v: oid
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: obs
    transform:
      v: create
    parameter:
      value: String
        v: Observation
  rule:
    name:
      v: SetId
    source:
      context:
        v: value
    target:
      context:
        v: obs
      context type:
        v: variable
      element:
        v: id
      transform:
        v: copy
      parameter:
        value: Id
  rule:
    name:
      v: SetSubject
    source:
      context:
        v: patient
    target:
      context:
        v: obs
      context type:
        v: variable
      element:
        v: subject
      transform:
        v: copy
      parameter:
        value: Id
  rule:
    name:
      v: SetCode
    source:
      context:
        v: code
    target:
      context:
        v: obs
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
      parameter:
        value: Id
  rule:
    name:
      v: SetValue
    source:
      context:
        v: value
    target:
      context:
        v: obs
      context type:
        v: variable
      element:
        v: value
      transform:
        v: copy
      parameter:
        value: Id
  rule:
    name:
      v: SetCategory
    source:
      context:
        v: cat
    target:
      context:
        v: obs
      context type:
        v: variable

Id
v: oid

Id
v: patient

Id
v: code

Id
v: value

v: category

v: copy

value: Id
  v: cat

name:
  v: TypeOfVaccineDose
type mode:
  v: none
input:
  name:
    v: typeof
  type:
    v: Coding
  mode:
    v: source
input:
  name:
    v: ext
  type:
    v: Extension
  mode:
    v: target
rule:
  name:
    v: SetURL
  source:
    context:
      v: typeof
  target:
    context:
      v: ext
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value: String
        v: http://smart.who.int/immunizations/StructureDefinition/IMMZTypeOfDose
rule:
  name:
    v: SetValue
  source:
    context:
      v: typeof
  target:
    context:
      v: ext
    context type:
      v: variable
    element:
      v: value
    transform:
      v: copy
    parameter:
      value: Id
        v: typeof

name:
  v: MakeImmunization
type mode:
  v: none
input:
  name:
    v: patient
  type:
    v: Reference
  mode:
    v: source
input:
  name:
    v: immid
  mode:
    v: source
input:
  name:
    v: immz
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: MakeImmunization
  source:
    context:
      v: immz
    element:
      v: vaccineType
    variable:
      v: vaccineCode
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: entry
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: String
        v: urn:uuid:
    parameter:
      value: Id
        v: immid
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: request
    variable:
      v: request
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: method
    transform:
      v: copy
    parameter:
      value: String
        v: PUT
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: url
    transform:
      v: append
    parameter:
      value: String
        v: Immunization/
    parameter:
      value: Id
        v: immid
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: imm
    transform:
      v: create
    parameter:
      value: String
        v: Immunization
  rule:
    name:
      v: SetId
    source:
      context:
        v: immid
    target:
      context:
        v: imm
      context type:
        v: variable
      element:
        v: id
      transform:
        v: copy
      parameter:
        value: Id
  rule:
    name:
      v: SetPatient
    source:
      context:
        v: patient
    target:
      context:
        v: imm
      context type:
        v: variable
      element:
        v: patient
      transform:
        v: copy
      parameter:
        value: Id
  rule:
    name:
      v: vaccineCode
    source:
      context:
        v: vaccineCode
    target:
      context:
        v: imm
      context type:
        v: variable
      element:
        v: vaccineCode
      transform:
        v: copy
      parameter:
        value: Id
  rule:
    name:
      v: protocolApplied
    source:
      context:
        v: immz
      element:
        v: typeOfDose
      variable:
        v: typeOfDose
    target:
      context:
        v: imm
      context type:
        v: variable
      element:
        v: protocolApplied
      variable:
        v: pa
    rule:
      name:
        v: SetSeriesToCode
      documentation:
        v: if display is missing
    rule:
      name:
        v: SetSeriesToDisplay
    rule:
      name:
        v: SetDoseNumber
    rule:
      name:
        v: totalDosesInSeries
    rule:
      name:
        v: diseaseTargeted
    rule:
      name:
        v: dueDateOfNextDose

Id
v: immid

Id
v: patient

Id
v: vaccineCode

v: typeOfDose

v: code

v: code

v: pa

v: variable

v: series

v: copy

value: Id
  v: code

v: typeOfDose

v: display

v: display

v: pa

v: variable

v: series

v: copy

value: Id
  v: display

v: immz

v: doseNumber

v: doseNumber

v: pa

v: variable

v: doseNumber

v: copy

value: Id
  v: doseNumber

v: immz

v: totalDosesInSeries

v: totalDoses

v: pa

v: variable

v: seriesDoses

v: copy

value: Id
  v: totalDoses

v: immz

v: diseaseTargeted

v: disease

v: pa

v: variable

v: targetDisease

v: copy

value: Id
  v: disease

v: immz

v: dueDateOfNextDose

v: duedate

v: pa

v: variable

v: extension

v: ext

v: ext

v: variable

v: url

v: copy

v: ext

v: variable

v: value

v: copy

value: Id
  v: duedate

name:
  v: dateAndTimeOfVaccination
source:
  context:
    v: immz
  element:
    v: dateAndTimeOfVaccination
  variable:
    v: occurrence
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: occurrence
  transform:
    v: copy
  parameter:
    value: Id
      v: occurrence

name:
  v: typeOfPoliovirusDose
source:
  context:
    v: immz
  element:
    v: typeOfPoliovirusDose
  variable:
    v: typeof
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
dependent:
  name:
    v: TypeOfVaccineDose
  variable:
    v: typeof
  variable:
    v: ext

name:
  v: typeOfJeDose
source:
  context:
    v: immz
  element:
    v: typeOfJeDose
  variable:
    v: typeof
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
dependent:
  name:
    v: TypeOfVaccineDose
  variable:
    v: typeof
  variable:
    v: ext

name:
  v: typeOfTbeDose
source:
  context:
    v: immz
  element:
    v: typeOfTbeDose
  variable:
    v: typeof
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
dependent:
  name:
    v: TypeOfVaccineDose
  variable:
    v: typeof
  variable:
    v: ext

name:
  v: typeOfTyphoidDose
source:
  context:
    v: immz
  element:
    v: typeOfTyphoidDose
  variable:
    v: typeof
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
dependent:
  name:
    v: TypeOfVaccineDose
  variable:
    v: typeof
  variable:
    v: ext

name:
  v: typeOfCholeraDose
source:
  context:
    v: immz
  element:
    v: typeOfCholeraDose
  variable:
    v: typeof
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
dependent:
  name:
    v: TypeOfVaccineDose
  variable:
    v: typeof
  variable:
    v: ext

name:
  v: typeOfMeningococcalDose
source:
  context:
    v: immz
  element:
    v: typeOfMeningococcalDose
  variable:
    v: typeof
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
dependent:
  name:
    v: TypeOfVaccineDose
  variable:
    v: typeof
  variable:
    v: ext

name:
  v: typeOfHepatitisADose
source:
  context:
    v: immz
  element:
    v: typeOfHepatitisADose
  variable:
    v: typeof
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
dependent:
  name:
    v: TypeOfVaccineDose
  variable:
    v: typeof
  variable:
    v: ext

name:
  v: typeOfHepatitisBDose
source:
  context:
    v: immz
  element:
    v: typeOfHepatitisBDose
  variable:
    v: typeof
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
dependent:
  name:
    v: TypeOfVaccineDose
  variable:
    v: typeof
  variable:
    v: ext

name:
  v: SetDefaultStatus
source:
  context:
    v: immz
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: status
  transform:
    v: copy
  parameter:
    value: String
      v: completed

name:
  v: immunizationEventStatus
source:
  context:
    v: immz
  element:
    v: immunizationEventStatus
  variable:
    v: status
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: status
  transform:
    v: translate
  parameter:
    value: Id
      v: status
  parameter:
    value: String
      v: http://smart.who.int/immunizations/ConceptMap/IMMZ.D.ConceptMap
  parameter:
    value: String
      v: code

name:
  v: reasonVaccineWasNotAdministered
source:
  context:
    v: immz
  element:
    v: reasonVaccineWasNotAdministered
  variable:
    v: reason
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: statusReason
  transform:
    v: copy
  parameter:
    value: Id
      v: reason

name:
  v: vaccineBrand
source:
  context:
    v: immz
  element:
    v: vaccineBrand
  variable:
    v: brand
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: url
  transform:
    v: copy
  parameter:
    value: String
      v: http://smart.who.int/immunizations/StructureDefinition/IMMZVaccineBrand
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: value
  transform:
    v: copy
  parameter:
    value: Id
      v: brand

name:
  v: liveVaccine
source:
  context:
    v: immz
  element:
    v: liveVaccine
  variable:
    v: live
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: url
  transform:
    v: copy
  parameter:
    value: String
      v: http://smart.who.int/immunizations/StructureDefinition/IMMZLiveVaccine
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: value
  transform:
    v: copy
  parameter:
    value: Id
      v: live

name:
  v: countryOfVaccination
source:
  context:
    v: immz
  element:
    v: countryOfVaccination
  variable:
    v: country
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: url
  transform:
    v: copy
  parameter:
    value: String
      v: http://smart.who.int/immunizations/StructureDefinition/IMMZCountryOfVaccination
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: value
  transform:
    v: copy
  parameter:
    value: Id
      v: country

name:
  v: administrativeArea
source:
  context:
    v: immz
  element:
    v: administrativeArea
  variable:
    v: area
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: url
  transform:
    v: copy
  parameter:
    value: String
      v: http://smart.who.int/immunizations/StructureDefinition/IMMZAdministrativeArea
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: value
  transform:
    v: copy
  parameter:
    value: Id
      v: area

name:
  v: vaccineManufacturer
source:
  context:
    v: immz
  element:
    v: vaccineManufacturer
  variable:
    v: vman
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: manufacturer
  variable:
    v: manufacturer
target:
  context:
    v: manufacturer
  context type:
    v: variable
  element:
    v: identifier
  variable:
    v: identifier
rule:
  name:
    v: SetSystem
  source:
    context:
      v: vman
    element:
      v: system
    variable:
      v: system
  target:
    context:
      v: identifier
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: Id
        v: system
rule:
  name:
    v: SetValue
  source:
    context:
      v: vman
    element:
      v: code
    variable:
      v: code
  target:
    context:
      v: identifier
    context type:
      v: variable
    element:
      v: value
    transform:
      v: copy
    parameter:
      value: Id
        v: code

name:
  v: vaccineBatchNumber
source:
  context:
    v: immz
  element:
    v: vaccineBatchNumber
  variable:
    v: batch
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: lotNumber
  transform:
    v: copy
  parameter:
    value: Id
      v: batch

name:
  v: vaccineMarketAuthorizationHolder
source:
  context:
    v: immz
  element:
    v: vaccineMarketAuthorizationHolder
  variable:
    v: market
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: url
  transform:
    v: copy
  parameter:
    value: String
      v: http://smart.who.int/immunizations/StructureDefinition/IMMZMarketAuthorization
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: value
  transform:
    v: copy
  parameter:
    value: Id
      v: market

name:
  v: expirationDate
source:
  context:
    v: immz
  element:
    v: expirationDate
  variable:
    v: expiration
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: expirationDate
  transform:
    v: copy
  parameter:
    value: Id
      v: expiration

name:
  v: doseQuantity
source:
  context:
    v: immz
  element:
    v: doseQuantity
  variable:
    v: dosequantity
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: doseQuantity
  transform:
    v: copy
  parameter:
    value: Id
      v: dosequantity

name:
  v: healthWorkerIdentifier
source:
  context:
    v: immz
  element:
    v: healthWorkerIdentifier
  variable:
    v: hw
target:
  context:
    v: imm
  context type:
    v: variable
  element:
    v: performer
  variable:
    v: performer
target:
  context:
    v: performer
  context type:
    v: variable
  element:
    v: actor
  variable:
    v: actor
target:
  context:
    v: actor
  context type:
    v: variable
  element:
    v: identifier
  variable:
    v: identifier
target:
  context:
    v: identifier
  context type:
    v: variable
  element:
    v: value
  transform:
    v: copy
  parameter:
    value: Id
      v: hw

name:
  v: D1andD13Observations
type mode:
  v: none
input:
  name:
    v: patient
  type:
    v: Reference
  mode:
    v: source
input:
  name:
    v: immid
  mode:
    v: source
input:
  name:
    v: immz
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: DefineCategory
  source:
    context:
      v: immz
  target:
    context type:
      v: variable
    variable:
      v: survey
    transform:
      v: c
    parameter:
      value: String
        v: http://terminology.hl7.org/CodeSystem/observation-category
    parameter:
      value: String
        v: survey
    parameter:
      value: String
        v: Survey
  rule:
    name:
      v: birthDose
    source:
      context:
        v: immz
      element:
        v: birthDose
      variable:
        v: content
    target:
      context type:
        v: variable
      variable:
        v: code
      transform:
        v: c
      parameter:
        value: String
      parameter:
        value: String
      parameter:
        value: String
    dependent:
      name:
        v: MakeImmzObservation
      variable:
        v: patient
      variable:
        v: immid
      variable:
        v: code
      variable:
        v: survey
      variable:
        v: content
      variable:
        v: bundle
  rule:
    name:
      v: completedThePrimaryVaccinationSeries
    source:
      context:
        v: immz
      element:
        v: completedThePrimaryVaccinationSeries
      variable:
        v: content
    target:
      context type:
        v: variable
      variable:
        v: code
      transform:
        v: c
      parameter:
        value: String
      parameter:
        value: String
      parameter:
        value: String
    dependent:
      name:
        v: MakeImmzObservation
      variable:
        v: patient
      variable:
        v: immid
      variable:
        v: code
      variable:
        v: survey
      variable:
        v: content
      variable:
        v: bundle
  rule:
    name:
      v: completedTheBoosterSeries
    source:
      context:
        v: immz
      element:
        v: completedTheBoosterSeries
      variable:
        v: content
    target:
      context type:
        v: variable
      variable:
        v: code
      transform:
        v: c
      parameter:
        value: String
      parameter:
        value: String
      parameter:
        value: String
    dependent:
      name:
        v: MakeImmzObservation
      variable:
        v: patient
      variable:
        v: immid
      variable:
        v: code
      variable:
        v: survey
      variable:
        v: content
      variable:
        v: bundle
  rule:
    name:
      v: dateWhenPrimaryVaccinationSeriesWasCompleted
    source:
      context:
        v: immz
      element:
        v: dateWhenPrimaryVaccinationSeriesWasCompleted
      variable:
        v: content
    target:
      context type:
        v: variable
      variable:
        v: code
      transform:
        v: c
      parameter:
        value: String
      parameter:
        value: String
      parameter:
        value: String
    dependent:
      name:
        v: MakeImmzObservation
      variable:
        v: patient
      variable:
        v: immid
      variable:
        v: code
      variable:
        v: survey
      variable:
        v: content
      variable:
        v: bundle

String
v: DE263

String
v: Birth dose

String
v: DE203

String
v: Completed the primary vaccination series

String
v: DE257

String
v: Completed the booster series

String
v: DE242

String
v: Date when primary vaccination series was completed

name:
  v: hivStatus
source:
  context:
    v: immz
  element:
    v: hivStatus
  variable:
    v: content
target:
  context type:
    v: variable
  variable:
    v: code
  transform:
    v: c
  parameter:
    value: String
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  parameter:
    value: String
      v: DE204
  parameter:
    value: String
      v: HIV status
dependent:
  name:
    v: MakeImmzObservation
  variable:
    v: patient
  variable:
    v: immid
  variable:
    v: code
  variable:
    v: survey
  variable:
    v: content
  variable:
    v: bundle

name:
  v: contactDate
source:
  context:
    v: immz
  element:
    v: contactDate
  variable:
    v: content
target:
  context type:
    v: variable
  variable:
    v: code
  transform:
    v: c
  parameter:
    value: String
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  parameter:
    value: String
      v: DE201
  parameter:
    value: String
      v: Contact date
dependent:
  name:
    v: MakeImmzObservation
  variable:
    v: patient
  variable:
    v: immid
  variable:
    v: code
  variable:
    v: survey
  variable:
    v: content
  variable:
    v: bundle

name:
  v: ancContactNumber
source:
  context:
    v: immz
  element:
    v: ancContactNumber
  variable:
    v: content
target:
  context type:
    v: variable
  variable:
    v: code
  transform:
    v: c
  parameter:
    value: String
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  parameter:
    value: String
      v: DE202
  parameter:
    value: String
      v: ANC contact number
dependent:
  name:
    v: MakeImmzObservation
  variable:
    v: patient
  variable:
    v: immid
  variable:
    v: code
  variable:
    v: survey
  variable:
    v: content
  variable:
    v: bundle

name:
  v: D1Observations
type mode:
  v: none
input:
  name:
    v: patient
  type:
    v: Reference
  mode:
    v: source
input:
  name:
    v: immid
  mode:
    v: source
input:
  name:
    v: immz
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: DefineCategory
  source:
    context:
      v: immz
  target:
    context type:
      v: variable
    variable:
      v: survey
    transform:
      v: c
    parameter:
      value: String
        v: http://terminology.hl7.org/CodeSystem/observation-category
    parameter:
      value: String
        v: survey
    parameter:
      value: String
        v: Survey
  rule:
    name:
      v: pretermBirth
    source:
      context:
        v: immz
      element:
        v: pretermBirth
      variable:
        v: content
    target:
      context type:
        v: variable
      variable:
        v: code
      transform:
        v: c
      parameter:
        value: String
      parameter:
        value: String
      parameter:
        value: String
    dependent:
      name:
        v: MakeImmzObservation
      variable:
        v: patient
      variable:
        v: immid
      variable:
        v: code
      variable:
        v: survey
      variable:
        v: content
      variable:
        v: bundle
  rule:
    name:
      v: immunocompromised
    source:
      context:
        v: immz
      element:
        v: immunocompromised
      variable:
        v: content
    target:
      context type:
        v: variable
      variable:
        v: code
      transform:
        v: c
      parameter:
        value: String
      parameter:
        value: String
      parameter:
        value: String
    dependent:
      name:
        v: MakeImmzObservation
      variable:
        v: patient
      variable:
        v: immid
      variable:
        v: code
      variable:
        v: survey
      variable:
        v: content
      variable:
        v: bundle
  rule:
    name:
      v: currentlyOnArt
    source:
      context:
        v: immz
      element:
        v: currentlyOnArt
      variable:
        v: content
    target:
      context type:
        v: variable
      variable:
        v: code
      transform:
        v: c
      parameter:
        value: String
      parameter:
        value: String
      parameter:
        value: String
    dependent:
      name:
        v: MakeImmzObservation
      variable:
        v: patient
      variable:
        v: immid
      variable:
        v: code
      variable:
        v: survey
      variable:
        v: content
      variable:
        v: bundle
  rule:
    name:
      v: typeOfTbInfectionTestPerformed
    source:
      context:
        v: immz
      element:
        v: typeOfTbInfectionTestPerformed
      variable:
        v: content
    target:
      context type:
        v: variable
      variable:
        v: code
      transform:
        v: c
      parameter:
        value: String
      parameter:
        value: String
      parameter:
        value: String
    dependent:
      name:
        v: MakeImmzObservation
      variable:
        v: patient
      variable:
        v: immid
      variable:
        v: code
      variable:
        v: survey
      variable:
        v: content
      variable:
        v: bundle

String
v: DE208

String
v: Preterm birth

String
v: DE209

String
v: Immunocompromised

String
v: DE210

String
v: Currently on ART

String
v: DE243

String
v: Type of TB infection test performed

name:
  v: tbInfectionTestResult
source:
  context:
    v: immz
  element:
    v: tbInfectionTestResult
  variable:
    v: content
target:
  context type:
    v: variable
  variable:
    v: code
  transform:
    v: c
  parameter:
    value: String
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  parameter:
    value: String
      v: DE246
  parameter:
    value: String
      v: TB infection test result
dependent:
  name:
    v: MakeImmzObservation
  variable:
    v: patient
  variable:
    v: immid
  variable:
    v: code
  variable:
    v: survey
  variable:
    v: content
  variable:
    v: bundle

name:
  v: immunologicallyStable
source:
  context:
    v: immz
  element:
    v: immunologicallyStable
  variable:
    v: content
target:
  context type:
    v: variable
  variable:
    v: code
  transform:
    v: c
  parameter:
    value: String
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  parameter:
    value: String
      v: DE249
  parameter:
    value: String
      v: Immunologically stable
dependent:
  name:
    v: MakeImmzObservation
  variable:
    v: patient
  variable:
    v: immid
  variable:
    v: code
  variable:
    v: survey
  variable:
    v: content
  variable:
    v: bundle

name:
  v: clinicallyWell
source:
  context:
    v: immz
  element:
    v: clinicallyWell
  variable:
    v: content
target:
  context type:
    v: variable
  variable:
    v: code
  transform:
    v: c
  parameter:
    value: String
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  parameter:
    value: String
      v: DE250
  parameter:
    value: String
      v: Clinically well
dependent:
  name:
    v: MakeImmzObservation
  variable:
    v: patient
  variable:
    v: immid
  variable:
    v: code
  variable:
    v: survey
  variable:
    v: content
  variable:
    v: bundle

name:
  v: birthWeightInGrams
source:
  context:
    v: immz
  element:
    v: birthWeightInGrams
  variable:
    v: value
target:
  context type:
    v: variable
  variable:
    v: content
  transform:
    v: create
  parameter:
    value: String
      v: Quantity
target:
  context:
    v: content
  context type:
    v: variable
  element:
    v: system
  transform:
    v: copy
  parameter:
    value: String
      v: http://unitsofmeasure.org
target:
  context:
    v: content
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value: String
      v: g
target:
  context:
    v: content
  context type:
    v: variable
  element:
    v: unit
  transform:
    v: copy
  parameter:
    value: String
      v: g
target:
  context:
    v: content
  context type:
    v: variable
  element:
    v: value
  transform:
    v: copy
  parameter:
    value: Id
      v: value
target:
  context type:
    v: variable
  variable:
    v: bwloinc
  transform:
    v: c
  parameter:
    value: String
      v: http://loinc.org
  parameter:
    value: String
      v: 8339-4
  parameter:
    value: String
      v: Birth weight Measured
target:
  context type:
    v: variable
  variable:
    v: bwdak
  transform:
    v: c
  parameter:
    value: String
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  parameter:
    value: String
      v: DE211
  parameter:
    value: String
      v: Birth weight in grams
target:
  context type:
    v: variable
  variable:
    v: code
  transform:
    v: create
  parameter:
    value: String
      v: CodeableConcept
target:
  context:
    v: code
  context type:
    v: variable
  element:
    v: coding
  transform:
    v: copy
  parameter:
    value: Id
      v: bwloinc
target:
  context:
    v: code
  context type:
    v: variable
  element:
    v: coding
  transform:
    v: copy
  parameter:
    value: Id
      v: bwdak
target:
  context type:
    v: variable
  variable:
    v: vital
  transform:
    v: c
  parameter:
    value: String
      v: http://terminology.hl7.org/CodeSystem/observation-category
  parameter:
    value: String
      v: vital-signs
  parameter:
    value: String
      v: Vital Signs
dependent:
  name:
    v: MakeImmzObservation
  variable:
    v: patient
  variable:
    v: immid
  variable:
    v: code
  variable:
    v: vital
  variable:
    v: content
  variable:
    v: bundle

name:
  v: artStartDate
source:
  context:
    v: immz
  element:
    v: artStartDate
  variable:
    v: content
target:
  context type:
    v: variable
  variable:
    v: code
  transform:
    v: c
  parameter:
    value: String
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  parameter:
    value: String
      v: DE215
  parameter:
    value: String
      v: ART start date
dependent:
  name:
    v: MakeImmzObservation
  variable:
    v: patient
  variable:
    v: immid
  variable:
    v: code
  variable:
    v: survey
  variable:
    v: content
  variable:
    v: bundle

name:
  v: highRiskOfPneumococcalInfection
source:
  context:
    v: immz
  element:
    v: highRiskOfPneumococcalInfection
  variable:
    v: content
target:
  context type:
    v: variable
  variable:
    v: code
  transform:
    v: c
  parameter:
    value: String
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  parameter:
    value: String
      v: DE251
  parameter:
    value: String
      v: High risk of pneumococcal infection
dependent:
  name:
    v: MakeImmzObservation
  variable:
    v: patient
  variable:
    v: immid
  variable:
    v: code
  variable:
    v: survey
  variable:
    v: content
  variable:
    v: bundle

name:
  v: ageInMonthsWhenClientReceivedFirstMeningococcalDose
source:
  context:
    v: immz
  element:
    v: ageInMonthsWhenClientReceivedFirstMeningococcalDose
  variable:
    v: value
target:
  context type:
    v: variable
  variable:
    v: content
  transform:
    v: create
  parameter:
    value: String
      v: Quantity
target:
  context:
    v: content
  context type:
    v: variable
  element:
    v: unit
  transform:
    v: copy
  parameter:
    value: String
      v: mo
target:
  context:
    v: content
  context type:
    v: variable
  element:
    v: value
  transform:
    v: copy
  parameter:
    value: Id
      v: value
target:
  context type:
    v: variable
  variable:
    v: code
  transform:
    v: c
  parameter:
    value: String
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  parameter:
    value: String
      v: DE236
  parameter:
    value: String
      v: Age in months when client received first meningococcal dose
dependent:
  name:
    v: MakeImmzObservation
  variable:
    v: patient
  variable:
    v: immid
  variable:
    v: code
  variable:
    v: survey
  variable:
    v: content
  variable:
    v: bundle

name:
  v: vnaLevel
source:
  context:
    v: immz
  element:
    v: vnaLevel
  variable:
    v: value
target:
  context type:
    v: variable
  variable:
    v: content
  transform:
    v: create
  parameter:
    value: String
      v: Quantity
target:
  context:
    v: content
  context type:
    v: variable
  element:
    v: system
  transform:
    v: copy
  parameter:
    value: String
      v: http://unitsofmeasure.org
target:
  context:
    v: content
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value: String
      v: [IU]/mL
target:
  context:
    v: content
  context type:
    v: variable
  element:
    v: unit
  transform:
    v: copy
  parameter:
    value: String
      v: [IU]/mL
target:
  context:
    v: content
  context type:
    v: variable
  element:
    v: value
  transform:
    v: copy
  parameter:
    value: Id
      v: value
target:
  context type:
    v: variable
  variable:
    v: code
  transform:
    v: c
  parameter:
    value: String
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  parameter:
    value: String
      v: DE240
  parameter:
    value: String
      v: VNA level
dependent:
  name:
    v: MakeImmzObservation
  variable:
    v: patient
  variable:
    v: immid
  variable:
    v: code
  variable:
    v: survey
  variable:
    v: content
  variable:
    v: bundle

name:
  v: riskOfOccupationalExposureToRabiesVirus
source:
  context:
    v: immz
  element:
    v: riskOfOccupationalExposureToRabiesVirus
  variable:
    v: content
target:
  context type:
    v: variable
  variable:
    v: code
  transform:
    v: c
  parameter:
    value: String
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  parameter:
    value: String
      v: DE253
  parameter:
    value: String
      v: Risk of occupational exposure to rabies virus
dependent:
  name:
    v: MakeImmzObservation
  variable:
    v: patient
  variable:
    v: immid
  variable:
    v: code
  variable:
    v: survey
  variable:
    v: content
  variable:
    v: bundle

name:
  v: dengueSerostatus
source:
  context:
    v: immz
  element:
    v: dengueSerostatus
  variable:
    v: content
target:
  context type:
    v: variable
  variable:
    v: code
  transform:
    v: c
  parameter:
    value: String
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  parameter:
    value: String
      v: DE241
  parameter:
    value: String
      v: Dengue serostatus
dependent:
  name:
    v: MakeImmzObservation
  variable:
    v: patient
  variable:
    v: immid
  variable:
    v: code
  variable:
    v: survey
  variable:
    v: content
  variable:
    v: bundle