@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://smart.who.int/ddcc/StructureMap/SHCToCoreDataSetVS> a fhir:StructureMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "SHCToCoreDataSetVS"] ; # 
  fhir:meta [
     fhir:versionId [ fhir:v "11" ] ;
     fhir:lastUpdated [ fhir:v "2023-02-15T20:22:07.304+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/SHCToCoreDataSetVS&quot; = &quot;SHCToCoreDataSetVS&quot;\r\n\r\n\r\nuses &quot;http://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-vaccination-bundle-dm&quot; alias SHCVaccinationBundleDM as source\r\nuses &quot;http://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-patient-general-dm&quot; alias SHCPatientDM as source\r\nuses &quot;http://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-vaccination-dm&quot; alias SHCImmunizationDM as source\r\nuses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; alias DDCCBundle as target\r\nuses &quot;http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSet.VS&quot; alias DDCCVS as produced\r\n\r\ngroup SHCToVS(source shc : SHCVaccinationBundleDM, target ddccBundle : DDCCBundle) {\r\n  shc.entry as patientEntrySHC then {\r\n    patientEntrySHC.resource : Patient first as patient then {\r\n      shc.entry as entry then {\r\n        // entry.resource : Immunization as immunization where vaccineCode.memberOf('http://smart.who.int/ddcc/ValueSet/who-ddcc-allowed-vaccines-covid-19') -&gt;  ddccBundle.entry as outentry,  create('http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSet.VS') as ddcc then {\r\n        entry.resource : Immunization as immunization -&gt;  ddccBundle.entry as outentry,  create('http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSet.VS') as ddcc then {\r\n          immunization then PatientToDDCCVS(patient, ddcc) &quot;set patient&quot;;\r\n          immunization -&gt; ddcc.vaccination as vaccination then ImmunizationToDDCC(immunization, vaccination) &quot;set vaccination&quot;;\r\n          immunization -&gt; outentry.resource = ddcc &quot;set outentry&quot;;\r\n        } &quot;immunizations&quot;;\r\n      } &quot;entries&quot;;\r\n    } &quot;get patient&quot;;\r\n  } &quot;find patient&quot;;\r\n}\r\n\r\ngroup PatientToDDCCVS(source patient : SHCPatientDM, target tgt : DDCCVS) {\r\n  patient.name as name then NameToText(name, tgt) &quot;set name&quot;;\r\n  patient.birthDate as birthDate -&gt; tgt.birthDate = birthDate &quot;set birthDate&quot;;\r\n  patient.identifier first as identifier -&gt; tgt.identifier = identifier &quot;set identifier&quot;;\r\n}\r\n\r\ngroup NameToText(source name : HumanName, target ddcc) {\r\n  // append doesn't work until ddcc.name is set\r\n  name.given first as given -&gt; ddcc.name = (given.replaceMatches('$', ' ')) &quot;set first name&quot;;\r\n  // name.given not_first as other -&gt; ddcc.name as tName, ddcc.name = append( tName, other ) &quot;set other names&quot;;\r\n  name.given not_first as other -&gt;  ddcc.name as tName,  (other.replaceMatches('$', ' ')) as spaced,  ddcc.name = append(tName, spaced) &quot;set other names&quot;;\r\n  name.family as family -&gt;  ddcc.name as tName,  ddcc.name = append(tName, family) &quot;add family name&quot;;\r\n  name.text as text -&gt; ddcc.name = text &quot;set full name&quot;;\r\n}\r\n\r\ngroup ImmunizationToDDCC(source immunization : SHCImmunizationDM, target vaccination) {\r\n  immunization.vaccineCode as vaccine then {\r\n    vaccine.coding as coding then {\r\n      coding -&gt; vaccination.vaccine = coding &quot;set default vaccine&quot;;\r\n      coding -&gt; vaccination.brand = coding &quot;set default brand&quot;;\r\n      coding where coding.memberOf('http://smart.who.int/ddcc/ValueSet/vaccine-covid19-cvx') -&gt; vaccination.vaccine = translate(coding, 'http://smart.who.int/ddcc/ConceptMap/vaccine-covid19-cvx-to-icd11', 'Coding') &quot;translate COVID CVX vaccine&quot;;\r\n      coding where coding.memberOf('http://smart.who.int/ddcc/ValueSet/vaccine-covid19-snomed') -&gt; vaccination.vaccine = translate(coding, 'http://smart.who.int/ddcc/ConceptMap/vaccine-covid19-snomed-to-icd11', 'Coding') &quot;translate COVID SNOMED vaccine&quot;;\r\n    };\r\n  };\r\n  immunization.manufacturer as tman then {\r\n    tman.identifier as identifier -&gt; vaccination.manufacturer as manufacturer then {\r\n      identifier.system as system -&gt; manufacturer.system = system &quot;set manufacturer system&quot;;\r\n      identifier.value as value -&gt; manufacturer.code = value &quot;set manufacturer value&quot;;\r\n    } &quot;set manufacturer id&quot;;\r\n  };\r\n  immunization.lotNumber as lot -&gt; vaccination.lot = lot &quot;set lot&quot;;\r\n  immunization.occurrence as date -&gt; vaccination.date = date &quot;set date&quot;;\r\n  immunization.performer as performer then {\r\n    performer.actor as actor then {\r\n      actor.display as centre -&gt; vaccination.centre = centre &quot;set centre&quot;;\r\n    };\r\n  };\r\n}\r\n\r\n</pre></div>"
  ] ; # 
  fhir:url [ fhir:v "http://smart.who.int/ddcc/StructureMap/SHCToCoreDataSetVS"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "1.0.0"] ; # 
  fhir:name [ fhir:v "SHCToCoreDataSetVS"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:date [ fhir:v "2023-11-07T06:07:49+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://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-vaccination-bundle-dm"^^xsd:anyURI ;
       fhir:link <http://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-vaccination-bundle-dm>
     ] ;
     fhir:mode [ fhir:v "source" ] ;
     fhir:alias [ fhir:v "SHCVaccinationBundleDM" ]
  ] [
     fhir:url [
       fhir:v "http://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-patient-general-dm"^^xsd:anyURI ;
       fhir:link <http://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-patient-general-dm>
     ] ;
     fhir:mode [ fhir:v "source" ] ;
     fhir:alias [ fhir:v "SHCPatientDM" ]
  ] [
     fhir:url [
       fhir:v "http://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-vaccination-dm"^^xsd:anyURI ;
       fhir:link <http://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-vaccination-dm>
     ] ;
     fhir:mode [ fhir:v "source" ] ;
     fhir:alias [ fhir:v "SHCImmunizationDM" ]
  ] [
     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 "DDCCBundle" ]
  ] [
     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 "produced" ] ;
     fhir:alias [ fhir:v "DDCCVS" ]
  ] ) ; # 
  fhir:group ( [
     fhir:name [ fhir:v "SHCToVS" ] ;
     fhir:typeMode [ fhir:v "none" ] ;
     fhir:input ( [
       fhir:name [ fhir:v "shc" ] ;
       fhir:type [ fhir:v "SHCVaccinationBundleDM" ] ;
       fhir:mode [ fhir:v "source" ]
     ] [
       fhir:name [ fhir:v "ddccBundle" ] ;
       fhir:type [ fhir:v "DDCCBundle" ] ;
       fhir:mode [ fhir:v "target" ]
     ] ) ;
     fhir:rule ( [
       fhir:name [ fhir:v "find patient" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "shc" ] ;
         fhir:element [ fhir:v "entry" ] ;
         fhir:variable [ fhir:v "patientEntrySHC" ]
       ] ) ;
       fhir:rule ( [
         fhir:name [ fhir:v "get patient" ] ;
         fhir:source ( [
           fhir:context [ fhir:v "patientEntrySHC" ] ;
           fhir:type [ fhir:v "Patient" ] ;
           fhir:element [ fhir:v "resource" ] ;
           fhir:listMode [ fhir:v "first" ] ;
           fhir:variable [ fhir:v "patient" ]
         ] ) ;
         fhir:rule ( [
           fhir:name [ fhir:v "entries" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "shc" ] ;
             fhir:element [ fhir:v "entry" ] ;
             fhir:variable [ fhir:v "entry" ]
           ] ) ;
           fhir:rule ( [
             fhir:name [ fhir:v "immunizations" ] ;
             fhir:source ( [
               fhir:context [ fhir:v "entry" ] ;
               fhir:type [ fhir:v "Immunization" ] ;
               fhir:element [ fhir:v "resource" ] ;
               fhir:variable [ fhir:v "immunization" ]
             ] ) ;
             fhir:target ( [
               fhir:context [ fhir:v "ddccBundle" ] ;
               fhir:contextType [ fhir:v "variable" ] ;
               fhir:element [ fhir:v "entry" ] ;
               fhir:variable [ fhir:v "outentry" ]
             ] [
               fhir:contextType [ fhir:v "variable" ] ;
               fhir:variable [ fhir:v "ddcc" ] ;
               fhir:transform [ fhir:v "create" ] ;
               fhir:parameter ( [
                 fhir:value [ fhir:v "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSet.VS" ]
               ] )
             ] ) ;
             fhir:rule ( [
               fhir:name [ fhir:v "set patient" ] ;
               fhir:source ( [
                 fhir:context [ fhir:v "immunization" ]
               ] ) ;
               fhir:dependent ( [
                 fhir:name [ fhir:v "PatientToDDCCVS" ] ;
                 fhir:variable ( [ fhir:v "patient" ] [ fhir:v "ddcc" ] )
               ] )
             ] [
               fhir:name [ fhir:v "set vaccination" ] ;
               fhir:source ( [
                 fhir:context [ fhir:v "immunization" ]
               ] ) ;
               fhir:target ( [
                 fhir:context [ fhir:v "ddcc" ] ;
                 fhir:contextType [ fhir:v "variable" ] ;
                 fhir:element [ fhir:v "vaccination" ] ;
                 fhir:variable [ fhir:v "vaccination" ]
               ] ) ;
               fhir:dependent ( [
                 fhir:name [ fhir:v "ImmunizationToDDCC" ] ;
                 fhir:variable ( [ fhir:v "immunization" ] [ fhir:v "vaccination" ] )
               ] )
             ] [
               fhir:name [ fhir:v "set outentry" ] ;
               fhir:source ( [
                 fhir:context [ fhir:v "immunization" ]
               ] ) ;
               fhir:target ( [
                 fhir:context [ fhir:v "outentry" ] ;
                 fhir:contextType [ fhir:v "variable" ] ;
                 fhir:element [ fhir:v "resource" ] ;
                 fhir:transform [ fhir:v "copy" ] ;
                 fhir:parameter ( [
                   fhir:value [ fhir:v "ddcc" ]
                 ] )
               ] )
             ] ) ;
             fhir:documentation [ fhir:v "entry.resource : Immunization as immunization where vaccineCode.memberOf('http://smart.who.int/ddcc/ValueSet/who-ddcc-allowed-vaccines-covid-19') ->  ddccBundle.entry as outentry,  create('http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSet.VS') as ddcc then {" ]
           ] )
         ] )
       ] )
     ] )
  ] [
     fhir:name [ fhir:v "PatientToDDCCVS" ] ;
     fhir:typeMode [ fhir:v "none" ] ;
     fhir:input ( [
       fhir:name [ fhir:v "patient" ] ;
       fhir:type [ fhir:v "SHCPatientDM" ] ;
       fhir:mode [ fhir:v "source" ]
     ] [
       fhir:name [ fhir:v "tgt" ] ;
       fhir:type [ fhir:v "DDCCVS" ] ;
       fhir:mode [ fhir:v "target" ]
     ] ) ;
     fhir:rule ( [
       fhir:name [ fhir:v "set name" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "patient" ] ;
         fhir:element [ fhir:v "name" ] ;
         fhir:variable [ fhir:v "name" ]
       ] ) ;
       fhir:dependent ( [
         fhir:name [ fhir:v "NameToText" ] ;
         fhir:variable ( [ fhir:v "name" ] [ fhir:v "tgt" ] )
       ] )
     ] [
       fhir:name [ fhir:v "set birthDate" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "patient" ] ;
         fhir:element [ fhir:v "birthDate" ] ;
         fhir:variable [ fhir:v "birthDate" ]
       ] ) ;
       fhir:target ( [
         fhir:context [ fhir:v "tgt" ] ;
         fhir:contextType [ fhir:v "variable" ] ;
         fhir:element [ fhir:v "birthDate" ] ;
         fhir:transform [ fhir:v "copy" ] ;
         fhir:parameter ( [
           fhir:value [ fhir:v "birthDate" ]
         ] )
       ] )
     ] [
       fhir:name [ fhir:v "set identifier" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "patient" ] ;
         fhir:element [ fhir:v "identifier" ] ;
         fhir:listMode [ fhir:v "first" ] ;
         fhir:variable [ fhir:v "identifier" ]
       ] ) ;
       fhir:target ( [
         fhir:context [ fhir:v "tgt" ] ;
         fhir:contextType [ fhir:v "variable" ] ;
         fhir:element [ fhir:v "identifier" ] ;
         fhir:transform [ fhir:v "copy" ] ;
         fhir:parameter ( [
           fhir:value [ fhir:v "identifier" ]
         ] )
       ] )
     ] )
  ] [
     fhir:name [ fhir:v "NameToText" ] ;
     fhir:typeMode [ fhir:v "none" ] ;
     fhir:input ( [
       fhir:name [ fhir:v "name" ] ;
       fhir:type [ fhir:v "HumanName" ] ;
       fhir:mode [ fhir:v "source" ]
     ] [
       fhir:name [ fhir:v "ddcc" ] ;
       fhir:mode [ fhir:v "target" ]
     ] ) ;
     fhir:rule ( [
       fhir:name [ fhir:v "set first name" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "name" ] ;
         fhir:element [ fhir:v "given" ] ;
         fhir:listMode [ fhir:v "first" ] ;
         fhir:variable [ fhir:v "given" ]
       ] ) ;
       fhir:target ( [
         fhir:context [ fhir:v "ddcc" ] ;
         fhir:contextType [ fhir:v "variable" ] ;
         fhir:element [ fhir:v "name" ] ;
         fhir:transform [ fhir:v "evaluate" ] ;
         fhir:parameter ( [
           fhir:value [ fhir:v "given.replaceMatches('$', ' ')" ]
         ] )
       ] ) ;
       fhir:documentation [ fhir:v "append doesn't work until ddcc.name is set" ]
     ] [
       fhir:name [ fhir:v "set other names" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "name" ] ;
         fhir:element [ fhir:v "given" ] ;
         fhir:listMode [ fhir:v "not_first" ] ;
         fhir:variable [ fhir:v "other" ]
       ] ) ;
       fhir:target ( [
         fhir:context [ fhir:v "ddcc" ] ;
         fhir:contextType [ fhir:v "variable" ] ;
         fhir:element [ fhir:v "name" ] ;
         fhir:variable [ fhir:v "tName" ]
       ] [
         fhir:contextType [ fhir:v "variable" ] ;
         fhir:variable [ fhir:v "spaced" ] ;
         fhir:transform [ fhir:v "evaluate" ] ;
         fhir:parameter ( [
           fhir:value [ fhir:v "other.replaceMatches('$', ' ')" ]
         ] )
       ] [
         fhir:context [ fhir:v "ddcc" ] ;
         fhir:contextType [ fhir:v "variable" ] ;
         fhir:element [ fhir:v "name" ] ;
         fhir:transform [ fhir:v "append" ] ;
         fhir:parameter ( [
           fhir:value [ fhir:v "tName" ]
         ] [
           fhir:value [ fhir:v "spaced" ]
         ] )
       ] ) ;
       fhir:documentation [ fhir:v "name.given not_first as other -> ddcc.name as tName, ddcc.name = append( tName, other ) \"set other names\";" ]
     ] [
       fhir:name [ fhir:v "add family name" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "name" ] ;
         fhir:element [ fhir:v "family" ] ;
         fhir:variable [ fhir:v "family" ]
       ] ) ;
       fhir:target ( [
         fhir:context [ fhir:v "ddcc" ] ;
         fhir:contextType [ fhir:v "variable" ] ;
         fhir:element [ fhir:v "name" ] ;
         fhir:variable [ fhir:v "tName" ]
       ] [
         fhir:context [ fhir:v "ddcc" ] ;
         fhir:contextType [ fhir:v "variable" ] ;
         fhir:element [ fhir:v "name" ] ;
         fhir:transform [ fhir:v "append" ] ;
         fhir:parameter ( [
           fhir:value [ fhir:v "tName" ]
         ] [
           fhir:value [ fhir:v "family" ]
         ] )
       ] )
     ] [
       fhir:name [ fhir:v "set full name" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "name" ] ;
         fhir:element [ fhir:v "text" ] ;
         fhir:variable [ fhir:v "text" ]
       ] ) ;
       fhir:target ( [
         fhir:context [ fhir:v "ddcc" ] ;
         fhir:contextType [ fhir:v "variable" ] ;
         fhir:element [ fhir:v "name" ] ;
         fhir:transform [ fhir:v "copy" ] ;
         fhir:parameter ( [
           fhir:value [ fhir:v "text" ]
         ] )
       ] )
     ] )
  ] [
     fhir:name [ fhir:v "ImmunizationToDDCC" ] ;
     fhir:typeMode [ fhir:v "none" ] ;
     fhir:input ( [
       fhir:name [ fhir:v "immunization" ] ;
       fhir:type [ fhir:v "SHCImmunizationDM" ] ;
       fhir:mode [ fhir:v "source" ]
     ] [
       fhir:name [ fhir:v "vaccination" ] ;
       fhir:mode [ fhir:v "target" ]
     ] ) ;
     fhir:rule ( [
       fhir:name [ fhir:v "vaccineCode" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "immunization" ] ;
         fhir:element [ fhir:v "vaccineCode" ] ;
         fhir:variable [ fhir:v "vaccine" ]
       ] ) ;
       fhir:rule ( [
         fhir:name [ fhir:v "coding" ] ;
         fhir:source ( [
           fhir:context [ fhir:v "vaccine" ] ;
           fhir:element [ fhir:v "coding" ] ;
           fhir:variable [ fhir:v "coding" ]
         ] ) ;
         fhir:rule ( [
           fhir:name [ fhir:v "set default vaccine" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "coding" ]
           ] ) ;
           fhir:target ( [
             fhir:context [ fhir:v "vaccination" ] ;
             fhir:contextType [ fhir:v "variable" ] ;
             fhir:element [ fhir:v "vaccine" ] ;
             fhir:transform [ fhir:v "copy" ] ;
             fhir:parameter ( [
               fhir:value [ fhir:v "coding" ]
             ] )
           ] )
         ] [
           fhir:name [ fhir:v "set default brand" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "coding" ]
           ] ) ;
           fhir:target ( [
             fhir:context [ fhir:v "vaccination" ] ;
             fhir:contextType [ fhir:v "variable" ] ;
             fhir:element [ fhir:v "brand" ] ;
             fhir:transform [ fhir:v "copy" ] ;
             fhir:parameter ( [
               fhir:value [ fhir:v "coding" ]
             ] )
           ] )
         ] [
           fhir:name [ fhir:v "translate COVID CVX vaccine" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "coding" ] ;
             fhir:condition [ fhir:v "coding.memberOf('http://smart.who.int/ddcc/ValueSet/vaccine-covid19-cvx')" ]
           ] ) ;
           fhir:target ( [
             fhir:context [ fhir:v "vaccination" ] ;
             fhir:contextType [ fhir:v "variable" ] ;
             fhir:element [ fhir:v "vaccine" ] ;
             fhir:transform [ fhir:v "translate" ] ;
             fhir:parameter ( [
               fhir:value [ fhir:v "coding" ]
             ] [
               fhir:value [ fhir:v "http://smart.who.int/ddcc/ConceptMap/vaccine-covid19-cvx-to-icd11" ]
             ] [
               fhir:value [ fhir:v "Coding" ]
             ] )
           ] )
         ] [
           fhir:name [ fhir:v "translate COVID SNOMED vaccine" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "coding" ] ;
             fhir:condition [ fhir:v "coding.memberOf('http://smart.who.int/ddcc/ValueSet/vaccine-covid19-snomed')" ]
           ] ) ;
           fhir:target ( [
             fhir:context [ fhir:v "vaccination" ] ;
             fhir:contextType [ fhir:v "variable" ] ;
             fhir:element [ fhir:v "vaccine" ] ;
             fhir:transform [ fhir:v "translate" ] ;
             fhir:parameter ( [
               fhir:value [ fhir:v "coding" ]
             ] [
               fhir:value [ fhir:v "http://smart.who.int/ddcc/ConceptMap/vaccine-covid19-snomed-to-icd11" ]
             ] [
               fhir:value [ fhir:v "Coding" ]
             ] )
           ] )
         ] )
       ] )
     ] [
       fhir:name [ fhir:v "manufacturer" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "immunization" ] ;
         fhir:element [ fhir:v "manufacturer" ] ;
         fhir:variable [ fhir:v "tman" ]
       ] ) ;
       fhir:rule ( [
         fhir:name [ fhir:v "set manufacturer id" ] ;
         fhir:source ( [
           fhir:context [ fhir:v "tman" ] ;
           fhir:element [ fhir:v "identifier" ] ;
           fhir:variable [ fhir:v "identifier" ]
         ] ) ;
         fhir:target ( [
           fhir:context [ fhir:v "vaccination" ] ;
           fhir:contextType [ fhir:v "variable" ] ;
           fhir:element [ fhir:v "manufacturer" ] ;
           fhir:variable [ fhir:v "manufacturer" ]
         ] ) ;
         fhir:rule ( [
           fhir:name [ fhir:v "set manufacturer system" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "identifier" ] ;
             fhir:element [ fhir:v "system" ] ;
             fhir:variable [ fhir:v "system" ]
           ] ) ;
           fhir:target ( [
             fhir:context [ fhir:v "manufacturer" ] ;
             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 manufacturer value" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "identifier" ] ;
             fhir:element [ fhir:v "value" ] ;
             fhir:variable [ fhir:v "value" ]
           ] ) ;
           fhir:target ( [
             fhir:context [ fhir:v "manufacturer" ] ;
             fhir:contextType [ fhir:v "variable" ] ;
             fhir:element [ fhir:v "code" ] ;
             fhir:transform [ fhir:v "copy" ] ;
             fhir:parameter ( [
               fhir:value [ fhir:v "value" ]
             ] )
           ] )
         ] )
       ] )
     ] [
       fhir:name [ fhir:v "set lot" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "immunization" ] ;
         fhir:element [ fhir:v "lotNumber" ] ;
         fhir:variable [ fhir:v "lot" ]
       ] ) ;
       fhir:target ( [
         fhir:context [ fhir:v "vaccination" ] ;
         fhir:contextType [ fhir:v "variable" ] ;
         fhir:element [ fhir:v "lot" ] ;
         fhir:transform [ fhir:v "copy" ] ;
         fhir:parameter ( [
           fhir:value [ fhir:v "lot" ]
         ] )
       ] )
     ] [
       fhir:name [ fhir:v "set date" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "immunization" ] ;
         fhir:element [ fhir:v "occurrence" ] ;
         fhir:variable [ fhir:v "date" ]
       ] ) ;
       fhir:target ( [
         fhir:context [ fhir:v "vaccination" ] ;
         fhir:contextType [ fhir:v "variable" ] ;
         fhir:element [ fhir:v "date" ] ;
         fhir:transform [ fhir:v "copy" ] ;
         fhir:parameter ( [
           fhir:value [ fhir:v "date" ]
         ] )
       ] )
     ] [
       fhir:name [ fhir:v "performer" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "immunization" ] ;
         fhir:element [ fhir:v "performer" ] ;
         fhir:variable [ fhir:v "performer" ]
       ] ) ;
       fhir:rule ( [
         fhir:name [ fhir:v "actor" ] ;
         fhir:source ( [
           fhir:context [ fhir:v "performer" ] ;
           fhir:element [ fhir:v "actor" ] ;
           fhir:variable [ fhir:v "actor" ]
         ] ) ;
         fhir:rule ( [
           fhir:name [ fhir:v "set centre" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "actor" ] ;
             fhir:element [ fhir:v "display" ] ;
             fhir:variable [ fhir:v "centre" ]
           ] ) ;
           fhir:target ( [
             fhir:context [ fhir:v "vaccination" ] ;
             fhir:contextType [ fhir:v "variable" ] ;
             fhir:element [ fhir:v "centre" ] ;
             fhir:transform [ fhir:v "copy" ] ;
             fhir:parameter ( [
               fhir:value [ fhir:v "centre" ]
             ] )
           ] )
         ] )
       ] )
     ] )
  ] ) . # 

# -------------------------------------------------------------------------------------

