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

Draft as of 2024-01-19

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