CertDCCtoCoreDataSet
type: StructureMap
node role: treeRoot
id:
  v: CertDCCtoCoreDataSet
text:
  status:
    v: generated
  div: Generated Narrative: StructureMap CertDCCtoCoreDataSet #xD; map "http://smart.who.int/ddcc/StructureMap/CertDCCtoCoreDataSet" = "CertDCCtoCoreDataSet"#xD; #xD; // Structure map transforming CertDCC logical model to bundle of Core Data Set logical model#xD; #xD; uses "http://smart.who.int/ddcc/StructureDefinition/CertDCC" alias CWTPayload 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 CertDCCtoCoreDataSet(source src : CWTPayload, target ddccBundle : DDCCBundle) {#xD; src.-260 as hcert then {#xD; hcert.1 as dcc then {#xD; dcc.v as v -> ddccBundle.entry as outentry, create('http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS') as ddcc then {#xD; v then DCCtoCoreDataSet(dcc, ddcc) "set DDCC";#xD; v -> ddcc.certificate as certificate then CertDCCtoCoreDataSetCertificate(src, dcc, v, certificate) "set certificate";#xD; v -> ddcc.vaccination as vaccination then VtoCoreDataSetVS(v, vaccination) "set vaccination";#xD; v -> outentry.resource = ddcc "set outentry";#xD; };#xD; dcc.t as t -> ddccBundle.entry as outentry, create('http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetTR') as ddcc then {#xD; t then DCCtoCoreDataSet(dcc, ddcc) "set DDCC";#xD; t -> ddcc.certificate as certificate then CertDCCtoCoreDataSetCertificate(src, dcc, t, certificate) "set certificate";#xD; t -> ddcc.test as test then TtoCoreDataSetTR(t, test) "set test";#xD; t -> outentry.resource = ddcc "set outentry";#xD; };#xD; } "eu_DCC_v1";#xD; } "hcert";#xD; }#xD; #xD; group DCCtoCoreDataSet(source dcc, target ddcc : DDCC) {#xD; dcc.dob as birthDate -> ddcc.birthDate = birthDate "set birthDate";#xD; dcc.nam as nam then {#xD; nam.gn as giv…
url:
  v: http://smart.who.int/ddcc/StructureMap/CertDCCtoCoreDataSet
version:
  v: 1.0.0
name:
  v: CertDCCtoCoreDataSet
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 CertDCC 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/CertDCC
    link: http://smart.who.int/ddcc/StructureDefinition/CertDCC
  mode:
    v: source
  alias:
    v: CWTPayload
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: CertDCCtoCoreDataSet
  type mode:
    v: none
  input:
    name:
      v: src
    type:
      v: CWTPayload
    mode:
      v: source
  input:
    name:
      v: ddccBundle
    type:
      v: DDCCBundle
    mode:
      v: target
  rule:
    name:
      v: hcert
    source:
      context:
        v: src
      element:
        v: -260
      variable:
        v: hcert
    rule:
      name:
        v: eu_DCC_v1
group:
  name:
    v: DCCtoCoreDataSet
  type mode:
    v: none
  input:
    name:
      v: dcc
    mode:
      v: source
  input:
    name:
      v: ddcc
    type:
      v: DDCC
    mode:
      v: target
  rule:
    name:
      v: set birthDate
    source:
      context:
        v: dcc
      element:
        v: dob
      variable:
        v: birthDate
    target:
      context:
        v: ddcc
      context type:
        v: variable
      element:
        v: birthDate
      transform:
        v: copy
      parameter:
        value: id
  rule:
    name:
      v: nam
    source:
      context:
        v: dcc
      element:
        v: nam
      variable:
        v: nam
    rule:
      name:
        v: set given name
    rule:
      name:
        v: add family name
group:
  name:
    v: CertDCCtoCoreDataSetCertificate
  type mode:
    v: none
  input:
    name:
      v: src
    type:
      v: CWTPayload
    mode:
      v: source
  input:
    name:
      v: dcc
    mode:
      v: source
  input:
    name:
      v: g
    mode:
      v: source
  input:
    name:
      v: certificate
    mode:
      v: target
  rule:
    name:
      v: set period
    source:
      context:
        v: src
    target:
      context:
        v: certificate
      context type:
        v: variable
      element:
        v: period
      variable:
        v: period

v: hcert

v: 1

v: dcc

v: v

context:
  v: dcc
element:
  v: v
variable:
  v: v

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/DDCCCoreDataSetVS

name:
  v: set DDCC
source:
  context:
    v: v
dependent:
  name:
    v: DCCtoCoreDataSet
  variable:
    v: dcc
  variable:
    v: ddcc

name:
  v: set certificate
source:
  context:
    v: v
target:
  context:
    v: ddcc
  context type:
    v: variable
  element:
    v: certificate
  variable:
    v: certificate
dependent:
  name:
    v: CertDCCtoCoreDataSetCertificate
  variable:
    v: src
  variable:
    v: dcc
  variable:
    v: v
  variable:
    v: certificate

name:
  v: set vaccination
source:
  context:
    v: v
target:
  context:
    v: ddcc
  context type:
    v: variable
  element:
    v: vaccination
  variable:
    v: vaccination
dependent:
  name:
    v: VtoCoreDataSetVS
  variable:
    v: v
  variable:
    v: vaccination

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

v: t

context:
  v: dcc
element:
  v: t
variable:
  v: t

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 DDCC
source:
  context:
    v: t
dependent:
  name:
    v: DCCtoCoreDataSet
  variable:
    v: dcc
  variable:
    v: ddcc

name:
  v: set certificate
source:
  context:
    v: t
target:
  context:
    v: ddcc
  context type:
    v: variable
  element:
    v: certificate
  variable:
    v: certificate
dependent:
  name:
    v: CertDCCtoCoreDataSetCertificate
  variable:
    v: src
  variable:
    v: dcc
  variable:
    v: t
  variable:
    v: certificate

name:
  v: set test
source:
  context:
    v: t
target:
  context:
    v: ddcc
  context type:
    v: variable
  element:
    v: test
  variable:
    v: test
dependent:
  name:
    v: TtoCoreDataSetTR
  variable:
    v: t
  variable:
    v: test

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

id
v: birthDate

v: nam

v: gn

v: given

v: ddcc

v: variable

v: name

v: evaluate

value: string
  v: given.replaceMatches('$', ' ')

v: nam

v: fn

v: family

v: ddcc

v: variable

v: name

v: tName

v: ddcc

v: variable

v: name

v: append

value: id
  v: tName

value: id
  v: family

v: create

value: string
  v: Period

name:
  v: CwtToPeriod
variable:
  v: src
variable:
  v: period

name:
  v: set version
source:
  context:
    v: dcc
  element:
    v: ver
  variable:
    v: ver
target:
  context:
    v: certificate
  context type:
    v: variable
  element:
    v: version
  transform:
    v: copy
  parameter:
    value: id
      v: ver

name:
  v: set hcid
source:
  context:
    v: g
  element:
    v: ci
  variable:
    v: ci
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
      v: ci

name:
  v: set issuer
source:
  context:
    v: g
  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: CwtToPeriod
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: CWTPayload
  mode:
    v: source
input:
  name:
    v: tgt
  type:
    v: Period
  mode:
    v: target
rule:
  name:
    v: set period start
  source:
    context:
      v: src
    element:
      v: 6
    variable:
      v: iat
  target:
    context type:
      v: variable
    variable:
      v: epoch
    transform:
      v: append
    parameter:
      value: id
        v: iat
    parameter:
      value: string
        v: seconds
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: start
    transform:
      v: evaluate
    parameter:
      value: string
        v: @1970-01-01T00:00:00.000+00:00 + epoch.toQuantity()
rule:
  name:
    v: set period end
  source:
    context:
      v: src
    element:
      v: 4
    variable:
      v: exp
  target:
    context type:
      v: variable
    variable:
      v: epoch
    transform:
      v: append
    parameter:
      value: id
        v: exp
    parameter:
      value: string
        v: seconds
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: end
    transform:
      v: evaluate
    parameter:
      value: string
        v: @1970-01-01T00:00:00.000+00:00 + epoch.toQuantity()

name:
  v: VtoCoreDataSetVS
type mode:
  v: none
input:
  name:
    v: v
  mode:
    v: source
input:
  name:
    v: vaccination
  mode:
    v: target
rule:
  name:
    v: set target disease
  source:
    context:
      v: v
    element:
      v: tg
    variable:
      v: tg
  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://snomed.info/sct
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: id
        v: tg
rule:
  name:
    v: set vaccine
  source:
    context:
      v: v
    element:
      v: vp
    variable:
      v: vp
  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: https://ec.europa.eu/health/documents/community-register/html/
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: id
        v: vp
rule:
  name:
    v: mp
  source:
    context:
      v: v
    element:
      v: mp
    variable:
      v: mp
  rule:
    name:
      v: set default brand
    source:
      context:
        v: mp
    target:
      context:
        v: vaccination
      context type:
        v: variable
      element:
        v: brand
      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
  rule:
    name:
      v: coding
    source:
      context:
        v: mp
    target:
      context type:
        v: variable
      variable:
        v: coded
      transform:
        v: c
      parameter:
        value: string
      parameter:
        value: id
    rule:
      name:
        v: translate COVID19 brand
rule:
  name:
    v: set maholder
  source:
    context:
      v: v
    element:
      v: ma
    variable:
      v: ma
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: maholder
    variable:
      v: coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: https://id.uvci.eu/valuesets/vaccine-mah-manf.json
  target:
    context:
      v: coding
    context type:
      v: variable

id
v: mp

id
v: mp

v: mp

v: coded.memberOf('http://smart.who.int/ddcc/ValueSet/vaccine-covid19-euur')

v: vaccination

v: variable

v: brand

v: translate

value: id
  v: coded

value: string
  v: Coding

v: code

v: copy

value: id
  v: ma

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

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

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

name:
  v: set country
source:
  context:
    v: v
  element:
    v: co
  variable:
    v: co
target:
  context:
    v: vaccination
  context type:
    v: variable
  element:
    v: country
  variable:
    v: coding
target:
  context:
    v: coding
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value: id
      v: co
target:
  context:
    v: coding
  context type:
    v: variable
  element:
    v: system
  transform:
    v: copy
  parameter:
    value: string
      v: urn:iso:std:iso:3166

name:
  v: TtoCoreDataSetTR
type mode:
  v: none
input:
  name:
    v: t
  mode:
    v: source
input:
  name:
    v: test
  mode:
    v: target
rule:
  name:
    v: tg
  source:
    context:
      v: t
    element:
      v: tg
    variable:
      v: tg
  rule:
    name:
      v: set default pathogen
    source:
      context:
        v: tg
    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
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
      parameter:
        value: id
  rule:
    name:
      v: coding
    source:
      context:
        v: tg
    target:
      context type:
        v: variable
      variable:
        v: coded
      transform:
        v: c
      parameter:
        value: string
      parameter:
        value: id
    rule:
      name:
        v: translate COVID19 pathogen
rule:
  name:
    v: tt
  source:
    context:
      v: t
    element:
      v: tt
    variable:
      v: tt
  rule:
    name:
      v: set default type
    source:
      context:
        v: tt
    target:
      context:
        v: test
      context type:
        v: variable
      element:
        v: type
      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
  rule:
    name:
      v: coding
    source:
      context:
        v: tt
    target:
      context type:
        v: variable
      variable:
        v: coded
      transform:
        v: c
      parameter:
        value: string
      parameter:
        value: id
    rule:
      name:
        v: translate COVID19 type
rule:
  name:
    v: set brand
  source:
    context:
      v: t
    element:
      v: nm
    variable:
      v: nm
  target:
    context:
      v: test
    context type:
      v: variable
    element:
      v: brand
    variable:
      v: coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: https://id.uvci.eu/valuesets/test-manf.json
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: id
        v: nm
rule:
  name:
    v: set manufacturer
  source:
    context:
      v: t
    element:
      v: ma
    variable:
      v: ma

id
v: tg

id
v: tg

v: tg

v: coded.memberOf('http://smart.who.int/ddcc/ValueSet/lab-test-pathogen-covid19-snomed')

v: test

v: variable

v: pathogen

v: translate

value: id
  v: coded

value: string
  v: Coding

id
v: tt

id
v: tt

v: tt

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

v: test

v: variable

v: type

v: translate

value: id
  v: coded

value: string
  v: Coding

context:
  v: test
context type:
  v: variable
element:
  v: manufacturer
variable:
  v: coding

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value: string
    v: https://covid-19-diagnostics.jrc.ec.europa.eu/devices

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

name:
  v: set date
source:
  context:
    v: t
  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

name:
  v: tr
source:
  context:
    v: t
  element:
    v: tr
  variable:
    v: tr
rule:
  name:
    v: set default result
  source:
    context:
      v: tr
  target:
    context:
      v: test
    context type:
      v: variable
    element:
      v: result
    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: id
        v: tr
rule:
  name:
    v: coding
  source:
    context:
      v: tr
  target:
    context type:
      v: variable
    variable:
      v: coded
    transform:
      v: c
    parameter:
      value: string
        v: http://snomed.info/sct
    parameter:
      value: id
        v: tr
  rule:
    name:
      v: translate COVID19 result
    source:
      context:
        v: tr
      condition:
        v: coded.memberOf('http://smart.who.int/ddcc/ValueSet/lab-test-qual-result-snomed')
    target:
      context:
        v: test
      context type:
        v: variable
      element:
        v: result
      transform:
        v: translate
      parameter:
        value: id
      parameter:
        value: string
      parameter:
        value: string

id
v: coded

string
v: Coding

name:
  v: set centre
source:
  context:
    v: t
  element:
    v: tc
  variable:
    v: tc
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: tc

name:
  v: set country
source:
  context:
    v: t
  element:
    v: co
  variable:
    v: co
target:
  context:
    v: test
  context type:
    v: variable
  element:
    v: country
  variable:
    v: coding
target:
  context:
    v: coding
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value: id
      v: co
target:
  context:
    v: coding
  context type:
    v: variable
  element:
    v: system
  transform:
    v: copy
  parameter:
    value: string
      v: urn:iso:std:iso:3166