DIVOCtoDDCC
type: StructureMap
node role: treeRoot
id:
  v: DIVOCtoDDCC
text:
  status:
    v: generated
  div: Generated Narrative: StructureMap DIVOCtoDDCC #xD; map "http://smart.who.int/ddcc/StructureMap/CertDIVOCtoDDCC" = "DIVOCtoDDCC"#xD; #xD; uses "http://smart.who.int/ddcc/StructureDefinition/CertDIVOC" alias W3CVC as source#xD; uses "http://hl7.org/fhir/ig/divoc/StructureDefinition/CredentialSubject" alias CredentialSubject as source#xD; uses "http://hl7.org/fhir/ig/divoc/StructureDefinition/Proof" alias Proof as source#xD; uses "http://hl7.org/fhir/ig/divoc/StructureDefinition/Address" alias Address as source#xD; uses "http://hl7.org/fhir/ig/divoc/StructureDefinition/Evidence" alias Evidence as source#xD; uses "http://hl7.org/fhir/ig/divoc/StructureDefinition/Verifier" alias Verifier as source#xD; uses "http://hl7.org/fhir/ig/divoc/StructureDefinition/Facility" alias Facility as source#xD; uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target#xD; #xD; group DIVOCtoDDCC(source src : W3CVC, target bundle : Bundle) {#xD; src -> bundle.type = 'transaction' "set bundle type";#xD; src -> bundle, bundle.entry as entry, entry.resource = create('Composition') as comp then {#xD; src -> bundle then ExtractCert(src, bundle, comp) "Certificate";#xD; src -> bundle then ExtractComposition(src, comp) "Composition";#xD; } "Patient and Composition Create";#xD; }#xD; #xD; group ExtractCert(source src : W3CVC, target bundle : Bundle, target comp : Composition) {#xD; src -> comp, bundle.entry as entry, entry.resource = create('Patient') as patient, uuid() as pid then {#xD; src -> patient then ExtractPatient(src, pid, patient) "extract patient";#xD; src -> comp.subject as subj, subj.reference = append('Patient/', pid) "Set patient";#xD; src where (src.evidence.count() > 0) -> comp.section as section then {#xD; src -> section.code as code, code.coding as coding, coding.system = 'http://loinc.org', coding.code = '11369-6', coding.display = 'History of Immunization Narrative' "add section";#xD; src.evidence as ev -> comp, bundle.entry as entryImm, entryImm.resource = c…
url:
  v: http://smart.who.int/ddcc/StructureMap/CertDIVOCtoDDCC
version:
  v: 1.0.0
name:
  v: DIVOCtoDDCC
status:
  v: draft
date:
  v: 2025-09-23T10:33:16+00:00
publisher:
  v: WHO
contact:
  name:
    v: WHO
  telecom:
    system:
      v: url
    value:
      v: http://who.int
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
    code:
      v: 001
structure:
  url:
    v: http://smart.who.int/ddcc/StructureDefinition/CertDIVOC
    link: http://smart.who.int/ddcc/StructureDefinition/CertDIVOC
  mode:
    v: source
  alias:
    v: W3CVC
structure:
  url:
    v: http://hl7.org/fhir/ig/divoc/StructureDefinition/CredentialSubject
    link: http://hl7.org/fhir/ig/divoc/StructureDefinition/CredentialSubject
  mode:
    v: source
  alias:
    v: CredentialSubject
structure:
  url:
    v: http://hl7.org/fhir/ig/divoc/StructureDefinition/Proof
    link: http://hl7.org/fhir/ig/divoc/StructureDefinition/Proof
  mode:
    v: source
  alias:
    v: Proof
structure:
  url:
    v: http://hl7.org/fhir/ig/divoc/StructureDefinition/Address
    link: http://hl7.org/fhir/ig/divoc/StructureDefinition/Address
  mode:
    v: source
  alias:
    v: Address
structure:
  url:
    v: http://hl7.org/fhir/ig/divoc/StructureDefinition/Evidence
    link: http://hl7.org/fhir/ig/divoc/StructureDefinition/Evidence
  mode:
    v: source
  alias:
    v: Evidence
structure:
  url:
    v: http://hl7.org/fhir/ig/divoc/StructureDefinition/Verifier
    link: http://hl7.org/fhir/ig/divoc/StructureDefinition/Verifier
  mode:
    v: source
  alias:
    v: Verifier
structure:
  url:
    v: http://hl7.org/fhir/ig/divoc/StructureDefinition/Facility
    link: http://hl7.org/fhir/ig/divoc/StructureDefinition/Facility
  mode:
    v: source
  alias:
    v: Facility
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Bundle
    link: http://hl7.org/fhir/StructureDefinition/Bundle
  mode:
    v: target
  alias:
    v: Bundle
group:
  name:
    v: DIVOCtoDDCC
  type mode:
    v: none
  input:
    name:
      v: src
    type:
      v: W3CVC
    mode:
      v: source
  input:
    name:
      v: bundle
    type:
      v: Bundle
    mode:
      v: target
  rule:
    name:
      v: set bundle type
    source:
      context:
        v: src
    target:
      context:
        v: bundle
      context type:
        v: variable
      element:
        v: type
      transform:
        v: copy
      parameter:
        value: string
  rule:
    name:
      v: Patient and Composition Create
    source:
      context:
        v: src
    target:
      context:
        v: bundle
      context type:
        v: variable
    target:
      context:
        v: bundle
      context type:
        v: variable
      element:
        v: entry
      variable:
        v: entry
    target:
      context:
        v: entry
      context type:
        v: variable
      element:
        v: resource
      variable:
        v: comp
      transform:
        v: create
      parameter:
        value: string
    rule:
      name:
        v: Certificate
    rule:
      name:
        v: Composition
group:
  name:
    v: ExtractCert
  type mode:
    v: none
  input:
    name:
      v: src
    type:
      v: W3CVC
    mode:
      v: source
  input:
    name:
      v: bundle
    type:
      v: Bundle
    mode:
      v: target
  input:
    name:
      v: comp
    type:
      v: Composition
    mode:
      v: target
  rule:
    name:
      v: Patient Create

string
v: transaction

string
v: Composition

v: src

v: bundle

v: variable

v: ExtractCert

v: src

v: bundle

v: comp

v: src

v: bundle

v: variable

v: ExtractComposition

v: src

v: comp

context:
  v: src

context:
  v: comp
context type:
  v: variable

context:
  v: bundle
context type:
  v: variable
element:
  v: entry
variable:
  v: entry

context:
  v: entry
context type:
  v: variable
element:
  v: resource
variable:
  v: patient
transform:
  v: create
parameter:
  value: string
    v: Patient

context type:
  v: variable
variable:
  v: pid
transform:
  v: uuid

name:
  v: extract patient
source:
  context:
    v: src
target:
  context:
    v: patient
  context type:
    v: variable
dependent:
  name:
    v: ExtractPatient
  variable:
    v: src
  variable:
    v: pid
  variable:
    v: patient

name:
  v: Composition.Set patient
source:
  context:
    v: src
target:
  context:
    v: comp
  context type:
    v: variable
  element:
    v: subject
  variable:
    v: subj
target:
  context:
    v: subj
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: append
  parameter:
    value: string
      v: Patient/
  parameter:
    value: id
      v: pid

name:
  v: Vaccination List
source:
  context:
    v: src
  condition:
    v: (src.evidence.count() > 0)
target:
  context:
    v: comp
  context type:
    v: variable
  element:
    v: section
  variable:
    v: section
rule:
  name:
    v: add section
  source:
    context:
      v: src
  target:
    context:
      v: section
    context type:
      v: variable
    element:
      v: code
    variable:
      v: code
  target:
    context:
      v: code
    context type:
      v: variable
    element:
      v: coding
    variable:
      v: coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: http://loinc.org
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: string
        v: 11369-6
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: display
    transform:
      v: copy
    parameter:
      value: string
        v: History of Immunization Narrative
rule:
  name:
    v: Immunization Create
  source:
    context:
      v: src
    element:
      v: evidence
    variable:
      v: ev
  target:
    context:
      v: comp
    context type:
      v: variable
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: entryImm
  target:
    context:
      v: entryImm
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: immunization
    transform:
      v: create
    parameter:
      value: string
        v: Immunization
  target:
    context type:
      v: variable
    variable:
      v: iid
    transform:
      v: uuid
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: entryOrg
  target:
    context:
      v: entryOrg
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: org
    transform:
      v: create
    parameter:
      value: string
        v: Organization
  target:
    context type:
      v: variable
    variable:
      v: oid
    transform:
      v: uuid
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: entryManuf
  target:
    context:
      v: entryOrg
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: manuf
    transform:
      v: create
    parameter:
      value: string
        v: Organization
  target:
    context type:
      v: variable
    variable:
      v: mid
    transform:
      v: uuid
  rule:
    name:
      v: Immunization ID
    source:
      context:
        v: src
    target:
      context:
        v: immunization
      context type:
        v: variable
      element:
        v: id
      transform:
        v: copy
      parameter:
        value: id
  rule:
    name:
      v: Organization ID
    source:
      context:
        v: src

id
v: iid

context:
  v: org
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value: id
    v: oid

name:
  v: Organization ID
source:
  context:
    v: src
target:
  context:
    v: manuf
  context type:
    v: variable
  element:
    v: id
  transform:
    v: copy
  parameter:
    value: id
      v: mid

name:
  v: add entry/author to section
source:
  context:
    v: src
target:
  context:
    v: section
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: entry
target:
  context:
    v: entry
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: append
  parameter:
    value: string
      v: Immunization/
  parameter:
    value: id
      v: iid
target:
  context:
    v: section
  context type:
    v: variable
  element:
    v: author
  variable:
    v: author
target:
  context:
    v: author
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: append
  parameter:
    value: string
      v: Organization/
  parameter:
    value: id
      v: oid

name:
  v: Composition.Set org
source:
  context:
    v: src
target:
  context:
    v: comp
  context type:
    v: variable
  element:
    v: author
  variable:
    v: author
target:
  context:
    v: author
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: append
  parameter:
    value: string
      v: Organization/
  parameter:
    value: id
      v: oid

name:
  v: Immunization.Set patient
source:
  context:
    v: src
target:
  context:
    v: immunization
  context type:
    v: variable
  element:
    v: patient
  variable:
    v: subj
target:
  context:
    v: subj
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: append
  parameter:
    value: string
      v: Patient/
  parameter:
    value: id
      v: pid

name:
  v: facility
source:
  context:
    v: ev
  element:
    v: facility
  variable:
    v: facility
rule:
  name:
    v: Set Organization name
  source:
    context:
      v: facility
    element:
      v: name
    variable:
      v: name
  target:
    context:
      v: org
    context type:
      v: variable
    element:
      v: name
    transform:
      v: copy
    parameter:
      value: id
        v: name

name:
  v: Set Manufacturer name
source:
  context:
    v: ev
  element:
    v: manufacturer
  variable:
    v: manufName
target:
  context:
    v: manuf
  context type:
    v: variable
  element:
    v: name
  transform:
    v: copy
  parameter:
    value: id
      v: manufName

name:
  v: create practitioner
source:
  context:
    v: ev
  element:
    v: verifier
  variable:
    v: practitioner
rule:
  name:
    v: set pract name
  source:
    context:
      v: practitioner
    element:
      v: name
    variable:
      v: practName
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: entry
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: practitioner
    transform:
      v: create
    parameter:
      value: string
        v: Practitioner
  target:
    context:
      v: practitioner
    context type:
      v: variable
    element:
      v: id
    variable:
      v: pracid
    transform:
      v: uuid
  target:
    context:
      v: practitioner
    context type:
      v: variable
    element:
      v: name
    variable:
      v: humanName
    transform:
      v: create
    parameter:
      value: string
        v: HumanName
  target:
    context:
      v: humanName
    context type:
      v: variable
    element:
      v: text
    transform:
      v: copy
    parameter:
      value: id
        v: practName
  target:
    context:
      v: immunization
    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: reference
    transform:
      v: append
    parameter:
      value: string
        v: Practitioner/
    parameter:
      value: id
        v: pracid

name:
  v: extract vaccine info
source:
  context:
    v: src
target:
  context:
    v: bundle
  context type:
    v: variable
dependent:
  name:
    v: ExtractVaccine
  variable:
    v: ev
  variable:
    v: oid
  variable:
    v: mid
  variable:
    v: immunization
  variable:
    v: bundle

name:
  v: ExtractVaccine
type mode:
  v: none
input:
  name:
    v: ev
  type:
    v: Evidence
  mode:
    v: source
input:
  name:
    v: oid
  mode:
    v: source
input:
  name:
    v: mid
  mode:
    v: source
input:
  name:
    v: immunization
  type:
    v: Immunization
  mode:
    v: target
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: set occurrence date
  source:
    context:
      v: ev
    element:
      v: date
    variable:
      v: dt
  target:
    context:
      v: immunization
    context type:
      v: variable
    element:
      v: occurrence
    transform:
      v: copy
    parameter:
      value: id
        v: dt
rule:
  name:
    v: set lot number
  source:
    context:
      v: ev
    element:
      v: batch
    variable:
      v: lot
  target:
    context:
      v: immunization
    context type:
      v: variable
    element:
      v: lotNumber
    transform:
      v: copy
    parameter:
      value: id
        v: lot
rule:
  name:
    v: Parse ICD11Code and Prophylaxis
  source:
    context:
      v: ev
    element:
      v: icd11Code
    variable:
      v: icd11Code
  rule:
    name:
      v: set vaccine coding
    source:
      context:
        v: ev
      element:
        v: prophylaxis
      variable:
        v: prophylaxis
    target:
      context:
        v: immunization
      context type:
        v: variable
      element:
        v: vaccineCode
      variable:
        v: type
    target:
      context:
        v: type
      context type:
        v: variable
      element:
        v: coding
      variable:
        v: coding
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: system
      transform:
        v: copy
      parameter:
        value: string
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
      parameter:
        value: id
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: display
      transform:
        v: copy
      parameter:
        value: id
rule:
  name:
    v: set identifier ci
  source:
    context:
      v: ev
    element:
      v: certificateId
    variable:
      v: ci
  target:
    context:
      v: immunization
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: identif
  target:
    context:
      v: identif
    context type:
      v: variable
    element:
      v: value
    transform:
      v: copy
    parameter:
      value: id
        v: ci
rule:
  name:
    v: set brand
  source:
    context:
      v: ev
    element:
      v: vaccine
    variable:
      v: mp
  target:
    context:
      v: immunization
    context type:
      v: variable
    element:
      v: extension
    variable:
      v: ext
  target:
    context:
      v: ext

id
v: icd11Code

id
v: prophylaxis

v: variable

v: value

v: coding

v: create

value: string
  v: Coding

context:
  v: ext
context type:
  v: variable
element:
  v: url
transform:
  v: copy
parameter:
  value: string
    v: https://smart.who.int/ddcc/StructureDefinition/DDCCVaccineBrand

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value: id
    v: mp

name:
  v: ev.facility rule
source:
  context:
    v: ev
  element:
    v: facility
  variable:
    v: facility
rule:
  name:
    v: ev.facility.address
  source:
    context:
      v: facility
    element:
      v: address
    variable:
      v: address
  rule:
    name:
      v: set country
    source:
      context:
        v: address
      element:
        v: addressCountry
      variable:
        v: contry
    target:
      context:
        v: immunization
      context type:
        v: variable
      element:
        v: extension
      variable:
        v: ext
    target:
      context:
        v: ext
      context type:
        v: variable
      element:
        v: value
      variable:
        v: coding
      transform:
        v: create
      parameter:
        value: string
    target:
      context:
        v: ext
      context type:
        v: variable
      element:
        v: url
      transform:
        v: copy
      parameter:
        value: string
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
      parameter:
        value: id
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: system
      transform:
        v: copy
      parameter:
        value: string

string
v: Coding

id
v: contry

string
v: urn:iso:std:iso:3166

name:
  v: ev.effectiveUntil rule
source:
  context:
    v: ev
  element:
    v: effectiveUntil
  variable:
    v: validFrom
target:
  context:
    v: immunization
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: value
  transform:
    v: copy
  parameter:
    value: id
      v: validFrom
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: url
  transform:
    v: copy
  parameter:
    value: string
      v: https://smart.who.int/ddcc/StructureDefinition/DDCCVaccineValidFrom

name:
  v: set manuf
source:
  context:
    v: oid
target:
  context:
    v: immunization
  context type:
    v: variable
  element:
    v: manufacturer
  variable:
    v: manuf
target:
  context:
    v: manuf
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: append
  parameter:
    value: string
      v: Organization/
  parameter:
    value: id
      v: oid

name:
  v: Extracting Immunization Location
source:
  context:
    v: ev
  element:
    v: facility
  variable:
    v: w3cFacility
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: entry
target:
  context:
    v: entry
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: location
  transform:
    v: create
  parameter:
    value: string
      v: Location
target:
  context:
    v: location
  context type:
    v: variable
  element:
    v: id
  variable:
    v: locid
  transform:
    v: uuid
target:
  context:
    v: immunization
  context type:
    v: variable
  element:
    v: location
  variable:
    v: loc
target:
  context:
    v: loc
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: append
  parameter:
    value: string
      v: Location/
  parameter:
    value: id
      v: locid
dependent:
  name:
    v: ExtractLocation
  variable:
    v: w3cFacility
  variable:
    v: location

name:
  v: set protocol applied
source:
  context:
    v: ev
target:
  context:
    v: immunization
  context type:
    v: variable
  element:
    v: protocolApplied
  variable:
    v: protocolApplied
dependent:
  name:
    v: ExtractProtocolApplied
  variable:
    v: ev
  variable:
    v: oid
  variable:
    v: protocolApplied

name:
  v: ExtractProtocolApplied
type mode:
  v: none
input:
  name:
    v: ev
  type:
    v: Evidence
  mode:
    v: source
input:
  name:
    v: oid
  mode:
    v: source
input:
  name:
    v: protocol
  type:
    v: ProtocolApplied
  mode:
    v: target
rule:
  name:
    v: set dose number
  source:
    context:
      v: ev
    element:
      v: dose
    variable:
      v: dn
  target:
    context:
      v: protocol
    context type:
      v: variable
    element:
      v: doseNumber
    transform:
      v: copy
    parameter:
      value: id
        v: dn
rule:
  name:
    v: set series doses
  source:
    context:
      v: ev
    element:
      v: totalDoses
    variable:
      v: sd
  target:
    context:
      v: protocol
    context type:
      v: variable
    element:
      v: seriesDoses
    transform:
      v: copy
    parameter:
      value: id
        v: sd
rule:
  name:
    v: set target disease type
  source:
    context:
      v: ev
  target:
    context:
      v: protocol
    context type:
      v: variable
    element:
      v: targetDisease
    variable:
      v: codeable
  target:
    context:
      v: codeable
    context type:
      v: variable
    element:
      v: coding
    variable:
      v: coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: http://snomed.info/sct
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: string
        v: 840539006
rule:
  name:
    v: set authority
  source:
    context:
      v: ev
  target:
    context:
      v: protocol
    context type:
      v: variable
    element:
      v: authority
    variable:
      v: authority
  target:
    context:
      v: authority
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: append
    parameter:
      value: string
        v: Organization/
    parameter:
      value: id
        v: oid

name:
  v: ExtractPatient
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: W3CVC
  mode:
    v: source
input:
  name:
    v: pid
  mode:
    v: source
input:
  name:
    v: patient
  type:
    v: Patient
  mode:
    v: target
rule:
  name:
    v: Patient ID
  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: Patient Data from Subj
  source:
    context:
      v: src
    element:
      v: credentialSubject
    variable:
      v: credentialSubject
  target:
    context:
      v: patient
    context type:
      v: variable
  dependent:
    name:
      v: ExtractPatientFromSubj
    variable:
      v: credentialSubject
    variable:
      v: patient
rule:
  name:
    v: set cred age
  source:
    context:
      v: src
    element:
      v: credentialSubject
    variable:
      v: credSubj
  rule:
    name:
      v: set age issuance date
    source:
      context:
        v: src
      element:
        v: issuanceDate
      variable:
        v: issuanceDate
    rule:
      name:
        v: set age

v: credSubj

v: age

v: age

v: patient

v: variable

v: birthDate

v: evaluate

value: id
  v: issuanceDate

value: string
  v: (($this - age).toString().substring(0, 4))

name:
  v: ExtractPatientFromSubj
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: CredentialSubject
  mode:
    v: source
input:
  name:
    v: patient
  type:
    v: Patient
  mode:
    v: target
rule:
  name:
    v: Patient Name
  source:
    context:
      v: src
    element:
      v: name
    variable:
      v: patientName
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: name
    variable:
      v: humanName
    transform:
      v: create
    parameter:
      value: string
        v: HumanName
  target:
    context:
      v: humanName
    context type:
      v: variable
    element:
      v: text
    transform:
      v: copy
    parameter:
      value: id
        v: patientName
rule:
  name:
    v: set patient identifier
  source:
    context:
      v: src
    element:
      v: id
    variable:
      v: id
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: identif
  target:
    context:
      v: identif
    context type:
      v: variable
    element:
      v: value
    transform:
      v: copy
    parameter:
      value: id
        v: id
rule:
  name:
    v: set birthDate
  source:
    context:
      v: src
    element:
      v: dob
    variable:
      v: birthDate
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: birthDate
    transform:
      v: copy
    parameter:
      value: id
        v: birthDate
rule:
  name:
    v: Extract Gender
  source:
    context:
      v: src
    element:
      v: gender
    variable:
      v: gender
  target:
    context:
      v: patient
    context type:
      v: variable
  dependent:
    name:
      v: ExtractGender
    variable:
      v: gender
    variable:
      v: patient
rule:
  name:
    v: Extract Sex
  source:
    context:
      v: src
    element:
      v: sex
    variable:
      v: sex
  target:
    context:
      v: patient
    context type:
      v: variable
  dependent:
    name:
      v: ExtractGender
    variable:
      v: sex
    variable:
      v: patient
rule:
  name:
    v: Extracting Patient Address
  source:
    context:
      v: src
    element:
      v: address
    variable:
      v: w3cAddress
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: address
    variable:
      v: fhirAddress
  dependent:
    name:
      v: ExtractAddress
    variable:
      v: w3cAddress
    variable:
      v: fhirAddress

name:
  v: ExtractLocation
type mode:
  v: none
input:
  name:
    v: facility
  type:
    v: Facility
  mode:
    v: source
input:
  name:
    v: location
  type:
    v: Address
  mode:
    v: target
rule:
  name:
    v: facility name
  source:
    context:
      v: facility
    element:
      v: name
    variable:
      v: name
  target:
    context:
      v: location
    context type:
      v: variable
    element:
      v: name
    transform:
      v: copy
    parameter:
      value: id
        v: name
rule:
  name:
    v: facility address
  source:
    context:
      v: facility
    element:
      v: address
    variable:
      v: w3cAddress
  target:
    context:
      v: location
    context type:
      v: variable
    element:
      v: address
    variable:
      v: fhirAddress
  dependent:
    name:
      v: ExtractAddress
    variable:
      v: w3cAddress
    variable:
      v: fhirAddress

name:
  v: ExtractAddress
type mode:
  v: none
input:
  name:
    v: w3cAddress
  type:
    v: Address
  mode:
    v: source
input:
  name:
    v: fhirAddress
  type:
    v: Address
  mode:
    v: target
rule:
  name:
    v: Line 1
  source:
    context:
      v: w3cAddress
    element:
      v: streetAddress
    variable:
      v: line1
  target:
    context:
      v: fhirAddress
    context type:
      v: variable
    element:
      v: line
    transform:
      v: copy
    parameter:
      value: id
        v: line1
rule:
  name:
    v: Line 2
  source:
    context:
      v: w3cAddress
    element:
      v: streetAddress2
    variable:
      v: line2
  target:
    context:
      v: fhirAddress
    context type:
      v: variable
    element:
      v: line
    transform:
      v: copy
    parameter:
      value: id
        v: line2
rule:
  name:
    v: City
  source:
    context:
      v: w3cAddress
    element:
      v: city
    variable:
      v: city
  target:
    context:
      v: fhirAddress
    context type:
      v: variable
    element:
      v: city
    transform:
      v: copy
    parameter:
      value: id
        v: city
rule:
  name:
    v: District
  source:
    context:
      v: w3cAddress
    element:
      v: district
    variable:
      v: district
  target:
    context:
      v: fhirAddress
    context type:
      v: variable
    element:
      v: district
    transform:
      v: copy
    parameter:
      value: id
        v: district
rule:
  name:
    v: Postal
  source:
    context:
      v: w3cAddress
    element:
      v: postalCode
    variable:
      v: postal
  target:
    context:
      v: fhirAddress
    context type:
      v: variable
    element:
      v: postalCode
    transform:
      v: copy
    parameter:
      value: id
        v: postal
rule:
  name:
    v: Region
  source:
    context:
      v: w3cAddress
    element:
      v: addressRegion
    variable:
      v: region
  target:
    context:
      v: fhirAddress
    context type:
      v: variable
    element:
      v: state
    transform:
      v: copy
    parameter:
      value: id
        v: region
rule:
  name:
    v: Country
  source:
    context:
      v: w3cAddress
    element:
      v: addressCountry
    variable:
      v: country
  target:
    context:
      v: fhirAddress
    context type:
      v: variable
    element:
      v: country
    transform:
      v: copy
    parameter:
      value: id
        v: country

name:
  v: ExtractGender
type mode:
  v: none
input:
  name:
    v: gender
  mode:
    v: source
input:
  name:
    v: patient
  type:
    v: Patient
  mode:
    v: target
rule:
  name:
    v: set male
  source:
    context:
      v: gender
    condition:
      v: (gender = 'M')
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: gender
    transform:
      v: copy
    parameter:
      value: string
        v: male
rule:
  name:
    v: set female
  source:
    context:
      v: gender
    condition:
      v: (gender = 'F')
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: gender
    transform:
      v: copy
    parameter:
      value: string
        v: female
rule:
  name:
    v: set male
  source:
    context:
      v: gender
    condition:
      v: (gender = 'Male')
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: gender
    transform:
      v: copy
    parameter:
      value: string
        v: male
rule:
  name:
    v: set female
  source:
    context:
      v: gender
    condition:
      v: (gender = 'Female')
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: gender
    transform:
      v: copy
    parameter:
      value: string
        v: female

name:
  v: ExtractComposition
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: W3CVC
  mode:
    v: source
input:
  name:
    v: composition
  type:
    v: Composition
  mode:
    v: target
rule:
  name:
    v: Title
  source:
    context:
      v: src
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: title
    transform:
      v: copy
    parameter:
      value: string
        v: International Certificate of Vaccination or Prophylaxis
rule:
  name:
    v: set category
  source:
    context:
      v: src
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: category
    variable:
      v: category
  target:
    context:
      v: category
    context type:
      v: variable
    element:
      v: coding
    variable:
      v: coding
  rule:
    name:
      v: Category
    source:
      context:
        v: src
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
      parameter:
        value: string
rule:
  name:
    v: set type
  source:
    context:
      v: src
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: type
    variable:
      v: type
  target:
    context:
      v: type
    context type:
      v: variable
    element:
      v: coding
    variable:
      v: coding
  rule:
    name:
      v: set type coding
    source:
      context:
        v: src
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: system
      transform:
        v: copy
      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: display
      transform:
        v: copy
      parameter:
        value: string
rule:
  name:
    v: Extract Period
  source:
    context:
      v: src
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: event
    variable:
      v: event
  target:
    context:
      v: event
    context type:
      v: variable
    element:
      v: period
    variable:
      v: period
    transform:
      v: create
    parameter:
      value: string
        v: Period
  dependent:
    name:
      v: ExtractPeriod
    variable:
      v: src
    variable:
      v: period
rule:
  name:
    v: set comp identifier parent
  source:
    context:
      v: src
    element:
      v: credentialSubject
    variable:
      v: credentialSubject
  target:
    context:
      v: composition
    context type:
      v: variable
  rule:
    name:
      v: set comp identifier
    source:
      context:
        v: credentialSubject
      element:
        v: refId
      variable:
        v: refId
    target:
      context:
        v: composition

string
v: ddcc-vs

string
v: 82593-5

string
v: Immunization summary report

v: variable

v: identifier

v: identif

context:
  v: identif
context type:
  v: variable
element:
  v: value
transform:
  v: copy
parameter:
  value: id
    v: refId

name:
  v: ExtractPeriod
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: W3CVC
  mode:
    v: source
input:
  name:
    v: tgt
  type:
    v: Period
  mode:
    v: target
rule:
  name:
    v: Start issuedAt
  source:
    context:
      v: src
    element:
      v: issuanceDate
    variable:
      v: issuanceDate
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: start
    transform:
      v: copy
    parameter:
      value: id
        v: issuanceDate