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/ and changes regularly. See the Directory of published versions

: null - TTL Representation

Draft as of 2024-10-17

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 "ICAOtoDDCC"] ; # 
  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 ICAOtoDDCC</b></p><a name=\"ICAOtoDDCC\"> </a><a name=\"hcICAOtoDDCC\"> </a><a name=\"ICAOtoDDCC-en-US\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>http://smart.who.int/ddcc/StructureMap/CertICAOtoDDCC<span style=\"color: navy\">&quot; = &quot;</span>ICAOtoDDCC<span style=\"color: navy\">&quot;\r\n\r\n</span><b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-CertICAO.html\" title=\"Certificate - ICAO Visible Digital Seal Logical Model\">http://smart.who.int/ddcc/StructureDefinition/CertICAO</a><span style=\"color: navy\">&quot; </span><b>alias </b>IJson <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/ig/icao/StructureDefinition/Data<span style=\"color: navy\">&quot; </span><b>alias </b>Data <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/ig/icao/StructureDefinition/Header<span style=\"color: navy\">&quot; </span><b>alias </b>Header <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/ig/icao/StructureDefinition/Message<span style=\"color: navy\">&quot; </span><b>alias </b>Message <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/ig/icao/StructureDefinition/Patient<span style=\"color: navy\">&quot; </span><b>alias </b>Patient <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/ig/icao/StructureDefinition/VaccinationEvent<span style=\"color: navy\">&quot; </span><b>alias </b>VaccinationEvent <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/ig/icao/StructureDefinition/VaccinationDetails<span style=\"color: navy\">&quot; </span><b>alias </b>VaccinationDetails <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/ig/icao/StructureDefinition/ServiceProvider<span style=\"color: navy\">&quot; </span><b>alias </b>ServiceProvider <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/ig/icao/StructureDefinition/Contact<span style=\"color: navy\">&quot; </span><b>alias </b>Contact <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/ig/icao/StructureDefinition/DateTimeTestReport<span style=\"color: navy\">&quot; </span><b>alias </b>DateTimeTestReport <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/ig/icao/StructureDefinition/TestResult<span style=\"color: navy\">&quot; </span><b>alias </b>TestResult <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/ig/icao/StructureDefinition/Signature<span style=\"color: navy\">&quot; </span><b>alias </b>Signature <b>as </b><b>source</b>\r\n<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>target</b>\r\n\r\n<b>group </b>ICAOtoDDCC<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>IJson, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.data<b> as </b><span style=\"color: maroon\">data</span><span style=\"color: navy\"><b> -&gt; </b></span>bundle<b> then </b>ExtractData<span style=\"color: navy\">(</span><span style=\"color: maroon\">data</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">bundle</span><span style=\"color: navy\">)</span> <i>&quot;Base Rule&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>ExtractData<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Data, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src<span style=\"color: navy\"><b> -&gt; </b></span>bundle.type = <span style=\"color: blue\">'transaction'</span> <i>&quot;set bundle type&quot;</i><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span> bundle<span style=\"color: navy\">, </span> bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><span style=\"color: navy\">, </span> entry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Composition'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">comp</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    src<span style=\"color: navy\"><b> -&gt; </b></span>bundle<b> then </b>ExtractCert<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">bundle</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">comp</span><span style=\"color: navy\">)</span> <i>&quot;Certificate&quot;</i><span style=\"color: navy\">;</span>\r\n    src<span style=\"color: navy\"><b> -&gt; </b></span>bundle<b> then </b>ExtractComposition<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">comp</span><span style=\"color: navy\">)</span> <i>&quot;Composition&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;Patient and Composition Create&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>ExtractCert<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Data, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle, <b>target</b> <span style=\"color: maroon\">comp</span><span style=\"color: navy\"> : </span>Composition<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src<span style=\"color: navy\"><b> -&gt; </b></span> comp<span style=\"color: navy\">, </span> bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><span style=\"color: navy\">, </span> entry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Patient'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">patient</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">pid</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    src.msg<b> as </b><span style=\"color: maroon\">msg</span><span style=\"color: navy\"><b> -&gt; </b></span>patient<b> then </b>ExtractPatientFromMsg<span style=\"color: navy\">(</span><span style=\"color: maroon\">msg</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">pid</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">patient</span><span style=\"color: navy\">)</span> <i>&quot;extract patient&quot;</i><span style=\"color: navy\">;</span>\r\n    src<span style=\"color: navy\"><b> -&gt; </b></span> comp.subject<b> as </b><span style=\"color: maroon\">subj</span><span style=\"color: navy\">, </span> subj.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Patient/'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">pid</span><span style=\"color: navy\">)</span> <i>&quot;Set patient&quot;</i><span style=\"color: navy\">;</span>\r\n    src.msg<b> as </b><span style=\"color: maroon\">msg</span><b> where </b>src.hdr.t = 'icao.vacc'<span style=\"color: navy\"><b> -&gt; </b></span> comp<span style=\"color: navy\">, </span> comp.section<b> as </b><span style=\"color: maroon\">section</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      src<span style=\"color: navy\"><b> -&gt; </b></span> section.code<b> as </b><span style=\"color: maroon\">code</span><span style=\"color: navy\">, </span> code.coding<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: blue\">'11369-6'</span><span style=\"color: navy\">, </span> coding.display = <span style=\"color: blue\">'History of Immunization Narrative'</span> <i>&quot;add section&quot;</i><span style=\"color: navy\">;</span>\r\n      msg.ve<b> as </b><span style=\"color: maroon\">vac</span><span style=\"color: navy\"><b> -&gt; </b></span>comp<b> then</b><span style=\"color: navy\"> {\r\n</span>        vac.vd<b> as </b><span style=\"color: maroon\">vacDetails</span><span style=\"color: navy\"><b> -&gt; </b></span> comp<span style=\"color: navy\">, </span> bundle.entry<b> as </b><span style=\"color: maroon\">entryImm</span><span style=\"color: navy\">, </span> entryImm.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Immunization'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">immunization</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">iid</span><span style=\"color: navy\">, </span> bundle.entry<b> as </b><span style=\"color: maroon\">entryOrg</span><span style=\"color: navy\">, </span> entryOrg.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Organization'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">org</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">oid</span><b> then</b><span style=\"color: navy\"> {\r\n</span>          src<span style=\"color: navy\"><b> -&gt; </b></span>immunization.id = <span style=\"color: maroon\">iid</span> <i>&quot;Immunization ID&quot;</i><span style=\"color: navy\">;</span>\r\n          src<span style=\"color: navy\"><b> -&gt; </b></span>org.id = <span style=\"color: maroon\">oid</span> <i>&quot;Organization ID&quot;</i><span style=\"color: navy\">;</span>\r\n          src<span style=\"color: navy\"><b> -&gt; </b></span> section.entry<b> as </b><span style=\"color: maroon\">entry</span><span style=\"color: navy\">, </span> entry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Immunization/'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">iid</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> section.author<b> as </b><span style=\"color: maroon\">author</span><span style=\"color: navy\">, </span> author.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Organization/'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">oid</span><span style=\"color: navy\">)</span> <i>&quot;add author immunization to section &quot;</i><span style=\"color: navy\">;</span>\r\n          src<span style=\"color: navy\"><b> -&gt; </b></span> comp.author<b> as </b><span style=\"color: maroon\">author</span><span style=\"color: navy\">, </span> author.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Organization/'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">oid</span><span style=\"color: navy\">)</span> <i>&quot;Set org&quot;</i><span style=\"color: navy\">;</span>\r\n          src<span style=\"color: navy\"><b> -&gt; </b></span> immunization.patient<b> as </b><span style=\"color: maroon\">subj</span><span style=\"color: navy\">, </span> subj.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Patient/'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">pid</span><span style=\"color: navy\">)</span> <i>&quot;Set patient&quot;</i><span style=\"color: navy\">;</span>\r\n          vacDetails.adm<b> as </b><span style=\"color: maroon\">adm</span><span style=\"color: navy\"><b> -&gt; </b></span>org.name = <span style=\"color: maroon\">adm</span> <i>&quot;Set Organization name&quot;</i><span style=\"color: navy\">;</span>\r\n          src<span style=\"color: navy\"><b> -&gt; </b></span>bundle<b> then </b>ExtractVaccine<span style=\"color: navy\">(</span><span style=\"color: maroon\">vac</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vacDetails</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">oid</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">immunization</span><span style=\"color: navy\">)</span> <i>&quot;extract vaccine info&quot;</i><span style=\"color: navy\">;</span>\r\n        <span style=\"color: navy\">}</span> <i>&quot;Imminization Create vac&quot;</i><span style=\"color: navy\">;</span>\r\n      <span style=\"color: navy\">}</span> <i>&quot;Imminization Create msg&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;Immunization Create&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;Patient Create&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>ExtractVaccine<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">vac</span><span style=\"color: navy\"> : </span>VaccinationEvent, <b>source</b> <span style=\"color: maroon\">vacDetails</span><span style=\"color: navy\"> : </span>VaccinationDetails, <b>source</b> <span style=\"color: maroon\">oid</span>, <b>target</b> <span style=\"color: maroon\">immunization</span><span style=\"color: navy\"> : </span>Immunization<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  vacDetails.dvc<b> as </b><span style=\"color: maroon\">dvc</span><span style=\"color: navy\"><b> -&gt; </b></span>immunization.occurrence = <span style=\"color: maroon\">dvc</span> <i>&quot;set occurrence date&quot;</i><span style=\"color: navy\">;</span>\r\n  vac.des<b> as </b><span style=\"color: maroon\">des</span><span style=\"color: navy\"><b> -&gt; </b></span> immunization.vaccineCode<b> as </b><span style=\"color: maroon\">type</span><span style=\"color: navy\">, </span> type.coding<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'http://hl7.org/fhir/sid/icd-11'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">des</span> <i>&quot;set vaccine coding&quot;</i><span style=\"color: navy\">;</span>\r\n  vac.nam<b> as </b><span style=\"color: maroon\">nam</span><span style=\"color: navy\"><b> -&gt; </b></span> immunization.extension<b> as </b><span style=\"color: maroon\">ext</span><span style=\"color: navy\">, </span> ext.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> ext.url = <span style=\"color: blue\">'https://smart.who.int/ddcc/StructureDefinition/DDCCVaccineBrand'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">nam</span> <i>&quot;set brand&quot;</i><span style=\"color: navy\">;</span>\r\n  vacDetails.ctr<b> as </b><span style=\"color: maroon\">co</span><span style=\"color: navy\"><b> -&gt; </b></span> immunization.extension<b> as </b><span style=\"color: maroon\">ext</span><span style=\"color: navy\">, </span> ext.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> ext.url = <span style=\"color: blue\">'https://smart.who.int/ddcc/StructureDefinition/DDCCCountryOfVaccination'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">co</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'urn:iso:std:iso:3166'</span> <i>&quot;set country&quot;</i><span style=\"color: navy\">;</span>\r\n  vacDetails.lot<b> as </b><span style=\"color: maroon\">lot</span><span style=\"color: navy\"><b> -&gt; </b></span>immunization.lotNumber = <span style=\"color: maroon\">lot</span> <i>&quot;set lot number&quot;</i><span style=\"color: navy\">;</span>\r\n  vac<span style=\"color: navy\"><b> -&gt; </b></span>immunization.protocolApplied<b> as </b><span style=\"color: maroon\">protocolApplied</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    vacDetails<span style=\"color: navy\"><b> -&gt; </b></span>protocolApplied<b> then</b><span style=\"color: navy\"> {\r\n</span>      vac<span style=\"color: navy\"><b> -&gt; </b></span>protocolApplied<b> then </b>ExtractProtocolApplied<span style=\"color: navy\">(</span><span style=\"color: maroon\">vac</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vacDetails</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">oid</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">protocolApplied</span><span style=\"color: navy\">)</span> <i>&quot;set protocol applied&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;set protocol applied vacdetails&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set protocol applied vac&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>ExtractProtocolApplied<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">vac</span><span style=\"color: navy\"> : </span>VaccinationEvent, <b>source</b> <span style=\"color: maroon\">vacDetails</span><span style=\"color: navy\"> : </span>VaccinationDetails, <b>source</b> <span style=\"color: maroon\">oid</span>, <b>target</b> <span style=\"color: maroon\">protocol</span><span style=\"color: navy\"> : </span>ProtocolApplied<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  vacDetails.seq<b> as </b><span style=\"color: maroon\">seq</span><span style=\"color: navy\"><b> -&gt; </b></span>protocol.doseNumber = <span style=\"color: maroon\">seq</span> <i>&quot;set dose number&quot;</i><span style=\"color: navy\">;</span>\r\n  vac.dis<b> as </b><span style=\"color: maroon\">dis</span><span style=\"color: navy\"><b> -&gt; </b></span> protocol.targetDisease<b> as </b><span style=\"color: maroon\">codeable</span><span style=\"color: navy\">, </span> codeable.coding<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'http://hl7.org/fhir/sid/icd-11'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">dis</span> <i>&quot;set target disease type&quot;</i><span style=\"color: navy\">;</span>\r\n  oid<span style=\"color: navy\"><b> -&gt; </b></span> protocol.authority<b> as </b><span style=\"color: maroon\">authority</span><span style=\"color: navy\">, </span> authority.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Organization/'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">oid</span><span style=\"color: navy\">)</span> <i>&quot;set authority&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>ExtractPatientFromMsg<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Message, <b>source</b> <span style=\"color: maroon\">pid</span>, <b>target</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\"> : </span>Patient<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.pid<b> as </b><span style=\"color: maroon\">patData</span><span style=\"color: navy\"><b> -&gt; </b></span>patient<b> then </b>ExtractPatient<span style=\"color: navy\">(</span><span style=\"color: maroon\">patData</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">pid</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">patient</span><span style=\"color: navy\">)</span> <i>&quot;extract patient from msg&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>ExtractPatient<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Patient, <b>source</b> <span style=\"color: maroon\">pid</span>, <b>target</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\"> : </span>Patient<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  pid<span style=\"color: navy\"><b> -&gt; </b></span>patient.id = <span style=\"color: maroon\">pid</span> <i>&quot;Patient ID&quot;</i><span style=\"color: navy\">;</span>\r\n  src.i<b> as </b><span style=\"color: maroon\">priorityIdentifier</span><span style=\"color: navy\"><b> -&gt; </b></span> patient.identifier<b> as </b><span style=\"color: maroon\">identif</span><span style=\"color: navy\">, </span> identif.value = <span style=\"color: maroon\">priorityIdentifier</span> <i>&quot;set priorityIdentifier&quot;</i><span style=\"color: navy\">;</span>\r\n  src.ai<b> as </b><span style=\"color: maroon\">additionalIdentifier</span><span style=\"color: navy\"><b> -&gt; </b></span> patient.identifier<b> as </b><span style=\"color: maroon\">identif</span><span style=\"color: navy\">, </span> identif.value = <span style=\"color: maroon\">additionalIdentifier</span> <i>&quot;set additionalIdentifier&quot;</i><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span>patient.identifier<b> as </b><span style=\"color: maroon\">identif</span><b> then </b>ExtractDocumentTypeNumber<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">identif</span><span style=\"color: navy\">)</span> <i>&quot;Document Type Number&quot;</i><span style=\"color: navy\">;</span>\r\n  src.n<b> as </b><span style=\"color: maroon\">name</span><span style=\"color: navy\"><b> -&gt; </b></span> patient.name = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'HumanName'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">humanName</span><span style=\"color: navy\">, </span> humanName.text = <span style=\"color: maroon\">name</span> <i>&quot;Patient Name&quot;</i><span style=\"color: navy\">;</span>\r\n  src.sex<b> as </b><span style=\"color: maroon\">gender</span><span style=\"color: navy\"><b> -&gt; </b></span>patient<b> then </b>ExtractGender<span style=\"color: navy\">(</span><span style=\"color: maroon\">gender</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">patient</span><span style=\"color: navy\">)</span> <i>&quot;Patient Gender&quot;</i><span style=\"color: navy\">;</span>\r\n  src.dob<b> as </b><span style=\"color: maroon\">birthDate</span><span style=\"color: navy\"><b> -&gt; </b></span>patient.birthDate = <span style=\"color: maroon\">birthDate</span> <i>&quot;set birthDate&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>ExtractGender<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">gender</span>, <b>target</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\"> : </span>Patient<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  gender<b> where </b>(gender = 'M')<span style=\"color: navy\"><b> -&gt; </b></span>patient.gender = <span style=\"color: blue\">'male'</span> <i>&quot;set male&quot;</i><span style=\"color: navy\">;</span>\r\n  gender<b> where </b>(gender = 'F')<span style=\"color: navy\"><b> -&gt; </b></span>patient.gender = <span style=\"color: blue\">'female'</span> <i>&quot;set female&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>ExtractDocumentTypeNumber<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Patient, <b>target</b> <span style=\"color: maroon\">identif</span><span style=\"color: navy\"> : </span>Identifier<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.dn<b> as </b><span style=\"color: maroon\">docNumber</span><span style=\"color: navy\"><b> -&gt; </b></span>identif.value = <span style=\"color: maroon\">docNumber</span> <i>&quot;set doc number&quot;</i><span style=\"color: navy\">;</span>\r\n  src.dt<b> as </b><span style=\"color: maroon\">docType</span><b> where </b>(docType = 'P')<span style=\"color: navy\"><b> -&gt; </b></span>identif.system = <span style=\"color: blue\">'PPN'</span> <i>&quot;set doc number P&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">P – Passport (Doc 9303-4)</span>\r\n  src.dt<b> as </b><span style=\"color: maroon\">docType</span><b> where </b>(docType = 'A')<span style=\"color: navy\"><b> -&gt; </b></span>identif.system = <span style=\"color: blue\">'DL'</span> <i>&quot;set doc number A&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">A – ID Card (Doc 9303-5)</span>\r\n  src.dt<b> as </b><span style=\"color: maroon\">docType</span><b> where </b>(docType = 'C')<span style=\"color: navy\"><b> -&gt; </b></span>identif.system = <span style=\"color: blue\">'DL'</span> <i>&quot;set doc number C&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">C – ID Card (Doc 9303-5)</span>\r\n  src.dt<b> as </b><span style=\"color: maroon\">docType</span><b> where </b>(docType = 'I')<span style=\"color: navy\"><b> -&gt; </b></span>identif.system = <span style=\"color: blue\">'DL'</span> <i>&quot;set doc number I&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">I – ID Card Doc 9303-5)</span>\r\n  src.dt<b> as </b><span style=\"color: maroon\">docType</span><b> where </b>(docType = 'AC')<span style=\"color: navy\"><b> -&gt; </b></span>identif.system = <span style=\"color: blue\">'EN'</span> <i>&quot;set doc number AC&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">AC - Crew Member Certificate (Doc 9303-5)</span>\r\n  src.dt<b> as </b><span style=\"color: maroon\">docType</span><b> where </b>(docType = 'V')<span style=\"color: navy\"><b> -&gt; </b></span>identif.system = <span style=\"color: blue\">'ACSN'</span> <i>&quot;set doc number V&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">V – Visa (Doc 9303-7)</span>\r\n  src.dt<b> as </b><span style=\"color: maroon\">docType</span><b> where </b>(docType = 'D')<span style=\"color: navy\"><b> -&gt; </b></span>identif.system = <span style=\"color: blue\">'DL'</span> <i>&quot;set doc number D&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">D – Driving License (ISO18013-1)</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>ExtractComposition<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Data, <b>target</b> <span style=\"color: maroon\">composition</span><span style=\"color: navy\"> : </span>Composition<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.msg<b> as </b><span style=\"color: maroon\">msg</span><span style=\"color: navy\"><b> -&gt; </b></span>composition<b> then</b><span style=\"color: navy\"> {\r\n</span>    msg.ucti<b> as </b><span style=\"color: maroon\">ucti</span><span style=\"color: navy\"><b> -&gt; </b></span> composition.identifier<b> as </b><span style=\"color: maroon\">identif</span><span style=\"color: navy\">, </span> identif.value = <span style=\"color: maroon\">ucti</span> <i>&quot;set comp test identifier&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set comp vaccine identifier parent&quot;</i><span style=\"color: navy\">;</span>\r\n  src.msg<b> as </b><span style=\"color: maroon\">msg</span><span style=\"color: navy\"><b> -&gt; </b></span>composition<b> then</b><span style=\"color: navy\"> {\r\n</span>    msg.uvci<b> as </b><span style=\"color: maroon\">uvci</span><span style=\"color: navy\"><b> -&gt; </b></span> composition.identifier<b> as </b><span style=\"color: maroon\">identif</span><span style=\"color: navy\">, </span> identif.value = <span style=\"color: maroon\">uvci</span> <i>&quot;set comp vaccine identifier&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set comp vaccine identifier parent&quot;</i><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span>composition.title = <span style=\"color: blue\">'International Certificate of Vaccination or Prophylaxis'</span> <i>&quot;Title&quot;</i><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span> composition.category<b> as </b><span style=\"color: maroon\">category</span><span style=\"color: navy\">, </span> category.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    src<span style=\"color: navy\"><b> -&gt; </b></span>coding.code = <span style=\"color: blue\">'ddcc-vs'</span> <i>&quot;Category&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set category&quot;</i><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span> composition.type<b> as </b><span style=\"color: maroon\">type</span><span style=\"color: navy\">, </span> type.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    src<span style=\"color: navy\"><b> -&gt; </b></span> coding.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: blue\">'82593-5'</span><span style=\"color: navy\">, </span> coding.display = <span style=\"color: blue\">'Immunization summary report'</span> <i>&quot;set type coding&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;set type&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/CertICAOtoDDCC"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "1.0.0"] ; # 
  fhir:name [ fhir:v "ICAOtoDDCC"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:date [ fhir:v "2024-10-17T05:03:04+00: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://smart.who.int/ddcc/StructureDefinition/CertICAO"^^xsd:anyURI ;
fhir:link <http://smart.who.int/ddcc/StructureDefinition/CertICAO>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "IJson" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/ig/icao/StructureDefinition/Data"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/ig/icao/StructureDefinition/Data>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "Data" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/ig/icao/StructureDefinition/Header"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/ig/icao/StructureDefinition/Header>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "Header" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/ig/icao/StructureDefinition/Message"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/ig/icao/StructureDefinition/Message>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "Message" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/ig/icao/StructureDefinition/Patient"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/ig/icao/StructureDefinition/Patient>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "Patient" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/ig/icao/StructureDefinition/VaccinationEvent"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/ig/icao/StructureDefinition/VaccinationEvent>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "VaccinationEvent" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/ig/icao/StructureDefinition/VaccinationDetails"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/ig/icao/StructureDefinition/VaccinationDetails>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "VaccinationDetails" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/ig/icao/StructureDefinition/ServiceProvider"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/ig/icao/StructureDefinition/ServiceProvider>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "ServiceProvider" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/ig/icao/StructureDefinition/Contact"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/ig/icao/StructureDefinition/Contact>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "Contact" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/ig/icao/StructureDefinition/DateTimeTestReport"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/ig/icao/StructureDefinition/DateTimeTestReport>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "DateTimeTestReport" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/ig/icao/StructureDefinition/TestResult"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/ig/icao/StructureDefinition/TestResult>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "TestResult" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/ig/icao/StructureDefinition/Signature"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/ig/icao/StructureDefinition/Signature>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "Signature" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Bundle"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle>     ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "Bundle" ]
  ] ) ; # 
  fhir:group ( [
fhir:name [ fhir:v "ICAOtoDDCC" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "IJson" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "Base Rule" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "data" ] ;
fhir:variable [ fhir:v "data" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "ExtractData" ] ;
        ( fhir:variable [ fhir:v "data" ] [ fhir:v "bundle" ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ExtractData" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "Data" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "set bundle type" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "transaction" ]         ] )       ] )     ] [
fhir:name [ fhir:v "Patient and Composition Create" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ]       ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry" ]       ] [
fhir:context [ fhir:v "entry" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "comp" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Composition" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "Certificate" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ]         ] ) ;
        ( fhir:dependent [
fhir:name [ fhir:v "ExtractCert" ] ;
          ( fhir:variable [ fhir:v "src" ] [ fhir:v "bundle" ] [ fhir:v "comp" ] )         ] )       ] [
fhir:name [ fhir:v "Composition" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ]         ] ) ;
        ( fhir:dependent [
fhir:name [ fhir:v "ExtractComposition" ] ;
          ( fhir:variable [ fhir:v "src" ] [ fhir:v "comp" ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ExtractCert" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "Data" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "comp" ] ;
fhir:type [ fhir:v "Composition" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "Patient Create" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "comp" ] ;
fhir:contextType [ fhir:v "variable" ]       ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry" ]       ] [
fhir:context [ fhir:v "entry" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "patient" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Patient" ]         ] )       ] [
fhir:contextType [ fhir:v "variable" ] ;
fhir:variable [ fhir:v "pid" ] ;
fhir:transform [ fhir:v "uuid" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "extract patient" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "msg" ] ;
fhir:variable [ fhir:v "msg" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ]         ] ) ;
        ( fhir:dependent [
fhir:name [ fhir:v "ExtractPatientFromMsg" ] ;
          ( fhir:variable [ fhir:v "msg" ] [ fhir:v "pid" ] [ fhir:v "patient" ] )         ] )       ] [
fhir:name [ fhir:v "Composition.Set patient" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "comp" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "subject" ] ;
fhir:variable [ fhir:v "subj" ]         ] [
fhir:context [ fhir:v "subj" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Patient/" ]           ] [
fhir:value [ fhir:v "pid" ]           ] )         ] )       ] [
fhir:name [ fhir:v "Immunization Create" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "msg" ] ;
fhir:variable [ fhir:v "msg" ] ;
fhir:condition [ fhir:v "src.hdr.t = 'icao.vacc'" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "comp" ] ;
fhir:contextType [ fhir:v "variable" ]         ] [
fhir:context [ fhir:v "comp" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "section" ] ;
fhir:variable [ fhir:v "section" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "add section" ] ;
          ( fhir:source [
fhir:context [ fhir:v "src" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "section" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]           ] [
fhir:context [ fhir:v "code" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]           ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "http://loinc.org" ]             ] )           ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "11369-6" ]             ] )           ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "History of Immunization Narrative" ]             ] )           ] )         ] [
fhir:name [ fhir:v "Imminization Create msg" ] ;
          ( fhir:source [
fhir:context [ fhir:v "msg" ] ;
fhir:element [ fhir:v "ve" ] ;
fhir:variable [ fhir:v "vac" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "comp" ] ;
fhir:contextType [ fhir:v "variable" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "Imminization Create vac" ] ;
            ( fhir:source [
fhir:context [ fhir:v "vac" ] ;
fhir:element [ fhir:v "vd" ] ;
fhir:variable [ fhir:v "vacDetails" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "comp" ] ;
fhir:contextType [ fhir:v "variable" ]             ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entryImm" ]             ] [
fhir:context [ fhir:v "entryImm" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "immunization" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Immunization" ]               ] )             ] [
fhir:contextType [ fhir:v "variable" ] ;
fhir:variable [ fhir:v "iid" ] ;
fhir:transform [ fhir:v "uuid" ]             ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entryOrg" ]             ] [
fhir:context [ fhir:v "entryOrg" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "org" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Organization" ]               ] )             ] [
fhir:contextType [ fhir:v "variable" ] ;
fhir:variable [ fhir:v "oid" ] ;
fhir:transform [ fhir:v "uuid" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "Immunization ID" ] ;
              ( fhir:source [
fhir:context [ fhir:v "src" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "iid" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "Organization ID" ] ;
              ( fhir:source [
fhir:context [ fhir:v "src" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "org" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "oid" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "add author immunization to section " ] ;
              ( fhir:source [
fhir:context [ fhir:v "src" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "section" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry" ]               ] [
fhir:context [ fhir:v "entry" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Immunization/" ]                 ] [
fhir:value [ fhir:v "iid" ]                 ] )               ] [
fhir:context [ fhir:v "section" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "author" ]               ] [
fhir:context [ fhir:v "author" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Organization/" ]                 ] [
fhir:value [ fhir:v "oid" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "Composition.Set org" ] ;
              ( fhir:source [
fhir:context [ fhir:v "src" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "comp" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "author" ]               ] [
fhir:context [ fhir:v "author" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Organization/" ]                 ] [
fhir:value [ fhir:v "oid" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "Immunization.Set patient" ] ;
              ( fhir:source [
fhir:context [ fhir:v "src" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "patient" ] ;
fhir:variable [ fhir:v "subj" ]               ] [
fhir:context [ fhir:v "subj" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Patient/" ]                 ] [
fhir:value [ fhir:v "pid" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "Set Organization name" ] ;
              ( fhir:source [
fhir:context [ fhir:v "vacDetails" ] ;
fhir:element [ fhir:v "adm" ] ;
fhir:variable [ fhir:v "adm" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "org" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "adm" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "extract vaccine info" ] ;
              ( fhir:source [
fhir:context [ fhir:v "src" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ]               ] ) ;
              ( fhir:dependent [
fhir:name [ fhir:v "ExtractVaccine" ] ;
                ( fhir:variable [ fhir:v "vac" ] [ fhir:v "vacDetails" ] [ fhir:v "oid" ] [ fhir:v "immunization" ] )               ] )             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ExtractVaccine" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "vac" ] ;
fhir:type [ fhir:v "VaccinationEvent" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "vacDetails" ] ;
fhir:type [ fhir:v "VaccinationDetails" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "oid" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "immunization" ] ;
fhir:type [ fhir:v "Immunization" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "set occurrence date" ] ;
      ( fhir:source [
fhir:context [ fhir:v "vacDetails" ] ;
fhir:element [ fhir:v "dvc" ] ;
fhir:variable [ fhir:v "dvc" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "occurrence" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "dvc" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set vaccine coding" ] ;
      ( fhir:source [
fhir:context [ fhir:v "vac" ] ;
fhir:element [ fhir:v "des" ] ;
fhir:variable [ fhir:v "des" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "vaccineCode" ] ;
fhir:variable [ fhir:v "type" ]       ] [
fhir:context [ fhir:v "type" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]       ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "http://hl7.org/fhir/sid/icd-11" ]         ] )       ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "des" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set brand" ] ;
      ( fhir:source [
fhir:context [ fhir:v "vac" ] ;
fhir:element [ fhir:v "nam" ] ;
fhir:variable [ fhir:v "nam" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]       ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]         ] )       ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "https://smart.who.int/ddcc/StructureDefinition/DDCCVaccineBrand" ]         ] )       ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "nam" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set country" ] ;
      ( fhir:source [
fhir:context [ fhir:v "vacDetails" ] ;
fhir:element [ fhir:v "ctr" ] ;
fhir:variable [ fhir:v "co" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]       ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]         ] )       ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "https://smart.who.int/ddcc/StructureDefinition/DDCCCountryOfVaccination" ]         ] )       ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "co" ]         ] )       ] [
fhir:context [ fhir:v "coding" ] ;
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:name [ fhir:v "set lot number" ] ;
      ( fhir:source [
fhir:context [ fhir:v "vacDetails" ] ;
fhir:element [ fhir:v "lot" ] ;
fhir:variable [ fhir:v "lot" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "lotNumber" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "lot" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set protocol applied vac" ] ;
      ( fhir:source [
fhir:context [ fhir:v "vac" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "protocolApplied" ] ;
fhir:variable [ fhir:v "protocolApplied" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "set protocol applied vacdetails" ] ;
        ( fhir:source [
fhir:context [ fhir:v "vacDetails" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "protocolApplied" ] ;
fhir:contextType [ fhir:v "variable" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "set protocol applied" ] ;
          ( fhir:source [
fhir:context [ fhir:v "vac" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "protocolApplied" ] ;
fhir:contextType [ fhir:v "variable" ]           ] ) ;
          ( fhir:dependent [
fhir:name [ fhir:v "ExtractProtocolApplied" ] ;
            ( fhir:variable [ fhir:v "vac" ] [ fhir:v "vacDetails" ] [ fhir:v "oid" ] [ fhir:v "protocolApplied" ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ExtractProtocolApplied" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "vac" ] ;
fhir:type [ fhir:v "VaccinationEvent" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "vacDetails" ] ;
fhir:type [ fhir:v "VaccinationDetails" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "oid" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "protocol" ] ;
fhir:type [ fhir:v "ProtocolApplied" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "set dose number" ] ;
      ( fhir:source [
fhir:context [ fhir:v "vacDetails" ] ;
fhir:element [ fhir:v "seq" ] ;
fhir:variable [ fhir:v "seq" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "protocol" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "doseNumber" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "seq" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set target disease type" ] ;
      ( fhir:source [
fhir:context [ fhir:v "vac" ] ;
fhir:element [ fhir:v "dis" ] ;
fhir:variable [ fhir:v "dis" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "protocol" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "targetDisease" ] ;
fhir:variable [ fhir:v "codeable" ]       ] [
fhir:context [ fhir:v "codeable" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]       ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "http://hl7.org/fhir/sid/icd-11" ]         ] )       ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "dis" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set authority" ] ;
      ( fhir:source [
fhir:context [ fhir:v "oid" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "protocol" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "authority" ] ;
fhir:variable [ fhir:v "authority" ]       ] [
fhir:context [ fhir:v "authority" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Organization/" ]         ] [
fhir:value [ fhir:v "oid" ]         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ExtractPatientFromMsg" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "Message" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "pid" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "extract patient from msg" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "pid" ] ;
fhir:variable [ fhir:v "patData" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "ExtractPatient" ] ;
        ( fhir:variable [ fhir:v "patData" ] [ fhir:v "pid" ] [ fhir:v "patient" ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ExtractPatient" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "pid" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "Patient ID" ] ;
      ( fhir:source [
fhir:context [ fhir:v "pid" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "pid" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set priorityIdentifier" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "i" ] ;
fhir:variable [ fhir:v "priorityIdentifier" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identif" ]       ] [
fhir:context [ fhir:v "identif" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "priorityIdentifier" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set additionalIdentifier" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "ai" ] ;
fhir:variable [ fhir:v "additionalIdentifier" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identif" ]       ] [
fhir:context [ fhir:v "identif" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "additionalIdentifier" ]         ] )       ] )     ] [
fhir:name [ fhir:v "Document Type Number" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identif" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "ExtractDocumentTypeNumber" ] ;
        ( fhir:variable [ fhir:v "src" ] [ fhir:v "identif" ] )       ] )     ] [
fhir:name [ fhir:v "Patient Name" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "n" ] ;
fhir:variable [ fhir:v "name" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "humanName" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "HumanName" ]         ] )       ] [
fhir:context [ fhir:v "humanName" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "name" ]         ] )       ] )     ] [
fhir:name [ fhir:v "Patient Gender" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "sex" ] ;
fhir:variable [ fhir:v "gender" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "ExtractGender" ] ;
        ( fhir:variable [ fhir:v "gender" ] [ fhir:v "patient" ] )       ] )     ] [
fhir:name [ fhir:v "set birthDate" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "dob" ] ;
fhir:variable [ fhir:v "birthDate" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "birthDate" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "birthDate" ]         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ExtractGender" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "gender" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "set male" ] ;
      ( fhir:source [
fhir:context [ fhir:v "gender" ] ;
fhir:condition [ fhir:v "(gender = 'M')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "gender" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "male" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set female" ] ;
      ( fhir:source [
fhir:context [ fhir:v "gender" ] ;
fhir:condition [ fhir:v "(gender = 'F')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "gender" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "female" ]         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ExtractDocumentTypeNumber" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "identif" ] ;
fhir:type [ fhir:v "Identifier" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "set doc number" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "dn" ] ;
fhir:variable [ fhir:v "docNumber" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "identif" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "docNumber" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set doc number P" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "dt" ] ;
fhir:variable [ fhir:v "docType" ] ;
fhir:condition [ fhir:v "(docType = 'P')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "identif" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "PPN" ]         ] )       ] ) ;
fhir:documentation [ fhir:v "P – Passport (Doc 9303-4)" ]     ] [
fhir:name [ fhir:v "set doc number A" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "dt" ] ;
fhir:variable [ fhir:v "docType" ] ;
fhir:condition [ fhir:v "(docType = 'A')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "identif" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "DL" ]         ] )       ] ) ;
fhir:documentation [ fhir:v "A – ID Card (Doc 9303-5)" ]     ] [
fhir:name [ fhir:v "set doc number C" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "dt" ] ;
fhir:variable [ fhir:v "docType" ] ;
fhir:condition [ fhir:v "(docType = 'C')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "identif" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "DL" ]         ] )       ] ) ;
fhir:documentation [ fhir:v "C – ID Card (Doc 9303-5)" ]     ] [
fhir:name [ fhir:v "set doc number I" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "dt" ] ;
fhir:variable [ fhir:v "docType" ] ;
fhir:condition [ fhir:v "(docType = 'I')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "identif" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "DL" ]         ] )       ] ) ;
fhir:documentation [ fhir:v "I – ID Card Doc 9303-5)" ]     ] [
fhir:name [ fhir:v "set doc number AC" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "dt" ] ;
fhir:variable [ fhir:v "docType" ] ;
fhir:condition [ fhir:v "(docType = 'AC')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "identif" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "EN" ]         ] )       ] ) ;
fhir:documentation [ fhir:v "AC - Crew Member Certificate (Doc 9303-5)" ]     ] [
fhir:name [ fhir:v "set doc number V" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "dt" ] ;
fhir:variable [ fhir:v "docType" ] ;
fhir:condition [ fhir:v "(docType = 'V')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "identif" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "ACSN" ]         ] )       ] ) ;
fhir:documentation [ fhir:v "V – Visa (Doc 9303-7)" ]     ] [
fhir:name [ fhir:v "set doc number D" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "dt" ] ;
fhir:variable [ fhir:v "docType" ] ;
fhir:condition [ fhir:v "(docType = 'D')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "identif" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "DL" ]         ] )       ] ) ;
fhir:documentation [ fhir:v "D – Driving License (ISO18013-1)" ]     ] )
  ] [
fhir:name [ fhir:v "ExtractComposition" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "Data" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "composition" ] ;
fhir:type [ fhir:v "Composition" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "set comp vaccine identifier parent" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "msg" ] ;
fhir:variable [ fhir:v "msg" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "set comp test identifier" ] ;
        ( fhir:source [
fhir:context [ fhir:v "msg" ] ;
fhir:element [ fhir:v "ucti" ] ;
fhir:variable [ fhir:v "ucti" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identif" ]         ] [
fhir:context [ fhir:v "identif" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "ucti" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "set comp vaccine identifier parent" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "msg" ] ;
fhir:variable [ fhir:v "msg" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "set comp vaccine identifier" ] ;
        ( fhir:source [
fhir:context [ fhir:v "msg" ] ;
fhir:element [ fhir:v "uvci" ] ;
fhir:variable [ fhir:v "uvci" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identif" ]         ] [
fhir:context [ fhir:v "identif" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "uvci" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "Title" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "International Certificate of Vaccination or Prophylaxis" ]         ] )       ] )     ] [
fhir:name [ fhir:v "set category" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "category" ] ;
fhir:variable [ fhir:v "category" ]       ] [
fhir:context [ fhir:v "category" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "Category" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "ddcc-vs" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "set type" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "type" ]       ] [
fhir:context [ fhir:v "type" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "set type coding" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "http://loinc.org" ]           ] )         ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "82593-5" ]           ] )         ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Immunization summary report" ]           ] )         ] )       ] )     ] )
  ] ) . #