CertDIVOCtoCoreDataSet
type: StructureMap
node role: treeRoot
id:
  v: CertDIVOCtoCoreDataSet
text:
  status:
    v: generated
  div: Generated Narrative: StructureMap CertDIVOCtoCoreDataSet #xD; map "http://smart.who.int/ddcc/StructureMap/CertDIVOCtoCoreDataSet" = "CertDIVOCtoCoreDataSet"#xD; #xD; // Structure map transforming CertDIVOC logical model to bundle of Core Data Set logical model#xD; #xD; uses "http://smart.who.int/ddcc/StructureDefinition/CertDIVOC" alias DIVOC 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 CertDIVOCtoCoreDataSetBundle(source src : DIVOC, target ddccBundle : DDCCBundle) {#xD; src.type as type then {#xD; type where type = 'ProofOfVaccinationCredential' then {#xD; src.evidence as evidence -> ddccBundle.entry as outentry, create('http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS') as ddcc then {#xD; src.credentialSubject as credentialSubject then CredentialSubjecttoCoreDataSet(credentialSubject, ddcc) "set patient";#xD; src -> ddcc.certificate as certificate then CertDIVOCtoCoreDataSetCertificate(src, evidence, certificate) "set certificate";#xD; evidence -> ddcc.vaccination as vaccination then EvidencetoCoreDataSetVS(evidence, vaccination) "set vaccination";#xD; evidence -> outentry.resource = ddcc "set outentry";#xD; };#xD; } "ProofOfVaccinationCredential";#xD; type where type = 'ProofOfTestCertificateCredential' then {#xD; src.evidence as evidence -> ddccBundle.entry as outentry, create('http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetTR') as ddcc then {#xD; src.credentialSubject as credentialSubject then CredentialSubjecttoCoreDataSet(credentialSubject, ddcc) "set patient";#xD; src -> ddcc.certificate as certificate then CertDIVOCtoCoreDataSetCertificate(src, evidence, certificate) "set certifi…
url:
  v: http://smart.who.int/ddcc/StructureMap/CertDIVOCtoCoreDataSet
version:
  v: 1.0.0
name:
  v: CertDIVOCtoCoreDataSet
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 CertDIVOC 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/CertDIVOC
    link: http://smart.who.int/ddcc/StructureDefinition/CertDIVOC
  mode:
    v: source
  alias:
    v: DIVOC
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: CertDIVOCtoCoreDataSetBundle
  type mode:
    v: none
  input:
    name:
      v: src
    type:
      v: DIVOC
    mode:
      v: source
  input:
    name:
      v: ddccBundle
    type:
      v: DDCCBundle
    mode:
      v: target
  rule:
    name:
      v: type
    source:
      context:
        v: src
      element:
        v: type
      variable:
        v: type
    rule:
      name:
        v: ProofOfVaccinationCredential
    rule:
      name:
        v: ProofOfTestCertificateCredential
group:
  name:
    v: CredentialSubjecttoCoreDataSet
  type mode:
    v: none
  input:
    name:
      v: credentialSubject
    mode:
      v: source
  input:
    name:
      v: ddcc
    type:
      v: DDCC
    mode:
      v: target
  rule:
    name:
      v: set name
    source:
      context:
        v: credentialSubject
      element:
        v: name
      variable:
        v: name
    target:
      context:
        v: ddcc
      context type:
        v: variable
      element:
        v: name
      transform:
        v: copy
      parameter:
        value: id
  rule:
    name:
      v: set birthDate
    source:
      context:
        v: credentialSubject
      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: identifier
    source:
      context:
        v: credentialSubject
      element:
        v: id
      variable:
        v: id
    target:
      context type:
        v: variable
      variable:
        v: identifier
      transform:
        v: create
      parameter:
        value: string
    target:
      context:
        v: identifier
      context type:
        v: variable
      element:
        v: value
      transform:
        v: copy
      parameter:
        value: id
    rule:
      name:
        v: set identifier

v: type

v: type = 'ProofOfVaccinationCredential'

v: evidence

context:
  v: src
element:
  v: evidence
variable:
  v: evidence

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 patient
source:
  context:
    v: src
  element:
    v: credentialSubject
  variable:
    v: credentialSubject
dependent:
  name:
    v: CredentialSubjecttoCoreDataSet
  variable:
    v: credentialSubject
  variable:
    v: ddcc

name:
  v: set certificate
source:
  context:
    v: src
target:
  context:
    v: ddcc
  context type:
    v: variable
  element:
    v: certificate
  variable:
    v: certificate
dependent:
  name:
    v: CertDIVOCtoCoreDataSetCertificate
  variable:
    v: src
  variable:
    v: evidence
  variable:
    v: certificate

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

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

v: type

v: type = 'ProofOfTestCertificateCredential'

v: evidence

context:
  v: src
element:
  v: evidence
variable:
  v: evidence

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 patient
source:
  context:
    v: src
  element:
    v: credentialSubject
  variable:
    v: credentialSubject
dependent:
  name:
    v: CredentialSubjecttoCoreDataSet
  variable:
    v: credentialSubject
  variable:
    v: ddcc

name:
  v: set certificate
source:
  context:
    v: src
target:
  context:
    v: ddcc
  context type:
    v: variable
  element:
    v: certificate
  variable:
    v: certificate
dependent:
  name:
    v: CertDIVOCtoCoreDataSetCertificate
  variable:
    v: src
  variable:
    v: evidence
  variable:
    v: certificate

name:
  v: set test
source:
  context:
    v: evidence
target:
  context:
    v: ddcc
  context type:
    v: variable
  element:
    v: test
  variable:
    v: test
dependent:
  name:
    v: EvidencetoCoreDataSetTR
  variable:
    v: evidence
  variable:
    v: test

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

id
v: name

id
v: birthDate

string
v: Identifier

id
v: id

context:
  v: id

context:
  v: ddcc
context type:
  v: variable
element:
  v: identifier
transform:
  v: copy
parameter:
  value: id
    v: identifier

name:
  v: CertDIVOCtoCoreDataSetCertificate
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: DIVOC
  mode:
    v: source
input:
  name:
    v: evidence
  mode:
    v: source
input:
  name:
    v: certificate
  mode:
    v: target
rule:
  name:
    v: set hcid
  source:
    context:
      v: evidence
    element:
      v: certificateId
    variable:
      v: certificateId
  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: certificateId
rule:
  name:
    v: context
  source:
    context:
      v: src
    element:
      v: context
    variable:
      v: context
  rule:
    name:
      v: set version
    source:
      context:
        v: context
      condition:
        v: (context.contains('cowin.gov.in'))
    target:
      context:
        v: certificate
      context type:
        v: variable
      element:
        v: version
      transform:
        v: copy
      parameter:
        value: id
rule:
  name:
    v: period
  source:
    context:
      v: evidence
  target:
    context:
      v: certificate
    context type:
      v: variable
    element:
      v: period
    variable:
      v: period
    transform:
      v: create
    parameter:
      value: string
        v: Period
  rule:
    name:
      v: set period start
    source:
      context:
        v: evidence
      element:
        v: effectiveStart
      variable:
        v: effectiveStart
    target:
      context:
        v: period
      context type:
        v: variable
      element:
        v: start
      transform:
        v: copy
      parameter:
        value: id
  rule:
    name:
      v: set period end
    source:
      context:
        v: evidence
      element:
        v: effectiveUntil
      variable:
        v: effectiveUntil
    target:
      context:
        v: period
      context type:
        v: variable
      element:
        v: end
      transform:
        v: copy
      parameter:
        value: id
rule:
  name:
    v: set issuer
  source:
    context:
      v: src
    element:
      v: issuer
    variable:
      v: issuer
  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: issuer

id
v: context

id
v: effectiveStart

id
v: effectiveUntil

name:
  v: EvidencetoCoreDataSetVS
type mode:
  v: none
input:
  name:
    v: evidence
  mode:
    v: source
input:
  name:
    v: vaccination
  mode:
    v: target
rule:
  name:
    v: set vaccine
  source:
    context:
      v: evidence
    element:
      v: icd11Code
    variable:
      v: icd11Code
  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: icd11Code
rule:
  name:
    v: set brand
  source:
    context:
      v: evidence
    element:
      v: vaccine
    variable:
      v: vaccine
  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: vaccine
rule:
  name:
    v: set manufacturer
  source:
    context:
      v: evidence
    element:
      v: manufacturer
    variable:
      v: manufacturer
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: manufacturer
    variable:
      v: coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: id
        v: manufacturer
rule:
  name:
    v: set lot
  source:
    context:
      v: evidence
    element:
      v: batch
    variable:
      v: batch
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: lot
    transform:
      v: copy
    parameter:
      value: id
        v: batch
rule:
  name:
    v: set date
  source:
    context:
      v: evidence
    element:
      v: date
    variable:
      v: date
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: date
    transform:
      v: copy
    parameter:
      value: id
        v: date
rule:
  name:
    v: set dose
  source:
    context:
      v: evidence
    element:
      v: dose
    variable:
      v: dose
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: dose
    transform:
      v: copy
    parameter:
      value: id
        v: dose
rule:
  name:
    v: set totalDoses
  source:
    context:
      v: evidence
    element:
      v: totalDoses
    variable:
      v: totalDoses
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: totalDoses

v: copy

value: id
  v: totalDoses

name:
  v: facility
source:
  context:
    v: evidence
  element:
    v: facility
  variable:
    v: facility
rule:
  name:
    v: 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: addressCountry
    target:
      context:
        v: vaccination
      context type:
        v: variable
      element:
        v: country
      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: set centre
  source:
    context:
      v: facility
    element:
      v: name
    variable:
      v: name
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: centre
    transform:
      v: copy
    parameter:
      value: id
        v: name

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

id
v: addressCountry

name:
  v: verifier
source:
  context:
    v: evidence
  element:
    v: verifier
  variable:
    v: verifier
rule:
  name:
    v: set practitioner
  source:
    context:
      v: verifier
    element:
      v: name
    variable:
      v: name
  target:
    context:
      v: vaccination
    context type:
      v: variable
    element:
      v: practitioner
    variable:
      v: practitioner
  target:
    context:
      v: practitioner
    context type:
      v: variable
    element:
      v: value
    transform:
      v: copy
    parameter:
      value: id
        v: name

name:
  v: EvidencetoCoreDataSetTR
type mode:
  v: none
input:
  name:
    v: evidence
  mode:
    v: source
input:
  name:
    v: test
  mode:
    v: target
rule:
  name:
    v: disease
  source:
    context:
      v: evidence
    element:
      v: disease
    variable:
      v: disease
  rule:
    name:
      v: set COVID19 pathogen
    source:
      context:
        v: disease
      condition:
        v: disease = 'COVID-19'
    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: string
  rule:
    name:
      v: set other pathogen
    source:
      context:
        v: disease
      condition:
        v: (disease = 'COVID-19').not()
    target:
      context:
        v: test
      context type:
        v: variable
      element:
        v: pathogen
      variable:
        v: coding
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
      parameter:
        value: id
rule:
  name:
    v: testType
  source:
    context:
      v: evidence
    element:
      v: testType
    variable:
      v: testType
  rule:
    name:
      v: set default type
    source:
      context:
        v: testType
    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: testType
    target:
      context type:
        v: variable
      variable:
        v: coded
      transform:
        v: c
      parameter:
        value: string
      parameter:
        value: id
    rule:
      name:
        v: translate DIVOC type
rule:
  name:
    v: sampleOrigin
  source:
    context:
      v: evidence
    element:
      v: sampleOrigin
    variable:
      v: sampleOrigin
  rule:
    name:
      v: set default origin
    source:
      context:
        v: sampleOrigin
    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: sampleOrigin
    target:
      context type:
        v: variable
      variable:
        v: coded
      transform:
        v: c
      parameter:
        value: string
      parameter:
        value: id
    rule:
      name:
        v: translate DIVOC origin

string
v: XN109

id
v: disease

id
v: testType

id
v: testType

v: testType

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

v: test

v: variable

v: type

v: translate

value: id
  v: coded

value: string
  v: Coding

id
v: sampleOrigin

id
v: sampleOrigin

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

context:
  v: test
context type:
  v: variable
element:
  v: origin
transform:
  v: translate
parameter:
  value: id
    v: coded
parameter:
  value: string
    v: http://smart.who.int/ddcc/ConceptMap/lab-test-sample-origin-divoc-to-icd11
parameter:
  value: string
    v: Coding

name:
  v: result
source:
  context:
    v: evidence
  element:
    v: result
  variable:
    v: result
rule:
  name:
    v: set default result
  source:
    context:
      v: result
  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: result
rule:
  name:
    v: coded
  source:
    context:
      v: result
  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-divoc
    parameter:
      value: id
        v: result
  rule:
    name:
      v: translate DIVOC result
    source:
      context:
        v: result
      condition:
        v: coded.memberOf('http://smart.who.int/ddcc/ValueSet/lab-test-qual-result-divoc')
    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 date
source:
  context:
    v: evidence
  element:
    v: sampleCollectionTimestamp
  variable:
    v: date
target:
  context:
    v: test
  context type:
    v: variable
  element:
    v: date
  transform:
    v: copy
  parameter:
    value: id
      v: date

name:
  v: set brand
source:
  context:
    v: evidence
  element:
    v: testName
  variable:
    v: testName
target:
  context:
    v: test
  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: testName

name:
  v: set manufacturer
source:
  context:
    v: evidence
  element:
    v: manufacturer
  variable:
    v: manufacturer
target:
  context:
    v: test
  context type:
    v: variable
  element:
    v: manufacturer
  variable:
    v: coding
target:
  context:
    v: coding
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value: id
      v: manufacturer

name:
  v: facility
source:
  context:
    v: evidence
  element:
    v: facility
  variable:
    v: facility
rule:
  name:
    v: 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: addressCountry
    target:
      context:
        v: test
      context type:
        v: variable
      element:
        v: country
      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: set centre
  source:
    context:
      v: facility
    element:
      v: name
    variable:
      v: name
  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: name

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

id
v: addressCountry