ICVPLMToIPS
type: StructureMap
node role: treeRoot
id:
  v: ICVPLMToIPS
text:
  status:
    v: generated
  div:
    v: Generated Narrative: StructureMap ICVPLMToIPS #xD; map "http://smart.who.int/icvp/StructureMap/ICVPLMToIPS" = "ICVPLMToIPS"#xD; #xD; uses "http://smart.who.int/icvp/StructureDefinition/ICVP" alias ICVPLogicalModel as source#xD; uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias IPS as target#xD; #xD; // uses "http://smart.who.int/icvp/ConceptMap/ICVPProductIdToVaccineType" alias ICVPProductIdToVaccineType as conceptmap#xD; // create Bundle#xD; group ICVPLMToIPS(source lm : ICVPLogicalModel, target ips : IPS) {#xD; lm -> ips.type = 'document' "setIPSType";#xD; lm -> uuid() as bid, ips.identifier as id, id.value = bid, id.system = 'urn:oid:2.16.724.4.8.10.200.10' "setId";#xD; lm -> uuid() as cid, uuid() as pid, uuid() as mid, uuid() as aid, uuid() as proid, uuid() as immid then {#xD; lm -> ips.entry as entry, entry.resource = create('Composition') as composition, entry.fullUrl = append('urn:uuid:', cid) then {#xD; lm then LmToComposition(lm, ips, composition, cid, pid, mid, aid, proid, immid) "setLmToComposition";#xD; lm -> ips.entry as entry, entry.fullUrl = append('urn:uuid:', pid), create('Patient') as patient then {#xD; lm then DemographicsToPatient(lm, patient, pid) "createPatient";#xD; lm -> entry.resource = patient "setPatientEntry";#xD; } "mapPatientResource";#xD; lm.issuer as issuer then {#xD; issuer.reference as id -> ips.entry as entry, entry.fullUrl = append('urn:uuid:', id), create('Organization') as organization then {#xD; lm -> organization then createAuthor(issuer, organization) "createOrganization";#xD; lm -> entry.resource = organization "setOrganizationEntry";#xD; } "mapOrganizationResource";#xD; } "ss";#xD; } "mapCompositionResource";#xD; } "setEntries";#xD; }#xD; #xD; // create Composition#xD; group LmToComposition(source lm : ICVPLogicalModel, target ips : Bundle, target composition : Composition, source cid, source pid, source mid, source aid, source proid, source immid) {#xD; cid -> composition.id = cid "setCid";#xD; lm -> composition.…
url:
  v: http://smart.who.int/icvp/StructureMap/ICVPLMToIPS
  l: ICVPLMToIPS
version:
  v: 0.3.0
name:
  v: ICVPLMToIPS
status:
  v: draft
date:
  v: 2025-10-30T20:06:40+00:00
publisher:
  v: WHO
contact:
  name:
    v: WHO
  telecom:
    system:
      v: url
    value:
      v: http://who.int
structure:
  url:
    v: http://smart.who.int/icvp/StructureDefinition/ICVP
    l: ICVP
  mode:
    v: source
  alias:
    v: ICVPLogicalModel
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Bundle
    l: Bundle
  mode:
    v: target
  alias:
    v: IPS
group:
  name:
    v: ICVPLMToIPS
  type mode:
    v: none
  documentation:
    v: uses "http://smart.who.int/icvp/ConceptMap/ICVPProductIdToVaccineType" alias ICVPProductIdToVaccineType as conceptmap create Bundle
  input:
    name:
      v: lm
    type:
      v: ICVPLogicalModel
    mode:
      v: source
  input:
    name:
      v: ips
    type:
      v: IPS
    mode:
      v: target
  rule:
    name:
      v: setIPSType
    source:
      context:
        v: lm
    target:
      context:
        v: ips
      context type:
        v: variable
      element:
        v: type
      transform:
        v: copy
      parameter:
        value: String
  rule:
    name:
      v: setId
    source:
      context:
        v: lm
    target:
      context type:
        v: variable
      variable:
        v: bid
      transform:
        v: uuid
    target:
      context:
        v: ips
      context type:
        v: variable
      element:
        v: identifier
      variable:
        v: id
    target:
      context:
        v: id
      context type:
        v: variable
      element:
        v: value
      transform:
        v: copy
      parameter:
        value: Id
    target:
      context:
        v: id
      context type:
        v: variable
      element:
        v: system
      transform:
        v: copy
      parameter:
        value: String
  rule:
    name:
      v: setEntries
    source:
      context:
        v: lm
    target:
      context type:
        v: variable
      variable:
        v: cid
      transform:
        v: uuid
    target:
      context type:
        v: variable
      variable:
        v: pid
      transform:
        v: uuid
    target:
      context type:
        v: variable
      variable:
        v: mid
      transform:
        v: uuid
    target:
      context type:
        v: variable
      variable:
        v: aid
      transform:
        v: uuid
    target:
      context type:
        v: variable
      variable:
        v: proid
      transform:
        v: uuid
    target:
      context type:
        v: variable
      variable:
        v: immid
      transform:
        v: uuid
    rule:
      name:
        v: mapCompositionResource
group:
  name:
    v: LmToComposition
  type mode:
    v: none
  documentation:
    v: create Composition
  input:
    name:
      v: lm
    type:
      v: ICVPLogicalModel
    mode:
      v: source
  input:
    name:
      v: ips
    type:
      v: Bundle
    mode:
      v: target
  input:
    name:
      v: composition

String
v: document

Id
v: bid

String
v: urn:oid:2.16.724.4.8.10.200.10

v: lm

v: ips

v: variable

v: entry

v: entry

v: entry

v: variable

v: resource

v: composition

v: create

value: String
  v: Composition

v: entry

v: variable

v: fullUrl

v: append

value: String
  v: urn:uuid:

value: Id
  v: cid

v: setLmToComposition

context:
  v: lm

name:
  v: LmToComposition
variable:
  v: lm
variable:
  v: ips
variable:
  v: composition
variable:
  v: cid
variable:
  v: pid
variable:
  v: mid
variable:
  v: aid
variable:
  v: proid
variable:
  v: immid

v: mapPatientResource

context:
  v: lm

context:
  v: ips
context type:
  v: variable
element:
  v: entry
variable:
  v: entry

context:
  v: entry
context type:
  v: variable
element:
  v: fullUrl
transform:
  v: append
parameter:
  value: String
    v: urn:uuid:
parameter:
  value: Id
    v: pid

context type:
  v: variable
variable:
  v: patient
transform:
  v: create
parameter:
  value: String
    v: Patient

name:
  v: createPatient
source:
  context:
    v: lm
dependent:
  name:
    v: DemographicsToPatient
  variable:
    v: lm
  variable:
    v: patient
  variable:
    v: pid

name:
  v: setPatientEntry
source:
  context:
    v: lm
target:
  context:
    v: entry
  context type:
    v: variable
  element:
    v: resource
  transform:
    v: copy
  parameter:
    value: Id
      v: patient

v: ss

context:
  v: lm
element:
  v: issuer
variable:
  v: issuer

name:
  v: mapOrganizationResource
source:
  context:
    v: issuer
  element:
    v: reference
  variable:
    v: id
target:
  context:
    v: ips
  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: id
target:
  context type:
    v: variable
  variable:
    v: organization
  transform:
    v: create
  parameter:
    value: String
      v: Organization
rule:
  name:
    v: createOrganization
  source:
    context:
      v: lm
  target:
    context:
      v: organization
    context type:
      v: variable
  dependent:
    name:
      v: createAuthor
    variable:
      v: issuer
    variable:
      v: organization
rule:
  name:
    v: setOrganizationEntry
  source:
    context:
      v: lm
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: resource
    transform:
      v: copy
    parameter:
      value: Id
        v: organization

v: Composition

v: target

name:
  v: cid
mode:
  v: source

name:
  v: pid
mode:
  v: source

name:
  v: mid
mode:
  v: source

name:
  v: aid
mode:
  v: source

name:
  v: proid
mode:
  v: source

name:
  v: immid
mode:
  v: source

name:
  v: setCid
source:
  context:
    v: cid
target:
  context:
    v: composition
  context type:
    v: variable
  element:
    v: id
  transform:
    v: copy
  parameter:
    value: Id
      v: cid

name:
  v: setStatus
source:
  context:
    v: lm
target:
  context:
    v: composition
  context type:
    v: variable
  element:
    v: status
  transform:
    v: copy
  parameter:
    value: String
      v: final

name:
  v: setTitle
source:
  context:
    v: lm
target:
  context:
    v: composition
  context type:
    v: variable
  element:
    v: title
  transform:
    v: copy
  parameter:
    value: String
      v: International Patient Summary

name:
  v: setType
source:
  context:
    v: lm
target:
  context type:
    v: variable
  variable:
    v: coding
  transform:
    v: create
  parameter:
    value: String
      v: Coding
target:
  context:
    v: coding
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value: String
      v: 60591-5
target:
  context:
    v: coding
  context type:
    v: variable
  element:
    v: system
  transform:
    v: copy
  parameter:
    value: String
      v: http://loinc.org
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: coding
target:
  context:
    v: composition
  context type:
    v: variable
  element:
    v: type
  transform:
    v: copy
  parameter:
    value: Id
      v: code

name:
  v: setSubject
source:
  context:
    v: lm
target:
  context:
    v: composition
  context type:
    v: variable
  element:
    v: subject
  variable:
    v: subject
rule:
  name:
    v: setSubject
  source:
    context:
      v: lm
  target:
    context:
      v: subject
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: append
    parameter:
      value: String
        v: urn:uuid:
    parameter:
      value: Id
        v: pid

name:
  v: setid
source:
  context:
    v: lm
  element:
    v: issuer
  variable:
    v: issuer
rule:
  name:
    v: setauthr
  source:
    context:
      v: issuer
    element:
      v: reference
    variable:
      v: id
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: author
    variable:
      v: author
  rule:
    name:
      v: setAuthor
    source:
      context:
        v: id
    target:
      context:
        v: author
      context type:
        v: variable
      element:
        v: reference
      transform:
        v: append
      parameter:
        value: String
      parameter:
        value: Id

String
v: urn:uuid:

Id
v: id

name:
  v: createMedication
source:
  context:
    v: lm
target:
  context:
    v: composition
  context type:
    v: variable
  element:
    v: section
  variable:
    v: medication
dependent:
  name:
    v: createSectionMedications
  variable:
    v: lm
  variable:
    v: medication
  variable:
    v: mid

name:
  v: createAllergies
source:
  context:
    v: lm
target:
  context:
    v: composition
  context type:
    v: variable
  element:
    v: section
  variable:
    v: allergies
dependent:
  name:
    v: createSectionAllergies
  variable:
    v: lm
  variable:
    v: allergies
  variable:
    v: aid

name:
  v: createProblems
source:
  context:
    v: lm
target:
  context:
    v: composition
  context type:
    v: variable
  element:
    v: section
  variable:
    v: problems
dependent:
  name:
    v: createSectionProblems
  variable:
    v: lm
  variable:
    v: problems
  variable:
    v: proid

name:
  v: createImmunizations
source:
  context:
    v: lm
dependent:
  name:
    v: createSectionImmunizations
  variable:
    v: lm
  variable:
    v: ips
  variable:
    v: composition
  variable:
    v: immid
  variable:
    v: pid

name:
  v: DemographicsToPatient
type mode:
  v: none
documentation:
  v: create Patient
input:
  name:
    v: lm
  type:
    v: ICVPLogicalModel
  mode:
    v: source
input:
  name:
    v: patient
  type:
    v: Patient
  mode:
    v: target
input:
  name:
    v: pid
  mode:
    v: source
rule:
  name:
    v: setPatientId
  source:
    context:
      v: pid
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: id
    transform:
      v: copy
    parameter:
      value: Id
        v: pid
rule:
  name:
    v: Setname
  source:
    context:
      v: lm
    element:
      v: name
    variable:
      v: sourceName
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: name
    variable:
      v: targetName
  dependent:
    name:
      v: nameToHumanName
    variable:
      v: sourceName
    variable:
      v: targetName
rule:
  name:
    v: setDateofBirth
  source:
    context:
      v: lm
    element:
      v: dob
    variable:
      v: dob
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: birthDate
    transform:
      v: copy
    parameter:
      value: Id
        v: dob
rule:
  name:
    v: PatientGender
  source:
    context:
      v: lm
    element:
      v: sex
    variable:
      v: sex
  dependent:
    name:
      v: ExtractGender
    variable:
      v: sex
    variable:
      v: patient
rule:
  name:
    v: setNationalIdentifier
  source:
    context:
      v: lm
    element:
      v: nid
    variable:
      v: id
  target:
    context:
      v: patient
    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: id
rule:
  name:
    v: setGuardianName
  source:
    context:
      v: lm
    element:
      v: guardian
    variable:
      v: guardian
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: contact
    variable:
      v: parentContact
  target:
    context:
      v: parentContact
    context type:
      v: variable
    element:
      v: name
    variable:
      v: parentName
  dependent:
    name:
      v: nameToHumanName
    variable:
      v: guardian
    variable:
      v: parentName

name:
  v: ExtractGender
type mode:
  v: none
documentation:
  v: deals with short and case sensitive codes
input:
  name:
    v: sex
  mode:
    v: source
input:
  name:
    v: patient
  type:
    v: Patient
  mode:
    v: target
rule:
  name:
    v: setMale
  source:
    context:
      v: sex
    condition:
      v: (sex = 'M')
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: gender
    transform:
      v: copy
    parameter:
      value: String
        v: male
rule:
  name:
    v: setFemale
  source:
    context:
      v: sex
    condition:
      v: (sex = 'F')
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: gender
    transform:
      v: copy
    parameter:
      value: String
        v: female
rule:
  name:
    v: setMale
  source:
    context:
      v: sex
    condition:
      v: (sex = 'm')
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: gender
    transform:
      v: copy
    parameter:
      value: String
        v: male
rule:
  name:
    v: setFemale
  source:
    context:
      v: sex
    condition:
      v: (sex = 'f')
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: gender
    transform:
      v: copy
    parameter:
      value: String
        v: female
rule:
  name:
    v: setMale
  source:
    context:
      v: sex
    condition:
      v: (sex = 'Male')
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: gender
    transform:
      v: copy
    parameter:
      value: String
        v: male
rule:
  name:
    v: setFemale
  source:
    context:
      v: sex
    condition:
      v: (sex = 'Female')
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: gender
    transform:
      v: copy
    parameter:
      value: String
        v: female
rule:
  name:
    v: setMale
  source:
    context:
      v: sex
    condition:
      v: (sex = 'male')
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: gender
    transform:
      v: copy
    parameter:
      value: String
        v: male
rule:
  name:
    v: setFemale
  source:
    context:
      v: sex
    condition:
      v: (sex = 'female')
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: gender
    transform:
      v: copy
    parameter:
      value: String
        v: female

name:
  v: createAuthor
type mode:
  v: none
documentation:
  v: create author
input:
  name:
    v: issuer
  mode:
    v: source
input:
  name:
    v: org
  type:
    v: Organization
  mode:
    v: target
rule:
  name:
    v: setID
  source:
    context:
      v: issuer
    element:
      v: reference
    variable:
      v: id
  target:
    context:
      v: org
    context type:
      v: variable
    element:
      v: id
    transform:
      v: copy
    parameter:
      value: Id
        v: id

name:
  v: createSectionMedications
type mode:
  v: none
documentation:
  v: create sectionMedications
input:
  name:
    v: lm
  type:
    v: ICVPLogicalModel
  mode:
    v: source
input:
  name:
    v: med
  type:
    v: BackboneElement
  mode:
    v: target
input:
  name:
    v: mid
  mode:
    v: source
rule:
  name:
    v: setmedicationid
  source:
    context:
      v: mid
  target:
    context:
      v: med
    context type:
      v: variable
    element:
      v: id
    transform:
      v: copy
    parameter:
      value: Id
        v: mid
rule:
  name:
    v: setMedicationTitle
  source:
    context:
      v: lm
  target:
    context:
      v: med
    context type:
      v: variable
    element:
      v: title
    transform:
      v: copy
    parameter:
      value: String
        v: Medication Summary Section
rule:
  name:
    v: setText
  source:
    context:
      v: lm
  target:
    context:
      v: med
    context type:
      v: variable
    element:
      v: text
    variable:
      v: text
  dependent:
    name:
      v: generateNarrativeText
    variable:
      v: med
    variable:
      v: text
rule:
  name:
    v: setCode
  source:
    context:
      v: lm
  target:
    context type:
      v: variable
    variable:
      v: coding
    transform:
      v: create
    parameter:
      value: String
        v: Coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: String
        v: 10160-0
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: String
        v: http://loinc.org
  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: coding
  target:
    context:
      v: med
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: Id
        v: code
rule:
  name:
    v: setCode
  source:
    context:
      v: lm
  target:
    context type:
      v: variable
    variable:
      v: coding
    transform:
      v: create
    parameter:
      value: String
        v: Coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: String
        v: unavailable
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: String
        v: http://terminology.hl7.org/CodeSystem/list-empty-reason
  target:
    context type:
      v: variable
    variable:
      v: code

v: create

value: String
  v: CodeableConcept

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

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

name:
  v: createSectionAllergies
type mode:
  v: none
documentation:
  v: create sectionAllergies
input:
  name:
    v: lm
  type:
    v: ICVPLogicalModel
  mode:
    v: source
input:
  name:
    v: all
  type:
    v: BackboneElement
  mode:
    v: target
input:
  name:
    v: aid
  mode:
    v: source
rule:
  name:
    v: setAllergyId
  source:
    context:
      v: aid
  target:
    context:
      v: all
    context type:
      v: variable
    element:
      v: id
    transform:
      v: copy
    parameter:
      value: Id
        v: aid
rule:
  name:
    v: setAllergyTitle
  source:
    context:
      v: lm
  target:
    context:
      v: all
    context type:
      v: variable
    element:
      v: title
    transform:
      v: copy
    parameter:
      value: String
        v: Allergies Section
rule:
  name:
    v: setText
  source:
    context:
      v: lm
  target:
    context:
      v: all
    context type:
      v: variable
    element:
      v: text
    variable:
      v: text
  dependent:
    name:
      v: generateNarrativeText
    variable:
      v: all
    variable:
      v: text
rule:
  name:
    v: setCode
  source:
    context:
      v: lm
  target:
    context type:
      v: variable
    variable:
      v: coding
    transform:
      v: create
    parameter:
      value: String
        v: Coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: String
        v: 48765-2
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: String
        v: http://loinc.org
  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: coding
  target:
    context:
      v: all
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: Id
        v: code
rule:
  name:
    v: setCode
  source:
    context:
      v: lm
  target:
    context type:
      v: variable
    variable:
      v: coding
    transform:
      v: create
    parameter:
      value: String
        v: Coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: String
        v: unavailable
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: String
        v: http://terminology.hl7.org/CodeSystem/list-empty-reason
  target:
    context type:
      v: variable
    variable:
      v: code

v: create

value: String
  v: CodeableConcept

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

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

name:
  v: createSectionProblems
type mode:
  v: none
documentation:
  v: create sectionProblems
input:
  name:
    v: lm
  type:
    v: ICVPLogicalModel
  mode:
    v: source
input:
  name:
    v: prb
  type:
    v: BackboneElement
  mode:
    v: target
input:
  name:
    v: proid
  mode:
    v: source
rule:
  name:
    v: setProblemsId
  source:
    context:
      v: proid
  target:
    context:
      v: prb
    context type:
      v: variable
    element:
      v: id
    transform:
      v: copy
    parameter:
      value: Id
        v: proid
rule:
  name:
    v: setProblemTitle
  source:
    context:
      v: lm
  target:
    context:
      v: prb
    context type:
      v: variable
    element:
      v: title
    transform:
      v: copy
    parameter:
      value: String
        v: Problems Section
rule:
  name:
    v: setText
  source:
    context:
      v: lm
  target:
    context:
      v: prb
    context type:
      v: variable
    element:
      v: text
    variable:
      v: text
  dependent:
    name:
      v: generateNarrativeText
    variable:
      v: prb
    variable:
      v: text
rule:
  name:
    v: setCode
  source:
    context:
      v: lm
  target:
    context type:
      v: variable
    variable:
      v: coding
    transform:
      v: create
    parameter:
      value: String
        v: Coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: String
        v: 11450-4
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: String
        v: http://loinc.org
  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: coding
  target:
    context:
      v: prb
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: Id
        v: code
rule:
  name:
    v: setCode
  source:
    context:
      v: lm
  target:
    context type:
      v: variable
    variable:
      v: coding
    transform:
      v: create
    parameter:
      value: String
        v: Coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: String
        v: unavailable
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: String
        v: http://terminology.hl7.org/CodeSystem/list-empty-reason
  target:
    context type:
      v: variable
    variable:
      v: code

v: create

value: String
  v: CodeableConcept

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

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

name:
  v: createSectionImmunizations
type mode:
  v: none
documentation:
  v: create sectionImmunizations
input:
  name:
    v: lm
  type:
    v: ICVPLogicalModel
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
input:
  name:
    v: composition
  type:
    v: Composition
  mode:
    v: target
input:
  name:
    v: immid
  mode:
    v: source
input:
  name:
    v: pid
  mode:
    v: source
rule:
  name:
    v: set
  source:
    context:
      v: lm
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: section
    variable:
      v: imm
  rule:
    name:
      v: setImmunizationsId
    source:
      context:
        v: immid
    target:
      context:
        v: imm
      context type:
        v: variable
      element:
        v: id
      transform:
        v: copy
      parameter:
        value: Id
  rule:
    name:
      v: setImmunizationTitle
    source:
      context:
        v: lm
    target:
      context:
        v: imm
      context type:
        v: variable
      element:
        v: title
      transform:
        v: copy
      parameter:
        value: String
  rule:
    name:
      v: setText
    source:
      context:
        v: lm
    target:
      context:
        v: imm
      context type:
        v: variable
      element:
        v: text
      variable:
        v: text
    dependent:
      name:
        v: generateNarrativeText
      variable:
        v: imm
      variable:
        v: text
  rule:
    name:
      v: setCode
    source:
      context:
        v: lm
    target:
      context type:
        v: variable
      variable:
        v: coding
      transform:
        v: create
      parameter:
        value: String
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
      parameter:
        value: String
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: system
      transform:
        v: copy
      parameter:
        value: String
    target:
      context type:
        v: variable
      variable:
        v: code
      transform:
        v: create
      parameter:
        value: String
    target:
      context:
        v: code
      context type:
        v: variable
      element:
        v: coding
      transform:
        v: copy
      parameter:
        value: Id
    target:
      context:
        v: imm
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
      parameter:
        value: Id
  rule:
    name:
      v: setImmz
    source:
      context:
        v: lm
      element:
        v: vaccineDetails
      variable:
        v: vax
    target:
      context type:
        v: variable
      variable:
        v: id
      transform:
        v: uuid
    target:
      context:
        v: bundle
      context type:
        v: variable
      element:
        v: entry
      variable:
        v: entry

Id
v: immid

String
v: Immunizations Section

String
v: Coding

String
v: 11369-6

String
v: CodeableConcept

Id
v: coding

Id
v: code

context:
  v: entry
context type:
  v: variable
element:
  v: fullUrl
transform:
  v: append
parameter:
  value: String
    v: urn:uuid:
parameter:
  value: Id
    v: id

context:
  v: imm
context type:
  v: variable
element:
  v: entry
variable:
  v: sectionEntry

context:
  v: sectionEntry
context type:
  v: variable
element:
  v: reference
transform:
  v: append
parameter:
  value: String
    v: urn:uuid:
parameter:
  value: Id
    v: id

context:
  v: entry
context type:
  v: variable
element:
  v: resource
variable:
  v: immunization
transform:
  v: create
parameter:
  value: String
    v: Immunization

context:
  v: immunization
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value: Id
    v: id

name:
  v: createImmunizationResource
variable:
  v: vax
variable:
  v: immunization
variable:
  v: pid

name:
  v: createImmunizationResource
type mode:
  v: none
input:
  name:
    v: vax
  type:
    v: vaccineDetails
  mode:
    v: source
input:
  name:
    v: immunization
  type:
    v: Immunization
  mode:
    v: target
input:
  name:
    v: pid
  mode:
    v: source
rule:
  name:
    v: setStatus
  source:
    context:
      v: vax
  target:
    context:
      v: immunization
    context type:
      v: variable
    element:
      v: status
    transform:
      v: copy
    parameter:
      value: String
        v: completed
rule:
  name:
    v: setVaccine
  source:
    context:
      v: vax
    element:
      v: productID
    variable:
      v: vaccine
  rule:
    name:
      v: keepProductIdExt
    source:
      context:
        v: vaccine
    target:
      context:
        v: immunization
      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
    target:
      context:
        v: ext
      context type:
        v: variable
      element:
        v: value
      transform:
        v: copy
      parameter:
        value: Id
  rule:
    name:
      v: mapVaxCode
    source:
      context:
        v: vaccine
      element:
        v: code
      variable:
        v: pcode
    target:
      context type:
        v: variable
      variable:
        v: src
      transform:
        v: create
      parameter:
        value: String
    target:
      context:
        v: src
      context type:
        v: variable
      element:
        v: system
      transform:
        v: copy
      parameter:
        value: String
    target:
      context:
        v: src
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
      parameter:
        value: Id
    target:
      context type:
        v: variable
      variable:
        v: vcoding
      transform:
        v: create
      parameter:
        value: String
    target:
      context:
        v: vcoding
      context type:
        v: variable
      element:
        v: system
      transform:
        v: copy
      parameter:
        value: String
    target:
      context:
        v: vcoding
      context type:
        v: variable
      element:
        v: code
      transform:
        v: translate
      parameter:
        value: Id
      parameter:
        value: String
      parameter:
        value: String
    target:
      context type:
        v: variable
      variable:
        v: tgtVaccineCode
      transform:
        v: create
      parameter:
        value: String
    target:
      context:
        v: tgtVaccineCode
      context type:
        v: variable
      element:
        v: coding
      transform:
        v: copy
      parameter:
        value: Id
    target:
      context:
        v: immunization
      context type:
        v: variable
      element:
        v: vaccineCode
      transform:
        v: copy
      parameter:
        value: Id
rule:
  name:
    v: setDate
  source:
    context:
      v: vax
    element:
      v: date

Id
v: vaccine

String
v: Coding

Id
v: pcode

String
v: Coding

Id
v: src

String
v: code

String
v: CodeableConcept

Id
v: vcoding

Id
v: tgtVaccineCode

v: date

context:
  v: immunization
context type:
  v: variable
element:
  v: occurrence
transform:
  v: append
parameter:
  value: Id
    v: date
parameter:
  value: String
    v: T00:00:00.000Z

name:
  v: setBatchNo
source:
  context:
    v: vax
  element:
    v: batchNo
  variable:
    v: batchNo
rule:
  name:
    v: setBatchNoFromText
  source:
    context:
      v: batchNo
    element:
      v: text
    variable:
      v: text
  target:
    context:
      v: immunization
    context type:
      v: variable
    element:
      v: lotNumber
    transform:
      v: copy
    parameter:
      value: Id
        v: text

name:
  v: setProtocolApplied
source:
  context:
    v: vax
target:
  context:
    v: immunization
  context type:
    v: variable
  element:
    v: protocolApplied
  variable:
    v: protocol
rule:
  name:
    v: setTargetDisease
  source:
    context:
      v: vax
    element:
      v: disease
    variable:
      v: disease
  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: disease
  target:
    context:
      v: protocol
    context type:
      v: variable
    element:
      v: targetDisease
    transform:
      v: copy
    parameter:
      value: Id
        v: code

name:
  v: setSubject
source:
  context:
    v: vax
target:
  context:
    v: immunization
  context type:
    v: variable
  element:
    v: patient
  variable:
    v: subject
target:
  context:
    v: subject
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: append
  parameter:
    value: String
      v: urn:uuid:
  parameter:
    value: Id
      v: pid

name:
  v: setManufacturer
source:
  context:
    v: vax
  element:
    v: manufacturerId
  variable:
    v: maId
target:
  context type:
    v: variable
  variable:
    v: maRef
  transform:
    v: create
  parameter:
    value: String
      v: Reference
target:
  context:
    v: maRef
  context type:
    v: variable
  element:
    v: identifier
  transform:
    v: copy
  parameter:
    value: Id
      v: maId
target:
  context:
    v: immunization
  context type:
    v: variable
  element:
    v: manufacturer
  transform:
    v: copy
  parameter:
    value: Id
      v: maRef

name:
  v: generateNarrativeText
type mode:
  v: none
documentation:
  v: helper function
input:
  name:
    v: src
  type:
    v: Section
  mode:
    v: source
input:
  name:
    v: text
  type:
    v: string
  mode:
    v: target
rule:
  name:
    v: setstatus
  source:
    context:
      v: src
  target:
    context:
      v: text
    context type:
      v: variable
    element:
      v: status
    transform:
      v: copy
    parameter:
      value: String
        v: empty
rule:
  name:
    v: setdiv
  source:
    context:
      v: src
  target:
    context:
      v: text
    context type:
      v: variable
    element:
      v: div
    transform:
      v: copy
    parameter:
      value: String
        v: Narrative not available

name:
  v: nameToHumanName
type mode:
  v: none
input:
  name:
    v: sourceName
  mode:
    v: source
input:
  name:
    v: targetName
  type:
    v: HumanName
  mode:
    v: target
rule:
  name:
    v: PatientName
  source:
    context:
      v: sourceName
    variable:
      v: patientName
  target:
    context:
      v: targetName
    context type:
      v: variable
    element:
      v: text
    transform:
      v: copy
    parameter:
      value: Id
        v: patientName

name:
  v: humanNameToHumanName
type mode:
  v: none
input:
  name:
    v: sourceName
  mode:
    v: source
input:
  name:
    v: targetName
  type:
    v: HumanName
  mode:
    v: target
rule:
  name:
    v: CopyUse
  source:
    context:
      v: sourceName
    element:
      v: use
    variable:
      v: use
  target:
    context:
      v: targetName
    context type:
      v: variable
    element:
      v: use
    transform:
      v: copy
    parameter:
      value: Id
        v: use
rule:
  name:
    v: CopyText
  source:
    context:
      v: sourceName
    element:
      v: text
    variable:
      v: text
  target:
    context:
      v: targetName
    context type:
      v: variable
    element:
      v: text
    transform:
      v: copy
    parameter:
      value: Id
        v: text
rule:
  name:
    v: CopyFamily
  source:
    context:
      v: sourceName
    element:
      v: family
    variable:
      v: family
  target:
    context:
      v: targetName
    context type:
      v: variable
    element:
      v: family
    transform:
      v: copy
    parameter:
      value: Id
        v: family
rule:
  name:
    v: CopyGiven
  source:
    context:
      v: sourceName
    element:
      v: given
    variable:
      v: given
  target:
    context:
      v: targetName
    context type:
      v: variable
    element:
      v: given
    transform:
      v: copy
    parameter:
      value: Id
        v: given
rule:
  name:
    v: CopyPrefix
  source:
    context:
      v: sourceName
    element:
      v: prefix
    variable:
      v: prefix
  target:
    context:
      v: targetName
    context type:
      v: variable
    element:
      v: prefix
    transform:
      v: copy
    parameter:
      value: Id
        v: prefix
rule:
  name:
    v: CopySuffix
  source:
    context:
      v: sourceName
    element:
      v: suffix
    variable:
      v: suffix
  target:
    context:
      v: targetName
    context type:
      v: variable
    element:
      v: suffix
    transform:
      v: copy
    parameter:
      value: Id
        v: suffix
rule:
  name:
    v: copyPeriod
  source:
    context:
      v: sourceName
    element:
      v: period
    variable:
      v: sourcePeriod
  target:
    context:
      v: targetName
    context type:
      v: variable
    element:
      v: period
    variable:
      v: targetPeriod
  rule:
    name:
      v: CopyPeriod
    source:
      context:
        v: sourcePeriod
    dependent:
      name:
        v: periodToPeriod
      variable:
        v: sourcePeriod
      variable:
        v: targetPeriod

name:
  v: periodToPeriod
type mode:
  v: none
input:
  name:
    v: sourcePeriod
  mode:
    v: source
input:
  name:
    v: targetPeriod
  type:
    v: Period
  mode:
    v: target
rule:
  name:
    v: setPeriodStart
  source:
    context:
      v: sourcePeriod
    element:
      v: start
    variable:
      v: start
  target:
    context:
      v: targetPeriod
    context type:
      v: variable
    element:
      v: start
    transform:
      v: copy
    parameter:
      value: Id
        v: start
rule:
  name:
    v: setPeriodEnd
  source:
    context:
      v: sourcePeriod
    element:
      v: end
    variable:
      v: end
  target:
    context:
      v: targetPeriod
    context type:
      v: variable
    element:
      v: end
    transform:
      v: copy
    parameter:
      value: Id
        v: end