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

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
Built from commit 6d9c2761.

: ResourcesToVSCoreDataSet - TTL Representation

Draft as of 2026-09-05

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

<http://hl7.org/fhir/StructureMap/ResourcesToVSCoreDataSet> a fhir:StructureMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "ResourcesToVSCoreDataSet"] ;
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ] ;
     fhir:Narrative.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><pre class=\"fml\">#xD;\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\">\"#xD;\n#xD;\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>#xD;\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>#xD;\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>#xD;\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>#xD;\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>#xD;\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>#xD;\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>#xD;\n#xD;\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\"> {#xD;\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\"> {#xD;\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\"> {#xD;\n</span>      <span style=\"color: navy\">// </span><span style=\"color: green\">There's got to be a better way to do this</span>#xD;\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>\"set hcid value\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"set hcid\"</i><span style=\"color: navy\">;</span>#xD;\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>\"set ddcc id value\"</i><span style=\"color: navy\">;</span>#xD;\n    bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><b> then</b><span style=\"color: navy\"> {#xD;\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>#xD;\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>#xD;\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>#xD;\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>#xD;\n    <span style=\"color: navy\">}</span> <i>\"set header from patient\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"setup ddcc\"</i><span style=\"color: navy\">;</span>#xD;\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) \"Patient\";       };</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">bundle as src then QRespToHeader( src, ddcc ) \"set header content\";   bundle as src -&gt; ddcc.vaccination as vaccination then QRespToVaccination( src, vaccination ) \"set vaccination content\";   bundle as src -&gt; ddcc.certificate as certificate then QRespToCertificate( src, certificate ) \"set certificate content\";</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">then {     a as item where linkId = 'name' -&gt; ddcc.name = item \"set name\";    } \"items\";</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\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\"> {#xD;\n</span>  composition<span style=\"color: navy\"><b> -&gt; </b></span>certificate.version = <span style=\"color: blue\">'RC2'</span> <i>\"set version\"</i><span style=\"color: navy\">;</span>#xD;\n  composition.event first<b> as </b><span style=\"color: maroon\">event</span><b> then</b><span style=\"color: navy\"> {#xD;\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\"> {#xD;\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>\"set period start\"</i><span style=\"color: navy\">;</span>#xD;\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>\"set period end\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"set period\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"set certificate period\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\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\"> {#xD;\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>#xD;\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>\"set birth date\"</i><span style=\"color: navy\">;</span>#xD;\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>\"set identifier from id\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">this will override what was set from id if it exists</span>#xD;\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\"> {#xD;\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>\"set identifier value\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"set identifier from identifier\"</i><span style=\"color: navy\">;</span>#xD;\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>\"set sex\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\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\"> {#xD;\n</span>  <span style=\"color: navy\">// </span><span style=\"color: green\">annoying because append doesn't work until ddcc.name is set</span>#xD;\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>\"set first name\"</i><span style=\"color: navy\">;</span>#xD;\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 ) \"set other names\";</span>#xD;\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>\"set other names\"</i><span style=\"color: navy\">;</span>#xD;\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>\"add family name\"</i><span style=\"color: navy\">;</span>#xD;\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>\"set full name\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\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\"> {#xD;\n</span>  immunization.vaccineCode<b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {#xD;\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>\"set vaccine\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"set vaccine code\"</i><span style=\"color: navy\">;</span>#xD;\n  immunization.extension<b> as </b><span style=\"color: maroon\">ext</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    ext first<b> as </b><span style=\"color: maroon\">brand</span><b> where </b><span style=\"color: navy\">(</span>ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineBrand'<span style=\"color: navy\">)</span><b> then</b><span style=\"color: navy\"> {#xD;\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>\"set brand code\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"set brand\"</i><span style=\"color: navy\">;</span>#xD;\n    ext first<b> as </b><span style=\"color: maroon\">maholder</span><b> where </b><span style=\"color: navy\">(</span>ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineMarketAuthorization'<span style=\"color: navy\">)</span><b> then</b><span style=\"color: navy\"> {#xD;\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>\"set maholder code\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"set maholder\"</i><span style=\"color: navy\">;</span>#xD;\n    ext first<b> as </b><span style=\"color: maroon\">valid</span><b> where </b><span style=\"color: navy\">(</span>ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineValidFrom'<span style=\"color: navy\">)</span><b> then</b><span style=\"color: navy\"> {#xD;\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>\"set validFrom date\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"set validFrom\"</i><span style=\"color: navy\">;</span>#xD;\n    ext first<b> as </b><span style=\"color: maroon\">country</span><b> where </b><span style=\"color: navy\">(</span>ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCCountryOfVaccination'<span style=\"color: navy\">)</span><b> then</b><span style=\"color: navy\"> {#xD;\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>\"set country code\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"set country\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"set extensions\"</i><span style=\"color: navy\">;</span>#xD;\n  immunization.manufacturer<b> as </b><span style=\"color: maroon\">manufacturer</span><b> then</b><span style=\"color: navy\"> {#xD;\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\"> {#xD;\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>\"set manufacturer system\"</i><span style=\"color: navy\">;</span>#xD;\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>\"set manufactutuer code\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"set manufacturer id\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"set manufacturer\"</i><span style=\"color: navy\">;</span>#xD;\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>\"set lot number\"</i><span style=\"color: navy\">;</span>#xD;\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>\"set date\"</i><span style=\"color: navy\">;</span>#xD;\n  immunization.protocolApplied first<b> as </b><span style=\"color: maroon\">protocol</span><b> then</b><span style=\"color: navy\"> {#xD;\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>\"set dose\"</i><span style=\"color: navy\">;</span>#xD;\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>\"set totalDoses\"</i><span style=\"color: navy\">;</span>#xD;\n    protocol.targetDisease first<b> as </b><span style=\"color: maroon\">disease</span><b> then</b><span style=\"color: navy\"> {#xD;\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>\"set disease coding\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"set disease\"</i><span style=\"color: navy\">;</span>#xD;\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\"> {#xD;\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\"> {#xD;\n</span>        reference<span style=\"color: navy\"><b> -&gt; </b></span>identifier.value = <span style=\"color: maroon\">reference</span> <i>\"set reference\"</i><span style=\"color: navy\">;</span>#xD;\n      <span style=\"color: navy\">}</span> <i>\"set issuer from reference\"</i><span style=\"color: navy\">;</span>#xD;\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>\"set issuer identifier\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"set issuer\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"set protocol applied\"</i><span style=\"color: navy\">;</span>#xD;\n  immunization.location<b> as </b><span style=\"color: maroon\">location</span><b> then</b><span style=\"color: navy\"> {#xD;\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>\"set vaccination centre from reference\"</i><span style=\"color: navy\">;</span>#xD;\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>\"set vaccination centre\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"set vaccination centre location\"</i><span style=\"color: navy\">;</span>#xD;\n  immunization.performer first<b> as </b><span style=\"color: maroon\">performer</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    performer.actor<b> as </b><span style=\"color: maroon\">actor</span><b> then</b><span style=\"color: navy\"> {#xD;\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>\"set practitioner\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"set actor\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"set performer\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\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\"> {#xD;\n</span>  immRec.recommendation<b> as </b><span style=\"color: maroon\">rec</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    rec.dateCriterion first<b> as </b><span style=\"color: maroon\">due_date</span><b> then</b><span style=\"color: navy\"> {#xD;\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>\"set due date\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"get date criterion\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"get recommendation\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span></pre></div>"
  ] ;
  fhir:StructureMap.url [ fhir:value "http://smart.who.int/ddcc/StructureMap/ResourcesToVSCoreDataSet"] ;
  fhir:StructureMap.version [ fhir:value "1.0.0"] ;
  fhir:StructureMap.name [ fhir:value "ResourcesToVSCoreDataSet"] ;
  fhir:StructureMap.status [ fhir:value "draft"] ;
  fhir:StructureMap.date [ fhir:value "2026-09-05T20:45:54+00:00"^^xsd:dateTime] ;
  fhir:StructureMap.publisher [ fhir:value "WHO"] ;
  fhir:StructureMap.contact [
     fhir:index 0 ;
     fhir:ContactDetail.name [ fhir:value "WHO" ] ;
     fhir:ContactDetail.telecom [
       fhir:index 0 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "http://who.int" ]
     ]
  ] ;
  fhir:StructureMap.jurisdiction [
     fhir:index 0 ;
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       fhir:Coding.system [ fhir:value "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ;
       fhir:Coding.code [ fhir:value "001" ]
     ]
  ] ;
  fhir:StructureMap.structure [
     fhir:index 0 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Bundle" ;
       fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "source" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "Bundle" ]
  ], [
     fhir:index 1 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/HumanName" ;
       fhir:link <http://hl7.org/fhir/StructureDefinition/HumanName>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "target" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "HumanName" ]
  ], [
     fhir:index 2 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://smart.who.int/ddcc/StructureDefinition/DDCCPatient" ;
       fhir:link <http://smart.who.int/ddcc/StructureDefinition/DDCCPatient>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "source" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "DDCCPatient" ]
  ], [
     fhir:index 3 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://smart.who.int/ddcc/StructureDefinition/DDCCImmunization" ;
       fhir:link <http://smart.who.int/ddcc/StructureDefinition/DDCCImmunization>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "source" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "DDCCImmunization" ]
  ], [
     fhir:index 4 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://smart.who.int/ddcc/StructureDefinition/DDCCImmunizationRecommendation" ;
       fhir:link <http://smart.who.int/ddcc/StructureDefinition/DDCCImmunizationRecommendation>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "source" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "DDCCImmunizationRecommendation" ]
  ], [
     fhir:index 5 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://smart.who.int/ddcc/StructureDefinition/DDCCVSComposition" ;
       fhir:link <http://smart.who.int/ddcc/StructureDefinition/DDCCVSComposition>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "source" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "DDCCVSComposition" ]
  ], [
     fhir:index 6 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVSPoV" ;
       fhir:link <http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVSPoV>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "target" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "DDCCPoV" ]
  ] ;
  fhir:StructureMap.group [
     fhir:index 0 ;
     fhir:StructureMap.group.name [ fhir:value "ResourcesToCoreDataSet" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "bundle" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "Bundle" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "ddcc" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "DDCCPoV" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "setup ddcc" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "bundle" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ddcc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "vaccination" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "vaccination" ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ddcc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "certificate" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "certificate" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set hcid" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "bundle" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "link" ] ;
           fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "link" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "certificate" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "hcid" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "hcid" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set hcid value" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "link" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "url" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "url" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "hcid" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "url.replaceMatches('[Uu][Rr][Nn]:[Hh][Cc][Ii][Dd]:', '')" ]
             ]
           ] ;
           fhir:StructureMap.group.rule.documentation [ fhir:value "There's got to be a better way to do this" ]
         ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set ddcc id value" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "bundle" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "id" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "certificate" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "ddccid" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "ddccid" ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "ddccid" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "id" ]
           ]
         ]
       ], [
         fhir:index 2 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set header from patient" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "bundle" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "entry" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set patient details" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "entry" ] ;
             fhir:StructureMap.group.rule.source.type [ fhir:value "Patient" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
             fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "patient" ]
           ] ;
           fhir:StructureMap.group.rule.dependent [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.dependent.name [ fhir:value "PatientToDDCCVS" ] ;
             fhir:StructureMap.group.rule.dependent.variable [
               fhir:value "patient" ;
               fhir:index 0
             ], [
               fhir:value "ddcc" ;
               fhir:index 1
             ]
           ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set immunization" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "entry" ] ;
             fhir:StructureMap.group.rule.source.type [ fhir:value "Immunization" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
             fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "immunization" ]
           ] ;
           fhir:StructureMap.group.rule.dependent [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.dependent.name [ fhir:value "ImmunizationToDDCCVS" ] ;
             fhir:StructureMap.group.rule.dependent.variable [
               fhir:value "immunization" ;
               fhir:index 0
             ], [
               fhir:value "vaccination" ;
               fhir:index 1
             ], [
               fhir:value "certificate" ;
               fhir:index 2
             ]
           ]
         ], [
           fhir:index 2 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set immunization recommendation" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "entry" ] ;
             fhir:StructureMap.group.rule.source.type [ fhir:value "ImmunizationRecommendation" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
             fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "immRec" ]
           ] ;
           fhir:StructureMap.group.rule.dependent [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.dependent.name [ fhir:value "ImmRecToDDCCVS" ] ;
             fhir:StructureMap.group.rule.dependent.variable [
               fhir:value "immRec" ;
               fhir:index 0
             ], [
               fhir:value "vaccination" ;
               fhir:index 1
             ]
           ]
         ], [
           fhir:index 3 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set composition" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "entry" ] ;
             fhir:StructureMap.group.rule.source.type [ fhir:value "Composition" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
             fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "composition" ]
           ] ;
           fhir:StructureMap.group.rule.dependent [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.dependent.name [ fhir:value "CompositionToDDCCVS" ] ;
             fhir:StructureMap.group.rule.dependent.variable [
               fhir:value "composition" ;
               fhir:index 0
             ], [
               fhir:value "certificate" ;
               fhir:index 1
             ]
           ]
         ]
       ]
     ]
  ], [
     fhir:index 1 ;
     fhir:StructureMap.group.name [ fhir:value "CompositionToDDCCVS" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "composition" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "DDCCVSComposition" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "certificate" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set version" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "composition" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "certificate" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "version" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "RC2" ]
         ]
       ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set certificate period" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "composition" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "event" ] ;
         fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "event" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set period" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "event" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "period" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "period" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "certificate" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "period" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "tPeriod" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set period start" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "period" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "start" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "start" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "tPeriod" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "start" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "start" ]
             ]
           ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set period end" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "period" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "end" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "end" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "tPeriod" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "end" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "end" ]
             ]
           ]
         ]
       ]
     ]
  ], [
     fhir:index 2 ;
     fhir:StructureMap.group.name [ fhir:value "PatientToDDCCVS" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "patient" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "DDCCPatient" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "ddcc" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "DDCCPoV" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set name" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "name" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "name" ]
       ] ;
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "NameToText" ] ;
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "name" ;
           fhir:index 0
         ], [
           fhir:value "ddcc" ;
           fhir:index 1
         ]
       ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set birth date" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "birthDate" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "bday" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ddcc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "birthDate" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "bday" ]
         ]
       ]
     ], [
       fhir:index 2 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set identifier from id" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "id" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ddcc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "id" ]
         ]
       ]
     ], [
       fhir:index 3 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set identifier from identifier" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "identifier" ] ;
         fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "sId" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ddcc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set identifier value" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "sId" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "value" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "id" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "id" ]
           ]
         ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "this will override what was set from id if it exists" ]
     ], [
       fhir:index 4 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set sex" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "gender" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "gender" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ddcc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "sex" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "gender" ]
         ]
       ]
     ]
  ], [
     fhir:index 3 ;
     fhir:StructureMap.group.name [ fhir:value "NameToText" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "name" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "HumanName" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "ddcc" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set first name" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "name" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "given" ] ;
         fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "given" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ddcc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "name" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "given.replaceMatches('$', ' ')" ]
         ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "annoying because append doesn't work until ddcc.name is set" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set other names" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "name" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "given" ] ;
         fhir:StructureMap.group.rule.source.listMode [ fhir:value "not_first" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "other" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ddcc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "name" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "tName" ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "spaced" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "other.replaceMatches('$', ' ')" ]
         ]
       ], [
         fhir:index 2 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ddcc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "name" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "append" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "tName" ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "spaced" ]
         ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "name.given not_first as other -> ddcc.name as tName, ddcc.name = append( tName, other ) \"set other names\";" ]
     ], [
       fhir:index 2 ;
       fhir:StructureMap.group.rule.name [ fhir:value "add family name" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "name" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "family" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "family" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ddcc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "name" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "tName" ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ddcc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "name" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "append" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "tName" ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "family" ]
         ]
       ]
     ], [
       fhir:index 3 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set full name" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "name" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "text" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "text" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ddcc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "name" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "text" ]
         ]
       ]
     ]
  ], [
     fhir:index 4 ;
     fhir:StructureMap.group.name [ fhir:value "ImmunizationToDDCCVS" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "immunization" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "DDCCImmunization" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "vaccination" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ], [
       fhir:index 2 ;
       fhir:StructureMap.group.input.name [ fhir:value "certificate" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set vaccine code" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "immunization" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "vaccineCode" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "code" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set vaccine" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "code" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "coding" ] ;
           fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "coding" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "vaccine" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "coding" ]
           ]
         ]
       ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set extensions" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "immunization" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "extension" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ext" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set brand" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "ext" ] ;
           fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "brand" ] ;
           fhir:StructureMap.group.rule.source.condition [ fhir:value "ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineBrand'" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set brand code" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "brand" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "valueCoding" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "coding" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "brand" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "coding" ]
             ]
           ]
         ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set maholder" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "ext" ] ;
           fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "maholder" ] ;
           fhir:StructureMap.group.rule.source.condition [ fhir:value "ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineMarketAuthorization'" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set maholder code" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "maholder" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "valueCoding" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "coding" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "maholder" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "coding" ]
             ]
           ]
         ]
       ], [
         fhir:index 2 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set validFrom" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "ext" ] ;
           fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "valid" ] ;
           fhir:StructureMap.group.rule.source.condition [ fhir:value "ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineValidFrom'" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set validFrom date" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "valid" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "valueDateTime" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "date" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "validFrom" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "date" ]
             ]
           ]
         ]
       ], [
         fhir:index 3 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set country" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "ext" ] ;
           fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "country" ] ;
           fhir:StructureMap.group.rule.source.condition [ fhir:value "ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCCountryOfVaccination'" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set country code" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "country" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "valueCode" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "code" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "country" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "vCountry" ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "vCountry" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:iso:std:iso:3166" ]
             ]
           ], [
             fhir:index 2 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "vCountry" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "code" ]
             ]
           ]
         ]
       ]
     ], [
       fhir:index 2 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set manufacturer" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "immunization" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "manufacturer" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "manufacturer" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set manufacturer id" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "manufacturer" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "identifier" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "identifier" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "manufacturer" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "vMan" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set manufacturer system" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "identifier" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "system" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "system" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "vMan" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "system" ]
             ]
           ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set manufactutuer code" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "identifier" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "value" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "value" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "vMan" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "value" ]
             ]
           ]
         ]
       ]
     ], [
       fhir:index 3 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set lot number" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "immunization" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "lotNumber" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "lot" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "lot" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "lot" ]
         ]
       ]
     ], [
       fhir:index 4 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set date" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "immunization" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "occurrence" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "date" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "date" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "date" ]
         ]
       ]
     ], [
       fhir:index 5 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set protocol applied" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "immunization" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "protocolApplied" ] ;
         fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "protocol" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set dose" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "protocol" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "doseNumber" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "dose" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "dose" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "dose" ]
           ]
         ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set totalDoses" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "protocol" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "seriesDoses" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "totalDoses" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "totalDoses" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "totalDoses" ]
           ]
         ]
       ], [
         fhir:index 2 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set disease" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "protocol" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "targetDisease" ] ;
           fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "disease" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set disease coding" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "disease" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "coding" ] ;
             fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "coding" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "disease" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "coding" ]
             ]
           ]
         ]
       ], [
         fhir:index 3 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set issuer" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "protocol" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "authority" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "authority" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "certificate" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "issuer" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "issuer" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set issuer from reference" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "authority" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "reference" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "reference" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "issuer" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ]
           ] ;
           fhir:StructureMap.group.rule.rule [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.name [ fhir:value "set reference" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "reference" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ;
               fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "reference" ]
               ]
             ]
           ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set issuer identifier" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "authority" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "identifier" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "identifier" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "issuer" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "identifier" ]
             ]
           ]
         ]
       ]
     ], [
       fhir:index 6 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set vaccination centre location" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "immunization" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "location" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "location" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set vaccination centre from reference" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "location" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "reference" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "reference" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "centre" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "reference" ]
           ]
         ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set vaccination centre" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "location" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "display" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "centre" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "centre" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "centre" ]
           ]
         ]
       ]
     ], [
       fhir:index 7 ;
       fhir:StructureMap.group.rule.name [ fhir:value "set performer" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "immunization" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "performer" ] ;
         fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "performer" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "set actor" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "performer" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "actor" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "actor" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set practitioner" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "actor" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "identifier" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "identifier" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "practitioner" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "identifier" ]
             ]
           ]
         ]
       ]
     ]
  ], [
     fhir:index 5 ;
     fhir:StructureMap.group.name [ fhir:value "ImmRecToDDCCVS" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "immRec" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "DDCCImmunizationRecommendation" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "vaccination" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "get recommendation" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "immRec" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "recommendation" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "rec" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "get date criterion" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "rec" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "dateCriterion" ] ;
           fhir:StructureMap.group.rule.source.listMode [ fhir:value "first" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "due_date" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "set due date" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "due_date" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "value" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "date" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "vaccination" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "nextDose" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "date" ]
             ]
           ]
         ]
       ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://hl7.org/fhir/StructureMap/ResourcesToVSCoreDataSet.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl ;
  owl:versionIRI <http://build.fhir.org/StructureMap/ResourcesToVSCoreDataSet.ttl> .