CDA to FHIR Maps
0.1.0 - ci-build Italy flag

CDA to FHIR Maps, published by HL7 Italy. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/hl7-it/cda2fhir/ and changes regularly. See the Directory of published versions

: CDA to FHIR - VAC - TTL Representation

Draft as of 2024-09-15

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 "cda2fhirVaccination"] ; # 
  fhir:text [
fhir:status [ fhir:v "generated" ] ;
fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n         <pre>map &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirVaccination&quot; = &quot;cda2fhirVaccination&quot;\n\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument&quot; alias ClinicalDocument as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor&quot; alias AssignedAuthor as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity&quot; alias AssignedEntity as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity&quot; alias AssociatedEntity as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization&quot; alias CustodianOrganization as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf&quot; alias OrganizationPartOf as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Organization&quot; alias rapresentedOrganization as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Section&quot; alias Section as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/PatientRole&quot; alias PatientRole as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AD&quot; alias AD as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; alias Bundle as target\nuses &quot;http://hl7.org/fhir/StructureDefinition/Composition&quot; alias Composition as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Patient&quot; alias Patient as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Encounter&quot; alias Encounter as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Person&quot; alias Patient as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Practitioner&quot; alias Practitioner as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Organization&quot; alias Organization as produced\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Act&quot; alias Act as produced\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ&quot; alias IVL_PQ as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/PQ&quot; alias PQ as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/SimpleQuantity&quot; alias SimpleQuantity as target\nuses &quot;http://hl7.org/fhir/StructureDefinition/Immunization&quot; alias Immunization as target\n\nimports &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes&quot;\nimports &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader&quot;\n\ngroup CdaToBundle(source cda : ClinicalDocument, target bundle : Bundle) {\n  cda -&gt;  bundle.entry as e,  e.request = create('BackboneElement') as request,  request.method = 'POST',  e.resource = create('Composition') as composition,  composition.id = uuid() as uuid1,  e.fullUrl = append('https://example/Composition/', uuid1),  request.url = 'Composition',  bundle.entry as e2,  e2.request = create('BackboneElement') as requestPAT,  requestPAT.method = 'PUT',  e2.resource = create('Patient') as patient,  patient.id = uuid() as uuid2,  e2.fullUrl = append('https://example/Patient/', uuid2),  bundle.entry as e3,  e3.request = create('BackboneElement') as request,  request.method = 'POST',  e3.resource = create('Encounter') as encounter,  encounter.id = uuid() as uuid3,  e3.fullUrl = append('https://example/Encounter/', uuid3),  request.url = 'Encounter',  bundle.entry as e5,  e5.request = create('BackboneElement') as request,  request.method = 'POST',  e5.resource = create('DocumentReference') as DocumentReference,  DocumentReference.id = uuid() as uuid5,  e5.fullUrl = append('https://example/DocumentReference/', uuid5),  request.url = 'DocumentReference' then {\n    cda then ClinicalDocumentToBundle(cda, patient, composition, encounter, bundle, DocumentReference) &quot;cdatobundle&quot;;\n    cda.recordTarget as recordTarget then {\n      recordTarget.patientRole as patient then {\n        patient.id as id -&gt; patient.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext1 -&gt; identifier.value = ext1 &quot;value&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n        } &quot;idfr&quot;;\n        patient.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') or (root = '2.16.840.1.113883.2.9.4.3.7') or (root = '2.16.840.1.113883.2.9.4.3.3') or (root = '2.16.840.1.113883.2.9.4.3.17') or (root = '2.16.840.1.113883.2.9.4.3.18') or (root = '2.16.840.1.113883.2.9.2.10.4.1.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1.1') or (root = '2.16.840.1.113883.2.9.2.10.4.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1') or (root = '2.16.840.1.113883.2.9.4.3.15') then {\n          id.extension as ext -&gt; requestPAT.url = append('Patient?identifier=', ext) &quot;UUID&quot;;\n        } &quot;ext&quot;;\n      } &quot;record&quot;;\n    } &quot;recPat&quot;;\n  } &quot;ClinicalDocumentToBody&quot;;\n}\n\ngroup ClinicalDocumentToBundle(source cda : ClinicalDocument, target patient : Patient, target composition : Composition, target encounter : Encounter, target bundle : Bundle, target DocumentReference : DocumentReference) {\n  cda -&gt; encounter.status = 'finished' &quot;finished&quot;;\n  cda -&gt; encounter.class = create('Coding') as coding then {\n    cda -&gt; coding.code = 'AMB' &quot;amb&quot;;\n  } &quot;coding&quot;;\n  cda -&gt; bundle.id = uuid() &quot;id&quot;;\n  cda.id -&gt; bundle.identifier &quot;identifier&quot;;\n  cda -&gt; bundle.type = 'transaction' &quot;type&quot;;\n  cda -&gt; bundle.timestamp = (timestamp.now()) &quot;date&quot;;\n  cda then ClinicalDocumentComposition(cda, composition, patient, encounter, bundle, DocumentReference) &quot;composition&quot;;\n  cda.component as component then {\n    component.structuredBody as body then {\n      body.component as component then {\n        component.section as srcSection then {\n          srcSection -&gt; composition.section as tgtSection then ClinicalDocumentSection(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;TerapiaFarmacologicaAllaDimissione&quot;;\n        };\n      };\n    } &quot;body&quot;;\n  };\n}\n\n// --------------------------------\ngroup ClinicalDocumentSection(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src.text as cdaText -&gt; tgt.text as fhirText then {\n    cdaText -&gt; fhirText.status = 'generated' &quot;narrativeStatus&quot;;\n    cdaText as t -&gt; fhirText.div = t &quot;narrativeText&quot;;\n  } &quot;cdaText&quot;;\n  src.entry as entry1 then {\n    entry1.substanceAdministration as substance then {\n      substance.templateId where (root = '2.16.840.1.113883.2.9.10.1.11.4.1') -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Immunization') as immunization,  immunization.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Immunization/', uuid1),  request.url = 'Immunization',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Immunization/' + %immunization.id) then {\n        substance -&gt;  immunization.patient = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;patientRef&quot;;\n        // substance.templateId as tid -&gt; immunization.identifier as idf then{\n        substance.statusCode as statusc where (code = 'completed') -&gt; immunization.status = 'completed';\n        substance.statusCode as statusc where (code = 'aborted') -&gt; immunization.status = 'final';\n        substance.statusCode as statusc where (code = 'suspended') -&gt; immunization.status = 'enterer-in-error';\n        substance.statusCode as statusc where (code = 'cancelled') -&gt; immunization.status = 'not-done';\n        substance.effectiveTime as eff where (value.exists()) -&gt; immunization.occurrence = create('dateTime') as value then TSDateTime(eff, value) &quot;value1&quot;;\n        substance.effectiveTime as eff where (low.exists()) -&gt; immunization.occurrence = create('Period') as value then IVLTSPeriod(eff, value) &quot;valuePeriod&quot;;\n        substance.routeCode -&gt; immunization.route &quot;route&quot;;\n        substance.approachSiteCode -&gt; immunization.site &quot;site&quot;;\n        substance -&gt; immunization.doseQuantity = create('SimpleQuantity') as quantity then {\n          substance.doseQuantity as q then {\n            q -&gt; quantity.value = (q.value) &quot;val&quot;;\n            q -&gt; quantity.unit = (q.unit) &quot;uni&quot;;\n          } &quot;qua&quot;;\n        } &quot;q&quot;;\n        substance.consumable as cons then {\n          cons.manufacturedProduct as manufact then {\n            manufact.manufacturedMaterial as manufactmat then {\n              manufactmat.code -&gt; immunization.vaccineCode;\n              manufactmat.lotNumberText as t -&gt; immunization.lotNumber = (t.dataString);\n            } &quot;manufactmat&quot;;\n            manufact.manufacturerOrganization as manufactOrg -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Organization') as organization then {\n              manufactOrg -&gt; organization.meta as meta then {\n                manufactOrg -&gt; meta.tag = create('Coding') as coding then {\n                  manufactOrg -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  manufactOrg -&gt; coding.code = 'ClinicalDocument/body/manufacturerOrganization' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              manufactOrg.id as id -&gt; organization.identifier as identifier then {\n                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                id.extension as ext -&gt; identifier.value = ext then {\n                  ext -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n                } &quot;ext&quot;;\n                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                id.root as r then {\n                  id.extension as ext -&gt;  organization.id = (r + '-' + ext) as uuid5,  e1.fullUrl = append('https://example/Organization/', uuid5),  immunization.manufacturer = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %uuid5);\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              // manufactOrg.id as id then{\n              manufactOrg.name as n -&gt; organization.name = (n.other);\n            } &quot;manufactOrg&quot;;\n          } &quot;manufact&quot;;\n        } &quot;cons&quot;;\n        substance.participant as part -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Location') as location then {\n          part -&gt; location.meta as meta then {\n            part -&gt; meta.tag = create('Coding') as coding then {\n              part -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              part -&gt; coding.code = 'ClinicalDocument/body/participant' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          part.participantRole as partRole then {\n            partRole.id as id -&gt; location.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext then {\n                ext -&gt; request.url = append('Location?identifier=', ext) &quot;UUID&quot;;\n              } &quot;ext&quot;;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  location.id = (r + '-' + ext) as uuid6,  e1.fullUrl = append('https://example/Location/', uuid6),  immunization.location = create('Reference') as reference,  reference.reference = ('https://example/Location/' + %uuid6) &quot;ref&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n          } &quot;role&quot;;\n        } &quot;part&quot;;\n        cda -&gt; immunization.protocolApplied as prot then {\n          substance.entryRelationship as entrirel4 then {\n            entrirel4.observation as obs then {\n              obs.code where (code = '75323-6') then {\n                obs.value -&gt; prot.targetDisease;\n              } &quot;codeControl&quot;;\n            } &quot;entrirel2&quot;;\n            entrirel4.observation as obsdosenumber then {\n              obsdosenumber.code where (code = '30973-2') then {\n                obsdosenumber.value as v then {\n                  v.value as int -&gt; prot.doseNumber = (int.toString());\n                } &quot;v&quot;;\n              } &quot;codeControl&quot;;\n            } &quot;entrirel2&quot;;\n          } &quot;entrirel4&quot;;\n        } &quot;protocolAp&quot;;\n        substance.entryRelationship as entrirel2 then {\n          entrirel2.observation as obs then {\n            obs.code where ((code = '59778-1') or (code = '30981-5') or (code = '30980-7') or (code = '59777-3')) then {\n              obs.value as value then {\n                value.high as h then {\n                  h.value as date -&gt; immunization.expirationDate = truncate(date, 10);\n                } &quot;da&quot;;\n              };\n            } &quot;codeControl&quot;;\n          } &quot;obs&quot;;\n        } &quot;entrirel2&quot;;\n        substance.entryRelationship as entrirel3 then {\n          entrirel3.observation as obs then {\n            obs.code where (code = '95715-9') -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  immunization.reasonReference = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n              obs then Observation(entrirel3, patient, tgt, bundle, enc, observation) &quot;observation&quot;;\n            } &quot;codeControl&quot;;\n          } &quot;obs&quot;;\n        } &quot;entrirel2&quot;;\n        substance.entryRelationship as entrirel4 then {\n          entrirel4.observation as obs then {\n            obs.code where (code = '59785-6') -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  immunization.reasonReference = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n              obs then Observation1(entrirel4, patient, tgt, bundle, enc, observation) &quot;observation&quot;;\n            } &quot;codeControl&quot;;\n          } &quot;obs&quot;;\n        } &quot;entrirel2&quot;;\n        substance.entryRelationship as entrirel4 then {\n          entrirel4.observation as obs then {\n            obs.code where (code = '31044-1') -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  immunization.reasonReference = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n              obs then Observation1(entrirel4, patient, tgt, bundle, enc, observation) &quot;observation&quot;;\n            } &quot;codeControl&quot;;\n          } &quot;obs&quot;;\n        } &quot;entrirel2&quot;;\n      } &quot;ControlloImmunization&quot;;\n      substance.templateId where (root = '2.16.840.1.113883.2.9.10.1.11.4.2') -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Immunization') as immunization,  immunization.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Immunization/', uuid1),  request.url = 'Immunization',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Immunization/' + %immunization.id) then {\n        substance -&gt;  immunization.patient = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;patientRef&quot;;\n        // substance.templateId as tid -&gt; immunization.identifier as idf then{\n        substance.statusCode as statusc where (code = 'completed') -&gt; immunization.status = 'completed';\n        substance.statusCode as statusc where (code = 'aborted') -&gt; immunization.status = 'final';\n        substance.statusCode as statusc where (code = 'suspended') -&gt; immunization.status = 'enterer-in-error';\n        substance.statusCode as statusc where (code = 'cancelled') -&gt; immunization.status = 'not-done';\n        substance.effectiveTime as eff where (value.exists()) -&gt; immunization.occurrence = create('dateTime') as value then TSDateTime(eff, value) &quot;value1&quot;;\n        substance.effectiveTime as eff where (low.exists()) -&gt; immunization.occurrence = create('Period') as value then IVLTSPeriod(eff, value) &quot;valuePeriod&quot;;\n        substance.consumable as cons then {\n          cons.manufacturedProduct as manufact then {\n            manufact.manufacturedMaterial as manufactmat then {\n              manufactmat.code -&gt; immunization.vaccineCode;\n              manufactmat.lotNumberText as t -&gt; immunization.lotNumber = (t.dataString);\n            } &quot;manufactmat&quot;;\n            manufact.manufacturerOrganization as manufactOrg -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Organization') as organization then {\n              manufactOrg -&gt; organization.meta as meta then {\n                manufactOrg -&gt; meta.tag = create('Coding') as coding then {\n                  manufactOrg -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  manufactOrg -&gt; coding.code = 'ClinicalDocument/body/manufacturerOrganization' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              manufactOrg.id as id -&gt; organization2.identifier as identifier then {\n                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                id.extension as ext -&gt; identifier.value = ext then {\n                  manufactOrg -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n                } &quot;ext&quot;;\n                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                id.root as r then {\n                  id.extension as ext -&gt;  organization1.id = (r + '-' + ext) as uuid23,  e1.fullUrl = append('https://example/Organization/', uuid23),  immunization.manufacturer = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %uuid23) &quot;org&quot;;\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              manufactOrg.name as n -&gt; organization.name = (n.other);\n            } &quot;manufactOrg&quot;;\n          } &quot;manufact&quot;;\n        } &quot;cons&quot;;\n        cda -&gt; immunization.protocolApplied as prot then {\n          substance.entryRelationship as entrirel4 then {\n            entrirel4.observation as obs then {\n              obs.code where (code = '75323-6') then {\n                obs.value -&gt; prot.targetDisease;\n              } &quot;codeControl&quot;;\n            } &quot;entrirel2&quot;;\n            entrirel4.observation as obsdosenumber then {\n              obsdosenumber.code where (code = '30973-2') then {\n                obsdosenumber.value as v then {\n                  v.value as int -&gt; prot.doseNumber = (int.toString());\n                } &quot;v&quot;;\n              } &quot;codeControl&quot;;\n            } &quot;entrirel2&quot;;\n          } &quot;entrirel4&quot;;\n        } &quot;protocolAp&quot;;\n        substance.entryRelationship as entrirel1 then {\n          entrirel1.observation as obs then {\n            obs.code where (code = '85714-4') then {\n              obs.code -&gt; immunization.statusReason;\n            } &quot;codeControl&quot;;\n            obs.code where (code = '59784-9') then {\n              obs.value as val then {\n                val.originalText as original -&gt; immunization.statusReason = create('CodeableConcept') as cod then {\n                  original.reference as reff -&gt; cod.text = (reff.value);\n                } &quot;cod&quot;;\n              } &quot;val&quot;;\n            } &quot;codeControl&quot;;\n          } &quot;obs&quot;;\n        } &quot;entrirel1&quot;;\n        substance.participant as part -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Location') as location then {\n          part -&gt; location.meta as meta then {\n            part -&gt; meta.tag = create('Coding') as coding then {\n              part -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              part -&gt; coding.code = 'ClinicalDocument/body/participant' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          part.participantRole as partRole then {\n            partRole.id as id -&gt; location.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext then {\n                ext -&gt; request.url = append('Location?identifier=', ext) &quot;UUID&quot;;\n              } &quot;ext&quot;;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  location.id = (r + '-' + ext) as uuid7,  e1.fullUrl = append('https://example/Location/', uuid7),  immunization.location = create('Reference') as reference,  reference.reference = ('https://example/Location/' + %uuid7) &quot;ref&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n          } &quot;role&quot;;\n        } &quot;location&quot;;\n      } &quot;sub2&quot;;\n    } &quot;substance&quot;;\n  };\n}\n\ngroup Observation(source entrirel2 : entryRelationship, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter, target obs : Observation) {\n  entrirel2.observation as observation then {\n    // observation.templateId as tid -&gt; obs.identifier as idf then{\n    observation.code -&gt; obs.code;\n    observation.statusCode as statusc where (code = 'completed') -&gt; obs.status = 'final';\n    observation.statusCode as statusc where (code = 'active') -&gt; obs.status = 'registered';\n    observation.statusCode as statusc where (code = 'aborted') -&gt; obs.status = 'cancelled';\n    observation.statusCode as statusc where (code = 'suspended') -&gt; obs.status = 'partial';\n    observation -&gt;  obs.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n    observation -&gt;  obs.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n    observation -&gt; obs.referenceRange as refRange then {\n      observation.value -&gt; refRange.appliesTo;\n      observation -&gt; refRange.text = 'string' &quot;text&quot;;\n    } &quot;refRange&quot;;\n  } &quot;obs&quot;;\n}\n\ngroup Observation1(source entrirel4 : entryRelationship, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter, target obs : Observation) {\n  entrirel4.observation as observation then {\n    // observation.templateId as tid -&gt; obs.identifier as idf then{\n    observation.code -&gt; obs.code;\n    observation.statusCode as statusc where (code = 'completed') -&gt; obs.status = 'final';\n    observation.statusCode as statusc where (code = 'active') -&gt; obs.status = 'registered';\n    observation.statusCode as statusc where (code = 'aborted') -&gt; obs.status = 'cancelled';\n    observation.statusCode as statusc where (code = 'suspended') -&gt; obs.status = 'partial';\n    observation -&gt;  obs.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n    observation -&gt;  obs.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n    observation.effectiveTime as eff where (value.exists()) -&gt; obs.effective = create('dateTime') as value then TSDateTime(eff, value) &quot;value1&quot;;\n    observation.effectiveTime as eff -&gt; obs.effective = create('Period') as period then IVLTSPeriod(eff, period) &quot;period&quot;;\n    observation -&gt; obs.value = create('CodeableConcept') as concept then {\n      observation.value -&gt; concept.coding = create('Coding') as coding then {\n        observation.value as v -&gt; coding.code = (v.code);\n        observation.value as v then {\n          v.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        } &quot;vv&quot;;\n        observation.value as v -&gt; coding.display = (v.displayName);\n      } &quot;coding&quot;;\n      observation.value as valu then {\n        valu.originalText as txt then {\n          txt.reference as ref -&gt; concept.text = (ref.value);\n        } &quot;txt&quot;;\n      };\n    } &quot;refRange&quot;;\n  } &quot;obs&quot;;\n}\n\n</pre>\n      </div>"
  ] ; # 
  fhir:url [ fhir:v "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirVaccination"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "0.1.0"] ; # 
  fhir:name [ fhir:v "cda2fhirVaccination"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:date [ fhir:v "2024-09-15T08:16:12+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "HL7 Italy"] ; # 
  fhir:contact ( [
fhir:name [ fhir:v "HL7 Italy" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "http://hl7.it" ]     ] )
  ] ) ; # 
  fhir:jurisdiction ( [
    ( fhir:coding [
fhir:system [ fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ] ;
fhir:code [ fhir:v "IT" ] ;
fhir:display [ fhir:v "Italy" ]     ] )
  ] ) ; # 
  fhir:structure ( [
fhir:url [
fhir:v "http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "ClinicalDocument" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor>     ] ;
fhir:mode [ fhir:v "queried" ] ;
fhir:alias [ fhir:v "AssignedAuthor" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity>     ] ;
fhir:mode [ fhir:v "queried" ] ;
fhir:alias [ fhir:v "AssignedEntity" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity>     ] ;
fhir:mode [ fhir:v "queried" ] ;
fhir:alias [ fhir:v "AssociatedEntity" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization>     ] ;
fhir:mode [ fhir:v "queried" ] ;
fhir:alias [ fhir:v "CustodianOrganization" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf>     ] ;
fhir:mode [ fhir:v "queried" ] ;
fhir:alias [ fhir:v "OrganizationPartOf" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/cda/StructureDefinition/Organization"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/Organization>     ] ;
fhir:mode [ fhir:v "queried" ] ;
fhir:alias [ fhir:v "rapresentedOrganization" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/cda/StructureDefinition/Section"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/Section>     ] ;
fhir:mode [ fhir:v "queried" ] ;
fhir:alias [ fhir:v "Section" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/cda/StructureDefinition/PatientRole"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/PatientRole>     ] ;
fhir:mode [ fhir:v "queried" ] ;
fhir:alias [ fhir:v "PatientRole" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/cda/StructureDefinition/AD"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/AD>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "AD" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Bundle"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle>     ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "Bundle" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Composition"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Composition>     ] ;
fhir:mode [ fhir:v "produced" ] ;
fhir:alias [ fhir:v "Composition" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Patient"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Patient>     ] ;
fhir:mode [ fhir:v "produced" ] ;
fhir:alias [ fhir:v "Patient" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Encounter"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter>     ] ;
fhir:mode [ fhir:v "produced" ] ;
fhir:alias [ fhir:v "Encounter" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Person"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Person>     ] ;
fhir:mode [ fhir:v "produced" ] ;
fhir:alias [ fhir:v "Patient" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Practitioner"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Practitioner>     ] ;
fhir:mode [ fhir:v "produced" ] ;
fhir:alias [ fhir:v "Practitioner" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Organization"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Organization>     ] ;
fhir:mode [ fhir:v "produced" ] ;
fhir:alias [ fhir:v "Organization" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/cda/StructureDefinition/Act"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/Act>     ] ;
fhir:mode [ fhir:v "produced" ] ;
fhir:alias [ fhir:v "Act" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "IVL_PQ" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/cda/StructureDefinition/PQ"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/PQ>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "PQ" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/SimpleQuantity>     ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "SimpleQuantity" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Immunization"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Immunization>     ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "Immunization" ]
  ] ) ; # 
  fhir:import ( [
fhir:v "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes"^^xsd:anyURI ;
fhir:link <http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes>
  ] [
fhir:v "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader"^^xsd:anyURI ;
fhir:link <http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader>
  ] ) ; # 
  fhir:group ( [
fhir:name [ fhir:v "CdaToBundle" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "cda" ] ;
fhir:type [ fhir:v "ClinicalDocument" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "ClinicalDocumentToBody" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e" ]       ] [
fhir:context [ fhir:v "e" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] [
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 "POST" ]         ] )       ] [
fhir:context [ fhir:v "e" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "composition" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Composition" ]         ] )       ] [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]       ] [
fhir:context [ fhir:v "e" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Composition/" ]         ] [
fhir:value [ fhir:v "uuid1" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Composition" ]         ] )       ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e2" ]       ] [
fhir:context [ fhir:v "e2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "requestPAT" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] [
fhir:context [ fhir:v "requestPAT" ] ;
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 "e2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "patient" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Patient" ]         ] )       ] [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "uuid" ]       ] [
fhir:context [ fhir:v "e2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Patient/" ]         ] [
fhir:value [ fhir:v "uuid2" ]         ] )       ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e3" ]       ] [
fhir:context [ fhir:v "e3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] [
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 "POST" ]         ] )       ] [
fhir:context [ fhir:v "e3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "encounter" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Encounter" ]         ] )       ] [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid3" ] ;
fhir:transform [ fhir:v "uuid" ]       ] [
fhir:context [ fhir:v "e3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Encounter/" ]         ] [
fhir:value [ fhir:v "uuid3" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Encounter" ]         ] )       ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e5" ]       ] [
fhir:context [ fhir:v "e5" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] [
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 "POST" ]         ] )       ] [
fhir:context [ fhir:v "e5" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "DocumentReference" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "DocumentReference" ]         ] )       ] [
fhir:context [ fhir:v "DocumentReference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid5" ] ;
fhir:transform [ fhir:v "uuid" ]       ] [
fhir:context [ fhir:v "e5" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "https://example/DocumentReference/" ]         ] [
fhir:value [ fhir:v "uuid5" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "DocumentReference" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "cdatobundle" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cda" ]         ] ) ;
        ( fhir:dependent [
fhir:name [ fhir:v "ClinicalDocumentToBundle" ] ;
          ( fhir:variable [ fhir:v "cda" ] [ fhir:v "patient" ] [ fhir:v "composition" ] [ fhir:v "encounter" ] [ fhir:v "bundle" ] [ fhir:v "DocumentReference" ] )         ] )       ] [
fhir:name [ fhir:v "recPat" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cda" ] ;
fhir:element [ fhir:v "recordTarget" ] ;
fhir:variable [ fhir:v "recordTarget" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "record" ] ;
          ( fhir:source [
fhir:context [ fhir:v "recordTarget" ] ;
fhir:element [ fhir:v "patientRole" ] ;
fhir:variable [ fhir:v "patient" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "idfr" ] ;
            ( fhir:source [
fhir:context [ fhir:v "patient" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "root1" ] ;
              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "r" ]                 ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                 ] [
fhir:value [ fhir:v "uri" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "value" ] ;
              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext1" ]               ] ) ;
              ( 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 "ext1" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "assigningAuthorityName" ] ;
              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "assigningAuthorityName" ] ;
fhir:variable [ fhir:v "s" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "assigner" ] ;
fhir:variable [ fhir:v "a" ]               ] [
fhir:context [ fhir:v "a" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "s" ]                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "ext" ] ;
            ( fhir:source [
fhir:context [ fhir:v "patient" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ] ;
fhir:condition [ fhir:v "(root = '2.16.840.1.113883.2.9.4.3.2') or (root = '2.16.840.1.113883.2.9.4.3.7') or (root = '2.16.840.1.113883.2.9.4.3.3') or (root = '2.16.840.1.113883.2.9.4.3.17') or (root = '2.16.840.1.113883.2.9.4.3.18') or (root = '2.16.840.1.113883.2.9.2.10.4.1.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1.1') or (root = '2.16.840.1.113883.2.9.2.10.4.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1') or (root = '2.16.840.1.113883.2.9.4.3.15')" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "UUID" ] ;
              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "requestPAT" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Patient?identifier=" ]                 ] [
fhir:value [ fhir:v "ext" ]                 ] )               ] )             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ClinicalDocumentToBundle" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "cda" ] ;
fhir:type [ fhir:v "ClinicalDocument" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "composition" ] ;
fhir:type [ fhir:v "Composition" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "encounter" ] ;
fhir:type [ fhir:v "Encounter" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "DocumentReference" ] ;
fhir:type [ fhir:v "DocumentReference" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "finished" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "finished" ]         ] )       ] )     ] [
fhir:name [ fhir:v "coding" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "class" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "amb" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cda" ]         ] ) ;
        ( 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 "AMB" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "id" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:transform [ fhir:v "uuid" ]       ] )     ] [
fhir:name [ fhir:v "identifier" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] )     ] [
fhir:name [ fhir:v "type" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ]       ] ) ;
      ( 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 "date" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "timestamp" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "timestamp.now()" ]         ] )       ] )     ] [
fhir:name [ fhir:v "composition" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "ClinicalDocumentComposition" ] ;
        ( fhir:variable [ fhir:v "cda" ] [ fhir:v "composition" ] [ fhir:v "patient" ] [ fhir:v "encounter" ] [ fhir:v "bundle" ] [ fhir:v "DocumentReference" ] )       ] )     ] [
fhir:name [ fhir:v "component" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ] ;
fhir:element [ fhir:v "component" ] ;
fhir:variable [ fhir:v "component" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "body" ] ;
        ( fhir:source [
fhir:context [ fhir:v "component" ] ;
fhir:element [ fhir:v "structuredBody" ] ;
fhir:variable [ fhir:v "body" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "component" ] ;
          ( fhir:source [
fhir:context [ fhir:v "body" ] ;
fhir:element [ fhir:v "component" ] ;
fhir:variable [ fhir:v "component" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "section" ] ;
            ( fhir:source [
fhir:context [ fhir:v "component" ] ;
fhir:element [ fhir:v "section" ] ;
fhir:variable [ fhir:v "srcSection" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "TerapiaFarmacologicaAllaDimissione" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "section" ] ;
fhir:variable [ fhir:v "tgtSection" ]               ] ) ;
              ( fhir:dependent [
fhir:name [ fhir:v "ClinicalDocumentSection" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ClinicalDocumentSection" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "--------------------------------" ] ;
    ( fhir:input [
fhir:name [ fhir:v "cda" ] ;
fhir:type [ fhir:v "ClinicalDocument" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "Section" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "tgt" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "enc" ] ;
fhir:type [ fhir:v "Encounter" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "title" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:variable [ fhir:v "t" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "t.dataString" ]         ] )       ] )     ] [
fhir:name [ fhir:v "code" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] )     ] [
fhir:name [ fhir:v "cdaText" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "fhirText" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "narrativeStatus" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "generated" ]           ] )         ] )       ] [
fhir:name [ fhir:v "narrativeText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cdaText" ] ;
fhir:variable [ fhir:v "t" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "div" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "t" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "entry" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry1" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "substance" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "substanceAdministration" ] ;
fhir:variable [ fhir:v "substance" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "ControlloImmunization" ] ;
          ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "templateId" ] ;
fhir:condition [ fhir:v "(root = '2.16.840.1.113883.2.9.10.1.11.4.1')" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]             ] )           ] [
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 "POST" ]             ] )           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "immunization" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Immunization" ]             ] )           ] [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "https://example/Immunization/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Immunization" ]             ] )           ] [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]             ] )           ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Immunization/' + %immunization.id" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "patientRef" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "patient" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]               ] )             ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Patient/' + %patient.id" ]               ] )             ] )           ] [
fhir:name [ fhir:v "statusCode" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]             ] ) ;
            ( 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:documentation [ fhir:v "substance.templateId as tid -> immunization.identifier as idf then{" ]           ] [
fhir:name [ fhir:v "statusCode" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'aborted')" ]             ] ) ;
            ( 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 "final" ]               ] )             ] )           ] [
fhir:name [ fhir:v "statusCode" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'suspended')" ]             ] ) ;
            ( 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 "enterer-in-error" ]               ] )             ] )           ] [
fhir:name [ fhir:v "statusCode" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'cancelled')" ]             ] ) ;
            ( 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 "not-done" ]               ] )             ] )           ] [
fhir:name [ fhir:v "value1" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ] ;
fhir:condition [ fhir:v "(value.exists())" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "occurrence" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]               ] )             ] ) ;
            ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
              ( fhir:variable [ fhir:v "eff" ] [ fhir:v "value" ] )             ] )           ] [
fhir:name [ fhir:v "valuePeriod" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ] ;
fhir:condition [ fhir:v "(low.exists())" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "occurrence" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Period" ]               ] )             ] ) ;
            ( fhir:dependent [
fhir:name [ fhir:v "IVLTSPeriod" ] ;
              ( fhir:variable [ fhir:v "eff" ] [ fhir:v "value" ] )             ] )           ] [
fhir:name [ fhir:v "route" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "routeCode" ] ;
fhir:variable [ fhir:v "vvv" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "route" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]             ] )           ] [
fhir:name [ fhir:v "site" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "approachSiteCode" ] ;
fhir:variable [ fhir:v "vvv" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "site" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]             ] )           ] [
fhir:name [ fhir:v "q" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "doseQuantity" ] ;
fhir:variable [ fhir:v "quantity" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "SimpleQuantity" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "qua" ] ;
              ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "doseQuantity" ] ;
fhir:variable [ fhir:v "q" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
                ( fhir:source [
fhir:context [ fhir:v "q" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "q.value" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "uni" ] ;
                ( fhir:source [
fhir:context [ fhir:v "q" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "q.unit" ]                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "cons" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "consumable" ] ;
fhir:variable [ fhir:v "cons" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "manufact" ] ;
              ( fhir:source [
fhir:context [ fhir:v "cons" ] ;
fhir:element [ fhir:v "manufacturedProduct" ] ;
fhir:variable [ fhir:v "manufact" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "manufactmat" ] ;
                ( fhir:source [
fhir:context [ fhir:v "manufact" ] ;
fhir:element [ fhir:v "manufacturedMaterial" ] ;
fhir:variable [ fhir:v "manufactmat" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "manufactmat" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "vaccineCode" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                   ] )                 ] [
fhir:name [ fhir:v "lotNumberText" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "manufactmat" ] ;
fhir:element [ fhir:v "lotNumberText" ] ;
fhir:variable [ fhir:v "t" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "lotNumber" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "t.dataString" ]                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "manufactOrg" ] ;
                ( fhir:source [
fhir:context [ fhir:v "manufact" ] ;
fhir:element [ fhir:v "manufacturerOrganization" ] ;
fhir:variable [ fhir:v "manufactOrg" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
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 "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "organization" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Organization" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "manufactOrg" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "manufactOrg" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "manufactOrg" ]                       ] ) ;
                      ( 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://algoritmodiscoring" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "code" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "manufactOrg" ]                       ] ) ;
                      ( 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 "ClinicalDocument/body/manufacturerOrganization" ]                         ] )                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "identifier" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "manufactOrg" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "root1" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "r" ]                       ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                       ] [
fhir:value [ fhir:v "uri" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "ext" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                     ] ) ;
                    ( 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 "ext" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "UUID" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "ext" ]                       ] ) ;
                      ( fhir:target [
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 "Organization?identifier=" ]                         ] [
fhir:value [ fhir:v "ext" ]                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "assigningAuthorityName" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "assigningAuthorityName" ] ;
fhir:variable [ fhir:v "s" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "assigner" ] ;
fhir:variable [ fhir:v "a" ]                     ] [
fhir:context [ fhir:v "a" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "s" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "r" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "extension" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid5" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                         ] )                       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Organization/" ]                         ] [
fhir:value [ fhir:v "uuid5" ]                         ] )                       ] [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "manufacturer" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]                         ] )                       ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Organization/' + %uuid5" ]                         ] )                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "name" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "manufactOrg" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "n" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "n.other" ]                     ] )                   ] ) ;
fhir:documentation [ fhir:v "manufactOrg.id as id then{" ]                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "part" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "part" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]             ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]               ] )             ] [
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 "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "location" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Location" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
              ( fhir:source [
fhir:context [ fhir:v "part" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                ( fhir:source [
fhir:context [ fhir:v "part" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "part" ]                   ] ) ;
                  ( 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://algoritmodiscoring" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "part" ]                   ] ) ;
                  ( 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 "ClinicalDocument/body/participant" ]                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "role" ] ;
              ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "participantRole" ] ;
fhir:variable [ fhir:v "partRole" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "identifier" ] ;
                ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "root1" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "r" ]                     ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                     ] [
fhir:value [ fhir:v "uri" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "ext" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                   ] ) ;
                  ( 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 "ext" ]                     ] )                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "UUID" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "ext" ]                     ] ) ;
                    ( fhir:target [
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 "Location?identifier=" ]                       ] [
fhir:value [ fhir:v "ext" ]                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "assigningAuthorityName" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "assigningAuthorityName" ] ;
fhir:variable [ fhir:v "s" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "assigner" ] ;
fhir:variable [ fhir:v "a" ]                   ] [
fhir:context [ fhir:v "a" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "s" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "r" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "ref" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid6" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                       ] )                     ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "https://example/Location/" ]                       ] [
fhir:value [ fhir:v "uuid6" ]                       ] )                     ] [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "location" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]                       ] )                     ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Location/' + %uuid6" ]                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "protocolAp" ] ;
            ( fhir:source [
fhir:context [ fhir:v "cda" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "protocolApplied" ] ;
fhir:variable [ fhir:v "prot" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "entrirel4" ] ;
              ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entrirel4" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "entrirel2" ] ;
                ( fhir:source [
fhir:context [ fhir:v "entrirel4" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "codeControl" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '75323-6')" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "vvv" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "prot" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "targetDisease" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "entrirel2" ] ;
                ( fhir:source [
fhir:context [ fhir:v "entrirel4" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obsdosenumber" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "codeControl" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "obsdosenumber" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '30973-2')" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "v" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obsdosenumber" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "v" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "v" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "int" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "prot" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "doseNumber" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "int.toString()" ]                         ] )                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "entrirel2" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entrirel2" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "obs" ] ;
              ( fhir:source [
fhir:context [ fhir:v "entrirel2" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "codeControl" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "((code = '59778-1') or (code = '30981-5') or (code = '30980-7') or (code = '59777-3'))" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "da" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "high" ] ;
fhir:variable [ fhir:v "h" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "h" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "date" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "expirationDate" ] ;
fhir:transform [ fhir:v "truncate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "date" ]                         ] [
fhir:value [ fhir:v "10"^^xsd:integer ]                         ] )                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "entrirel2" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entrirel3" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "obs" ] ;
              ( fhir:source [
fhir:context [ fhir:v "entrirel3" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "codeControl" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '95715-9')" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
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 "POST" ]                   ] )                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                   ] )                 ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                   ] )                 ] [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reasonReference" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]                   ] )                 ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Observation/' + %observation.id" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "observation" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "obs" ]                   ] ) ;
                  ( fhir:dependent [
fhir:name [ fhir:v "Observation" ] ;
                    ( fhir:variable [ fhir:v "entrirel3" ] [ fhir:v "patient" ] [ fhir:v "tgt" ] [ fhir:v "bundle" ] [ fhir:v "enc" ] [ fhir:v "observation" ] )                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "entrirel2" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entrirel4" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "obs" ] ;
              ( fhir:source [
fhir:context [ fhir:v "entrirel4" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "codeControl" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '59785-6')" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
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 "POST" ]                   ] )                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                   ] )                 ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                   ] )                 ] [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reasonReference" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]                   ] )                 ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Observation/' + %observation.id" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "observation" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "obs" ]                   ] ) ;
                  ( fhir:dependent [
fhir:name [ fhir:v "Observation1" ] ;
                    ( fhir:variable [ fhir:v "entrirel4" ] [ fhir:v "patient" ] [ fhir:v "tgt" ] [ fhir:v "bundle" ] [ fhir:v "enc" ] [ fhir:v "observation" ] )                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "entrirel2" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entrirel4" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "obs" ] ;
              ( fhir:source [
fhir:context [ fhir:v "entrirel4" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "codeControl" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '31044-1')" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
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 "POST" ]                   ] )                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                   ] )                 ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                   ] )                 ] [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reasonReference" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]                   ] )                 ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Observation/' + %observation.id" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "observation" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "obs" ]                   ] ) ;
                  ( fhir:dependent [
fhir:name [ fhir:v "Observation1" ] ;
                    ( fhir:variable [ fhir:v "entrirel4" ] [ fhir:v "patient" ] [ fhir:v "tgt" ] [ fhir:v "bundle" ] [ fhir:v "enc" ] [ fhir:v "observation" ] )                   ] )                 ] )               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "sub2" ] ;
          ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "templateId" ] ;
fhir:condition [ fhir:v "(root = '2.16.840.1.113883.2.9.10.1.11.4.2')" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]             ] )           ] [
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 "POST" ]             ] )           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "immunization" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Immunization" ]             ] )           ] [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "https://example/Immunization/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Immunization" ]             ] )           ] [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]             ] )           ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Immunization/' + %immunization.id" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "patientRef" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "patient" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]               ] )             ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Patient/' + %patient.id" ]               ] )             ] )           ] [
fhir:name [ fhir:v "statusCode" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]             ] ) ;
            ( 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:documentation [ fhir:v "substance.templateId as tid -> immunization.identifier as idf then{" ]           ] [
fhir:name [ fhir:v "statusCode" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'aborted')" ]             ] ) ;
            ( 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 "final" ]               ] )             ] )           ] [
fhir:name [ fhir:v "statusCode" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'suspended')" ]             ] ) ;
            ( 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 "enterer-in-error" ]               ] )             ] )           ] [
fhir:name [ fhir:v "statusCode" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'cancelled')" ]             ] ) ;
            ( 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 "not-done" ]               ] )             ] )           ] [
fhir:name [ fhir:v "value1" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ] ;
fhir:condition [ fhir:v "(value.exists())" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "occurrence" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]               ] )             ] ) ;
            ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
              ( fhir:variable [ fhir:v "eff" ] [ fhir:v "value" ] )             ] )           ] [
fhir:name [ fhir:v "valuePeriod" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ] ;
fhir:condition [ fhir:v "(low.exists())" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "occurrence" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Period" ]               ] )             ] ) ;
            ( fhir:dependent [
fhir:name [ fhir:v "IVLTSPeriod" ] ;
              ( fhir:variable [ fhir:v "eff" ] [ fhir:v "value" ] )             ] )           ] [
fhir:name [ fhir:v "cons" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "consumable" ] ;
fhir:variable [ fhir:v "cons" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "manufact" ] ;
              ( fhir:source [
fhir:context [ fhir:v "cons" ] ;
fhir:element [ fhir:v "manufacturedProduct" ] ;
fhir:variable [ fhir:v "manufact" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "manufactmat" ] ;
                ( fhir:source [
fhir:context [ fhir:v "manufact" ] ;
fhir:element [ fhir:v "manufacturedMaterial" ] ;
fhir:variable [ fhir:v "manufactmat" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "manufactmat" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "vaccineCode" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                   ] )                 ] [
fhir:name [ fhir:v "lotNumberText" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "manufactmat" ] ;
fhir:element [ fhir:v "lotNumberText" ] ;
fhir:variable [ fhir:v "t" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "lotNumber" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "t.dataString" ]                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "manufactOrg" ] ;
                ( fhir:source [
fhir:context [ fhir:v "manufact" ] ;
fhir:element [ fhir:v "manufacturerOrganization" ] ;
fhir:variable [ fhir:v "manufactOrg" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
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 "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "organization" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Organization" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "manufactOrg" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "manufactOrg" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "manufactOrg" ]                       ] ) ;
                      ( 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://algoritmodiscoring" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "code" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "manufactOrg" ]                       ] ) ;
                      ( 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 "ClinicalDocument/body/manufacturerOrganization" ]                         ] )                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "identifier" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "manufactOrg" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "organization2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "root1" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "r" ]                       ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                       ] [
fhir:value [ fhir:v "uri" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "ext" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                     ] ) ;
                    ( 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 "ext" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "UUID" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "manufactOrg" ]                       ] ) ;
                      ( fhir:target [
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 "Organization?identifier=" ]                         ] [
fhir:value [ fhir:v "ext" ]                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "assigningAuthorityName" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "assigningAuthorityName" ] ;
fhir:variable [ fhir:v "s" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "assigner" ] ;
fhir:variable [ fhir:v "a" ]                     ] [
fhir:context [ fhir:v "a" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "s" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "r" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "org" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "organization1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid23" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                         ] )                       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Organization/" ]                         ] [
fhir:value [ fhir:v "uuid23" ]                         ] )                       ] [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "manufacturer" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]                         ] )                       ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Organization/' + %uuid23" ]                         ] )                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "name" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "manufactOrg" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "n" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "n.other" ]                     ] )                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "protocolAp" ] ;
            ( fhir:source [
fhir:context [ fhir:v "cda" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "protocolApplied" ] ;
fhir:variable [ fhir:v "prot" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "entrirel4" ] ;
              ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entrirel4" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "entrirel2" ] ;
                ( fhir:source [
fhir:context [ fhir:v "entrirel4" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "codeControl" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '75323-6')" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "vvv" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "prot" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "targetDisease" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "entrirel2" ] ;
                ( fhir:source [
fhir:context [ fhir:v "entrirel4" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obsdosenumber" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "codeControl" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "obsdosenumber" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '30973-2')" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "v" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obsdosenumber" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "v" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "v" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "int" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "prot" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "doseNumber" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "int.toString()" ]                         ] )                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "entrirel1" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entrirel1" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "obs" ] ;
              ( fhir:source [
fhir:context [ fhir:v "entrirel1" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "codeControl" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '85714-4')" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "statusReason" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "codeControl" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '59784-9')" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "cod" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "original" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "statusReason" ] ;
fhir:variable [ fhir:v "cod" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "original" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reff" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "cod" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "reff.value" ]                         ] )                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "location" ] ;
            ( fhir:source [
fhir:context [ fhir:v "substance" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "part" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]             ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]               ] )             ] [
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 "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "location" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Location" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
              ( fhir:source [
fhir:context [ fhir:v "part" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                ( fhir:source [
fhir:context [ fhir:v "part" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "part" ]                   ] ) ;
                  ( 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://algoritmodiscoring" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "part" ]                   ] ) ;
                  ( 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 "ClinicalDocument/body/participant" ]                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "role" ] ;
              ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "participantRole" ] ;
fhir:variable [ fhir:v "partRole" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "identifier" ] ;
                ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "root1" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "r" ]                     ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                     ] [
fhir:value [ fhir:v "uri" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "ext" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                   ] ) ;
                  ( 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 "ext" ]                     ] )                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "UUID" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "ext" ]                     ] ) ;
                    ( fhir:target [
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 "Location?identifier=" ]                       ] [
fhir:value [ fhir:v "ext" ]                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "assigningAuthorityName" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "assigningAuthorityName" ] ;
fhir:variable [ fhir:v "s" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "assigner" ] ;
fhir:variable [ fhir:v "a" ]                   ] [
fhir:context [ fhir:v "a" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "s" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "r" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "ref" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid7" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                       ] )                     ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "https://example/Location/" ]                       ] [
fhir:value [ fhir:v "uuid7" ]                       ] )                     ] [
fhir:context [ fhir:v "immunization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "location" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]                       ] )                     ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Location/' + %uuid7" ]                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "Observation" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "entrirel2" ] ;
fhir:type [ fhir:v "entryRelationship" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "tgt" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "enc" ] ;
fhir:type [ fhir:v "Encounter" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "obs" ] ;
fhir:type [ fhir:v "Observation" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "obs" ] ;
      ( fhir:source [
fhir:context [ fhir:v "entrirel2" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "observation" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]         ] ) ;
fhir:documentation [ fhir:v "observation.templateId as tid -> obs.identifier as idf then{" ]       ] [
fhir:name [ fhir:v "statusCode" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "final" ]           ] )         ] )       ] [
fhir:name [ fhir:v "statusCode" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'active')" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "registered" ]           ] )         ] )       ] [
fhir:name [ fhir:v "statusCode" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'aborted')" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "cancelled" ]           ] )         ] )       ] [
fhir:name [ fhir:v "statusCode" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'suspended')" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "partial" ]           ] )         ] )       ] [
fhir:name [ fhir:v "reference" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "subject" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]           ] )         ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Patient/' + %patient.id" ]           ] )         ] )       ] [
fhir:name [ fhir:v "reference" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "encounter" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]           ] )         ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Encounter/' + %enc.id" ]           ] )         ] )       ] [
fhir:name [ fhir:v "refRange" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "referenceRange" ] ;
fhir:variable [ fhir:v "refRange" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
          ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "vvv" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "refRange" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "appliesTo" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]           ] )         ] [
fhir:name [ fhir:v "text" ] ;
          ( fhir:source [
fhir:context [ fhir:v "observation" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "refRange" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "string" ]             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "Observation1" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "entrirel4" ] ;
fhir:type [ fhir:v "entryRelationship" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "tgt" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "enc" ] ;
fhir:type [ fhir:v "Encounter" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "obs" ] ;
fhir:type [ fhir:v "Observation" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "obs" ] ;
      ( fhir:source [
fhir:context [ fhir:v "entrirel4" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "observation" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]         ] ) ;
fhir:documentation [ fhir:v "observation.templateId as tid -> obs.identifier as idf then{" ]       ] [
fhir:name [ fhir:v "statusCode" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "final" ]           ] )         ] )       ] [
fhir:name [ fhir:v "statusCode" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'active')" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "registered" ]           ] )         ] )       ] [
fhir:name [ fhir:v "statusCode" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'aborted')" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "cancelled" ]           ] )         ] )       ] [
fhir:name [ fhir:v "statusCode" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'suspended')" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "partial" ]           ] )         ] )       ] [
fhir:name [ fhir:v "reference" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "subject" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]           ] )         ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Patient/' + %patient.id" ]           ] )         ] )       ] [
fhir:name [ fhir:v "reference" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "encounter" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]           ] )         ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Encounter/' + %enc.id" ]           ] )         ] )       ] [
fhir:name [ fhir:v "value1" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ] ;
fhir:condition [ fhir:v "(value.exists())" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]           ] )         ] ) ;
        ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
          ( fhir:variable [ fhir:v "eff" ] [ fhir:v "value" ] )         ] )       ] [
fhir:name [ fhir:v "period" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Period" ]           ] )         ] ) ;
        ( fhir:dependent [
fhir:name [ fhir:v "IVLTSPeriod" ] ;
          ( fhir:variable [ fhir:v "eff" ] [ fhir:v "period" ] )         ] )       ] [
fhir:name [ fhir:v "refRange" ] ;
        ( fhir:source [
fhir:context [ fhir:v "observation" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "obs" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "concept" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
          ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "value" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "concept" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
            ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "v" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "v.code" ]               ] )             ] )           ] [
fhir:name [ fhir:v "vv" ] ;
            ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "v" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "codeSystem" ] ;
              ( fhir:source [
fhir:context [ fhir:v "v" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "system" ]                 ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                 ] [
fhir:value [ fhir:v "uri" ]                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "value" ] ;
            ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "v" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "v.displayName" ]               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "value" ] ;
          ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "valu" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "txt" ] ;
            ( fhir:source [
fhir:context [ fhir:v "valu" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "txt" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
              ( fhir:source [
fhir:context [ fhir:v "txt" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "ref" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "concept" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "ref.value" ]                 ] )               ] )             ] )           ] )         ] )       ] )     ] )
  ] ) . #