WHO Digital Documentation of COVID-19 Certificates (DDCC)
1.0.0 - CI Build International flag

This page is part of the WHO Digital Documentation of COVID-19 Certificates (DDCC) (v1.0.0: releases Draft) based on FHIR (HL7® FHIR® Standard) R4. This is the current published version. For a full list of available versions, see the Directory of published versions

: null - TTL Representation

Draft as of 2024-10-15

Raw ttl | Download

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:StructureMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "ResourcesToVSCoreDataSet"] ; # 
  fhir:text [
fhir:status [ fhir:v "generated" ] ;
fhir: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\"> &quot;</span>http://smart.who.int/ddcc/StructureMap/ResourcesToVSCoreDataSet<span style=\"color: navy\">&quot; = &quot;</span>ResourcesToVSCoreDataSet<span style=\"color: navy\">&quot;\r\n\r\n</span><b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/bundle.html\" title=\"Bundle\">http://hl7.org/fhir/StructureDefinition/Bundle</a><span style=\"color: navy\">&quot; </span><b>alias </b>Bundle <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/datatypes.html#HumanName\" title=\"HumanName\">http://hl7.org/fhir/StructureDefinition/HumanName</a><span style=\"color: navy\">&quot; </span><b>alias </b>HumanName <b>as </b><b>target</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-DDCCPatient.html\" title=\"DDCC Patient\">http://smart.who.int/ddcc/StructureDefinition/DDCCPatient</a><span style=\"color: navy\">&quot; </span><b>alias </b>DDCCPatient <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-DDCCImmunization.html\" title=\"DDCC Immunization\">http://smart.who.int/ddcc/StructureDefinition/DDCCImmunization</a><span style=\"color: navy\">&quot; </span><b>alias </b>DDCCImmunization <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-DDCCImmunizationRecommendation.html\" title=\"DDCC Immunization Recommendation\">http://smart.who.int/ddcc/StructureDefinition/DDCCImmunizationRecommendation</a><span style=\"color: navy\">&quot; </span><b>alias </b>DDCCImmunizationRecommendation <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-DDCCVSComposition.html\" title=\"DDCC:VS Composition\">http://smart.who.int/ddcc/StructureDefinition/DDCCVSComposition</a><span style=\"color: navy\">&quot; </span><b>alias </b>DDCCVSComposition <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</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\">&quot; </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> -&gt; </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> -&gt; </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> -&gt; </b></span>hcid.value = <span style=\"color: navy\">(</span>url.replaceMatches('[Uu][Rr][Nn]:[Hh][Cc][Ii][Dd]:', '')<span style=\"color: navy\">)</span> <i>&quot;set hcid value&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;set hcid&quot;</i><span style=\"color: navy\">;</span>\r\n    bundle.id<b> as </b><span style=\"color: maroon\">id</span><span style=\"color: navy\"><b> -&gt; </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>&quot;set ddcc id value&quot;</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>&quot;set patient details&quot;</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>&quot;set immunization&quot;</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>&quot;set immunization recommendation&quot;</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>&quot;set composition&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;set header from patient&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;setup ddcc&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">// 	     entry.resource : DDCCPatient as patient                  entry.resource : Patient as patient            then  Decode-Patient-To-QR(patient,qr) &quot;Patient&quot;;       };</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">bundle as src then QRespToHeader( src, ddcc ) &quot;set header content&quot;;   bundle as src -&gt; ddcc.vaccination as vaccination then QRespToVaccination( src, vaccination ) &quot;set vaccination content&quot;;   bundle as src -&gt; ddcc.certificate as certificate then QRespToCertificate( src, certificate ) &quot;set certificate content&quot;;</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">then {     a as item where linkId = 'name' -&gt; ddcc.name = item &quot;set name&quot;;    } &quot;items&quot;;</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> -&gt; </b></span>certificate.version = <span style=\"color: blue\">'RC2'</span> <i>&quot;set version&quot;</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> -&gt; </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> -&gt; </b></span>tPeriod.start = <span style=\"color: maroon\">start</span> <i>&quot;set period start&quot;</i><span style=\"color: navy\">;</span>\r\n      period.end<b> as </b><span style=\"color: maroon\">end</span><span style=\"color: navy\"><b> -&gt; </b></span>tPeriod.end = <span style=\"color: maroon\">end</span> <i>&quot;set period end&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;set period&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set certificate period&quot;</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>&quot;set name&quot;</i><span style=\"color: navy\">;</span>\r\n  patient.birthDate<b> as </b><span style=\"color: maroon\">bday</span><span style=\"color: navy\"><b> -&gt; </b></span>ddcc.birthDate = <span style=\"color: maroon\">bday</span> <i>&quot;set birth date&quot;</i><span style=\"color: navy\">;</span>\r\n  patient.id<b> as </b><span style=\"color: maroon\">id</span><span style=\"color: navy\"><b> -&gt; </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>&quot;set identifier from id&quot;</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> -&gt; </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> -&gt; </b></span>identifier.value = <span style=\"color: maroon\">id</span> <i>&quot;set identifier value&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set identifier from identifier&quot;</i><span style=\"color: navy\">;</span>\r\n  patient.gender<b> as </b><span style=\"color: maroon\">gender</span><span style=\"color: navy\"><b> -&gt; </b></span>ddcc.sex = <span style=\"color: maroon\">gender</span> <i>&quot;set sex&quot;</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> -&gt; </b></span>ddcc.name = <span style=\"color: navy\">(</span>given.replaceMatches('$', ' ')<span style=\"color: navy\">)</span> <i>&quot;set first name&quot;</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 -&gt; ddcc.name as tName, ddcc.name = append( tName, other ) &quot;set other names&quot;;</span>\r\n  name.given not_first<b> as </b><span style=\"color: maroon\">other</span><span style=\"color: navy\"><b> -&gt; </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>&quot;set other names&quot;</i><span style=\"color: navy\">;</span>\r\n  name.family<b> as </b><span style=\"color: maroon\">family</span><span style=\"color: navy\"><b> -&gt; </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>&quot;add family name&quot;</i><span style=\"color: navy\">;</span>\r\n  name.text<b> as </b><span style=\"color: maroon\">text</span><span style=\"color: navy\"><b> -&gt; </b></span>ddcc.name = <span style=\"color: maroon\">text</span> <i>&quot;set full name&quot;</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> -&gt; </b></span>vaccination.vaccine = <span style=\"color: maroon\">coding</span> <i>&quot;set vaccine&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set vaccine code&quot;</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> -&gt; </b></span>vaccination.brand = <span style=\"color: maroon\">coding</span> <i>&quot;set brand code&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;set brand&quot;</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> -&gt; </b></span>vaccination.maholder = <span style=\"color: maroon\">coding</span> <i>&quot;set maholder code&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;set maholder&quot;</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> -&gt; </b></span>vaccination.validFrom = <span style=\"color: maroon\">date</span> <i>&quot;set validFrom date&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;set validFrom&quot;</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> -&gt; </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>&quot;set country code&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;set country&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set extensions&quot;</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> -&gt; </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> -&gt; </b></span>vMan.system = <span style=\"color: maroon\">system</span> <i>&quot;set manufacturer system&quot;</i><span style=\"color: navy\">;</span>\r\n      identifier.value<b> as </b><span style=\"color: maroon\">value</span><span style=\"color: navy\"><b> -&gt; </b></span>vMan.code = <span style=\"color: maroon\">value</span> <i>&quot;set manufactutuer code&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;set manufacturer id&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set manufacturer&quot;</i><span style=\"color: navy\">;</span>\r\n  immunization.lotNumber<b> as </b><span style=\"color: maroon\">lot</span><span style=\"color: navy\"><b> -&gt; </b></span>vaccination.lot = <span style=\"color: maroon\">lot</span> <i>&quot;set lot number&quot;</i><span style=\"color: navy\">;</span>\r\n  immunization.occurrence<b> as </b><span style=\"color: maroon\">date</span><span style=\"color: navy\"><b> -&gt; </b></span>vaccination.date = <span style=\"color: maroon\">date</span> <i>&quot;set date&quot;</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> -&gt; </b></span>vaccination.dose = <span style=\"color: maroon\">dose</span> <i>&quot;set dose&quot;</i><span style=\"color: navy\">;</span>\r\n    protocol.seriesDoses<b> as </b><span style=\"color: maroon\">totalDoses</span><span style=\"color: navy\"><b> -&gt; </b></span>vaccination.totalDoses = <span style=\"color: maroon\">totalDoses</span> <i>&quot;set totalDoses&quot;</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> -&gt; </b></span>vaccination.disease = <span style=\"color: maroon\">coding</span> <i>&quot;set disease coding&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;set disease&quot;</i><span style=\"color: navy\">;</span>\r\n    protocol.authority<b> as </b><span style=\"color: maroon\">authority</span><span style=\"color: navy\"><b> -&gt; </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> -&gt; </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> -&gt; </b></span>identifier.value = <span style=\"color: maroon\">reference</span> <i>&quot;set reference&quot;</i><span style=\"color: navy\">;</span>\r\n      <span style=\"color: navy\">}</span> <i>&quot;set issuer from reference&quot;</i><span style=\"color: navy\">;</span>\r\n      authority.identifier<b> as </b><span style=\"color: maroon\">identifier</span><span style=\"color: navy\"><b> -&gt; </b></span>issuer.identifier = <span style=\"color: maroon\">identifier</span> <i>&quot;set issuer identifier&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;set issuer&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set protocol applied&quot;</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> -&gt; </b></span>vaccination.centre = <span style=\"color: maroon\">reference</span> <i>&quot;set vaccination centre from reference&quot;</i><span style=\"color: navy\">;</span>\r\n    location.display<b> as </b><span style=\"color: maroon\">centre</span><span style=\"color: navy\"><b> -&gt; </b></span>vaccination.centre = <span style=\"color: maroon\">centre</span> <i>&quot;set vaccination centre&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set vaccination centre location&quot;</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> -&gt; </b></span>vaccination.practitioner = <span style=\"color: maroon\">identifier</span> <i>&quot;set practitioner&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;set actor&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set performer&quot;</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> -&gt; </b></span>vaccination.nextDose = <span style=\"color: maroon\">date</span> <i>&quot;set due date&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;get date criterion&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;get recommendation&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  ] ; # 
  fhir:url [ fhir:v "http://smart.who.int/ddcc/StructureMap/ResourcesToVSCoreDataSet"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "1.0.0"] ; # 
  fhir:name [ fhir:v "ResourcesToVSCoreDataSet"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:date [ fhir:v "2024-10-15T11:00:36+02:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "WHO"] ; # 
  fhir:contact ( [
fhir:name [ fhir:v "WHO" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "http://who.int" ]     ] )
  ] ) ; # 
  fhir:jurisdiction ( [
    ( fhir:coding [
fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm"^^xsd:anyURI ] ;
fhir:code [ fhir:v "001" ]     ] )
  ] ) ; # 
  fhir:structure ( [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Bundle"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "Bundle" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/HumanName"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/HumanName>     ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "HumanName" ]
  ] [
fhir:url [
fhir:v "http://smart.who.int/ddcc/StructureDefinition/DDCCPatient"^^xsd:anyURI ;
fhir:link <http://smart.who.int/ddcc/StructureDefinition/DDCCPatient>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "DDCCPatient" ]
  ] [
fhir:url [
fhir:v "http://smart.who.int/ddcc/StructureDefinition/DDCCImmunization"^^xsd:anyURI ;
fhir:link <http://smart.who.int/ddcc/StructureDefinition/DDCCImmunization>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "DDCCImmunization" ]
  ] [
fhir:url [
fhir:v "http://smart.who.int/ddcc/StructureDefinition/DDCCImmunizationRecommendation"^^xsd:anyURI ;
fhir:link <http://smart.who.int/ddcc/StructureDefinition/DDCCImmunizationRecommendation>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "DDCCImmunizationRecommendation" ]
  ] [
fhir:url [
fhir:v "http://smart.who.int/ddcc/StructureDefinition/DDCCVSComposition"^^xsd:anyURI ;
fhir:link <http://smart.who.int/ddcc/StructureDefinition/DDCCVSComposition>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "DDCCVSComposition" ]
  ] [
fhir:url [
fhir:v "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVSPoV"^^xsd:anyURI ;
fhir:link <http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVSPoV>     ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "DDCCPoV" ]
  ] ) ; # 
  fhir:group ( [
fhir:name [ fhir:v "ResourcesToCoreDataSet" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "ddcc" ] ;
fhir:type [ fhir:v "DDCCPoV" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "setup ddcc" ] ;
      ( fhir:source [
fhir:context [ fhir:v "bundle" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ddcc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "vaccination" ] ;
fhir:variable [ fhir:v "vaccination" ]       ] [
fhir:context [ fhir:v "ddcc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "certificate" ] ;
fhir:variable [ fhir:v "certificate" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "set hcid" ] ;
        ( fhir:source [
fhir:context [ fhir:v "bundle" ] ;
fhir:element [ fhir:v "link" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "link" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "certificate" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "hcid" ] ;
fhir:variable [ fhir:v "hcid" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "set hcid value" ] ;
          ( fhir:source [
fhir:context [ fhir:v "link" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:variable [ fhir:v "url" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "hcid" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "url.replaceMatches('[Uu][Rr][Nn]:[Hh][Cc][Ii][Dd]:', '')" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "set ddcc id value" ] ;
        ( fhir:source [
fhir:context [ fhir:v "bundle" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "certificate" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "ddccid" ] ;
fhir:variable [ fhir:v "ddccid" ]         ] [
fhir:context [ fhir:v "ddccid" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "id" ]           ] )         ] )       ] [
fhir:name [ fhir:v "set header from patient" ] ;
        ( fhir:source [
fhir:context [ fhir:v "bundle" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "set patient details" ] ;
          ( fhir:source [
fhir:context [ fhir:v "entry" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "patient" ]           ] ) ;
          ( fhir:dependent [
fhir:name [ fhir:v "PatientToDDCCVS" ] ;
            ( fhir:variable [ fhir:v "patient" ] [ fhir:v "ddcc" ] )           ] )         ] [
fhir:name [ fhir:v "set immunization" ] ;
          ( fhir:source [
fhir:context [ fhir:v "entry" ] ;
fhir:type [ fhir:v "Immunization" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "immunization" ]           ] ) ;
          ( fhir:dependent [
fhir:name [ fhir:v "ImmunizationToDDCCVS" ] ;
            ( fhir:variable [ fhir:v "immunization" ] [ fhir:v "vaccination" ] [ fhir:v "certificate" ] )           ] )         ] [
fhir:name [ fhir:v "set immunization recommendation" ] ;
          ( fhir:source [
fhir:context [ fhir:v "entry" ] ;
fhir:type [ fhir:v "ImmunizationRecommendation" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "immRec" ]           ] ) ;
          ( fhir:dependent [
fhir:name [ fhir:v "ImmRecToDDCCVS" ] ;
            ( fhir:variable [ fhir:v "immRec" ] [ fhir:v "vaccination" ] )           ] )         ] [
fhir:name [ fhir:v "set composition" ] ;
          ( fhir:source [
fhir:context [ fhir:v "entry" ] ;
fhir:type [ fhir:v "Composition" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "composition" ]           ] ) ;
          ( fhir:dependent [
fhir:name [ fhir:v "CompositionToDDCCVS" ] ;
            ( fhir:variable [ fhir:v "composition" ] [ fhir:v "certificate" ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "CompositionToDDCCVS" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "composition" ] ;
fhir:type [ fhir:v "DDCCVSComposition" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "certificate" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "set version" ] ;
      ( fhir:source [
fhir:context [ fhir:v "composition" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "certificate" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "RC2" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set certificate period" ] ;
      ( fhir:source [
fhir:context [ fhir:v "composition" ] ;
fhir:element [ fhir:v "event" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "event" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "set period" ] ;
        ( fhir:source [
fhir:context [ fhir:v "event" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "period" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "certificate" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "tPeriod" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "set period start" ] ;
          ( fhir:source [
fhir:context [ fhir:v "period" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:variable [ fhir:v "start" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "tPeriod" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "start" ]             ] )           ] )         ] [
fhir:name [ fhir:v "set period end" ] ;
          ( fhir:source [
fhir:context [ fhir:v "period" ] ;
fhir:element [ fhir:v "end" ] ;
fhir:variable [ fhir:v "end" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "tPeriod" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "end" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "end" ]             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "PatientToDDCCVS" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "DDCCPatient" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "ddcc" ] ;
fhir:type [ fhir:v "DDCCPoV" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "set name" ] ;
      ( fhir:source [
fhir:context [ fhir:v "patient" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "NameToText" ] ;
        ( fhir:variable [ fhir:v "name" ] [ fhir:v "ddcc" ] )       ] )     ] [
fhir:name [ fhir:v "set birth date" ] ;
      ( fhir:source [
fhir:context [ fhir:v "patient" ] ;
fhir:element [ fhir:v "birthDate" ] ;
fhir:variable [ fhir:v "bday" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ddcc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "birthDate" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "bday" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set identifier from id" ] ;
      ( fhir:source [
fhir:context [ fhir:v "patient" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ddcc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]       ] [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "id" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set identifier from identifier" ] ;
      ( fhir:source [
fhir:context [ fhir:v "patient" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "sId" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ddcc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "set identifier value" ] ;
        ( fhir:source [
fhir:context [ fhir:v "sId" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "id" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "id" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "set sex" ] ;
      ( fhir:source [
fhir:context [ fhir:v "patient" ] ;
fhir:element [ fhir:v "gender" ] ;
fhir:variable [ fhir:v "gender" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ddcc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "sex" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "gender" ]         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "NameToText" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "name" ] ;
fhir:type [ fhir:v "HumanName" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "ddcc" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "set first name" ] ;
      ( fhir:source [
fhir:context [ fhir:v "name" ] ;
fhir:element [ fhir:v "given" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "given" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ddcc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "given.replaceMatches('$', ' ')" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set other names" ] ;
      ( fhir:source [
fhir:context [ fhir:v "name" ] ;
fhir:element [ fhir:v "given" ] ;
fhir:listMode [ fhir:v "not_first" ] ;
fhir:variable [ fhir:v "other" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ddcc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "tName" ]       ] [
fhir:contextType [ fhir:v "variable" ] ;
fhir:variable [ fhir:v "spaced" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "other.replaceMatches('$', ' ')" ]         ] )       ] [
fhir:context [ fhir:v "ddcc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "tName" ]         ] [
fhir:value [ fhir:v "spaced" ]         ] )       ] )     ] [
fhir:name [ fhir:v "add family name" ] ;
      ( fhir:source [
fhir:context [ fhir:v "name" ] ;
fhir:element [ fhir:v "family" ] ;
fhir:variable [ fhir:v "family" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ddcc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "tName" ]       ] [
fhir:context [ fhir:v "ddcc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "tName" ]         ] [
fhir:value [ fhir:v "family" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set full name" ] ;
      ( fhir:source [
fhir:context [ fhir:v "name" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "text" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ddcc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "text" ]         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ImmunizationToDDCCVS" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "immunization" ] ;
fhir:type [ fhir:v "DDCCImmunization" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "vaccination" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "certificate" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "set vaccine code" ] ;
      ( fhir:source [
fhir:context [ fhir:v "immunization" ] ;
fhir:element [ fhir:v "vaccineCode" ] ;
fhir:variable [ fhir:v "code" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "set vaccine" ] ;
        ( fhir:source [
fhir:context [ fhir:v "code" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "coding" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "vaccine" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "coding" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "set extensions" ] ;
      ( fhir:source [
fhir:context [ fhir:v "immunization" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "set brand" ] ;
        ( fhir:source [
fhir:context [ fhir:v "ext" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "brand" ] ;
fhir:condition [ fhir:v "ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineBrand'" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "set brand code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "brand" ] ;
fhir:element [ fhir:v "valueCoding" ] ;
fhir:variable [ fhir:v "coding" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "brand" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "coding" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "set maholder" ] ;
        ( fhir:source [
fhir:context [ fhir:v "ext" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "maholder" ] ;
fhir:condition [ fhir:v "ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineMarketAuthorization'" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "set maholder code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "maholder" ] ;
fhir:element [ fhir:v "valueCoding" ] ;
fhir:variable [ fhir:v "coding" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "maholder" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "coding" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "set validFrom" ] ;
        ( fhir:source [
fhir:context [ fhir:v "ext" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "valid" ] ;
fhir:condition [ fhir:v "ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineValidFrom'" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "set validFrom date" ] ;
          ( fhir:source [
fhir:context [ fhir:v "valid" ] ;
fhir:element [ fhir:v "valueDateTime" ] ;
fhir:variable [ fhir:v "date" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "validFrom" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "date" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "set country" ] ;
        ( fhir:source [
fhir:context [ fhir:v "ext" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "country" ] ;
fhir:condition [ fhir:v "ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCCountryOfVaccination'" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "set country code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "country" ] ;
fhir:element [ fhir:v "valueCode" ] ;
fhir:variable [ fhir:v "code" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "country" ] ;
fhir:variable [ fhir:v "vCountry" ]           ] [
fhir:context [ fhir:v "vCountry" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "urn:iso:std:iso:3166" ]             ] )           ] [
fhir:context [ fhir:v "vCountry" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "code" ]             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "set manufacturer" ] ;
      ( fhir:source [
fhir:context [ fhir:v "immunization" ] ;
fhir:element [ fhir:v "manufacturer" ] ;
fhir:variable [ fhir:v "manufacturer" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "set manufacturer id" ] ;
        ( fhir:source [
fhir:context [ fhir:v "manufacturer" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "manufacturer" ] ;
fhir:variable [ fhir:v "vMan" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "set manufacturer system" ] ;
          ( fhir:source [
fhir:context [ fhir:v "identifier" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:variable [ fhir:v "system" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "vMan" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "system" ]             ] )           ] )         ] [
fhir:name [ fhir:v "set manufactutuer code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "identifier" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "vMan" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "value" ]             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "set lot number" ] ;
      ( fhir:source [
fhir:context [ fhir:v "immunization" ] ;
fhir:element [ fhir:v "lotNumber" ] ;
fhir:variable [ fhir:v "lot" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "lot" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "lot" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set date" ] ;
      ( fhir:source [
fhir:context [ fhir:v "immunization" ] ;
fhir:element [ fhir:v "occurrence" ] ;
fhir:variable [ fhir:v "date" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "date" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "date" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set protocol applied" ] ;
      ( fhir:source [
fhir:context [ fhir:v "immunization" ] ;
fhir:element [ fhir:v "protocolApplied" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "protocol" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "set dose" ] ;
        ( fhir:source [
fhir:context [ fhir:v "protocol" ] ;
fhir:element [ fhir:v "doseNumber" ] ;
fhir:variable [ fhir:v "dose" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "dose" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "dose" ]           ] )         ] )       ] [
fhir:name [ fhir:v "set totalDoses" ] ;
        ( fhir:source [
fhir:context [ fhir:v "protocol" ] ;
fhir:element [ fhir:v "seriesDoses" ] ;
fhir:variable [ fhir:v "totalDoses" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "totalDoses" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "totalDoses" ]           ] )         ] )       ] [
fhir:name [ fhir:v "set disease" ] ;
        ( fhir:source [
fhir:context [ fhir:v "protocol" ] ;
fhir:element [ fhir:v "targetDisease" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "disease" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "set disease coding" ] ;
          ( fhir:source [
fhir:context [ fhir:v "disease" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "coding" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "disease" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "coding" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "set issuer" ] ;
        ( fhir:source [
fhir:context [ fhir:v "protocol" ] ;
fhir:element [ fhir:v "authority" ] ;
fhir:variable [ fhir:v "authority" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "certificate" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "issuer" ] ;
fhir:variable [ fhir:v "issuer" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "set issuer from reference" ] ;
          ( fhir:source [
fhir:context [ fhir:v "authority" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reference" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "issuer" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "set reference" ] ;
            ( fhir:source [
fhir:context [ fhir:v "reference" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "reference" ]               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "set issuer identifier" ] ;
          ( fhir:source [
fhir:context [ fhir:v "authority" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "issuer" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "identifier" ]             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "set vaccination centre location" ] ;
      ( fhir:source [
fhir:context [ fhir:v "immunization" ] ;
fhir:element [ fhir:v "location" ] ;
fhir:variable [ fhir:v "location" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "set vaccination centre from reference" ] ;
        ( fhir:source [
fhir:context [ fhir:v "location" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reference" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "centre" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "reference" ]           ] )         ] )       ] [
fhir:name [ fhir:v "set vaccination centre" ] ;
        ( fhir:source [
fhir:context [ fhir:v "location" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:variable [ fhir:v "centre" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "centre" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "centre" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "set performer" ] ;
      ( fhir:source [
fhir:context [ fhir:v "immunization" ] ;
fhir:element [ fhir:v "performer" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "performer" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "set actor" ] ;
        ( fhir:source [
fhir:context [ fhir:v "performer" ] ;
fhir:element [ fhir:v "actor" ] ;
fhir:variable [ fhir:v "actor" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "set practitioner" ] ;
          ( fhir:source [
fhir:context [ fhir:v "actor" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "identifier" ]             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ImmRecToDDCCVS" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "immRec" ] ;
fhir:type [ fhir:v "DDCCImmunizationRecommendation" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "vaccination" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "get recommendation" ] ;
      ( fhir:source [
fhir:context [ fhir:v "immRec" ] ;
fhir:element [ fhir:v "recommendation" ] ;
fhir:variable [ fhir:v "rec" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "get date criterion" ] ;
        ( fhir:source [
fhir:context [ fhir:v "rec" ] ;
fhir:element [ fhir:v "dateCriterion" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "due_date" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "set due date" ] ;
          ( fhir:source [
fhir:context [ fhir:v "due_date" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "date" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "vaccination" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "nextDose" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "date" ]             ] )           ] )         ] )       ] )     ] )
  ] ) . #