WHO Digital Documentation of COVID-19 Certificates (DDCC)
1.0.0 - CI Build
WHO Digital Documentation of COVID-19 Certificates (DDCC), published by WHO. This guide is not an authorized publication; it is the continuous build for version 1.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/WorldHealthOrganization/ddcc/tree/main and changes regularly. See the Directory of published versions
Draft as of 2024-10-17 |
{
"resourceType" : "StructureMap",
"id" : "ResourcesToVSCoreDataSet",
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap ResourcesToVSCoreDataSet</b></p><a name=\"ResourcesToVSCoreDataSet\"> </a><a name=\"hcResourcesToVSCoreDataSet\"> </a><a name=\"ResourcesToVSCoreDataSet-en-US\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> "</span>http://smart.who.int/ddcc/StructureMap/ResourcesToVSCoreDataSet<span style=\"color: navy\">" = "</span>ResourcesToVSCoreDataSet<span style=\"color: navy\">"\r\n\r\n</span><b>uses</b><span style=\"color: navy\"> "</span><a href=\"http://hl7.org/fhir/R4/bundle.html\" title=\"Bundle\">http://hl7.org/fhir/StructureDefinition/Bundle</a><span style=\"color: navy\">" </span><b>alias </b>Bundle <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"http://hl7.org/fhir/R4/datatypes.html#HumanName\" title=\"HumanName\">http://hl7.org/fhir/StructureDefinition/HumanName</a><span style=\"color: navy\">" </span><b>alias </b>HumanName <b>as </b><b>target</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"StructureDefinition-DDCCPatient.html\" title=\"DDCC Patient\">http://smart.who.int/ddcc/StructureDefinition/DDCCPatient</a><span style=\"color: navy\">" </span><b>alias </b>DDCCPatient <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"StructureDefinition-DDCCImmunization.html\" title=\"DDCC Immunization\">http://smart.who.int/ddcc/StructureDefinition/DDCCImmunization</a><span style=\"color: navy\">" </span><b>alias </b>DDCCImmunization <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"StructureDefinition-DDCCImmunizationRecommendation.html\" title=\"DDCC Immunization Recommendation\">http://smart.who.int/ddcc/StructureDefinition/DDCCImmunizationRecommendation</a><span style=\"color: navy\">" </span><b>alias </b>DDCCImmunizationRecommendation <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"StructureDefinition-DDCCVSComposition.html\" title=\"DDCC:VS Composition\">http://smart.who.int/ddcc/StructureDefinition/DDCCVSComposition</a><span style=\"color: navy\">" </span><b>alias </b>DDCCVSComposition <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"StructureDefinition-DDCCCoreDataSetVSPoV.html\" title=\"DDCC Core Data Set Logical Model - Vaccination Status - Proof of Vaccination\">http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVSPoV</a><span style=\"color: navy\">" </span><b>alias </b>DDCCPoV <b>as </b><b>target</b>\r\n\r\n<b>group </b>ResourcesToCoreDataSet<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle, <b>target</b> <span style=\"color: maroon\">ddcc</span><span style=\"color: navy\"> : </span>DDCCPoV<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> bundle<span style=\"color: navy\"><b> -> </b></span> ddcc.vaccination<b> as </b><span style=\"color: maroon\">vaccination</span><span style=\"color: navy\">, </span> ddcc.certificate<b> as </b><span style=\"color: maroon\">certificate</span><b> then</b><span style=\"color: navy\"> {\r\n</span> bundle.link first<b> as </b><span style=\"color: maroon\">link</span><span style=\"color: navy\"><b> -> </b></span>certificate.hcid<b> as </b><span style=\"color: maroon\">hcid</span><b> then</b><span style=\"color: navy\"> {\r\n</span> <span style=\"color: navy\">// </span><span style=\"color: green\">There's got to be a better way to do this</span>\r\n link.url<b> as </b><span style=\"color: maroon\">url</span><span style=\"color: navy\"><b> -> </b></span>hcid.value = <span style=\"color: navy\">(</span>url.replaceMatches('[Uu][Rr][Nn]:[Hh][Cc][Ii][Dd]:', '')<span style=\"color: navy\">)</span> <i>"set hcid value"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set hcid"</i><span style=\"color: navy\">;</span>\r\n bundle.id<b> as </b><span style=\"color: maroon\">id</span><span style=\"color: navy\"><b> -> </b></span> certificate.ddccid<b> as </b><span style=\"color: maroon\">ddccid</span><span style=\"color: navy\">, </span> ddccid.value = <span style=\"color: maroon\">id</span> <i>"set ddcc id value"</i><span style=\"color: navy\">;</span>\r\n bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><b> then</b><span style=\"color: navy\"> {\r\n</span> entry.resource<span style=\"color: navy\"> : </span>Patient first<b> as </b><span style=\"color: maroon\">patient</span><b> then </b>PatientToDDCCVS<span style=\"color: navy\">(</span><span style=\"color: maroon\">patient</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">ddcc</span><span style=\"color: navy\">)</span> <i>"set patient details"</i><span style=\"color: navy\">;</span>\r\n entry.resource<span style=\"color: navy\"> : </span>Immunization first<b> as </b><span style=\"color: maroon\">immunization</span><b> then </b>ImmunizationToDDCCVS<span style=\"color: navy\">(</span><span style=\"color: maroon\">immunization</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vaccination</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">certificate</span><span style=\"color: navy\">)</span> <i>"set immunization"</i><span style=\"color: navy\">;</span>\r\n entry.resource<span style=\"color: navy\"> : </span>ImmunizationRecommendation first<b> as </b><span style=\"color: maroon\">immRec</span><b> then </b>ImmRecToDDCCVS<span style=\"color: navy\">(</span><span style=\"color: maroon\">immRec</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vaccination</span><span style=\"color: navy\">)</span> <i>"set immunization recommendation"</i><span style=\"color: navy\">;</span>\r\n entry.resource<span style=\"color: navy\"> : </span>Composition first<b> as </b><span style=\"color: maroon\">composition</span><b> then </b>CompositionToDDCCVS<span style=\"color: navy\">(</span><span style=\"color: maroon\">composition</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">certificate</span><span style=\"color: navy\">)</span> <i>"set composition"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set header from patient"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"setup ddcc"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">// \t entry.resource : DDCCPatient as patient entry.resource : Patient as patient then Decode-Patient-To-QR(patient,qr) "Patient"; };</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">bundle as src then QRespToHeader( src, ddcc ) "set header content"; bundle as src -> ddcc.vaccination as vaccination then QRespToVaccination( src, vaccination ) "set vaccination content"; bundle as src -> ddcc.certificate as certificate then QRespToCertificate( src, certificate ) "set certificate content";</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">then { a as item where linkId = 'name' -> ddcc.name = item "set name"; } "items";</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>CompositionToDDCCVS<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">composition</span><span style=\"color: navy\"> : </span>DDCCVSComposition, <b>target</b> <span style=\"color: maroon\">certificate</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> composition<span style=\"color: navy\"><b> -> </b></span>certificate.version = <span style=\"color: blue\">'RC2'</span> <i>"set version"</i><span style=\"color: navy\">;</span>\r\n composition.event first<b> as </b><span style=\"color: maroon\">event</span><b> then</b><span style=\"color: navy\"> {\r\n</span> event.period<b> as </b><span style=\"color: maroon\">period</span><span style=\"color: navy\"><b> -> </b></span>certificate.period<b> as </b><span style=\"color: maroon\">tPeriod</span><b> then</b><span style=\"color: navy\"> {\r\n</span> period.start<b> as </b><span style=\"color: maroon\">start</span><span style=\"color: navy\"><b> -> </b></span>tPeriod.start = <span style=\"color: maroon\">start</span> <i>"set period start"</i><span style=\"color: navy\">;</span>\r\n period.end<b> as </b><span style=\"color: maroon\">end</span><span style=\"color: navy\"><b> -> </b></span>tPeriod.end = <span style=\"color: maroon\">end</span> <i>"set period end"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set period"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set certificate period"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>PatientToDDCCVS<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\"> : </span>DDCCPatient, <b>target</b> <span style=\"color: maroon\">ddcc</span><span style=\"color: navy\"> : </span>DDCCPoV<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> patient.name<b> as </b><span style=\"color: maroon\">name</span><b> then </b>NameToText<span style=\"color: navy\">(</span><span style=\"color: maroon\">name</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">ddcc</span><span style=\"color: navy\">)</span> <i>"set name"</i><span style=\"color: navy\">;</span>\r\n patient.birthDate<b> as </b><span style=\"color: maroon\">bday</span><span style=\"color: navy\"><b> -> </b></span>ddcc.birthDate = <span style=\"color: maroon\">bday</span> <i>"set birth date"</i><span style=\"color: navy\">;</span>\r\n patient.id<b> as </b><span style=\"color: maroon\">id</span><span style=\"color: navy\"><b> -> </b></span> ddcc.identifier<b> as </b><span style=\"color: maroon\">identifier</span><span style=\"color: navy\">, </span> identifier.value = <span style=\"color: maroon\">id</span> <i>"set identifier from id"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">this will override what was set from id if it exists</span>\r\n patient.identifier first<b> as </b><span style=\"color: maroon\">sId</span><span style=\"color: navy\"><b> -> </b></span>ddcc.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {\r\n</span> sId.value<b> as </b><span style=\"color: maroon\">id</span><span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">id</span> <i>"set identifier value"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set identifier from identifier"</i><span style=\"color: navy\">;</span>\r\n patient.gender<b> as </b><span style=\"color: maroon\">gender</span><span style=\"color: navy\"><b> -> </b></span>ddcc.sex = <span style=\"color: maroon\">gender</span> <i>"set sex"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>NameToText<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">name</span><span style=\"color: navy\"> : </span>HumanName, <b>target</b> <span style=\"color: maroon\">ddcc</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> <span style=\"color: navy\">// </span><span style=\"color: green\">annoying because append doesn't work until ddcc.name is set</span>\r\n name.given first<b> as </b><span style=\"color: maroon\">given</span><span style=\"color: navy\"><b> -> </b></span>ddcc.name = <span style=\"color: navy\">(</span>given.replaceMatches('$', ' ')<span style=\"color: navy\">)</span> <i>"set first name"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: #b36b00\" title=\"This element was not defined prior to R5\">// name.given not_first as other -> ddcc.name as tName, ddcc.name = append( tName, other ) "set other names";</span>\r\n name.given not_first<b> as </b><span style=\"color: maroon\">other</span><span style=\"color: navy\"><b> -> </b></span> ddcc.name<b> as </b><span style=\"color: maroon\">tName</span><span style=\"color: navy\">, </span> <span style=\"color: navy\">(</span>other.replaceMatches('$', ' ')<span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">spaced</span><span style=\"color: navy\">, </span> ddcc.name = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">tName</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">spaced</span><span style=\"color: navy\">)</span> <i>"set other names"</i><span style=\"color: navy\">;</span>\r\n name.family<b> as </b><span style=\"color: maroon\">family</span><span style=\"color: navy\"><b> -> </b></span> ddcc.name<b> as </b><span style=\"color: maroon\">tName</span><span style=\"color: navy\">, </span> ddcc.name = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">tName</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">family</span><span style=\"color: navy\">)</span> <i>"add family name"</i><span style=\"color: navy\">;</span>\r\n name.text<b> as </b><span style=\"color: maroon\">text</span><span style=\"color: navy\"><b> -> </b></span>ddcc.name = <span style=\"color: maroon\">text</span> <i>"set full name"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>ImmunizationToDDCCVS<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">immunization</span><span style=\"color: navy\"> : </span>DDCCImmunization, <b>target</b> <span style=\"color: maroon\">vaccination</span>, <b>target</b> <span style=\"color: maroon\">certificate</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> immunization.vaccineCode<b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {\r\n</span> code.coding first<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\"><b> -> </b></span>vaccination.vaccine = <span style=\"color: maroon\">coding</span> <i>"set vaccine"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set vaccine code"</i><span style=\"color: navy\">;</span>\r\n immunization.extension<b> as </b><span style=\"color: maroon\">ext</span><b> then</b><span style=\"color: navy\"> {\r\n</span> ext first<b> as </b><span style=\"color: maroon\">brand</span><b> where </b>ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineBrand'<b> then</b><span style=\"color: navy\"> {\r\n</span> brand.valueCoding<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\"><b> -> </b></span>vaccination.brand = <span style=\"color: maroon\">coding</span> <i>"set brand code"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set brand"</i><span style=\"color: navy\">;</span>\r\n ext first<b> as </b><span style=\"color: maroon\">maholder</span><b> where </b>ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineMarketAuthorization'<b> then</b><span style=\"color: navy\"> {\r\n</span> maholder.valueCoding<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\"><b> -> </b></span>vaccination.maholder = <span style=\"color: maroon\">coding</span> <i>"set maholder code"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set maholder"</i><span style=\"color: navy\">;</span>\r\n ext first<b> as </b><span style=\"color: maroon\">valid</span><b> where </b>ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineValidFrom'<b> then</b><span style=\"color: navy\"> {\r\n</span> valid.valueDateTime<b> as </b><span style=\"color: maroon\">date</span><span style=\"color: navy\"><b> -> </b></span>vaccination.validFrom = <span style=\"color: maroon\">date</span> <i>"set validFrom date"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set validFrom"</i><span style=\"color: navy\">;</span>\r\n ext first<b> as </b><span style=\"color: maroon\">country</span><b> where </b>ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCCountryOfVaccination'<b> then</b><span style=\"color: navy\"> {\r\n</span> country.valueCode<b> as </b><span style=\"color: maroon\">code</span><span style=\"color: navy\"><b> -> </b></span> vaccination.country<b> as </b><span style=\"color: maroon\">vCountry</span><span style=\"color: navy\">, </span> vCountry.system = <span style=\"color: blue\">'urn:iso:std:iso:3166'</span><span style=\"color: navy\">, </span> vCountry.code = <span style=\"color: maroon\">code</span> <i>"set country code"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set country"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set extensions"</i><span style=\"color: navy\">;</span>\r\n immunization.manufacturer<b> as </b><span style=\"color: maroon\">manufacturer</span><b> then</b><span style=\"color: navy\"> {\r\n</span> manufacturer.identifier<b> as </b><span style=\"color: maroon\">identifier</span><span style=\"color: navy\"><b> -> </b></span>vaccination.manufacturer<b> as </b><span style=\"color: maroon\">vMan</span><b> then</b><span style=\"color: navy\"> {\r\n</span> identifier.system<b> as </b><span style=\"color: maroon\">system</span><span style=\"color: navy\"><b> -> </b></span>vMan.system = <span style=\"color: maroon\">system</span> <i>"set manufacturer system"</i><span style=\"color: navy\">;</span>\r\n identifier.value<b> as </b><span style=\"color: maroon\">value</span><span style=\"color: navy\"><b> -> </b></span>vMan.code = <span style=\"color: maroon\">value</span> <i>"set manufactutuer code"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set manufacturer id"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set manufacturer"</i><span style=\"color: navy\">;</span>\r\n immunization.lotNumber<b> as </b><span style=\"color: maroon\">lot</span><span style=\"color: navy\"><b> -> </b></span>vaccination.lot = <span style=\"color: maroon\">lot</span> <i>"set lot number"</i><span style=\"color: navy\">;</span>\r\n immunization.occurrence<b> as </b><span style=\"color: maroon\">date</span><span style=\"color: navy\"><b> -> </b></span>vaccination.date = <span style=\"color: maroon\">date</span> <i>"set date"</i><span style=\"color: navy\">;</span>\r\n immunization.protocolApplied first<b> as </b><span style=\"color: maroon\">protocol</span><b> then</b><span style=\"color: navy\"> {\r\n</span> protocol.doseNumber<b> as </b><span style=\"color: maroon\">dose</span><span style=\"color: navy\"><b> -> </b></span>vaccination.dose = <span style=\"color: maroon\">dose</span> <i>"set dose"</i><span style=\"color: navy\">;</span>\r\n protocol.seriesDoses<b> as </b><span style=\"color: maroon\">totalDoses</span><span style=\"color: navy\"><b> -> </b></span>vaccination.totalDoses = <span style=\"color: maroon\">totalDoses</span> <i>"set totalDoses"</i><span style=\"color: navy\">;</span>\r\n protocol.targetDisease first<b> as </b><span style=\"color: maroon\">disease</span><b> then</b><span style=\"color: navy\"> {\r\n</span> disease.coding first<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\"><b> -> </b></span>vaccination.disease = <span style=\"color: maroon\">coding</span> <i>"set disease coding"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set disease"</i><span style=\"color: navy\">;</span>\r\n protocol.authority<b> as </b><span style=\"color: maroon\">authority</span><span style=\"color: navy\"><b> -> </b></span>certificate.issuer<b> as </b><span style=\"color: maroon\">issuer</span><b> then</b><span style=\"color: navy\"> {\r\n</span> authority.reference<b> as </b><span style=\"color: maroon\">reference</span><span style=\"color: navy\"><b> -> </b></span>issuer.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {\r\n</span> reference<span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">reference</span> <i>"set reference"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set issuer from reference"</i><span style=\"color: navy\">;</span>\r\n authority.identifier<b> as </b><span style=\"color: maroon\">identifier</span><span style=\"color: navy\"><b> -> </b></span>issuer.identifier = <span style=\"color: maroon\">identifier</span> <i>"set issuer identifier"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set issuer"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set protocol applied"</i><span style=\"color: navy\">;</span>\r\n immunization.location<b> as </b><span style=\"color: maroon\">location</span><b> then</b><span style=\"color: navy\"> {\r\n</span> location.reference<b> as </b><span style=\"color: maroon\">reference</span><span style=\"color: navy\"><b> -> </b></span>vaccination.centre = <span style=\"color: maroon\">reference</span> <i>"set vaccination centre from reference"</i><span style=\"color: navy\">;</span>\r\n location.display<b> as </b><span style=\"color: maroon\">centre</span><span style=\"color: navy\"><b> -> </b></span>vaccination.centre = <span style=\"color: maroon\">centre</span> <i>"set vaccination centre"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set vaccination centre location"</i><span style=\"color: navy\">;</span>\r\n immunization.performer first<b> as </b><span style=\"color: maroon\">performer</span><b> then</b><span style=\"color: navy\"> {\r\n</span> performer.actor<b> as </b><span style=\"color: maroon\">actor</span><b> then</b><span style=\"color: navy\"> {\r\n</span> actor.identifier<b> as </b><span style=\"color: maroon\">identifier</span><span style=\"color: navy\"><b> -> </b></span>vaccination.practitioner = <span style=\"color: maroon\">identifier</span> <i>"set practitioner"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set actor"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set performer"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>ImmRecToDDCCVS<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">immRec</span><span style=\"color: navy\"> : </span>DDCCImmunizationRecommendation, <b>target</b> <span style=\"color: maroon\">vaccination</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> immRec.recommendation<b> as </b><span style=\"color: maroon\">rec</span><b> then</b><span style=\"color: navy\"> {\r\n</span> rec.dateCriterion first<b> as </b><span style=\"color: maroon\">due_date</span><b> then</b><span style=\"color: navy\"> {\r\n</span> due_date.value<b> as </b><span style=\"color: maroon\">date</span><span style=\"color: navy\"><b> -> </b></span>vaccination.nextDose = <span style=\"color: maroon\">date</span> <i>"set due date"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"get date criterion"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"get recommendation"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
},
"url" : "http://smart.who.int/ddcc/StructureMap/ResourcesToVSCoreDataSet",
"version" : "1.0.0",
"name" : "ResourcesToVSCoreDataSet",
"status" : "draft",
"date" : "2024-10-17T04:40:27+00:00",
"publisher" : "WHO",
"contact" : [
{
"name" : "WHO",
"telecom" : [
{
"system" : "url",
"value" : "http://who.int"
}
]
}
],
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/StructureDefinition/Bundle",
"mode" : "source",
"alias" : "Bundle"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/HumanName",
"mode" : "target",
"alias" : "HumanName"
},
{
"url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCPatient",
"mode" : "source",
"alias" : "DDCCPatient"
},
{
"url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCImmunization",
"mode" : "source",
"alias" : "DDCCImmunization"
},
{
"url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCImmunizationRecommendation",
"mode" : "source",
"alias" : "DDCCImmunizationRecommendation"
},
{
"url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCVSComposition",
"mode" : "source",
"alias" : "DDCCVSComposition"
},
{
"url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVSPoV",
"mode" : "target",
"alias" : "DDCCPoV"
}
],
"group" : [
{
"name" : "ResourcesToCoreDataSet",
"typeMode" : "none",
"input" : [
{
"name" : "bundle",
"type" : "Bundle",
"mode" : "source"
},
{
"name" : "ddcc",
"type" : "DDCCPoV",
"mode" : "target"
}
],
"rule" : [
{
"name" : "setup ddcc",
"source" : [
{
"context" : "bundle"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "vaccination",
"variable" : "vaccination"
},
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "certificate",
"variable" : "certificate"
}
],
"rule" : [
{
"name" : "set hcid",
"source" : [
{
"context" : "bundle",
"element" : "link",
"listMode" : "first",
"variable" : "link"
}
],
"target" : [
{
"context" : "certificate",
"contextType" : "variable",
"element" : "hcid",
"variable" : "hcid"
}
],
"rule" : [
{
"name" : "set hcid value",
"source" : [
{
"context" : "link",
"element" : "url",
"variable" : "url"
}
],
"target" : [
{
"context" : "hcid",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "url.replaceMatches('[Uu][Rr][Nn]:[Hh][Cc][Ii][Dd]:', '')"
}
]
}
]
}
]
},
{
"name" : "set ddcc id value",
"source" : [
{
"context" : "bundle",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "certificate",
"contextType" : "variable",
"element" : "ddccid",
"variable" : "ddccid"
},
{
"context" : "ddccid",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "id"
}
]
}
]
},
{
"name" : "set header from patient",
"source" : [
{
"context" : "bundle",
"element" : "entry",
"variable" : "entry"
}
],
"rule" : [
{
"name" : "set patient details",
"source" : [
{
"context" : "entry",
"type" : "Patient",
"element" : "resource",
"listMode" : "first",
"variable" : "patient"
}
],
"dependent" : [
{
"name" : "PatientToDDCCVS",
"variable" : [
"patient",
"ddcc"
]
}
]
},
{
"name" : "set immunization",
"source" : [
{
"context" : "entry",
"type" : "Immunization",
"element" : "resource",
"listMode" : "first",
"variable" : "immunization"
}
],
"dependent" : [
{
"name" : "ImmunizationToDDCCVS",
"variable" : [
"immunization",
"vaccination",
"certificate"
]
}
]
},
{
"name" : "set immunization recommendation",
"source" : [
{
"context" : "entry",
"type" : "ImmunizationRecommendation",
"element" : "resource",
"listMode" : "first",
"variable" : "immRec"
}
],
"dependent" : [
{
"name" : "ImmRecToDDCCVS",
"variable" : [
"immRec",
"vaccination"
]
}
]
},
{
"name" : "set composition",
"source" : [
{
"context" : "entry",
"type" : "Composition",
"element" : "resource",
"listMode" : "first",
"variable" : "composition"
}
],
"dependent" : [
{
"name" : "CompositionToDDCCVS",
"variable" : [
"composition",
"certificate"
]
}
]
}
]
}
]
}
]
},
{
"name" : "CompositionToDDCCVS",
"typeMode" : "none",
"input" : [
{
"name" : "composition",
"type" : "DDCCVSComposition",
"mode" : "source"
},
{
"name" : "certificate",
"mode" : "target"
}
],
"rule" : [
{
"name" : "set version",
"source" : [
{
"context" : "composition"
}
],
"target" : [
{
"context" : "certificate",
"contextType" : "variable",
"element" : "version",
"transform" : "copy",
"parameter" : [
{
"valueString" : "RC2"
}
]
}
]
},
{
"name" : "set certificate period",
"source" : [
{
"context" : "composition",
"element" : "event",
"listMode" : "first",
"variable" : "event"
}
],
"rule" : [
{
"name" : "set period",
"source" : [
{
"context" : "event",
"element" : "period",
"variable" : "period"
}
],
"target" : [
{
"context" : "certificate",
"contextType" : "variable",
"element" : "period",
"variable" : "tPeriod"
}
],
"rule" : [
{
"name" : "set period start",
"source" : [
{
"context" : "period",
"element" : "start",
"variable" : "start"
}
],
"target" : [
{
"context" : "tPeriod",
"contextType" : "variable",
"element" : "start",
"transform" : "copy",
"parameter" : [
{
"valueId" : "start"
}
]
}
]
},
{
"name" : "set period end",
"source" : [
{
"context" : "period",
"element" : "end",
"variable" : "end"
}
],
"target" : [
{
"context" : "tPeriod",
"contextType" : "variable",
"element" : "end",
"transform" : "copy",
"parameter" : [
{
"valueId" : "end"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "PatientToDDCCVS",
"typeMode" : "none",
"input" : [
{
"name" : "patient",
"type" : "DDCCPatient",
"mode" : "source"
},
{
"name" : "ddcc",
"type" : "DDCCPoV",
"mode" : "target"
}
],
"rule" : [
{
"name" : "set name",
"source" : [
{
"context" : "patient",
"element" : "name",
"variable" : "name"
}
],
"dependent" : [
{
"name" : "NameToText",
"variable" : [
"name",
"ddcc"
]
}
]
},
{
"name" : "set birth date",
"source" : [
{
"context" : "patient",
"element" : "birthDate",
"variable" : "bday"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "copy",
"parameter" : [
{
"valueId" : "bday"
}
]
}
]
},
{
"name" : "set identifier from id",
"source" : [
{
"context" : "patient",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier"
},
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "id"
}
]
}
]
},
{
"name" : "set identifier from identifier",
"source" : [
{
"context" : "patient",
"element" : "identifier",
"listMode" : "first",
"variable" : "sId"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier"
}
],
"rule" : [
{
"name" : "set identifier value",
"source" : [
{
"context" : "sId",
"element" : "value",
"variable" : "id"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "id"
}
]
}
]
}
]
},
{
"name" : "set sex",
"source" : [
{
"context" : "patient",
"element" : "gender",
"variable" : "gender"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "sex",
"transform" : "copy",
"parameter" : [
{
"valueId" : "gender"
}
]
}
]
}
]
},
{
"name" : "NameToText",
"typeMode" : "none",
"input" : [
{
"name" : "name",
"type" : "HumanName",
"mode" : "source"
},
{
"name" : "ddcc",
"mode" : "target"
}
],
"rule" : [
{
"name" : "set first name",
"source" : [
{
"context" : "name",
"element" : "given",
"listMode" : "first",
"variable" : "given"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "given.replaceMatches('$', ' ')"
}
]
}
]
},
{
"name" : "set other names",
"source" : [
{
"context" : "name",
"element" : "given",
"listMode" : "not_first",
"variable" : "other"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "name",
"variable" : "tName"
},
{
"contextType" : "variable",
"variable" : "spaced",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "other.replaceMatches('$', ' ')"
}
]
},
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "name",
"transform" : "append",
"parameter" : [
{
"valueId" : "tName"
},
{
"valueId" : "spaced"
}
]
}
]
},
{
"name" : "add family name",
"source" : [
{
"context" : "name",
"element" : "family",
"variable" : "family"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "name",
"variable" : "tName"
},
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "name",
"transform" : "append",
"parameter" : [
{
"valueId" : "tName"
},
{
"valueId" : "family"
}
]
}
]
},
{
"name" : "set full name",
"source" : [
{
"context" : "name",
"element" : "text",
"variable" : "text"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "name",
"transform" : "copy",
"parameter" : [
{
"valueId" : "text"
}
]
}
]
}
]
},
{
"name" : "ImmunizationToDDCCVS",
"typeMode" : "none",
"input" : [
{
"name" : "immunization",
"type" : "DDCCImmunization",
"mode" : "source"
},
{
"name" : "vaccination",
"mode" : "target"
},
{
"name" : "certificate",
"mode" : "target"
}
],
"rule" : [
{
"name" : "set vaccine code",
"source" : [
{
"context" : "immunization",
"element" : "vaccineCode",
"variable" : "code"
}
],
"rule" : [
{
"name" : "set vaccine",
"source" : [
{
"context" : "code",
"element" : "coding",
"listMode" : "first",
"variable" : "coding"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "vaccine",
"transform" : "copy",
"parameter" : [
{
"valueId" : "coding"
}
]
}
]
}
]
},
{
"name" : "set extensions",
"source" : [
{
"context" : "immunization",
"element" : "extension",
"variable" : "ext"
}
],
"rule" : [
{
"name" : "set brand",
"source" : [
{
"context" : "ext",
"listMode" : "first",
"variable" : "brand",
"condition" : "ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineBrand'"
}
],
"rule" : [
{
"name" : "set brand code",
"source" : [
{
"context" : "brand",
"element" : "valueCoding",
"variable" : "coding"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "brand",
"transform" : "copy",
"parameter" : [
{
"valueId" : "coding"
}
]
}
]
}
]
},
{
"name" : "set maholder",
"source" : [
{
"context" : "ext",
"listMode" : "first",
"variable" : "maholder",
"condition" : "ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineMarketAuthorization'"
}
],
"rule" : [
{
"name" : "set maholder code",
"source" : [
{
"context" : "maholder",
"element" : "valueCoding",
"variable" : "coding"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "maholder",
"transform" : "copy",
"parameter" : [
{
"valueId" : "coding"
}
]
}
]
}
]
},
{
"name" : "set validFrom",
"source" : [
{
"context" : "ext",
"listMode" : "first",
"variable" : "valid",
"condition" : "ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineValidFrom'"
}
],
"rule" : [
{
"name" : "set validFrom date",
"source" : [
{
"context" : "valid",
"element" : "valueDateTime",
"variable" : "date"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "validFrom",
"transform" : "copy",
"parameter" : [
{
"valueId" : "date"
}
]
}
]
}
]
},
{
"name" : "set country",
"source" : [
{
"context" : "ext",
"listMode" : "first",
"variable" : "country",
"condition" : "ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCCountryOfVaccination'"
}
],
"rule" : [
{
"name" : "set country code",
"source" : [
{
"context" : "country",
"element" : "valueCode",
"variable" : "code"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "country",
"variable" : "vCountry"
},
{
"context" : "vCountry",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "urn:iso:std:iso:3166"
}
]
},
{
"context" : "vCountry",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueId" : "code"
}
]
}
]
}
]
}
]
},
{
"name" : "set manufacturer",
"source" : [
{
"context" : "immunization",
"element" : "manufacturer",
"variable" : "manufacturer"
}
],
"rule" : [
{
"name" : "set manufacturer id",
"source" : [
{
"context" : "manufacturer",
"element" : "identifier",
"variable" : "identifier"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "manufacturer",
"variable" : "vMan"
}
],
"rule" : [
{
"name" : "set manufacturer system",
"source" : [
{
"context" : "identifier",
"element" : "system",
"variable" : "system"
}
],
"target" : [
{
"context" : "vMan",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueId" : "system"
}
]
}
]
},
{
"name" : "set manufactutuer code",
"source" : [
{
"context" : "identifier",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "vMan",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueId" : "value"
}
]
}
]
}
]
}
]
},
{
"name" : "set lot number",
"source" : [
{
"context" : "immunization",
"element" : "lotNumber",
"variable" : "lot"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "lot",
"transform" : "copy",
"parameter" : [
{
"valueId" : "lot"
}
]
}
]
},
{
"name" : "set date",
"source" : [
{
"context" : "immunization",
"element" : "occurrence",
"variable" : "date"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "date",
"transform" : "copy",
"parameter" : [
{
"valueId" : "date"
}
]
}
]
},
{
"name" : "set protocol applied",
"source" : [
{
"context" : "immunization",
"element" : "protocolApplied",
"listMode" : "first",
"variable" : "protocol"
}
],
"rule" : [
{
"name" : "set dose",
"source" : [
{
"context" : "protocol",
"element" : "doseNumber",
"variable" : "dose"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "dose",
"transform" : "copy",
"parameter" : [
{
"valueId" : "dose"
}
]
}
]
},
{
"name" : "set totalDoses",
"source" : [
{
"context" : "protocol",
"element" : "seriesDoses",
"variable" : "totalDoses"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "totalDoses",
"transform" : "copy",
"parameter" : [
{
"valueId" : "totalDoses"
}
]
}
]
},
{
"name" : "set disease",
"source" : [
{
"context" : "protocol",
"element" : "targetDisease",
"listMode" : "first",
"variable" : "disease"
}
],
"rule" : [
{
"name" : "set disease coding",
"source" : [
{
"context" : "disease",
"element" : "coding",
"listMode" : "first",
"variable" : "coding"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "disease",
"transform" : "copy",
"parameter" : [
{
"valueId" : "coding"
}
]
}
]
}
]
},
{
"name" : "set issuer",
"source" : [
{
"context" : "protocol",
"element" : "authority",
"variable" : "authority"
}
],
"target" : [
{
"context" : "certificate",
"contextType" : "variable",
"element" : "issuer",
"variable" : "issuer"
}
],
"rule" : [
{
"name" : "set issuer from reference",
"source" : [
{
"context" : "authority",
"element" : "reference",
"variable" : "reference"
}
],
"target" : [
{
"context" : "issuer",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier"
}
],
"rule" : [
{
"name" : "set reference",
"source" : [
{
"context" : "reference"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "reference"
}
]
}
]
}
]
},
{
"name" : "set issuer identifier",
"source" : [
{
"context" : "authority",
"element" : "identifier",
"variable" : "identifier"
}
],
"target" : [
{
"context" : "issuer",
"contextType" : "variable",
"element" : "identifier",
"transform" : "copy",
"parameter" : [
{
"valueId" : "identifier"
}
]
}
]
}
]
}
]
},
{
"name" : "set vaccination centre location",
"source" : [
{
"context" : "immunization",
"element" : "location",
"variable" : "location"
}
],
"rule" : [
{
"name" : "set vaccination centre from reference",
"source" : [
{
"context" : "location",
"element" : "reference",
"variable" : "reference"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "centre",
"transform" : "copy",
"parameter" : [
{
"valueId" : "reference"
}
]
}
]
},
{
"name" : "set vaccination centre",
"source" : [
{
"context" : "location",
"element" : "display",
"variable" : "centre"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "centre",
"transform" : "copy",
"parameter" : [
{
"valueId" : "centre"
}
]
}
]
}
]
},
{
"name" : "set performer",
"source" : [
{
"context" : "immunization",
"element" : "performer",
"listMode" : "first",
"variable" : "performer"
}
],
"rule" : [
{
"name" : "set actor",
"source" : [
{
"context" : "performer",
"element" : "actor",
"variable" : "actor"
}
],
"rule" : [
{
"name" : "set practitioner",
"source" : [
{
"context" : "actor",
"element" : "identifier",
"variable" : "identifier"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "practitioner",
"transform" : "copy",
"parameter" : [
{
"valueId" : "identifier"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "ImmRecToDDCCVS",
"typeMode" : "none",
"input" : [
{
"name" : "immRec",
"type" : "DDCCImmunizationRecommendation",
"mode" : "source"
},
{
"name" : "vaccination",
"mode" : "target"
}
],
"rule" : [
{
"name" : "get recommendation",
"source" : [
{
"context" : "immRec",
"element" : "recommendation",
"variable" : "rec"
}
],
"rule" : [
{
"name" : "get date criterion",
"source" : [
{
"context" : "rec",
"element" : "dateCriterion",
"listMode" : "first",
"variable" : "due_date"
}
],
"rule" : [
{
"name" : "set due date",
"source" : [
{
"context" : "due_date",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "nextDose",
"transform" : "copy",
"parameter" : [
{
"valueId" : "date"
}
]
}
]
}
]
}
]
}
]
}
]
}