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

This is the continuous build for version 1.0.0. This version is based on the current content of https://github.com/WorldHealthOrganization/ddcc and changes regularly.

: CoreDataSetVSLibrary - XML Representation

Draft as of 2024-01-19

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="CoreDataSetVSLibrary"/>
  <meta>
    <versionId value="2"/>
    <lastUpdated value="2022-06-01T12:53:30.965+00:00"/>
  </meta>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><pre>map &quot;http://smart.who.int/ddcc/StructureMap/CoreDataSetVSLibrary&quot; = &quot;CoreDataSetVSLibrary&quot;


uses &quot;http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSet.VS&quot; alias DDCCVS as source
uses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; alias AddBundle as target
uses &quot;http://hl7.org/fhir/StructureDefinition/Patient&quot; alias Patient as target
uses &quot;http://smart.who.int/ddcc/StructureDefinition/DDCCPatient&quot; alias DDCCPatient as produced
uses &quot;http://smart.who.int/ddcc/StructureDefinition/DDCCDocumentReferenceQR&quot; alias DDCCDocRefQR as produced
uses &quot;http://smart.who.int/ddcc/StructureDefinition/DDCCVSComposition&quot; alias DDCCVSComposition as produced
uses &quot;http://smart.who.int/ddcc/StructureDefinition/DDCCImmunization&quot; alias DDCCImmunization as produced
uses &quot;http://smart.who.int/ddcc/StructureDefinition/DDCCImmunizationRecommendation&quot; alias DDCCImmRec as produced

imports &quot;http://smart.who.int/ddcc/StructureMap/CoreDataSetLibrary&quot;

group VSToAddBundle(source ddcc : DDCCVS, target bundle : AddBundle) {
  ddcc -&gt; bundle.type = 'transaction' &quot;set bundle type&quot;;
  ddcc -&gt;  uuid() as pid,  uuid() as compid,  uuid() as iid,  uuid() as irid,  uuid() as qrwhoid,  uuid() as qrdccid then {
    ddcc -&gt;  bundle.entry as entry,  entry.fullUrl = append('urn:uuid:', pid),  entry.request as request,  request.method = 'PUT',  request.url = append('Patient/', pid),  create('http://smart.who.int/ddcc/StructureDefinition/DDCCPatient') as patient then {
      ddcc then DDCCToPatient(ddcc, patient, pid) &quot;setup patient&quot;;
      ddcc -&gt; entry.resource = patient &quot;set patient resource&quot;;
    } &quot;create patient resource&quot;;
    ddcc -&gt;  bundle.entry as entry,  entry.fullUrl = append('urn:uuid:', compid),  entry.request as request,  request.method = 'PUT',  request.url = append('Composition/', compid),  create('http://smart.who.int/ddcc/StructureDefinition/DDCCVSComposition') as comp then {
      ddcc then DDCCToComposition(ddcc, comp, compid, pid) &quot;setup composition&quot;;
      ddcc -&gt;  comp.category as category,  category.coding as coding,  coding.system = 'http://smart.who.int/ddcc/CodeSystem/DDCC-Composition-Category-CodeSystem',  coding.code = 'ddcc-vs' &quot;set category&quot;;
      ddcc -&gt; comp.title = 'International Certificate of Vaccination or Prophylaxis' &quot;set title&quot;;
      ddcc -&gt; comp.section as section then {
        ddcc -&gt;  section.code as code,  code.coding as coding,  coding.system = 'http://loinc.org',  coding.code = '11369-6' &quot;set code&quot;;
        ddcc.certificate as certificate then {
          certificate.issuer as issuer -&gt; section.author = issuer &quot;set author&quot;;
        } &quot;set certificate&quot;;
        // ddcc.certificate as certificate -&gt; section.author as author then {
        //             certificate.issuer as issuer then {
        //               issuer.identifier as pha -&gt; author.identifier as identifier, author.type = &quot;Organization&quot; then {
        //                 pha.value as value -&gt; identifier.value = value &quot;set pha&quot;;
        //               } &quot;set author identifier&quot;;
        //             } &quot;set author ref&quot;;
        //             
        //           } &quot;set author&quot;;
        ddcc -&gt;  section.focus as focus,  focus.reference = append('Immunization/', iid) &quot;set focus&quot;;
        ddcc -&gt;  section.entry as entry,  entry.reference = append('Immunization/', iid) &quot;add Immunization entry&quot;;
        ddcc -&gt;  section.entry as entry,  entry.reference = append('ImmunizationRecommendation/', irid) &quot;add ImmunizationRecommendation entry&quot;;
        ddcc -&gt;  section.entry as entry,  entry.reference = append('DocumentReference/', qrwhoid) &quot;add WHO QR entry&quot;;
        ddcc -&gt;  section.entry as entry,  entry.reference = append('DocumentReference/', qrdccid) &quot;add DCC QR entry&quot;;
      } &quot;set section&quot;;
      ddcc -&gt; entry.resource = comp &quot;set composition resource&quot;;
    } &quot;create composition resource&quot;;
    ddcc -&gt;  bundle.entry as entry,  entry.fullUrl = append('urn:uuid:', qrwhoid),  entry.request as request,  request.method = 'PUT',  request.url = append('DocumentReference/', qrwhoid),  create('http://smart.who.int/ddcc/StructureDefinition/DDCCDocumentReferenceQR') as qr then {
      ddcc then DDCCToDocumentReference(ddcc, qr, qrwhoid, pid) &quot;setup WHO DocRef&quot;;
      ddcc -&gt;  qr.category as category,  category.coding as coding,  coding.system = 'http://smart.who.int/ddcc/CodeSystem/DDCC-QR-Category-Usage-CodeSystem',  coding.code = 'who' &quot;set category&quot;;
      ddcc -&gt; qr.description = 'WHO QR code for COVID 19 Vaccine Certificate' &quot;set description&quot;;
      ddcc -&gt; entry.resource = qr &quot;set WHO QR&quot;;
    } &quot;create WHO QR Doc Ref&quot;;
    ddcc -&gt;  bundle.entry as entry,  entry.fullUrl = append('urn:uuid:', qrdccid),  entry.request as request,  request.method = 'PUT',  request.url = append('DocumentReference/', qrdccid),  create('http://smart.who.int/ddcc/StructureDefinition/DDCCDocumentReferenceQR') as qr then {
      ddcc then DDCCToDocumentReference(ddcc, qr, qrdccid, pid) &quot;setup DCC DocRef&quot;;
      ddcc -&gt;  qr.category as category,  category.coding as coding,  coding.system = 'http://smart.who.int/ddcc/CodeSystem/DDCC-QR-Category-Usage-CodeSystem',  coding.code = 'dcc' &quot;set category&quot;;
      ddcc -&gt; qr.description = 'DCC QR code for COVID 19 Vaccine Certificate' &quot;set description&quot;;
      ddcc -&gt; entry.resource = qr &quot;set DCC QR&quot;;
    } &quot;create DCC QR Doc Ref&quot;;
    ddcc.vaccination first as vaccination -&gt;  bundle.entry as entry,  entry.fullUrl = append('urn:uuid:', iid),  entry.request as request,  request.method = 'PUT',  request.url = append('Immunization/', iid),  create('http://smart.who.int/ddcc/StructureDefinition/DDCCImmunization') as immunization then {
      ddcc.certificate as certificate then DDCCToImmunization(vaccination, immunization, certificate, iid, pid) &quot;setup immunization&quot;;
      ddcc -&gt; entry.resource = immunization &quot;set immunization resource&quot;;
    } &quot;create immunization resource&quot;;
    ddcc.vaccination first as vaccination -&gt;  bundle.entry as entry,  entry.fullUrl = append('urn:uuid:', irid),  entry.request as request,  request.method = 'PUT',  request.url = append('ImmunizationRecommendation/', irid),  create('http://smart.who.int/ddcc/StructureDefinition/DDCCImmunizationRecommendation') as immrec then {
      vaccination then DDCCToImmRec(vaccination, immrec, irid, iid, pid) &quot;setup immunization recommendation&quot;;
      ddcc -&gt; entry.resource = immrec &quot;set immunization recommendation resource&quot;;
    } &quot;create immunization recommendation resource&quot;;
  } &quot;set uuids&quot;;
}

group DDCCToImmunization(source src, target immunization : DDCCImmunization, source certificate, source iid, source pid) {
  iid -&gt; immunization.id = iid &quot;set id&quot;;
  src.brand as brand -&gt; immunization.extension as ext then {
    brand -&gt;  ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineBrand',  ext.value = brand &quot;set brand extension values&quot;;
  } &quot;set brand extension&quot;;
  src.maholder as maholder -&gt; immunization.extension as ext then {
    maholder -&gt;  ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineMarketAuthorization',  ext.value = maholder &quot;set MA Holder extension values&quot;;
  } &quot;set maholder extension&quot;;
  src.country as country -&gt; immunization.extension as ext then {
    country.code as code -&gt;  ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCCountryOfVaccination',  ext.value = code &quot;set country extension values&quot;;
  } &quot;set country extension&quot;;
  src.validFrom as validFrom -&gt; immunization.extension as ext then {
    validFrom -&gt;  ext.url = 'http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineValidFrom',  ext.value = validFrom &quot;set valid from extension values&quot;;
  } &quot;set vaccine valid extension&quot;;
  src -&gt; immunization.status = 'completed' &quot;set status&quot;;
  src.vaccine as vaccine -&gt;  immunization.vaccineCode as vacCode,  vacCode.coding = vaccine &quot;set vaccine&quot;;
  src -&gt;  immunization.patient as patient,  patient.reference = append('Patient/', pid) &quot;set patient&quot;;
  src.manufacturer as manufacturer -&gt;  immunization.manufacturer as tman,  tman.identifier as ident then {
    manufacturer.system as system -&gt; ident.system = system &quot;set system&quot;;
    manufacturer.code as code -&gt; ident.value = code &quot;set value&quot;;
  } &quot;set manufacturer identifier&quot;;
  src.lot as lot -&gt; immunization.lotNumber = lot &quot;set lot number&quot;;
  src.date as date -&gt; immunization.occurrence = date &quot;set occurrence date&quot;;
  src.centre as centre -&gt; immunization.location as location then {
    centre -&gt; location.display = centre &quot;set location display&quot;;
  } &quot;set location&quot;;
  src.practitioner as practitioner -&gt; immunization.performer as performer then {
    practitioner.value as hw -&gt; performer.actor as actor then {
      hw -&gt;  actor.type = 'Practitioner',  actor.identifier as identifier then {
        hw -&gt; identifier.value = hw &quot;set hw identifier&quot;;
      } &quot;set actor&quot;;
    } &quot;set performer&quot;;
  } &quot;set practitioner&quot;;
  src -&gt; immunization.protocolApplied as protocol then {
    src -&gt; protocol.authority as authority then {
      certificate.issuer as issuer -&gt; authority.type = 'Organization' then {
        issuer.identifier as pha -&gt; authority.identifier as identifier then {
          pha.value as value -&gt; identifier.value = value &quot;set pha&quot;;
        } &quot;set issuer identifier&quot;;
      } &quot;set issuer&quot;;
    } &quot;set authority&quot;;
    src.disease as disease -&gt; protocol.targetDisease as tdisease then {
      disease -&gt; tdisease.coding = disease &quot;set target disease code&quot;;
    } &quot;set target disease&quot;;
    src.dose as dose -&gt; protocol.doseNumber = dose &quot;set dose number&quot;;
    src.totalDoses as totalDoses -&gt; protocol.seriesDoses = totalDoses &quot;set total doses&quot;;
  } &quot;set protocolApplied&quot;;
}

group DDCCToImmRec(source src, target immrec : DDCCImmunizationRecommendation, source irid, source iid, source pid) {
  src.date as date -&gt; immrec.date = date &quot;set date&quot;;
  src -&gt;  immrec.patient as patient,  patient.reference = append('Patient/', pid) &quot;set patient&quot;;
  src -&gt; immrec.recommendation as rec then {
    src.vaccine as vaccine -&gt; rec.vaccineCode as vaccineCode then {
      vaccine -&gt; vaccineCode.coding = vaccine &quot;set vaccine code coding&quot;;
    } &quot;set vaccine code&quot;;
    src.disease as disease -&gt; rec.targetDisease as targetDisease then {
      disease -&gt; targetDisease.coding = disease &quot;set target disease coding&quot;;
    } &quot;set target disease&quot;;
    src -&gt; rec.forecastStatus as forecast then {
      src -&gt; forecast.coding as coding then {
        src -&gt; coding.system = 'http://terminology.hl7.org/2.1.0/CodeSystem-immunization-recommendation-status.html' &quot;set forecast system&quot;;
        src -&gt; coding.code = 'due' &quot;set forecast code&quot;;
      } &quot;set forecast status coding&quot;;
    } &quot;set forecast status&quot;;
    src -&gt; rec.dateCriterion as due_date then {
      src -&gt; due_date.code as code then {
        src -&gt; code.coding as coding then {
          src -&gt; coding.system = 'http://loinc.org' &quot;set due date code system&quot;;
          src -&gt; coding.code = '30980-7' &quot;set due date code code&quot;;
        } &quot;set due date code coding&quot;;
      } &quot;set due date code&quot;;
      src.nextDose as nextDose -&gt; due_date.value = nextDose &quot;set due date value&quot;;
    } &quot;set date criterion&quot;;
    src.dose as dose -&gt; rec.doseNumber = (dose.toInteger() + 1) &quot;set dose number&quot;;
    src.totalDoses as totalDoses -&gt; rec.seriesDoses = totalDoses &quot;set total doses&quot;;
    src -&gt;  rec.supportingImmunization as imm,  imm.reference = append('Immunization/', iid) &quot;set supporting immunization&quot;;
  } &quot;set recommendation&quot;;
}

</pre></div>
  </text>
  <url value="http://smart.who.int/ddcc/StructureMap/CoreDataSetVSLibrary"/>
  <version value="1.0.0"/>
  <name value="CoreDataSetVSLibrary"/>
  <status value="draft"/>
  <date value="2024-01-19T16:18:21+00:00"/>
  <publisher value="WHO"/>
  <contact>
    <name value="WHO"/>
    <telecom>
      <system value="url"/>
      <value value="http://who.int"/>
    </telecom>
  </contact>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
    </coding>
  </jurisdiction>
  <structure>
    <url
         value="http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSet.VS"/>
    <mode value="source"/>
    <alias value="DDCCVS"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
    <mode value="target"/>
    <alias value="AddBundle"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Patient"/>
    <mode value="target"/>
    <alias value="Patient"/>
  </structure>
  <structure>
    <url value="http://smart.who.int/ddcc/StructureDefinition/DDCCPatient"/>
    <mode value="produced"/>
    <alias value="DDCCPatient"/>
  </structure>
  <structure>
    <url
         value="http://smart.who.int/ddcc/StructureDefinition/DDCCDocumentReferenceQR"/>
    <mode value="produced"/>
    <alias value="DDCCDocRefQR"/>
  </structure>
  <structure>
    <url
         value="http://smart.who.int/ddcc/StructureDefinition/DDCCVSComposition"/>
    <mode value="produced"/>
    <alias value="DDCCVSComposition"/>
  </structure>
  <structure>
    <url
         value="http://smart.who.int/ddcc/StructureDefinition/DDCCImmunization"/>
    <mode value="produced"/>
    <alias value="DDCCImmunization"/>
  </structure>
  <structure>
    <url
         value="http://smart.who.int/ddcc/StructureDefinition/DDCCImmunizationRecommendation"/>
    <mode value="produced"/>
    <alias value="DDCCImmRec"/>
  </structure>
  <import value="http://smart.who.int/ddcc/StructureMap/CoreDataSetLibrary"/>
  <group>
    <name value="VSToAddBundle"/>
    <typeMode value="none"/>
    <input>
      <name value="ddcc"/>
      <type value="DDCCVS"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="bundle"/>
      <type value="AddBundle"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="set bundle type"/>
      <source>
        <context value="ddcc"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="type"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="transaction"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="set uuids"/>
      <source>
        <context value="ddcc"/>
      </source>
      <target>
        <contextType value="variable"/>
        <variable value="pid"/>
        <transform value="uuid"/>
      </target>
      <target>
        <contextType value="variable"/>
        <variable value="compid"/>
        <transform value="uuid"/>
      </target>
      <target>
        <contextType value="variable"/>
        <variable value="iid"/>
        <transform value="uuid"/>
      </target>
      <target>
        <contextType value="variable"/>
        <variable value="irid"/>
        <transform value="uuid"/>
      </target>
      <target>
        <contextType value="variable"/>
        <variable value="qrwhoid"/>
        <transform value="uuid"/>
      </target>
      <target>
        <contextType value="variable"/>
        <variable value="qrdccid"/>
        <transform value="uuid"/>
      </target>
      <rule>
        <name value="create patient resource"/>
        <source>
          <context value="ddcc"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="entry"/>
        </target>
        <target>
          <context value="entry"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="urn:uuid:"/>
          </parameter>
          <parameter>
            <valueId value="pid"/>
          </parameter>
        </target>
        <target>
          <context value="entry"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PUT"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="append"/>
          <parameter>
            <valueString value="Patient/"/>
          </parameter>
          <parameter>
            <valueId value="pid"/>
          </parameter>
        </target>
        <target>
          <contextType value="variable"/>
          <variable value="patient"/>
          <transform value="create"/>
          <parameter>
            <valueString
                         value="http://smart.who.int/ddcc/StructureDefinition/DDCCPatient"/>
          </parameter>
        </target>
        <rule>
          <name value="setup patient"/>
          <source>
            <context value="ddcc"/>
          </source>
          <dependent>
            <name value="DDCCToPatient"/>
            <variable value="ddcc"/>
            <variable value="patient"/>
            <variable value="pid"/>
          </dependent>
        </rule>
        <rule>
          <name value="set patient resource"/>
          <source>
            <context value="ddcc"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="patient"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="create composition resource"/>
        <source>
          <context value="ddcc"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="entry"/>
        </target>
        <target>
          <context value="entry"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="urn:uuid:"/>
          </parameter>
          <parameter>
            <valueId value="compid"/>
          </parameter>
        </target>
        <target>
          <context value="entry"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PUT"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="append"/>
          <parameter>
            <valueString value="Composition/"/>
          </parameter>
          <parameter>
            <valueId value="compid"/>
          </parameter>
        </target>
        <target>
          <contextType value="variable"/>
          <variable value="comp"/>
          <transform value="create"/>
          <parameter>
            <valueString
                         value="http://smart.who.int/ddcc/StructureDefinition/DDCCVSComposition"/>
          </parameter>
        </target>
        <rule>
          <name value="setup composition"/>
          <source>
            <context value="ddcc"/>
          </source>
          <dependent>
            <name value="DDCCToComposition"/>
            <variable value="ddcc"/>
            <variable value="comp"/>
            <variable value="compid"/>
            <variable value="pid"/>
          </dependent>
        </rule>
        <rule>
          <name value="set category"/>
          <source>
            <context value="ddcc"/>
          </source>
          <target>
            <context value="comp"/>
            <contextType value="variable"/>
            <element value="category"/>
            <variable value="category"/>
          </target>
          <target>
            <context value="category"/>
            <contextType value="variable"/>
            <element value="coding"/>
            <variable value="coding"/>
          </target>
          <target>
            <context value="coding"/>
            <contextType value="variable"/>
            <element value="system"/>
            <transform value="copy"/>
            <parameter>
              <valueString
                           value="http://smart.who.int/ddcc/CodeSystem/DDCC-Composition-Category-CodeSystem"/>
            </parameter>
          </target>
          <target>
            <context value="coding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="ddcc-vs"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="set title"/>
          <source>
            <context value="ddcc"/>
          </source>
          <target>
            <context value="comp"/>
            <contextType value="variable"/>
            <element value="title"/>
            <transform value="copy"/>
            <parameter>
              <valueString
                           value="International Certificate of Vaccination or Prophylaxis"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="set section"/>
          <source>
            <context value="ddcc"/>
          </source>
          <target>
            <context value="comp"/>
            <contextType value="variable"/>
            <element value="section"/>
            <variable value="section"/>
          </target>
          <rule>
            <name value="set code"/>
            <source>
              <context value="ddcc"/>
            </source>
            <target>
              <context value="section"/>
              <contextType value="variable"/>
              <element value="code"/>
              <variable value="code"/>
            </target>
            <target>
              <context value="code"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <variable value="coding"/>
            </target>
            <target>
              <context value="coding"/>
              <contextType value="variable"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="http://loinc.org"/>
              </parameter>
            </target>
            <target>
              <context value="coding"/>
              <contextType value="variable"/>
              <element value="code"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="11369-6"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="set certificate"/>
            <source>
              <context value="ddcc"/>
              <element value="certificate"/>
              <variable value="certificate"/>
            </source>
            <rule>
              <name value="set author"/>
              <source>
                <context value="certificate"/>
                <element value="issuer"/>
                <variable value="issuer"/>
              </source>
              <target>
                <context value="section"/>
                <contextType value="variable"/>
                <element value="author"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="issuer"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="set focus"/>
            <source>
              <context value="ddcc"/>
            </source>
            <target>
              <context value="section"/>
              <contextType value="variable"/>
              <element value="focus"/>
              <variable value="focus"/>
            </target>
            <target>
              <context value="focus"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="append"/>
              <parameter>
                <valueString value="Immunization/"/>
              </parameter>
              <parameter>
                <valueId value="iid"/>
              </parameter>
            </target>
            <documentation
                           value="ddcc.certificate as certificate -&gt; section.author as author then {
            certificate.issuer as issuer then {
              issuer.identifier as pha -&gt; author.identifier as identifier, author.type = &quot;Organization&quot; then {
                pha.value as value -&gt; identifier.value = value &quot;set pha&quot;;
              } &quot;set author identifier&quot;;
            } &quot;set author ref&quot;;
            
          } &quot;set author&quot;;"/>
          </rule>
          <rule>
            <name value="add Immunization entry"/>
            <source>
              <context value="ddcc"/>
            </source>
            <target>
              <context value="section"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="entry"/>
            </target>
            <target>
              <context value="entry"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="append"/>
              <parameter>
                <valueString value="Immunization/"/>
              </parameter>
              <parameter>
                <valueId value="iid"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="add ImmunizationRecommendation entry"/>
            <source>
              <context value="ddcc"/>
            </source>
            <target>
              <context value="section"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="entry"/>
            </target>
            <target>
              <context value="entry"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="append"/>
              <parameter>
                <valueString value="ImmunizationRecommendation/"/>
              </parameter>
              <parameter>
                <valueId value="irid"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="add WHO QR entry"/>
            <source>
              <context value="ddcc"/>
            </source>
            <target>
              <context value="section"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="entry"/>
            </target>
            <target>
              <context value="entry"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="append"/>
              <parameter>
                <valueString value="DocumentReference/"/>
              </parameter>
              <parameter>
                <valueId value="qrwhoid"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="add DCC QR entry"/>
            <source>
              <context value="ddcc"/>
            </source>
            <target>
              <context value="section"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="entry"/>
            </target>
            <target>
              <context value="entry"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="append"/>
              <parameter>
                <valueString value="DocumentReference/"/>
              </parameter>
              <parameter>
                <valueId value="qrdccid"/>
              </parameter>
            </target>
          </rule>
        </rule>
        <rule>
          <name value="set composition resource"/>
          <source>
            <context value="ddcc"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="comp"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="create WHO QR Doc Ref"/>
        <source>
          <context value="ddcc"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="entry"/>
        </target>
        <target>
          <context value="entry"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="urn:uuid:"/>
          </parameter>
          <parameter>
            <valueId value="qrwhoid"/>
          </parameter>
        </target>
        <target>
          <context value="entry"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PUT"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="append"/>
          <parameter>
            <valueString value="DocumentReference/"/>
          </parameter>
          <parameter>
            <valueId value="qrwhoid"/>
          </parameter>
        </target>
        <target>
          <contextType value="variable"/>
          <variable value="qr"/>
          <transform value="create"/>
          <parameter>
            <valueString
                         value="http://smart.who.int/ddcc/StructureDefinition/DDCCDocumentReferenceQR"/>
          </parameter>
        </target>
        <rule>
          <name value="setup WHO DocRef"/>
          <source>
            <context value="ddcc"/>
          </source>
          <dependent>
            <name value="DDCCToDocumentReference"/>
            <variable value="ddcc"/>
            <variable value="qr"/>
            <variable value="qrwhoid"/>
            <variable value="pid"/>
          </dependent>
        </rule>
        <rule>
          <name value="set category"/>
          <source>
            <context value="ddcc"/>
          </source>
          <target>
            <context value="qr"/>
            <contextType value="variable"/>
            <element value="category"/>
            <variable value="category"/>
          </target>
          <target>
            <context value="category"/>
            <contextType value="variable"/>
            <element value="coding"/>
            <variable value="coding"/>
          </target>
          <target>
            <context value="coding"/>
            <contextType value="variable"/>
            <element value="system"/>
            <transform value="copy"/>
            <parameter>
              <valueString
                           value="http://smart.who.int/ddcc/CodeSystem/DDCC-QR-Category-Usage-CodeSystem"/>
            </parameter>
          </target>
          <target>
            <context value="coding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="who"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="set description"/>
          <source>
            <context value="ddcc"/>
          </source>
          <target>
            <context value="qr"/>
            <contextType value="variable"/>
            <element value="description"/>
            <transform value="copy"/>
            <parameter>
              <valueString
                           value="WHO QR code for COVID 19 Vaccine Certificate"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="set WHO QR"/>
          <source>
            <context value="ddcc"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="qr"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="create DCC QR Doc Ref"/>
        <source>
          <context value="ddcc"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="entry"/>
        </target>
        <target>
          <context value="entry"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="urn:uuid:"/>
          </parameter>
          <parameter>
            <valueId value="qrdccid"/>
          </parameter>
        </target>
        <target>
          <context value="entry"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PUT"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="append"/>
          <parameter>
            <valueString value="DocumentReference/"/>
          </parameter>
          <parameter>
            <valueId value="qrdccid"/>
          </parameter>
        </target>
        <target>
          <contextType value="variable"/>
          <variable value="qr"/>
          <transform value="create"/>
          <parameter>
            <valueString
                         value="http://smart.who.int/ddcc/StructureDefinition/DDCCDocumentReferenceQR"/>
          </parameter>
        </target>
        <rule>
          <name value="setup DCC DocRef"/>
          <source>
            <context value="ddcc"/>
          </source>
          <dependent>
            <name value="DDCCToDocumentReference"/>
            <variable value="ddcc"/>
            <variable value="qr"/>
            <variable value="qrdccid"/>
            <variable value="pid"/>
          </dependent>
        </rule>
        <rule>
          <name value="set category"/>
          <source>
            <context value="ddcc"/>
          </source>
          <target>
            <context value="qr"/>
            <contextType value="variable"/>
            <element value="category"/>
            <variable value="category"/>
          </target>
          <target>
            <context value="category"/>
            <contextType value="variable"/>
            <element value="coding"/>
            <variable value="coding"/>
          </target>
          <target>
            <context value="coding"/>
            <contextType value="variable"/>
            <element value="system"/>
            <transform value="copy"/>
            <parameter>
              <valueString
                           value="http://smart.who.int/ddcc/CodeSystem/DDCC-QR-Category-Usage-CodeSystem"/>
            </parameter>
          </target>
          <target>
            <context value="coding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="dcc"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="set description"/>
          <source>
            <context value="ddcc"/>
          </source>
          <target>
            <context value="qr"/>
            <contextType value="variable"/>
            <element value="description"/>
            <transform value="copy"/>
            <parameter>
              <valueString
                           value="DCC QR code for COVID 19 Vaccine Certificate"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="set DCC QR"/>
          <source>
            <context value="ddcc"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="qr"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="create immunization resource"/>
        <source>
          <context value="ddcc"/>
          <element value="vaccination"/>
          <listMode value="first"/>
          <variable value="vaccination"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="entry"/>
        </target>
        <target>
          <context value="entry"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="urn:uuid:"/>
          </parameter>
          <parameter>
            <valueId value="iid"/>
          </parameter>
        </target>
        <target>
          <context value="entry"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PUT"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="append"/>
          <parameter>
            <valueString value="Immunization/"/>
          </parameter>
          <parameter>
            <valueId value="iid"/>
          </parameter>
        </target>
        <target>
          <contextType value="variable"/>
          <variable value="immunization"/>
          <transform value="create"/>
          <parameter>
            <valueString
                         value="http://smart.who.int/ddcc/StructureDefinition/DDCCImmunization"/>
          </parameter>
        </target>
        <rule>
          <name value="setup immunization"/>
          <source>
            <context value="ddcc"/>
            <element value="certificate"/>
            <variable value="certificate"/>
          </source>
          <dependent>
            <name value="DDCCToImmunization"/>
            <variable value="vaccination"/>
            <variable value="immunization"/>
            <variable value="certificate"/>
            <variable value="iid"/>
            <variable value="pid"/>
          </dependent>
        </rule>
        <rule>
          <name value="set immunization resource"/>
          <source>
            <context value="ddcc"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="immunization"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="create immunization recommendation resource"/>
        <source>
          <context value="ddcc"/>
          <element value="vaccination"/>
          <listMode value="first"/>
          <variable value="vaccination"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="entry"/>
        </target>
        <target>
          <context value="entry"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="urn:uuid:"/>
          </parameter>
          <parameter>
            <valueId value="irid"/>
          </parameter>
        </target>
        <target>
          <context value="entry"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PUT"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="append"/>
          <parameter>
            <valueString value="ImmunizationRecommendation/"/>
          </parameter>
          <parameter>
            <valueId value="irid"/>
          </parameter>
        </target>
        <target>
          <contextType value="variable"/>
          <variable value="immrec"/>
          <transform value="create"/>
          <parameter>
            <valueString
                         value="http://smart.who.int/ddcc/StructureDefinition/DDCCImmunizationRecommendation"/>
          </parameter>
        </target>
        <rule>
          <name value="setup immunization recommendation"/>
          <source>
            <context value="vaccination"/>
          </source>
          <dependent>
            <name value="DDCCToImmRec"/>
            <variable value="vaccination"/>
            <variable value="immrec"/>
            <variable value="irid"/>
            <variable value="iid"/>
            <variable value="pid"/>
          </dependent>
        </rule>
        <rule>
          <name value="set immunization recommendation resource"/>
          <source>
            <context value="ddcc"/>
          </source>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="immrec"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="DDCCToImmunization"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="immunization"/>
      <type value="DDCCImmunization"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="certificate"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="iid"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="pid"/>
      <mode value="source"/>
    </input>
    <rule>
      <name value="set id"/>
      <source>
        <context value="iid"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="iid"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="set brand extension"/>
      <source>
        <context value="src"/>
        <element value="brand"/>
        <variable value="brand"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="extension"/>
        <variable value="ext"/>
      </target>
      <rule>
        <name value="set brand extension values"/>
        <source>
          <context value="brand"/>
        </source>
        <target>
          <context value="ext"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString
                         value="http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineBrand"/>
          </parameter>
        </target>
        <target>
          <context value="ext"/>
          <contextType value="variable"/>
          <element value="value"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="brand"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="set maholder extension"/>
      <source>
        <context value="src"/>
        <element value="maholder"/>
        <variable value="maholder"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="extension"/>
        <variable value="ext"/>
      </target>
      <rule>
        <name value="set MA Holder extension values"/>
        <source>
          <context value="maholder"/>
        </source>
        <target>
          <context value="ext"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString
                         value="http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineMarketAuthorization"/>
          </parameter>
        </target>
        <target>
          <context value="ext"/>
          <contextType value="variable"/>
          <element value="value"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="maholder"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="set country extension"/>
      <source>
        <context value="src"/>
        <element value="country"/>
        <variable value="country"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="extension"/>
        <variable value="ext"/>
      </target>
      <rule>
        <name value="set country extension values"/>
        <source>
          <context value="country"/>
          <element value="code"/>
          <variable value="code"/>
        </source>
        <target>
          <context value="ext"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString
                         value="http://smart.who.int/ddcc/StructureDefinition/DDCCCountryOfVaccination"/>
          </parameter>
        </target>
        <target>
          <context value="ext"/>
          <contextType value="variable"/>
          <element value="value"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="code"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="set vaccine valid extension"/>
      <source>
        <context value="src"/>
        <element value="validFrom"/>
        <variable value="validFrom"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="extension"/>
        <variable value="ext"/>
      </target>
      <rule>
        <name value="set valid from extension values"/>
        <source>
          <context value="validFrom"/>
        </source>
        <target>
          <context value="ext"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString
                         value="http://smart.who.int/ddcc/StructureDefinition/DDCCVaccineValidFrom"/>
          </parameter>
        </target>
        <target>
          <context value="ext"/>
          <contextType value="variable"/>
          <element value="value"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="validFrom"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="set status"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="status"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="completed"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="set vaccine"/>
      <source>
        <context value="src"/>
        <element value="vaccine"/>
        <variable value="vaccine"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="vaccineCode"/>
        <variable value="vacCode"/>
      </target>
      <target>
        <context value="vacCode"/>
        <contextType value="variable"/>
        <element value="coding"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="vaccine"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="set patient"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="patient"/>
        <variable value="patient"/>
      </target>
      <target>
        <context value="patient"/>
        <contextType value="variable"/>
        <element value="reference"/>
        <transform value="append"/>
        <parameter>
          <valueString value="Patient/"/>
        </parameter>
        <parameter>
          <valueId value="pid"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="set manufacturer identifier"/>
      <source>
        <context value="src"/>
        <element value="manufacturer"/>
        <variable value="manufacturer"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="manufacturer"/>
        <variable value="tman"/>
      </target>
      <target>
        <context value="tman"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="ident"/>
      </target>
      <rule>
        <name value="set system"/>
        <source>
          <context value="manufacturer"/>
          <element value="system"/>
          <variable value="system"/>
        </source>
        <target>
          <context value="ident"/>
          <contextType value="variable"/>
          <element value="system"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="system"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="set value"/>
        <source>
          <context value="manufacturer"/>
          <element value="code"/>
          <variable value="code"/>
        </source>
        <target>
          <context value="ident"/>
          <contextType value="variable"/>
          <element value="value"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="code"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="set lot number"/>
      <source>
        <context value="src"/>
        <element value="lot"/>
        <variable value="lot"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="lotNumber"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="lot"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="set occurrence date"/>
      <source>
        <context value="src"/>
        <element value="date"/>
        <variable value="date"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="occurrence"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="date"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="set location"/>
      <source>
        <context value="src"/>
        <element value="centre"/>
        <variable value="centre"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="location"/>
        <variable value="location"/>
      </target>
      <rule>
        <name value="set location display"/>
        <source>
          <context value="centre"/>
        </source>
        <target>
          <context value="location"/>
          <contextType value="variable"/>
          <element value="display"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="centre"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="set practitioner"/>
      <source>
        <context value="src"/>
        <element value="practitioner"/>
        <variable value="practitioner"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="performer"/>
        <variable value="performer"/>
      </target>
      <rule>
        <name value="set performer"/>
        <source>
          <context value="practitioner"/>
          <element value="value"/>
          <variable value="hw"/>
        </source>
        <target>
          <context value="performer"/>
          <contextType value="variable"/>
          <element value="actor"/>
          <variable value="actor"/>
        </target>
        <rule>
          <name value="set actor"/>
          <source>
            <context value="hw"/>
          </source>
          <target>
            <context value="actor"/>
            <contextType value="variable"/>
            <element value="type"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Practitioner"/>
            </parameter>
          </target>
          <target>
            <context value="actor"/>
            <contextType value="variable"/>
            <element value="identifier"/>
            <variable value="identifier"/>
          </target>
          <rule>
            <name value="set hw identifier"/>
            <source>
              <context value="hw"/>
            </source>
            <target>
              <context value="identifier"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="hw"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="set protocolApplied"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="immunization"/>
        <contextType value="variable"/>
        <element value="protocolApplied"/>
        <variable value="protocol"/>
      </target>
      <rule>
        <name value="set authority"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="protocol"/>
          <contextType value="variable"/>
          <element value="authority"/>
          <variable value="authority"/>
        </target>
        <rule>
          <name value="set issuer"/>
          <source>
            <context value="certificate"/>
            <element value="issuer"/>
            <variable value="issuer"/>
          </source>
          <target>
            <context value="authority"/>
            <contextType value="variable"/>
            <element value="type"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Organization"/>
            </parameter>
          </target>
          <rule>
            <name value="set issuer identifier"/>
            <source>
              <context value="issuer"/>
              <element value="identifier"/>
              <variable value="pha"/>
            </source>
            <target>
              <context value="authority"/>
              <contextType value="variable"/>
              <element value="identifier"/>
              <variable value="identifier"/>
            </target>
            <rule>
              <name value="set pha"/>
              <source>
                <context value="pha"/>
                <element value="value"/>
                <variable value="value"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="value"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="set target disease"/>
        <source>
          <context value="src"/>
          <element value="disease"/>
          <variable value="disease"/>
        </source>
        <target>
          <context value="protocol"/>
          <contextType value="variable"/>
          <element value="targetDisease"/>
          <variable value="tdisease"/>
        </target>
        <rule>
          <name value="set target disease code"/>
          <source>
            <context value="disease"/>
          </source>
          <target>
            <context value="tdisease"/>
            <contextType value="variable"/>
            <element value="coding"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="disease"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="set dose number"/>
        <source>
          <context value="src"/>
          <element value="dose"/>
          <variable value="dose"/>
        </source>
        <target>
          <context value="protocol"/>
          <contextType value="variable"/>
          <element value="doseNumber"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="dose"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="set total doses"/>
        <source>
          <context value="src"/>
          <element value="totalDoses"/>
          <variable value="totalDoses"/>
        </source>
        <target>
          <context value="protocol"/>
          <contextType value="variable"/>
          <element value="seriesDoses"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="totalDoses"/>
          </parameter>
        </target>
      </rule>
    </rule>
  </group>
  <group>
    <name value="DDCCToImmRec"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="immrec"/>
      <type value="DDCCImmunizationRecommendation"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="irid"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="iid"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="pid"/>
      <mode value="source"/>
    </input>
    <rule>
      <name value="set date"/>
      <source>
        <context value="src"/>
        <element value="date"/>
        <variable value="date"/>
      </source>
      <target>
        <context value="immrec"/>
        <contextType value="variable"/>
        <element value="date"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="date"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="set patient"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="immrec"/>
        <contextType value="variable"/>
        <element value="patient"/>
        <variable value="patient"/>
      </target>
      <target>
        <context value="patient"/>
        <contextType value="variable"/>
        <element value="reference"/>
        <transform value="append"/>
        <parameter>
          <valueString value="Patient/"/>
        </parameter>
        <parameter>
          <valueId value="pid"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="set recommendation"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="immrec"/>
        <contextType value="variable"/>
        <element value="recommendation"/>
        <variable value="rec"/>
      </target>
      <rule>
        <name value="set vaccine code"/>
        <source>
          <context value="src"/>
          <element value="vaccine"/>
          <variable value="vaccine"/>
        </source>
        <target>
          <context value="rec"/>
          <contextType value="variable"/>
          <element value="vaccineCode"/>
          <variable value="vaccineCode"/>
        </target>
        <rule>
          <name value="set vaccine code coding"/>
          <source>
            <context value="vaccine"/>
          </source>
          <target>
            <context value="vaccineCode"/>
            <contextType value="variable"/>
            <element value="coding"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="vaccine"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="set target disease"/>
        <source>
          <context value="src"/>
          <element value="disease"/>
          <variable value="disease"/>
        </source>
        <target>
          <context value="rec"/>
          <contextType value="variable"/>
          <element value="targetDisease"/>
          <variable value="targetDisease"/>
        </target>
        <rule>
          <name value="set target disease coding"/>
          <source>
            <context value="disease"/>
          </source>
          <target>
            <context value="targetDisease"/>
            <contextType value="variable"/>
            <element value="coding"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="disease"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="set forecast status"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="rec"/>
          <contextType value="variable"/>
          <element value="forecastStatus"/>
          <variable value="forecast"/>
        </target>
        <rule>
          <name value="set forecast status coding"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="forecast"/>
            <contextType value="variable"/>
            <element value="coding"/>
            <variable value="coding"/>
          </target>
          <rule>
            <name value="set forecast system"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="coding"/>
              <contextType value="variable"/>
              <element value="system"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="http://terminology.hl7.org/2.1.0/CodeSystem-immunization-recommendation-status.html"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="set forecast code"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="coding"/>
              <contextType value="variable"/>
              <element value="code"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="due"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="set date criterion"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="rec"/>
          <contextType value="variable"/>
          <element value="dateCriterion"/>
          <variable value="due_date"/>
        </target>
        <rule>
          <name value="set due date code"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="due_date"/>
            <contextType value="variable"/>
            <element value="code"/>
            <variable value="code"/>
          </target>
          <rule>
            <name value="set due date code coding"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="code"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <variable value="coding"/>
            </target>
            <rule>
              <name value="set due date code system"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="http://loinc.org"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="set due date code code"/>
              <source>
                <context value="src"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="code"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="30980-7"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="set due date value"/>
          <source>
            <context value="src"/>
            <element value="nextDose"/>
            <variable value="nextDose"/>
          </source>
          <target>
            <context value="due_date"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="nextDose"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="set dose number"/>
        <source>
          <context value="src"/>
          <element value="dose"/>
          <variable value="dose"/>
        </source>
        <target>
          <context value="rec"/>
          <contextType value="variable"/>
          <element value="doseNumber"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString value="dose.toInteger() + 1"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="set total doses"/>
        <source>
          <context value="src"/>
          <element value="totalDoses"/>
          <variable value="totalDoses"/>
        </source>
        <target>
          <context value="rec"/>
          <contextType value="variable"/>
          <element value="seriesDoses"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="totalDoses"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="set supporting immunization"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="rec"/>
          <contextType value="variable"/>
          <element value="supportingImmunization"/>
          <variable value="imm"/>
        </target>
        <target>
          <context value="imm"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="append"/>
          <parameter>
            <valueString value="Immunization/"/>
          </parameter>
          <parameter>
            <valueId value="iid"/>
          </parameter>
        </target>
      </rule>
    </rule>
  </group>
</StructureMap>