CertICAOtoCoreDataSet
type: StructureMap
node role: treeRoot
id:
  v: CertICAOtoCoreDataSet
text:
  status:
    v: generated
  div: Generated Narrative: StructureMap CertICAOtoCoreDataSet #xD; map "http://smart.who.int/ddcc/StructureMap/CertICAOtoCoreDataSet" = "CertICAOtoCoreDataSet"#xD; #xD; // Structure map transforming CertICAO logical model to bundle of Core Data Set logical model#xD; #xD; uses "http://smart.who.int/ddcc/StructureDefinition/CertICAOVDS" alias VDS as source#xD; uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias DDCCBundle as target#xD; uses "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSet" alias DDCC as target#xD; uses "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS" alias DDCCVS as target#xD; uses "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetTR" alias DDCCTR as target#xD; #xD; group CertICAOtoCoreDataSet(source src : VDS, target ddccBundle : DDCCBundle) {#xD; src.data as data then {#xD; data.msg as msg then {#xD; msg.ve as ve then {#xD; ve.vd as vd -> ddccBundle.entry as outentry, create('http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS') as ddcc then {#xD; data.hdr as hdr -> ddcc.certificate as certificate then VDStoCoreDataSetCertificate(hdr, msg, certificate) "set certificate";#xD; msg.pid as pid then ExtractPatient(pid, ddcc) "set patient";#xD; vd -> ddcc.vaccination as vaccination then ExtractVaccine(ve, vd, vaccination) "set vaccination";#xD; vd -> outentry.resource = ddcc "set outentry";#xD; };#xD; };#xD; msg.tr as tr -> ddccBundle.entry as outentry, create('http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetTR') as ddcc then {#xD; data.hdr as hdr -> ddcc.certificate as certificate then VDStoCoreDataSetCertificate(hdr, msg, certificate) "set certificate";#xD; msg.pid as pid then ExtractPatient(pid, ddcc) "set patient";#xD; msg.sp as sp then {#xD; msg.dat as dat -> ddcc.test as test then ExtractTest(sp, dat, tr, test) "set test";#xD; };#xD; tr -> outentry.resource = ddcc "set outentry";#xD; };#xD; };#xD; };#xD; }#xD; #xD; group VDStoCoreDataSetCertificate(source hdr, source msg, target c…
url:
  v: http://smart.who.int/ddcc/StructureMap/CertICAOtoCoreDataSet
version:
  v: 1.0.0
name:
  v: CertICAOtoCoreDataSet
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
description:
  v: Structure map transforming CertICAO logical model to bundle of Core Data Set logical model
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/CertICAOVDS
    link: http://smart.who.int/ddcc/StructureDefinition/CertICAOVDS
  mode:
    v: source
  alias:
    v: VDS
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Bundle
    link: http://hl7.org/fhir/StructureDefinition/Bundle
  mode:
    v: target
  alias:
    v: DDCCBundle
structure:
  url:
    v: http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSet
    link: http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSet
  mode:
    v: target
  alias:
    v: DDCC
structure:
  url:
    v: http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS
    link: http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS
  mode:
    v: target
  alias:
    v: DDCCVS
structure:
  url:
    v: http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetTR
    link: http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetTR
  mode:
    v: target
  alias:
    v: DDCCTR
group:
  name:
    v: CertICAOtoCoreDataSet
  type mode:
    v: none
  input:
    name:
      v: src
    type:
      v: VDS
    mode:
      v: source
  input:
    name:
      v: ddccBundle
    type:
      v: DDCCBundle
    mode:
      v: target
  rule:
    name:
      v: data
    source:
      context:
        v: src
      element:
        v: data
      variable:
        v: data
    rule:
      name:
        v: msg
group:
  name:
    v: VDStoCoreDataSetCertificate
  type mode:
    v: none
  input:
    name:
      v: hdr
    mode:
      v: source
  input:
    name:
      v: msg
    mode:
      v: source
  input:
    name:
      v: certificate
    mode:
      v: target
  rule:
    name:
      v: set version
    source:
      context:
        v: hdr
      element:
        v: v
      variable:
        v: v
    target:
      context:
        v: certificate
      context type:
        v: variable
      element:
        v: version
      transform:
        v: copy
      parameter:
        value: id
  rule:
    name:
      v: set hcid from uvci
    source:
      context:
        v: msg
      element:
        v: uvci
      variable:
        v: uvci
    target:
      context:
        v: certificate
      context type:
        v: variable
      element:
        v: hcid
      variable:
        v: hcid
    target:
      context:
        v: hcid
      context type:
        v: variable
      element:
        v: value
      transform:
        v: copy
      parameter:
        value: id
  rule:
    name:
      v: set hcid from utci
    source:
      context:
        v: msg
      element:
        v: utci
      variable:
        v: utci
    target:
      context:
        v: certificate
      context type:
        v: variable
      element:
        v: hcid
      variable:
        v: hcid
    target:
      context:
        v: hcid
      context type:
        v: variable

v: data

v: msg

v: msg

v: ve

context:
  v: msg
element:
  v: ve
variable:
  v: ve

name:
  v: vd
source:
  context:
    v: ve
  element:
    v: vd
  variable:
    v: vd
target:
  context:
    v: ddccBundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: outentry
target:
  context type:
    v: variable
  variable:
    v: ddcc
  transform:
    v: create
  parameter:
    value: string
      v: http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS
rule:
  name:
    v: set certificate
  source:
    context:
      v: data
    element:
      v: hdr
    variable:
      v: hdr
  target:
    context:
      v: ddcc
    context type:
      v: variable
    element:
      v: certificate
    variable:
      v: certificate
  dependent:
    name:
      v: VDStoCoreDataSetCertificate
    variable:
      v: hdr
    variable:
      v: msg
    variable:
      v: certificate
rule:
  name:
    v: set patient
  source:
    context:
      v: msg
    element:
      v: pid
    variable:
      v: pid
  dependent:
    name:
      v: ExtractPatient
    variable:
      v: pid
    variable:
      v: ddcc
rule:
  name:
    v: set vaccination
  source:
    context:
      v: vd
  target:
    context:
      v: ddcc
    context type:
      v: variable
    element:
      v: vaccination
    variable:
      v: vaccination
  dependent:
    name:
      v: ExtractVaccine
    variable:
      v: ve
    variable:
      v: vd
    variable:
      v: vaccination
rule:
  name:
    v: set outentry
  source:
    context:
      v: vd
  target:
    context:
      v: outentry
    context type:
      v: variable
    element:
      v: resource
    transform:
      v: copy
    parameter:
      value: id
        v: ddcc

v: tr

context:
  v: msg
element:
  v: tr
variable:
  v: tr

context:
  v: ddccBundle
context type:
  v: variable
element:
  v: entry
variable:
  v: outentry

context type:
  v: variable
variable:
  v: ddcc
transform:
  v: create
parameter:
  value: string
    v: http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetTR

name:
  v: set certificate
source:
  context:
    v: data
  element:
    v: hdr
  variable:
    v: hdr
target:
  context:
    v: ddcc
  context type:
    v: variable
  element:
    v: certificate
  variable:
    v: certificate
dependent:
  name:
    v: VDStoCoreDataSetCertificate
  variable:
    v: hdr
  variable:
    v: msg
  variable:
    v: certificate

name:
  v: set patient
source:
  context:
    v: msg
  element:
    v: pid
  variable:
    v: pid
dependent:
  name:
    v: ExtractPatient
  variable:
    v: pid
  variable:
    v: ddcc

name:
  v: sp
source:
  context:
    v: msg
  element:
    v: sp
  variable:
    v: sp
rule:
  name:
    v: set test
  source:
    context:
      v: msg
    element:
      v: dat
    variable:
      v: dat
  target:
    context:
      v: ddcc
    context type:
      v: variable
    element:
      v: test
    variable:
      v: test
  dependent:
    name:
      v: ExtractTest
    variable:
      v: sp
    variable:
      v: dat
    variable:
      v: tr
    variable:
      v: test

name:
  v: set outentry
source:
  context:
    v: tr
target:
  context:
    v: outentry
  context type:
    v: variable
  element:
    v: resource
  transform:
    v: copy
  parameter:
    value: id
      v: ddcc

id
v: v

id
v: uvci

v: value

v: copy

value: id
  v: utci

name:
  v: set issuer
source:
  context:
    v: hdr
  element:
    v: is
  variable:
    v: is
target:
  context:
    v: certificate
  context type:
    v: variable
  element:
    v: issuer
  variable:
    v: issuer
  transform:
    v: create
  parameter:
    value: string
      v: Reference
target:
  context:
    v: issuer
  context type:
    v: variable
  element:
    v: display
  transform:
    v: copy
  parameter:
    value: id
      v: is

name:
  v: ExtractPatient
type mode:
  v: none
input:
  name:
    v: pid
  mode:
    v: source
input:
  name:
    v: ddcc
  type:
    v: DDCC
  mode:
    v: target
rule:
  name:
    v: set name
  source:
    context:
      v: pid
    element:
      v: n
    variable:
      v: name
  target:
    context:
      v: ddcc
    context type:
      v: variable
    element:
      v: name
    transform:
      v: copy
    parameter:
      value: id
        v: name
rule:
  name:
    v: set birthDate
  source:
    context:
      v: pid
    element:
      v: dob
    variable:
      v: birthDate
  target:
    context:
      v: ddcc
    context type:
      v: variable
    element:
      v: birthDate
    transform:
      v: copy
    parameter:
      value: id
        v: birthDate
rule:
  name:
    v: set priorityIdentifier
  source:
    context:
      v: pid
    element:
      v: i
    variable:
      v: priorityIdentifier
  target:
    context:
      v: ddcc
    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: priorityIdentifier
rule:
  name:
    v: set Document Type Number
  source:
    context:
      v: pid
    element:
      v: dn
  target:
    context:
      v: ddcc
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: identifier
  dependent:
    name:
      v: ExtractDocumentTypeNumber
    variable:
      v: pid
    variable:
      v: identifier

name:
  v: ExtractDocumentTypeNumber
type mode:
  v: none
input:
  name:
    v: src
  mode:
    v: source
input:
  name:
    v: identif
  type:
    v: Identifier
  mode:
    v: target
rule:
  name:
    v: set doc number
  source:
    context:
      v: src
    element:
      v: dn
    variable:
      v: docNumber
  target:
    context:
      v: identif
    context type:
      v: variable
    element:
      v: value
    transform:
      v: copy
    parameter:
      value: id
        v: docNumber
rule:
  name:
    v: set doc number P
  source:
    context:
      v: src
    element:
      v: dt
    variable:
      v: docType
    condition:
      v: (docType = 'P')
  target:
    context:
      v: identif
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: PPN
  documentation:
    v: P – Passport (Doc 9303-4)
rule:
  name:
    v: set doc number A
  source:
    context:
      v: src
    element:
      v: dt
    variable:
      v: docType
    condition:
      v: (docType = 'A')
  target:
    context:
      v: identif
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: DL
  documentation:
    v: A – ID Card (Doc 9303-5)
rule:
  name:
    v: set doc number C
  source:
    context:
      v: src
    element:
      v: dt
    variable:
      v: docType
    condition:
      v: (docType = 'C')
  target:
    context:
      v: identif
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: DL
  documentation:
    v: C – ID Card (Doc 9303-5)
rule:
  name:
    v: set doc number I
  source:
    context:
      v: src
    element:
      v: dt
    variable:
      v: docType
    condition:
      v: (docType = 'I')
  target:
    context:
      v: identif
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: DL
  documentation:
    v: I – ID Card Doc 9303-5)
rule:
  name:
    v: set doc number AC
  source:
    context:
      v: src
    element:
      v: dt
    variable:
      v: docType
    condition:
      v: (docType = 'AC')
  target:
    context:
      v: identif
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: EN
  documentation:
    v: AC - Crew Member Certificate (Doc 9303-5)
rule:
  name:
    v: set doc number V
  source:
    context:
      v: src
    element:
      v: dt
    variable:
      v: docType
    condition:
      v: (docType = 'V')
  target:
    context:
      v: identif
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: ACSN
  documentation:
    v: V – Visa (Doc 9303-7)
rule:
  name:
    v: set doc number D
  source:
    context:
      v: src
    element:
      v: dt

v: docType

v: (docType = 'D')

context:
  v: identif
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value: string
    v: DL

v: D – Driving License (ISO18013-1)

name:
  v: ExtractVaccine
type mode:
  v: none
input:
  name:
    v: ve
  mode:
    v: source
input:
  name:
    v: vd
  mode:
    v: source
input:
  name:
    v: vaccination
  mode:
    v: target
rule:
  name:
    v: set vaccine
  source:
    context:
      v: ve
    element:
      v: des
    variable:
      v: des
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: vaccine
    variable:
      v: coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: http://id.who.int/icd11/mms
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: id
        v: des
rule:
  name:
    v: set brand
  source:
    context:
      v: ve
    element:
      v: nam
    variable:
      v: nam
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: brand
    variable:
      v: coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: id
        v: nam
rule:
  name:
    v: set target disease
  source:
    context:
      v: ve
    element:
      v: dis
    variable:
      v: dis
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: disease
    variable:
      v: coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: http://id.who.int/icd11/mms
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: id
        v: dis
rule:
  name:
    v: set date
  source:
    context:
      v: vd
    element:
      v: dvc
    variable:
      v: dvc
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: date
    transform:
      v: copy
    parameter:
      value: id
        v: dvc
rule:
  name:
    v: set dose
  source:
    context:
      v: vd
    element:
      v: seq
    variable:
      v: seq
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: dose
    transform:
      v: copy
    parameter:
      value: id
        v: seq
rule:
  name:
    v: set nextDose
  source:
    context:
      v: vd
    element:
      v: dvn
    variable:
      v: dvn
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: nextDose
    transform:
      v: copy
    parameter:
      value: id
        v: dvn

name:
  v: ctr
source:
  context:
    v: vd
  element:
    v: ctr
  variable:
    v: ctr
target:
  context:
    v: vaccination
  context type:
    v: variable
  element:
    v: country
  variable:
    v: coding
rule:
  name:
    v: set country
  source:
    context:
      v: ctr
  dependent:
    name:
      v: ExtractCountry
    variable:
      v: ctr
    variable:
      v: coding

name:
  v: set centre
source:
  context:
    v: vd
  element:
    v: adm
  variable:
    v: adm
target:
  context:
    v: vaccination
  context type:
    v: variable
  element:
    v: centre
  transform:
    v: copy
  parameter:
    value: id
      v: adm

name:
  v: set lot
source:
  context:
    v: vd
  element:
    v: lot
  variable:
    v: lot
target:
  context:
    v: vaccination
  context type:
    v: variable
  element:
    v: lot
  transform:
    v: copy
  parameter:
    value: id
      v: lot

name:
  v: ExtractTest
type mode:
  v: none
input:
  name:
    v: sp
  mode:
    v: source
input:
  name:
    v: dat
  mode:
    v: source
input:
  name:
    v: tr
  mode:
    v: source
input:
  name:
    v: test
  mode:
    v: target
rule:
  name:
    v: set pathogen
  source:
    context:
      v: tr
  target:
    context:
      v: test
    context type:
      v: variable
    element:
      v: pathogen
    variable:
      v: coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: http://id.who.int/icd11/mms
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: string
        v: XN109
rule:
  name:
    v: tc
  source:
    context:
      v: tr
    element:
      v: tc
    variable:
      v: tc
  rule:
    name:
      v: set default type
    source:
      context:
        v: tc
    target:
      context:
        v: test
      context type:
        v: variable
      element:
        v: type
      variable:
        v: coding
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
      parameter:
        value: id
  rule:
    name:
      v: coding
    source:
      context:
        v: tc
    target:
      context type:
        v: variable
      variable:
        v: coded
      transform:
        v: c
      parameter:
        value: string
      parameter:
        value: id
    rule:
      name:
        v: translate ICAO type
rule:
  name:
    v: m
  source:
    context:
      v: tr
    element:
      v: m
    variable:
      v: m
  rule:
    name:
      v: set default origin
    source:
      context:
        v: m
    target:
      context:
        v: test
      context type:
        v: variable
      element:
        v: origin
      variable:
        v: coding
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
      parameter:
        value: id
  rule:
    name:
      v: coding
    source:
      context:
        v: m
    target:
      context type:
        v: variable
      variable:
        v: coded
      transform:
        v: c
      parameter:
        value: string
      parameter:
        value: id
    rule:
      name:
        v: translate ICAO origin
rule:
  name:
    v: set date
  source:
    context:
      v: dat
    element:
      v: sc
    variable:
      v: date
  target:
    context:
      v: test
    context type:
      v: variable
    element:
      v: date
    transform:
      v: copy
    parameter:
      value: id
        v: date
rule:
  name:
    v: r
  source:
    context:
      v: tr

id
v: tc

id
v: tc

v: tc

v: coded.memberOf('http://smart.who.int/ddcc/ValueSet/lab-test-type-icao')

v: test

v: variable

v: type

v: translate

value: id
  v: coded

value: string
  v: Coding

id
v: m

id
v: m

v: m

v: coded.memberOf('http://smart.who.int/ddcc/ValueSet/lab-test-sample-origin-icao')

v: test

v: variable

v: origin

v: translate

value: id
  v: coded

value: string
  v: Coding

v: r

v: r

name:
  v: set default result
source:
  context:
    v: r
target:
  context:
    v: test
  context type:
    v: variable
  element:
    v: result
  variable:
    v: coding
target:
  context:
    v: coding
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value: id
      v: r

name:
  v: coding
source:
  context:
    v: r
target:
  context type:
    v: variable
  variable:
    v: coded
  transform:
    v: c
  parameter:
    value: string
      v: http://smart.who.int/ddcc/CodeSystem/lab-test-qual-result-icao
  parameter:
    value: id
      v: r
rule:
  name:
    v: translate ICAO result
  source:
    context:
      v: r
    condition:
      v: coded.memberOf('http://smart.who.int/ddcc/ValueSet/lab-test-qual-result-icao')
  target:
    context:
      v: test
    context type:
      v: variable
    element:
      v: result
    transform:
      v: translate
    parameter:
      value: id
        v: coded
    parameter:
      value: string
        v: http://smart.who.int/ddcc/ConceptMap/lab-test-qual-result-icao-to-icd11
    parameter:
      value: string
        v: Coding

name:
  v: set centre
source:
  context:
    v: sp
  element:
    v: spn
  variable:
    v: spn
target:
  context:
    v: test
  context type:
    v: variable
  element:
    v: centre
  variable:
    v: coding
target:
  context:
    v: coding
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value: id
      v: spn

name:
  v: ctr
source:
  context:
    v: sp
  element:
    v: ctr
  variable:
    v: ctr
target:
  context:
    v: test
  context type:
    v: variable
  element:
    v: country
  variable:
    v: coding
rule:
  name:
    v: set country
  source:
    context:
      v: ctr
  dependent:
    name:
      v: ExtractCountry
    variable:
      v: ctr
    variable:
      v: coding

name:
  v: ExtractCountry
type mode:
  v: none
input:
  name:
    v: country
  mode:
    v: source
input:
  name:
    v: coding
  mode:
    v: target
rule:
  name:
    v: set default country
  source:
    context:
      v: country
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: id
        v: country
rule:
  name:
    v: coded
  source:
    context:
      v: country
  target:
    context type:
      v: variable
    variable:
      v: coded
    transform:
      v: c
    parameter:
      value: string
        v: urn:iso:std:iso:3166
    parameter:
      value: id
        v: country
  rule:
    name:
      v: set country with system
    source:
      context:
        v: country
      condition:
        v: coded.memberOf('http://hl7.org/fhir/ValueSet/iso3166-1-3')
    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

id
v: country

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