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
Draft as of 2024-09-15 |
@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 "cda2fhirMedPrescription"] ; # fhir:text [ fhir:status [ fhir:v "generated" ] ; fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <pre>map "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirMedPrescription" = "cda2fhirMedPrescription"\n\nuses "http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument" alias ClinicalDocument as source\nuses "http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor" alias AssignedAuthor as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity" alias AssignedEntity as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity" alias AssociatedEntity as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization" alias CustodianOrganization as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf" alias OrganizationPartOf as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/Organization" alias rapresentedOrganization as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/Section" alias Section as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/PatientRole" alias PatientRole as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/AD" alias AD as source\nuses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target\nuses "http://hl7.org/fhir/StructureDefinition/Composition" alias Composition as produced\nuses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as produced\nuses "http://hl7.org/fhir/StructureDefinition/Encounter" alias Encounter as produced\nuses "http://hl7.org/fhir/StructureDefinition/Person" alias Patient as produced\nuses "http://hl7.org/fhir/StructureDefinition/Practitioner" alias Practitioner as produced\nuses "http://hl7.org/fhir/StructureDefinition/Organization" alias Organization as produced\nuses "http://hl7.org/fhir/cda/StructureDefinition/Act" alias Act as produced\nuses "http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ" alias IVL_PQ as source\nuses "http://hl7.org/fhir/cda/StructureDefinition/PQ" alias PQ as source\nuses "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" alias SimpleQuantity as target\n\nimports "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes"\nimports "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader"\n\ngroup CdaToBundle(source cda : ClinicalDocument, target bundle : Bundle) {\n cda -> 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) "cdatobundle";\n cda.recordTarget as recordTarget then {\n recordTarget.patientRole as patient then {\n patient.id as id -> patient.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext;\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n } "record";\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 -> requestPAT.url = append('Patient?identifier=', ext) "UUID";\n } "ext";\n } "recPat";\n } "patient";\n } "ClinicalDocumentToBody";\n}\n\ngroup ClinicalDocumentToBundle(source cda : ClinicalDocument, target patient : Patient, target composition : Composition, target encounter : Encounter, target bundle : Bundle, target DocumentReference : DocumentReference) {\n cda -> bundle.id = uuid() "id";\n cda.id -> bundle.identifier "identifier";\n cda -> bundle.type = 'transaction' "type";\n cda -> bundle.timestamp = (timestamp.now()) "date";\n cda then ClinicalDocumentComposition(cda, composition, patient, encounter, bundle, DocumentReference) "composition";\n cda.component as component then {\n component.structuredBody as body then {\n body -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Coverage') as coverage, coverage.id = uuid() as uuid1, e1.fullUrl = append('https://example/Coverage/', uuid1), request.url = 'Coverage' then {\n body -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'POST', e2.resource = create('MedicationRequest') as medRq, medRq.id = uuid() as uuid1, e2.fullUrl = append('https://example/MedicationRequest/', uuid1), request.url = 'MedicationRequest' then {\n body.component as component then {\n // discretizzi il primo livello di component\n component.section as srcSection then {\n srcSection.code where (code = '57827-8') -> composition.section as tgtSection then ClinicalDocumentSectionEsenzioni(cda, srcSection, patient, tgtSection, bundle, encounter, coverage) "esenz";\n srcSection.code where (code = '57828-6') -> composition.section as tgtSection then ClinicalDocumentSectionPrescrizioneFarmaceutica(cda, srcSection, patient, tgtSection, bundle, encounter, coverage, medRq) "prescfarm";\n srcSection.code where (code = '48767-8') -> composition.section as tgtSection then ClinicalDocumentSectionAnnotazioni(cda, srcSection, patient, tgtSection, bundle, encounter, medRq) "annot";\n srcSection.code where (code = '51851-4') -> composition.section as tgtSection then ClinicalDocumentSectionMessaggioRegionale(cda, srcSection, patient, tgtSection, bundle, encounter, medRq) "messregg";\n srcSection.code where (code = '8716-3') -> composition.section as tgtSection then ClinicalDocumentSectionParametriVitali(cda, srcSection, patient, tgtSection, bundle, encounter) "paramvit";\n srcSection.code where (code = '48765-2') -> composition.section as tgtSection then ClinicalDocumentSectionAllergieaiFarmaci(cda, srcSection, patient, tgtSection, bundle, encounter) "allergfarm";\n srcSection.code where (code = '47420-5') -> composition.section as tgtSection then ClinicalDocumentSectionStatoClinicoPaziente(cda, srcSection, patient, tgtSection, bundle, encounter) "statclinpaz";\n } "cov";\n };\n } "medreq";\n } "coverage";\n } "body";\n };\n}\n\ngroup ClinicalDocumentSectionEsenzioni(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter, target coverage : Coverage) {\n src.title as t -> tgt.title = (t.dataString);\n src.code -> tgt.code;\n src.text as cdaText -> tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Coverage/' + %coverage.id), tgt.text as fhirText then {\n cdaText -> fhirText.status = 'generated' "narrativeStatus";\n cdaText as t -> fhirText.div = t "narrativeText";\n src.entry as srcse then {\n srcse.act as srcsec then {\n srcsec.code -> coverage.type;\n srcsec.code as srctxt then {\n srctxt -> coverage.type as typetxt then {\n srctxt.originalText as ref then {\n ref.reference as t then {\n t.value as l -> typetxt.text = l "reference";\n } "tcf";\n } "rfde";\n } "reftxt";\n } "origtxt";\n srcsec where coverage.status.exists().not() then {\n srcsec -> coverage.status = 'active' "status";\n } "statuscode";\n srcsec -> coverage.beneficiary = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n srcsec -> coverage.payor = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n } "cdaText";\n } "secact";\n } "cff";\n}\n\ngroup ClinicalDocumentSectionPrescrizioneFarmaceutica(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter, target coverage : Coverage, target medRq : MedicationRequest) {\n src.title as t -> tgt.title = (t.dataString);\n src.code -> tgt.code;\n src.text as cdaText -> tgt.entry = create('Reference') as reference, reference.reference = ('https://example/MedicationRequest/' + %medRq.id), tgt.text as fhirText then {\n src.id -> medRq.identifier;\n cdaText -> fhirText.status = 'generated' "narrativeStatus";\n cdaText as t -> fhirText.div = t "narrativeText";\n cdaText -> medRq.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n cdaText -> medRq.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";\n cdaText -> medRq.status = 'active' "status";\n cdaText -> medRq.intent = 'order' "intent";\n src.entry as srcent then {\n srcent.substanceAdministration as subAdm then {\n subAdm.effectiveTime : IVL_TS as eff -> medRq.dosageInstruction = create('Dosage') as dosage then {\n subAdm -> dosage.timing = create('Timing') as tim then {\n subAdm -> tim.repeat as repeat then {\n eff -> repeat.bounds = create('Period') as period then IVLTSPeriod(eff, period) "boundsperiod";\n eff.width as width then {\n width.value as v -> repeat.duration = v;\n width.unit as u -> repeat.durationUnit = u;\n };\n } "repeat";\n } "timing";\n } "dosage";\n subAdm.effectiveTime as eff -> medRq.dosageInstruction = create('Dosage') as dosage then {\n subAdm -> dosage.timing = create('Timing') as tim then {\n eff where eff.low.exists().not() and eff.high.exists().not() then {\n eff.value as v -> tim.event = create('dateTime') as event then TSDateTime(v, event) "evnt";\n } "effct1";\n } "timing1";\n } "dosage1";\n subAdm.effectiveTime : PIVL_TS as effp -> medRq.dosageInstruction = create('Dosage') as dosage then {\n effp -> dosage.timing = create('Timing') as timing then {\n effp -> timing then periodTiming(effp, timing) "cod";\n effp where effp.phase.exists() then {\n effp.phase as phase -> timing.repeat as r then {\n phase.low -> r.bounds = create('Period') as period then {\n phase.low -> period.start "lo";\n };\n phase.width as wid then {\n wid.value as v -> r.duration = v "vals";\n wid.unit as u -> r.durationUnit = u;\n } "dur";\n } "rep";\n } "phase";\n } "timing";\n } "eff";\n subAdm.effectiveTime : EIVL_TS as effe -> medRq.dosageInstruction = create('Dosage') as dosage then {\n effe -> dosage.timing = create('Timing') as timing then {\n effe -> timing.repeat as r then {\n effe.event -> r.when;\n effe.offset as offset then {\n offset.low as v then {\n v.value as o -> r.offset = o "barabar";\n } "offs";\n } "poi";\n } "lkj";\n } "ghj";\n } "eff";\n subAdm.doseQuantity as doseQuant -> medRq.dosageInstruction = create('Dosage') as dosage then {\n doseQuant.originalText as ot then {\n ot.reference -> dosage.text;\n } "ot";\n doseQuant -> dosage.doseAndRate as dosageRate then {\n doseQuant -> dosageRate.dose = create('Range') as d then {\n doseQuant -> d.low = create('SimpleQuantity') as l then {\n doseQuant.low as lo -> l.value = (lo.value);\n doseQuant.low as lo -> l.unit = (lo.unit);\n } "low";\n doseQuant -> d.high = create('SimpleQuantity') as h then {\n doseQuant.high as hi -> h.value = (hi.value);\n doseQuant.high as hi -> h.unit = (hi.unit);\n } "low";\n } "d";\n } "dosageRate";\n } "doseQuant";\n subAdm -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Medication') as medication, medication.id = uuid() as uuid1, e1.fullUrl = append('https://example/Medication/', uuid1), request.url = 'Medication', medRq.medication = create('Reference') as reference, reference.reference = ('https://example/Medication/' + %medication.id) then {\n subAdm.consumable as cons then {\n cons.manufacturedProduct as manuprod then {\n manuprod.manufacturedLabeledDrug as manudrug then {\n manudrug.code -> medication.code;\n manudrug -> medication.identifier as medid then {\n manudrug.name -> medid.value;\n } "idmedname";\n manudrug.code as srctxt then {\n srctxt -> medication.code as typetxt then {\n srctxt.originalText as ref then {\n ref.reference as reference then {\n reference.value as l -> typetxt.text = l "reference";\n } "tcf";\n } "tcfg";\n } "reftxtd";\n } "origtxtd";\n } "manudrug";\n manuprod.manufacturedMaterial as manufact then {\n manufact.code -> medication.code;\n manufact.code as srctxt then {\n srctxt -> medication.code as typetxt then {\n srctxt.originalText as ref then {\n ref.reference as reference then {\n reference.value as l -> typetxt.text = l "reference";\n } "tcf";\n } "tcfg";\n } "reftxt";\n } "origtxt";\n manufact.ingredient as ingredient -> medication.ingredient as ing then {\n ingredient.quantity as quantity -> ing.strength = create('Ratio') as strength then EmedRTOPQPQRatio(quantity, strength) "strength";\n manufact -> ing.item = create('CodeableConcept') as ingcode, ingcode.text = (%manufact.name.other) "ingredientCode";\n } "ingr";\n manufact.formCode -> medication.form;\n manufact -> medication.identifier as medid "transl";\n } "manuFact";\n } "manumat";\n } "cons";\n subAdm.entryRelationship as entryrel1 then {\n entryrel1.supply as sup -> medRq.dispenseRequest as dispreq then {\n sup -> dispreq.quantity = create('SimpleQuantity') as quantity then {\n sup.quantity as q -> quantity.value = (q.value);\n } "quantity";\n };\n } "entry1";\n subAdm.entryRelationship as entryrel2 where (typeCode = 'REFR') then {\n subAdm -> medRq.insurance = create('Reference') as reference, reference.reference = ('https://example/Coverage/' + %coverage.id) then {\n entryrel2.act as act2 -> coverage.costToBeneficiary as cost then {\n act2 -> cost.value = create('SimpleQuantity') as val then {\n act2 -> val.value = '0' "bnm";\n } "beneficmoney";\n act2 -> cost.exception as except then {\n act2.code -> except.type;\n } "exept";\n } "act2";\n } "Cover";\n } "entry2";\n subAdm.entryRelationship as entryrel3 where (typeCode = 'RSON') then {\n entryrel3.observation as obs3 where (classCode = 'OBS') then {\n obs3.code -> medRq.reasonCode;\n obs3.text as text then {\n text -> medRq.reasonCode as ce then {\n // text.reference as reference-> ce.text=reference;\n text.reference as reference then {\n reference.value as l -> ce.text = l "reference";\n } "tcf";\n } "originltext";\n } "txt";\n } "obs3";\n } "entry2";\n subAdm.entryRelationship as entryrel4 where (typeCode = 'SUBJ') then {\n entryrel4.observation as obs3 -> medRq.substitution as sub then {\n obs3.code as Code -> sub.allowed = create('CodeableConcept') as allowed then CECodeableConcept(Code, allowed);\n obs3.entryRelationship as entry then {\n entry.observation as obs4 then {\n obs4.code -> sub.reason;\n } "obs4";\n } "entry";\n } "obs";\n } "code";\n subAdm.entryRelationship as entryrel2 where (typeCode = 'SUBJ') then {\n entryrel2.act as act2 where (classCode = 'ACT') then {\n act2.text as text -> medRq.note as note then {\n text.reference as t then {\n t.value as l -> note.text = l "reference";\n } "tcx";\n } "reference";\n } "obs3";\n } "entry2";\n } "subsadm";\n } "subadm";\n } "hnjh";\n } "xxx";\n}\n\n// ------------Sezione Annotazioni-----------------------------------------------------------------------------------------------------------------------------------------\ngroup ClinicalDocumentSectionAnnotazioni(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter, target medRq : MedicationRequest) {\n src.title as t -> tgt.title = (t.dataString);\n src.code -> tgt.code;\n src.text as cdaText -> tgt.entry = create('Reference') as reference, reference.reference = ('https://example/MedicationRequest/' + %medRq.id), tgt.text as fhirText then {\n cdaText -> fhirText.status = 'generated' "narrativeStatus";\n cdaText as t -> fhirText.div = t "narrativeText";\n src.entry as entry then {\n entry.act as act then {\n act.text as text -> medRq.note as note then {\n text.reference as t then {\n t.value as l -> note.text = l "reference";\n } "tcx";\n } "reference";\n };\n };\n } "entry";\n}\n\n// ------------Sezione Messaggio Regionale-----------------------------------------------------------------------------------------------------------------------------------------\ngroup ClinicalDocumentSectionMessaggioRegionale(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter, target medRq : MedicationRequest) {\n src.title as t -> tgt.title = (t.dataString);\n src.code -> tgt.code;\n src.text as cdaText -> tgt.entry = create('Reference') as reference, reference.reference = ('https://example/MedicationRequest/' + %medRq.id) then {\n cdaText as text -> medRq.note as note then {\n text as t -> note.text = t "reference";\n } "nota";\n } "entry";\n}\n\n// ------------Sezione Parametri Vitali-----------------------------------------------------------------------------------------------------------------------------------------\ngroup ClinicalDocumentSectionParametriVitali(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n src.title as t -> tgt.title = (t.dataString);\n src.code -> tgt.code;\n src.text as cdaText -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'POST', e8.resource = create('Observation') as Observation, Observation.id = uuid() as uuid8, e8.fullUrl = append('https://example/Observation/', uuid8), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %Observation.id) then {\n src -> Observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n src -> Observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";\n src.code -> Observation.code;\n src where Observation.statusCode.exists().not() then {\n src -> Observation.status = 'final' "status";\n } "statuscode";\n cdaText -> Observation.note as note then {\n cdaText as t -> note.text = t "reference";\n } "reference";\n } "nota";\n}\n\n// ------------Sezione Allergie_Intolleranze-----------------------------------------------------------------------------------------------------------------------------------------\ngroup ClinicalDocumentSectionAllergieaiFarmaci(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n src.title as t -> tgt.title = (t.dataString);\n src.code -> tgt.code;\n src -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'POST', e9.resource = create('AllergyIntolerance') as allergyIntolerance, allergyIntolerance.id = uuid() as uuid9, e9.fullUrl = append('https://example/AllergyIntolerance/', uuid9), request.url = 'AllergyIntolerance', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/AllergyIntolerance/' + %allergyIntolerance.id) then {\n src -> allergyIntolerance.patient = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n src -> allergyIntolerance.clinicalStatus = create('CodeableConcept') as status then {\n src -> status.text = 'string' "text";\n src -> status.coding = create('Coding') as coding then {\n src -> coding.code = 'active' "active";\n src -> coding.system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical' "system";\n } "coding";\n } "allergy";\n src.text as cdaText -> allergyIntolerance.note as note then {\n cdaText as t -> note.text = t "reference";\n } "reference";\n } "nota";\n}\n\n// ------------Sezione Stato Clinico del Paziente----------------------------------------------------------------------------------------------------------------------------------------\ngroup ClinicalDocumentSectionStatoClinicoPaziente(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n src.title as t -> tgt.title = (t.dataString);\n src.code -> tgt.code;\n src.text as cdaText -> bundle.entry as e7, e7.request = create('BackboneElement') as request, request.method = 'POST', e7.resource = create('Observation') as Observation, Observation.id = uuid() as uuid7, e7.fullUrl = append('https://example/Observation/', uuid7), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %Observation.id) then {\n src -> Observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n src -> Observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";\n src.code -> Observation.code;\n src where Observation.statusCode.exists().not() then {\n src -> Observation.status = 'final' "status";\n } "statuscode";\n cdaText -> Observation.note as note then {\n cdaText as t -> note.text = t "reference";\n } "reference";\n } "nota";\n}\n\ngroup periodTiming(source effectiveTime : PIVL_TS, target timing : Timing) {\n effectiveTime -> timing.repeat as r then {\n effectiveTime.period as p -> r.period = (p.value);\n effectiveTime.period as p -> r.periodUnit = (p.unit);\n } "repeat";\n}\n\ngroup EmedRTOPQPQRatio(source src : RTO_PQ_PQ, target tgt : Ratio) {\n src.numerator as numerator -> tgt.numerator as targetNumerator then EmedPQQuantity(numerator, targetNumerator);\n src.denominator as denominator -> tgt.denominator as targetDenominator then EmedPQQuantity(denominator, targetDenominator);\n}\n\ngroup EmedPQQuantity(source src : PQ, target tgt : Quantity) {\n src.value as value -> tgt.value = value;\n src.unit as unit -> tgt.code = unit;\n src.unit as unit -> tgt.system = ('http://fhir.ch/ig/ch-emed/ValueSet/UnitCode'.resolve().compose.include.where(concept.where(code = %unit)).system);\n src.unit as unit -> tgt.unit = ('http://fhir.ch/ig/ch-emed/ValueSet/UnitCode'.resolve().compose.include.concept.where(code = %unit).display);\n}\n\n</pre>\n </div>" ] ; # fhir:url [ fhir:v "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirMedPrescription"^^xsd:anyURI] ; # fhir:version [ fhir:v "0.1.0"] ; # fhir:name [ fhir:v "cda2fhirMedPrescription"] ; # 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: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 "patient" ] ; ( fhir:source [ fhir:context [ fhir:v "cda" ] ; fhir:element [ fhir:v "recordTarget" ] ; fhir:variable [ fhir:v "recordTarget" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "recPat" ] ; ( fhir:source [ fhir:context [ fhir:v "recordTarget" ] ; fhir:element [ fhir:v "patientRole" ] ; fhir:variable [ fhir:v "patient" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "record" ] ; ( 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 "extension" ] ; ( 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: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 "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 "coverage" ] ; ( fhir:source [ fhir:context [ fhir:v "body" ] ] ) ; ( 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 "coverage" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Coverage" ] ] ) ] [ fhir:context [ fhir:v "coverage" ] ; 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/Coverage/" ] ] [ 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 "Coverage" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "medreq" ] ; ( fhir:source [ fhir:context [ fhir:v "body" ] ] ) ; ( fhir:target [ 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 "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 "e2" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "resource" ] ; fhir:variable [ fhir:v "medRq" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "MedicationRequest" ] ] ) ] [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "id" ] ; fhir:variable [ fhir:v "uuid1" ] ; 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/MedicationRequest/" ] ] [ 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 "MedicationRequest" ] ] ) ] ) ; ( 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 "cov" ] ; ( fhir:source [ fhir:context [ fhir:v "component" ] ; fhir:element [ fhir:v "section" ] ; fhir:variable [ fhir:v "srcSection" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "esenz" ] ; ( fhir:source [ fhir:context [ fhir:v "srcSection" ] ; fhir:element [ fhir:v "code" ] ; fhir:condition [ fhir:v "(code = '57827-8')" ] ] ) ; ( 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 "ClinicalDocumentSectionEsenzioni" ] ; ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] [ fhir:v "coverage" ] ) ] ) ] [ fhir:name [ fhir:v "prescfarm" ] ; ( fhir:source [ fhir:context [ fhir:v "srcSection" ] ; fhir:element [ fhir:v "code" ] ; fhir:condition [ fhir:v "(code = '57828-6')" ] ] ) ; ( 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 "ClinicalDocumentSectionPrescrizioneFarmaceutica" ] ; ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] [ fhir:v "coverage" ] [ fhir:v "medRq" ] ) ] ) ] [ fhir:name [ fhir:v "annot" ] ; ( fhir:source [ fhir:context [ fhir:v "srcSection" ] ; fhir:element [ fhir:v "code" ] ; fhir:condition [ fhir:v "(code = '48767-8')" ] ] ) ; ( 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 "ClinicalDocumentSectionAnnotazioni" ] ; ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] [ fhir:v "medRq" ] ) ] ) ] [ fhir:name [ fhir:v "messregg" ] ; ( fhir:source [ fhir:context [ fhir:v "srcSection" ] ; fhir:element [ fhir:v "code" ] ; fhir:condition [ fhir:v "(code = '51851-4')" ] ] ) ; ( 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 "ClinicalDocumentSectionMessaggioRegionale" ] ; ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] [ fhir:v "medRq" ] ) ] ) ] [ fhir:name [ fhir:v "paramvit" ] ; ( fhir:source [ fhir:context [ fhir:v "srcSection" ] ; fhir:element [ fhir:v "code" ] ; fhir:condition [ fhir:v "(code = '8716-3')" ] ] ) ; ( 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 "ClinicalDocumentSectionParametriVitali" ] ; ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] ) ] ) ] [ fhir:name [ fhir:v "allergfarm" ] ; ( fhir:source [ fhir:context [ fhir:v "srcSection" ] ; fhir:element [ fhir:v "code" ] ; fhir:condition [ fhir:v "(code = '48765-2')" ] ] ) ; ( 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 "ClinicalDocumentSectionAllergieaiFarmaci" ] ; ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] ) ] ) ] [ fhir:name [ fhir:v "statclinpaz" ] ; ( fhir:source [ fhir:context [ fhir:v "srcSection" ] ; fhir:element [ fhir:v "code" ] ; fhir:condition [ fhir:v "(code = '47420-5')" ] ] ) ; ( 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 "ClinicalDocumentSectionStatoClinicoPaziente" ] ; ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] ) ] ) ] ) ; fhir:documentation [ fhir:v "discretizzi il primo livello di component" ] ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "ClinicalDocumentSectionEsenzioni" ] ; 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 "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:name [ fhir:v "coverage" ] ; fhir:type [ fhir:v "Coverage" ] ; 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 "cff" ] ; ( 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 "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/Coverage/' + %coverage.id" ] ] ) ] [ 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 "secact" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "entry" ] ; fhir:variable [ fhir:v "srcse" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "cdaText" ] ; ( fhir:source [ fhir:context [ fhir:v "srcse" ] ; fhir:element [ fhir:v "act" ] ; fhir:variable [ fhir:v "srcsec" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "code" ] ; ( fhir:source [ fhir:context [ fhir:v "srcsec" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "coverage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "type" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] [ fhir:name [ fhir:v "origtxt" ] ; ( fhir:source [ fhir:context [ fhir:v "srcsec" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "srctxt" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reftxt" ] ; ( fhir:source [ fhir:context [ fhir:v "srctxt" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "coverage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "type" ] ; fhir:variable [ fhir:v "typetxt" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "rfde" ] ; ( fhir:source [ fhir:context [ fhir:v "srctxt" ] ; fhir:element [ fhir:v "originalText" ] ; fhir:variable [ fhir:v "ref" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "tcf" ] ; ( fhir:source [ fhir:context [ fhir:v "ref" ] ; fhir:element [ fhir:v "reference" ] ; fhir:variable [ fhir:v "t" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "t" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "l" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "typetxt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "l" ] ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "statuscode" ] ; ( fhir:source [ fhir:context [ fhir:v "srcsec" ] ; fhir:condition [ fhir:v "coverage.status.exists().not()" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "status" ] ; ( fhir:source [ fhir:context [ fhir:v "srcsec" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "coverage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "status" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "active" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "srcsec" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "coverage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "beneficiary" ] ; 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 "srcsec" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "coverage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "payor" ] ; 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 "ClinicalDocumentSectionPrescrizioneFarmaceutica" ] ; 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 "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:name [ fhir:v "coverage" ] ; fhir:type [ fhir:v "Coverage" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "medRq" ] ; fhir:type [ fhir:v "MedicationRequest" ] ; 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 "xxx" ] ; ( 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 "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/MedicationRequest/' + %medRq.id" ] ] ) ] [ 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 "id" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "id" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "identifier" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] [ 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 "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "cdaText" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; 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 "cdaText" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; 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 "status" ] ; ( fhir:source [ fhir:context [ fhir:v "cdaText" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "status" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "active" ] ] ) ] ) ] [ fhir:name [ fhir:v "intent" ] ; ( fhir:source [ fhir:context [ fhir:v "cdaText" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "intent" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "order" ] ] ) ] ) ] [ fhir:name [ fhir:v "hnjh" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "entry" ] ; fhir:variable [ fhir:v "srcent" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "subadm" ] ; ( fhir:source [ fhir:context [ fhir:v "srcent" ] ; fhir:element [ fhir:v "substanceAdministration" ] ; fhir:variable [ fhir:v "subAdm" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "dosage" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ; fhir:type [ fhir:v "IVL_TS" ] ; fhir:element [ fhir:v "effectiveTime" ] ; fhir:variable [ fhir:v "eff" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "dosageInstruction" ] ; fhir:variable [ fhir:v "dosage" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Dosage" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "timing" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "dosage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "timing" ] ; fhir:variable [ fhir:v "tim" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Timing" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "repeat" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tim" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "repeat" ] ; fhir:variable [ fhir:v "repeat" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "boundsperiod" ] ; ( fhir:source [ fhir:context [ fhir:v "eff" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "repeat" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "bounds" ] ; 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 "width" ] ; ( fhir:source [ fhir:context [ fhir:v "eff" ] ; fhir:element [ fhir:v "width" ] ; fhir:variable [ fhir:v "width" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "value" ] ; ( fhir:source [ fhir:context [ fhir:v "width" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "v" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "repeat" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "duration" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "v" ] ] ) ] ) ] [ fhir:name [ fhir:v "unit" ] ; ( fhir:source [ fhir:context [ fhir:v "width" ] ; fhir:element [ fhir:v "unit" ] ; fhir:variable [ fhir:v "u" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "repeat" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "durationUnit" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "u" ] ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "dosage1" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ; fhir:element [ fhir:v "effectiveTime" ] ; fhir:variable [ fhir:v "eff" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "dosageInstruction" ] ; fhir:variable [ fhir:v "dosage" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Dosage" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "timing1" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "dosage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "timing" ] ; fhir:variable [ fhir:v "tim" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Timing" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "effct1" ] ; ( fhir:source [ fhir:context [ fhir:v "eff" ] ; fhir:condition [ fhir:v "eff.low.exists().not() and eff.high.exists().not()" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "evnt" ] ; ( fhir:source [ fhir:context [ fhir:v "eff" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "v" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tim" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "event" ] ; fhir:variable [ fhir:v "event" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "dateTime" ] ] ) ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "TSDateTime" ] ; ( fhir:variable [ fhir:v "v" ] [ fhir:v "event" ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "eff" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ; fhir:type [ fhir:v "PIVL_TS" ] ; fhir:element [ fhir:v "effectiveTime" ] ; fhir:variable [ fhir:v "effp" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "dosageInstruction" ] ; fhir:variable [ fhir:v "dosage" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Dosage" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "timing" ] ; ( fhir:source [ fhir:context [ fhir:v "effp" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "dosage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "timing" ] ; fhir:variable [ fhir:v "timing" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Timing" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "cod" ] ; ( fhir:source [ fhir:context [ fhir:v "effp" ] ] ) ; ( fhir:target [ fhir:contextType [ fhir:v "variable" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "timing" ] ] ) ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "periodTiming" ] ; ( fhir:variable [ fhir:v "effp" ] [ fhir:v "timing" ] ) ] ) ] [ fhir:name [ fhir:v "phase" ] ; ( fhir:source [ fhir:context [ fhir:v "effp" ] ; fhir:condition [ fhir:v "effp.phase.exists()" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "rep" ] ; ( fhir:source [ fhir:context [ fhir:v "effp" ] ; fhir:element [ fhir:v "phase" ] ; fhir:variable [ fhir:v "phase" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "timing" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "repeat" ] ; fhir:variable [ fhir:v "r" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "low" ] ; ( fhir:source [ fhir:context [ fhir:v "phase" ] ; fhir:element [ fhir:v "low" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "r" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "bounds" ] ; fhir:variable [ fhir:v "period" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Period" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "lo" ] ; ( fhir:source [ fhir:context [ fhir:v "phase" ] ; fhir:element [ fhir:v "low" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "period" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "start" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] ) ] [ fhir:name [ fhir:v "dur" ] ; ( fhir:source [ fhir:context [ fhir:v "phase" ] ; fhir:element [ fhir:v "width" ] ; fhir:variable [ fhir:v "wid" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "vals" ] ; ( fhir:source [ fhir:context [ fhir:v "wid" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "v" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "r" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "duration" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "v" ] ] ) ] ) ] [ fhir:name [ fhir:v "unit" ] ; ( fhir:source [ fhir:context [ fhir:v "wid" ] ; fhir:element [ fhir:v "unit" ] ; fhir:variable [ fhir:v "u" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "r" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "durationUnit" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "u" ] ] ) ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "eff" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ; fhir:type [ fhir:v "EIVL_TS" ] ; fhir:element [ fhir:v "effectiveTime" ] ; fhir:variable [ fhir:v "effe" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "dosageInstruction" ] ; fhir:variable [ fhir:v "dosage" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Dosage" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "ghj" ] ; ( fhir:source [ fhir:context [ fhir:v "effe" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "dosage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "timing" ] ; fhir:variable [ fhir:v "timing" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Timing" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "lkj" ] ; ( fhir:source [ fhir:context [ fhir:v "effe" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "timing" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "repeat" ] ; fhir:variable [ fhir:v "r" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "event" ] ; ( fhir:source [ fhir:context [ fhir:v "effe" ] ; fhir:element [ fhir:v "event" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "r" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "when" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] [ fhir:name [ fhir:v "poi" ] ; ( fhir:source [ fhir:context [ fhir:v "effe" ] ; fhir:element [ fhir:v "offset" ] ; fhir:variable [ fhir:v "offset" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "offs" ] ; ( fhir:source [ fhir:context [ fhir:v "offset" ] ; fhir:element [ fhir:v "low" ] ; fhir:variable [ fhir:v "v" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "barabar" ] ; ( fhir:source [ fhir:context [ fhir:v "v" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "o" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "r" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "offset" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "o" ] ] ) ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "doseQuant" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ; fhir:element [ fhir:v "doseQuantity" ] ; fhir:variable [ fhir:v "doseQuant" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "dosageInstruction" ] ; fhir:variable [ fhir:v "dosage" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Dosage" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "ot" ] ; ( fhir:source [ fhir:context [ fhir:v "doseQuant" ] ; fhir:element [ fhir:v "originalText" ] ; fhir:variable [ fhir:v "ot" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "ot" ] ; fhir:element [ fhir:v "reference" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "dosage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] ) ] [ fhir:name [ fhir:v "dosageRate" ] ; ( fhir:source [ fhir:context [ fhir:v "doseQuant" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "dosage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "doseAndRate" ] ; fhir:variable [ fhir:v "dosageRate" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "d" ] ; ( fhir:source [ fhir:context [ fhir:v "doseQuant" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "dosageRate" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "dose" ] ; fhir:variable [ fhir:v "d" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Range" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "low" ] ; ( fhir:source [ fhir:context [ fhir:v "doseQuant" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "d" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "low" ] ; fhir:variable [ fhir:v "l" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "SimpleQuantity" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "low" ] ; ( fhir:source [ fhir:context [ fhir:v "doseQuant" ] ; fhir:element [ fhir:v "low" ] ; fhir:variable [ fhir:v "lo" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "l" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "lo.value" ] ] ) ] ) ] [ fhir:name [ fhir:v "low" ] ; ( fhir:source [ fhir:context [ fhir:v "doseQuant" ] ; fhir:element [ fhir:v "low" ] ; fhir:variable [ fhir:v "lo" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "l" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "unit" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "lo.unit" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "low" ] ; ( fhir:source [ fhir:context [ fhir:v "doseQuant" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "d" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "high" ] ; fhir:variable [ fhir:v "h" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "SimpleQuantity" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "high" ] ; ( fhir:source [ fhir:context [ fhir:v "doseQuant" ] ; fhir:element [ fhir:v "high" ] ; fhir:variable [ fhir:v "hi" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "h" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "hi.value" ] ] ) ] ) ] [ fhir:name [ fhir:v "high" ] ; ( fhir:source [ fhir:context [ fhir:v "doseQuant" ] ; fhir:element [ fhir:v "high" ] ; fhir:variable [ fhir:v "hi" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "h" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "unit" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "hi.unit" ] ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "subsadm" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ] ) ; ( 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 "medication" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Medication" ] ] ) ] [ fhir:context [ fhir:v "medication" ] ; 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/Medication/" ] ] [ 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 "Medication" ] ] ) ] [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "medication" ] ; 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/Medication/' + %medication.id" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "cons" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ; fhir:element [ fhir:v "consumable" ] ; fhir:variable [ fhir:v "cons" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "manumat" ] ; ( fhir:source [ fhir:context [ fhir:v "cons" ] ; fhir:element [ fhir:v "manufacturedProduct" ] ; fhir:variable [ fhir:v "manuprod" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "manudrug" ] ; ( fhir:source [ fhir:context [ fhir:v "manuprod" ] ; fhir:element [ fhir:v "manufacturedLabeledDrug" ] ; fhir:variable [ fhir:v "manudrug" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "code" ] ; ( fhir:source [ fhir:context [ fhir:v "manudrug" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medication" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] [ fhir:name [ fhir:v "idmedname" ] ; ( fhir:source [ fhir:context [ fhir:v "manudrug" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medication" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "identifier" ] ; fhir:variable [ fhir:v "medid" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "name" ] ; ( fhir:source [ fhir:context [ fhir:v "manudrug" ] ; fhir:element [ fhir:v "name" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medid" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] ) ] [ fhir:name [ fhir:v "origtxtd" ] ; ( fhir:source [ fhir:context [ fhir:v "manudrug" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "srctxt" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reftxtd" ] ; ( fhir:source [ fhir:context [ fhir:v "srctxt" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medication" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "typetxt" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "tcfg" ] ; ( fhir:source [ fhir:context [ fhir:v "srctxt" ] ; fhir:element [ fhir:v "originalText" ] ; fhir:variable [ fhir:v "ref" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "tcf" ] ; ( fhir:source [ fhir:context [ fhir:v "ref" ] ; fhir:element [ fhir:v "reference" ] ; fhir:variable [ fhir:v "reference" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "reference" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "l" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "typetxt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "l" ] ] ) ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "manuFact" ] ; ( fhir:source [ fhir:context [ fhir:v "manuprod" ] ; fhir:element [ fhir:v "manufacturedMaterial" ] ; fhir:variable [ fhir:v "manufact" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "code" ] ; ( fhir:source [ fhir:context [ fhir:v "manufact" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medication" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] [ fhir:name [ fhir:v "origtxt" ] ; ( fhir:source [ fhir:context [ fhir:v "manufact" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "srctxt" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reftxt" ] ; ( fhir:source [ fhir:context [ fhir:v "srctxt" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medication" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "typetxt" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "tcfg" ] ; ( fhir:source [ fhir:context [ fhir:v "srctxt" ] ; fhir:element [ fhir:v "originalText" ] ; fhir:variable [ fhir:v "ref" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "tcf" ] ; ( fhir:source [ fhir:context [ fhir:v "ref" ] ; fhir:element [ fhir:v "reference" ] ; fhir:variable [ fhir:v "reference" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "reference" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "l" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "typetxt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "l" ] ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "ingr" ] ; ( fhir:source [ fhir:context [ fhir:v "manufact" ] ; fhir:element [ fhir:v "ingredient" ] ; fhir:variable [ fhir:v "ingredient" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medication" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "ingredient" ] ; fhir:variable [ fhir:v "ing" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "strength" ] ; ( fhir:source [ fhir:context [ fhir:v "ingredient" ] ; fhir:element [ fhir:v "quantity" ] ; fhir:variable [ fhir:v "quantity" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "ing" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "strength" ] ; fhir:variable [ fhir:v "strength" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Ratio" ] ] ) ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "EmedRTOPQPQRatio" ] ; ( fhir:variable [ fhir:v "quantity" ] [ fhir:v "strength" ] ) ] ) ] [ fhir:name [ fhir:v "ingredientCode" ] ; ( fhir:source [ fhir:context [ fhir:v "manufact" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "ing" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "ingcode" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "CodeableConcept" ] ] ) ] [ fhir:context [ fhir:v "ingcode" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%manufact.name.other" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "formCode" ] ; ( fhir:source [ fhir:context [ fhir:v "manufact" ] ; fhir:element [ fhir:v "formCode" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medication" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "form" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] [ fhir:name [ fhir:v "transl" ] ; ( fhir:source [ fhir:context [ fhir:v "manufact" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medication" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "identifier" ] ; fhir:variable [ fhir:v "medid" ] ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "entry1" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ; fhir:element [ fhir:v "entryRelationship" ] ; fhir:variable [ fhir:v "entryrel1" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "supply" ] ; ( fhir:source [ fhir:context [ fhir:v "entryrel1" ] ; fhir:element [ fhir:v "supply" ] ; fhir:variable [ fhir:v "sup" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "dispenseRequest" ] ; fhir:variable [ fhir:v "dispreq" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "quantity" ] ; ( fhir:source [ fhir:context [ fhir:v "sup" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "dispreq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "quantity" ] ; fhir:variable [ fhir:v "quantity" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "SimpleQuantity" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "quantity" ] ; ( fhir:source [ fhir:context [ fhir:v "sup" ] ; fhir:element [ fhir:v "quantity" ] ; fhir:variable [ 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 "entry2" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ; fhir:element [ fhir:v "entryRelationship" ] ; fhir:variable [ fhir:v "entryrel2" ] ; fhir:condition [ fhir:v "(typeCode = 'REFR')" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "Cover" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "insurance" ] ; 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/Coverage/' + %coverage.id" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "act2" ] ; ( fhir:source [ fhir:context [ fhir:v "entryrel2" ] ; fhir:element [ fhir:v "act" ] ; fhir:variable [ fhir:v "act2" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "coverage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "costToBeneficiary" ] ; fhir:variable [ fhir:v "cost" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "beneficmoney" ] ; ( fhir:source [ fhir:context [ fhir:v "act2" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "cost" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "val" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "SimpleQuantity" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "bnm" ] ; ( fhir:source [ fhir:context [ fhir:v "act2" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "val" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "0" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "exept" ] ; ( fhir:source [ fhir:context [ fhir:v "act2" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "cost" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "exception" ] ; fhir:variable [ fhir:v "except" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "code" ] ; ( fhir:source [ fhir:context [ fhir:v "act2" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "except" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "type" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "entry2" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ; fhir:element [ fhir:v "entryRelationship" ] ; fhir:variable [ fhir:v "entryrel3" ] ; fhir:condition [ fhir:v "(typeCode = 'RSON')" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "obs3" ] ; ( fhir:source [ fhir:context [ fhir:v "entryrel3" ] ; fhir:element [ fhir:v "observation" ] ; fhir:variable [ fhir:v "obs3" ] ; fhir:condition [ fhir:v "(classCode = 'OBS')" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "code" ] ; ( fhir:source [ fhir:context [ fhir:v "obs3" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "reasonCode" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] [ fhir:name [ fhir:v "txt" ] ; ( fhir:source [ fhir:context [ fhir:v "obs3" ] ; fhir:element [ fhir:v "text" ] ; fhir:variable [ fhir:v "text" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "originltext" ] ; ( fhir:source [ fhir:context [ fhir:v "text" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "reasonCode" ] ; fhir:variable [ fhir:v "ce" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "tcf" ] ; ( fhir:source [ fhir:context [ fhir:v "text" ] ; fhir:element [ fhir:v "reference" ] ; fhir:variable [ fhir:v "reference" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "reference" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "l" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "ce" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "l" ] ] ) ] ) ] ) ; fhir:documentation [ fhir:v "text.reference as reference-> ce.text=reference;" ] ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "code" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ; fhir:element [ fhir:v "entryRelationship" ] ; fhir:variable [ fhir:v "entryrel4" ] ; fhir:condition [ fhir:v "(typeCode = 'SUBJ')" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "obs" ] ; ( fhir:source [ fhir:context [ fhir:v "entryrel4" ] ; fhir:element [ fhir:v "observation" ] ; fhir:variable [ fhir:v "obs3" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "substitution" ] ; fhir:variable [ fhir:v "sub" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "code" ] ; ( fhir:source [ fhir:context [ fhir:v "obs3" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "Code" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "sub" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "allowed" ] ; fhir:variable [ fhir:v "allowed" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "CodeableConcept" ] ] ) ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "CECodeableConcept" ] ; ( fhir:variable [ fhir:v "Code" ] [ fhir:v "allowed" ] ) ] ) ] [ fhir:name [ fhir:v "entry" ] ; ( fhir:source [ fhir:context [ fhir:v "obs3" ] ; fhir:element [ fhir:v "entryRelationship" ] ; fhir:variable [ fhir:v "entry" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "obs4" ] ; ( fhir:source [ fhir:context [ fhir:v "entry" ] ; fhir:element [ fhir:v "observation" ] ; fhir:variable [ fhir:v "obs4" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "code" ] ; ( fhir:source [ fhir:context [ fhir:v "obs4" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "sub" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "reason" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "entry2" ] ; ( fhir:source [ fhir:context [ fhir:v "subAdm" ] ; fhir:element [ fhir:v "entryRelationship" ] ; fhir:variable [ fhir:v "entryrel2" ] ; fhir:condition [ fhir:v "(typeCode = 'SUBJ')" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "obs3" ] ; ( fhir:source [ fhir:context [ fhir:v "entryrel2" ] ; fhir:element [ fhir:v "act" ] ; fhir:variable [ fhir:v "act2" ] ; fhir:condition [ fhir:v "(classCode = 'ACT')" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "act2" ] ; fhir:element [ fhir:v "text" ] ; fhir:variable [ fhir:v "text" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "note" ] ; fhir:variable [ fhir:v "note" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "tcx" ] ; ( fhir:source [ fhir:context [ fhir:v "text" ] ; fhir:element [ fhir:v "reference" ] ; fhir:variable [ fhir:v "t" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "t" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "l" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "note" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "l" ] ] ) ] ) ] ) ] ) ] ) ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "ClinicalDocumentSectionAnnotazioni" ] ; fhir:typeMode [ fhir:v "none" ] ; fhir:documentation [ fhir:v "------------Sezione Annotazioni-----------------------------------------------------------------------------------------------------------------------------------------" ] ; ( 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:name [ fhir:v "medRq" ] ; fhir:type [ fhir:v "MedicationRequest" ] ; 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 "entry" ] ; ( 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 "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/MedicationRequest/' + %medRq.id" ] ] ) ] [ 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 "entry" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "act" ] ; ( fhir:source [ fhir:context [ fhir:v "entry" ] ; fhir:element [ fhir:v "act" ] ; fhir:variable [ fhir:v "act" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "act" ] ; fhir:element [ fhir:v "text" ] ; fhir:variable [ fhir:v "text" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "note" ] ; fhir:variable [ fhir:v "note" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "tcx" ] ; ( fhir:source [ fhir:context [ fhir:v "text" ] ; fhir:element [ fhir:v "reference" ] ; fhir:variable [ fhir:v "t" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "t" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "l" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "note" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "l" ] ] ) ] ) ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "ClinicalDocumentSectionMessaggioRegionale" ] ; fhir:typeMode [ fhir:v "none" ] ; fhir:documentation [ fhir:v "------------Sezione Messaggio Regionale-----------------------------------------------------------------------------------------------------------------------------------------" ] ; ( 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:name [ fhir:v "medRq" ] ; fhir:type [ fhir:v "MedicationRequest" ] ; 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 "entry" ] ; ( 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 "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/MedicationRequest/' + %medRq.id" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "nota" ] ; ( fhir:source [ fhir:context [ fhir:v "cdaText" ] ; fhir:variable [ fhir:v "text" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "medRq" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "note" ] ; fhir:variable [ fhir:v "note" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "text" ] ; fhir:variable [ fhir:v "t" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "note" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "t" ] ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "ClinicalDocumentSectionParametriVitali" ] ; fhir:typeMode [ fhir:v "none" ] ; fhir:documentation [ fhir:v "------------Sezione Parametri Vitali-----------------------------------------------------------------------------------------------------------------------------------------" ] ; ( 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 "nota" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "text" ] ; fhir:variable [ fhir:v "cdaText" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "bundle" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "entry" ] ; fhir:variable [ fhir:v "e8" ] ] [ fhir:context [ fhir:v "e8" ] ; 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 "e8" ] ; 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 "uuid8" ] ; fhir:transform [ fhir:v "uuid" ] ] [ fhir:context [ fhir:v "e8" ] ; 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 "uuid8" ] ] ) ] [ 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 "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/Observation/' + %Observation.id" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "Observation" ] ; 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 "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "Observation" ] ; 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 "code" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "Observation" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] [ fhir:name [ fhir:v "statuscode" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:condition [ fhir:v "Observation.statusCode.exists().not()" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "status" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "Observation" ] ; 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 "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "cdaText" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "Observation" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "note" ] ; fhir:variable [ fhir:v "note" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "cdaText" ] ; fhir:variable [ fhir:v "t" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "note" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "t" ] ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "ClinicalDocumentSectionAllergieaiFarmaci" ] ; fhir:typeMode [ fhir:v "none" ] ; fhir:documentation [ fhir:v "------------Sezione Allergie_Intolleranze-----------------------------------------------------------------------------------------------------------------------------------------" ] ; ( 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 "nota" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "bundle" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "entry" ] ; fhir:variable [ fhir:v "e9" ] ] [ fhir:context [ fhir:v "e9" ] ; 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 "e9" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "resource" ] ; fhir:variable [ fhir:v "allergyIntolerance" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "AllergyIntolerance" ] ] ) ] [ fhir:context [ fhir:v "allergyIntolerance" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "id" ] ; fhir:variable [ fhir:v "uuid9" ] ; fhir:transform [ fhir:v "uuid" ] ] [ fhir:context [ fhir:v "e9" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "fullUrl" ] ; fhir:transform [ fhir:v "append" ] ; ( fhir:parameter [ fhir:value [ fhir:v "https://example/AllergyIntolerance/" ] ] [ fhir:value [ fhir:v "uuid9" ] ] ) ] [ 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 "AllergyIntolerance" ] ] ) ] [ 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/AllergyIntolerance/' + %allergyIntolerance.id" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "allergyIntolerance" ] ; 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 "allergy" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "allergyIntolerance" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "clinicalStatus" ] ; fhir:variable [ fhir:v "status" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "CodeableConcept" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "text" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "status" ] ; 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 "coding" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "status" ] ; 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 "active" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "coding" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "code" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "active" ] ] ) ] ) ] [ fhir:name [ fhir:v "system" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "coding" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "system" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical" ] ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "text" ] ; fhir:variable [ fhir:v "cdaText" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "allergyIntolerance" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "note" ] ; fhir:variable [ fhir:v "note" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "cdaText" ] ; fhir:variable [ fhir:v "t" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "note" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "t" ] ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "ClinicalDocumentSectionStatoClinicoPaziente" ] ; fhir:typeMode [ fhir:v "none" ] ; fhir:documentation [ fhir:v "------------Sezione Stato Clinico del Paziente----------------------------------------------------------------------------------------------------------------------------------------" ] ; ( 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 "nota" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "text" ] ; fhir:variable [ fhir:v "cdaText" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "bundle" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "entry" ] ; fhir:variable [ fhir:v "e7" ] ] [ fhir:context [ fhir:v "e7" ] ; 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 "e7" ] ; 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 "uuid7" ] ; fhir:transform [ fhir:v "uuid" ] ] [ fhir:context [ fhir:v "e7" ] ; 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 "uuid7" ] ] ) ] [ 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 "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/Observation/' + %Observation.id" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "Observation" ] ; 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 "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "Observation" ] ; 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 "code" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "vvv" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "Observation" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "vvv" ] ; fhir:transform [ fhir:v "create" ] ] ) ] [ fhir:name [ fhir:v "statuscode" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:condition [ fhir:v "Observation.statusCode.exists().not()" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "status" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "Observation" ] ; 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 "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "cdaText" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "Observation" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "note" ] ; fhir:variable [ fhir:v "note" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "reference" ] ; ( fhir:source [ fhir:context [ fhir:v "cdaText" ] ; fhir:variable [ fhir:v "t" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "note" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "t" ] ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "periodTiming" ] ; fhir:typeMode [ fhir:v "none" ] ; ( fhir:input [ fhir:name [ fhir:v "effectiveTime" ] ; fhir:type [ fhir:v "PIVL_TS" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "timing" ] ; fhir:type [ fhir:v "Timing" ] ; fhir:mode [ fhir:v "target" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "repeat" ] ; ( fhir:source [ fhir:context [ fhir:v "effectiveTime" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "timing" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "repeat" ] ; fhir:variable [ fhir:v "r" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "period" ] ; ( fhir:source [ fhir:context [ fhir:v "effectiveTime" ] ; fhir:element [ fhir:v "period" ] ; fhir:variable [ fhir:v "p" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "r" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "period" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "p.value" ] ] ) ] ) ] [ fhir:name [ fhir:v "period" ] ; ( fhir:source [ fhir:context [ fhir:v "effectiveTime" ] ; fhir:element [ fhir:v "period" ] ; fhir:variable [ fhir:v "p" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "r" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "periodUnit" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "p.unit" ] ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "EmedRTOPQPQRatio" ] ; fhir:typeMode [ fhir:v "none" ] ; ( fhir:input [ fhir:name [ fhir:v "src" ] ; fhir:type [ fhir:v "RTO_PQ_PQ" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "tgt" ] ; fhir:type [ fhir:v "Ratio" ] ; fhir:mode [ fhir:v "target" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "numerator" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "numerator" ] ; fhir:variable [ fhir:v "numerator" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "numerator" ] ; fhir:variable [ fhir:v "targetNumerator" ] ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "EmedPQQuantity" ] ; ( fhir:variable [ fhir:v "numerator" ] [ fhir:v "targetNumerator" ] ) ] ) ] [ fhir:name [ fhir:v "denominator" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "denominator" ] ; fhir:variable [ fhir:v "denominator" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "denominator" ] ; fhir:variable [ fhir:v "targetDenominator" ] ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "EmedPQQuantity" ] ; ( fhir:variable [ fhir:v "denominator" ] [ fhir:v "targetDenominator" ] ) ] ) ] ) ] [ fhir:name [ fhir:v "EmedPQQuantity" ] ; fhir:typeMode [ fhir:v "none" ] ; ( fhir:input [ fhir:name [ fhir:v "src" ] ; fhir:type [ fhir:v "PQ" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "tgt" ] ; fhir:type [ fhir:v "Quantity" ] ; fhir:mode [ fhir:v "target" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "value" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "value" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "value" ] ] ) ] ) ] [ fhir:name [ fhir:v "unit" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "unit" ] ; fhir:variable [ fhir:v "unit" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "code" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "unit" ] ] ) ] ) ] [ fhir:name [ fhir:v "unit" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "unit" ] ; fhir:variable [ fhir:v "unit" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "system" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "'http://fhir.ch/ig/ch-emed/ValueSet/UnitCode'.resolve().compose.include.where(concept.where(code = %unit)).system" ] ] ) ] ) ] [ fhir:name [ fhir:v "unit" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "unit" ] ; fhir:variable [ fhir:v "unit" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "unit" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "'http://fhir.ch/ig/ch-emed/ValueSet/UnitCode'.resolve().compose.include.concept.where(code = %unit).display" ] ] ) ] ) ] ) ] ) . #
IG © 2023+ HL7 Italy. Package hl7.fhir.it.cda2fhir#0.1.0 based on FHIR 4.0.1. Generated 2024-09-15
Links: Table of Contents |
QA Report