CDA to FHIR Maps
0.1.0 - ci-build Italy flag

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

: CDA to FHIR - VPS - TTL Representation

Draft as of 2024-09-15

Raw ttl | Download

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:StructureMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "cda2fhirEdReport"] ; # 
  fhir:text [
fhir:status [ fhir:v "generated" ] ;
fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n         <pre>map &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirEdReport&quot; = &quot;cda2fhirEdReport&quot;\n\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument&quot; alias ClinicalDocument as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor&quot; alias AssignedAuthor as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity&quot; alias AssignedEntity as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity&quot; alias AssociatedEntity as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization&quot; alias CustodianOrganization as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf&quot; alias OrganizationPartOf as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Organization&quot; alias rapresentedOrganization as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Section&quot; alias Section as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/PatientRole&quot; alias PatientRole as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AD&quot; alias AD as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; alias Bundle as target\nuses &quot;http://hl7.org/fhir/StructureDefinition/Composition&quot; alias Composition as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Patient&quot; alias Patient as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Encounter&quot; alias Encounter as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Person&quot; alias Patient as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Practitioner&quot; alias Practitioner as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Organization&quot; alias Organization as produced\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Act&quot; alias Act as produced\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ&quot; alias IVL_PQ as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/IVL-TS&quot; as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/PQ&quot; alias PQ as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/SimpleQuantity&quot; alias SimpleQuantity as target\n\nimports &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes&quot;\nimports &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader&quot;\n\n// --------------------------------------------------------------------------------------------\ngroup CdaToBundle(source cda : ClinicalDocument, target bundle : Bundle) {\n  cda -&gt;  bundle.entry as e,  e.request = create('BackboneElement') as request,  request.method = 'POST',  e.resource = create('Composition') as composition,  composition.id = uuid() as uuid1,  e.fullUrl = append('https://example/Composition/', uuid1),  request.url = 'Composition',  bundle.entry as e2,  e2.request = create('BackboneElement') as requestPAT,  requestPAT.method = 'PUT',  e2.resource = create('Patient') as patient,  patient.id = uuid() as uuid2,  e2.fullUrl = append('https://example/Patient/', uuid2),  bundle.entry as e3,  e3.request = create('BackboneElement') as request,  request.method = 'POST',  e3.resource = create('Encounter') as encounter,  encounter.id = uuid() as uuid3,  e3.fullUrl = append('https://example/Encounter/', uuid3),  request.url = 'Encounter',  bundle.entry as e6,  e6.request = create('BackboneElement') as request,  request.method = 'POST',  e6.resource = create('DocumentReference') as DocumentReference,  DocumentReference.id = uuid() as uuid6,  e6.fullUrl = append('https://example/DocumentReference/', uuid6),  request.url = 'DocumentReference' then {\n    cda then ClinicalDocumentToBundle(cda, patient, composition, encounter, bundle, DocumentReference) &quot;cdatobundle&quot;;\n    cda.recordTarget as recordTarget then {\n      recordTarget.patientRole as patient then {\n        patient.id as id -&gt; patient.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext1 -&gt; identifier.value = ext1 &quot;value&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n        } &quot;idfr&quot;;\n        patient.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') or (root = '2.16.840.1.113883.2.9.4.3.7') or (root = '2.16.840.1.113883.2.9.4.3.3') or (root = '2.16.840.1.113883.2.9.4.3.17') or (root = '2.16.840.1.113883.2.9.4.3.18') or (root = '2.16.840.1.113883.2.9.2.10.4.1.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1.1') or (root = '2.16.840.1.113883.2.9.2.10.4.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1') or (root = '2.16.840.1.113883.2.9.4.3.15') then {\n          id.extension as ext -&gt; requestPAT.url = append('Patient?identifier=', ext) &quot;UUID&quot;;\n        } &quot;ext&quot;;\n      } &quot;record&quot;;\n    } &quot;recPat&quot;;\n  } &quot;ClinicalDocumentToBody&quot;;\n}\n\ngroup ClinicalDocumentToBundle(source cda : ClinicalDocument, target patient : Patient, target composition : Composition, target encounter : Encounter, target bundle : Bundle, target documentreference : DocumentReference) {\n  cda -&gt; bundle.id = uuid() &quot;id&quot;;\n  cda.id -&gt; bundle.identifier &quot;identifier&quot;;\n  cda -&gt; bundle.type = 'transaction' &quot;type&quot;;\n  cda -&gt; bundle.timestamp = (timestamp.now()) &quot;date&quot;;\n  cda then ClinicalDocumentComposition(cda, composition, patient, encounter, bundle, documentreference) &quot;composition&quot;;\n  cda.component as component then {\n    component.structuredBody as body then {\n      body.component as component then {\n        component.section as srcSection then {\n          srcSection.code where (code = '11459-5') -&gt; composition.section as tgtSection then ModalitadiTrasposto(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;Modalitaditrasporto&quot;;\n          srcSection.code where (code = '78337-3') -&gt; composition.section as tgtSection then InquadramentoClinicoIniziale(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;Inquadramentoclinico&quot;;\n          srcSection.code where (code = '46239-0') -&gt; composition.section as tgtSection then MotivoDellaVisita(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;Inquadramentoclinico&quot;;\n          srcSection.code where (code = '54094-8') -&gt; composition.section as tgtSection then Triage(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;Triage&quot;;\n          srcSection.code where (code = '46240-8') -&gt; composition.section as tgtSection then ClinicalDocumentSectionEncounter(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;motivoricovero&quot;;\n          srcSection.code where (code = '8648-8') -&gt; composition.section as tgtSection then ClinicalDocumentSectionDecorsoOspedaliero(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;DecorsoOspedaliero&quot;;\n          srcSection.code where (code = '55109-3') -&gt; composition.section as tgtSection then ClinicalDocumentSectionComplicanze(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;Complicazioni&quot;;\n          srcSection.code where (code = '62387-6') -&gt; composition.section as tgtSection then ClinicalDocumentSectionConsulenza(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;Hospitaldischargestudiessummary&quot;;\n          srcSection.code where (code = '30954-2') -&gt; composition.section as tgtSection then ClinicalDocumentSectionAccertamenti(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;Accertamenti&quot;;\n          srcSection.code where (code = '8716-3') -&gt; composition.section as tgtSection then ClinicalDocumentSectionParametriVitali(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;Accertamenti&quot;;\n          srcSection.code where (code = '29549-3') -&gt; composition.section as tgtSection then ClinicalDocumentSectionTerapiaFarmacoInPronto(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;Accertamenti&quot;;\n          srcSection.code where (code = '18776-5') -&gt; composition.section as tgtSection then ClinicalDocumentSectionPianoCuraDimissione(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;Pianodicuraalladimissione&quot;;\n          srcSection.code where (code = '28574-2') -&gt; composition.section as tgtSection then ClinicalDocumentSectionDimissione(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;Dimissione&quot;;\n          srcSection.code where (code = '75311-1') -&gt; composition.section as tgtSection then ClinicalDocumentSectionTerapiaFarmacologicaDimissione(cda, srcSection, patient, tgtSection, bundle, encounter) &quot;TerapiaFarmacologicaDimissione&quot;;\n        };\n      };\n    } &quot;body&quot;;\n  };\n}\n\n// Sezione complicanze--------------------------------------------------------------------------\ngroup ClinicalDocumentSectionComplicanze(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src where src.entry.exists() then {\n    src.text as cdaText -&gt; tgt.text as fhirText then {\n      cdaText -&gt; fhirText.status = 'generated' &quot;narrativeStatus&quot;;\n      cdaText as t -&gt; fhirText.div = t &quot;narrativeText&quot;;\n    } &quot;cdaText&quot;;\n  } &quot;entryexists&quot;;\n  // Sezione Strutturata-----------------------------------------------------------------------------------------------------------------------------------------------\n  src.entry as entry1 -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n    entry1.observation as obs then Observation(obs, patient, enc, observation, bundle) &quot;act&quot;;\n  };\n  // Sezione Narrativa---------------------------------------------------------------------------------------------------------------------------------------------\n  src where src.entry.exists().not() then {\n    src.text as cdaText -&gt;  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 -&gt;  Observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n      src -&gt;  Observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n      src.code -&gt; Observation.code;\n      src where observation.statusCode.exists().not() then {\n        src -&gt; Observation.status = 'final' &quot;status&quot;;\n      } &quot;statuscode&quot;;\n      cdaText -&gt; Observation.note as note then {\n        cdaText as t -&gt; note.text = t &quot;reference&quot;;\n      } &quot;reference&quot;;\n    } &quot;cdaText&quot;;\n  } &quot;where&quot;;\n}\n\ngroup Observation(source obs : Observation, target patient : Patient, target encounter : Encounter, target ob : Observation, target bundle : Bundle) {\n  obs -&gt;  ob.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n  obs -&gt;  ob.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;\n  obs.code -&gt; ob.code;\n  obs.statusCode as statusc where (code = 'completed') -&gt; ob.status = 'final';\n  obs.statusCode as statusc where (code = 'active') -&gt; ob.status = 'registered';\n  obs.statusCode as statusc where (code = 'aborted') -&gt; ob.status = 'cancelled';\n  obs.statusCode as statusc where (code = 'suspended') -&gt; ob.status = 'partial';\n  obs where obs.statusCode.exists().not() then {\n    obs -&gt; ob.status = 'final' &quot;status&quot;;\n  } &quot;statuscode&quot;;\n  obs.effectiveTime as effectiveTime -&gt; ob.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;value2&quot;;\n  obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n    obs.effectiveTime as eff -&gt; ob.effective = create('Period') as period then IVLTSPeriod(eff, period);\n  } &quot;where&quot;;\n  obs.value : INT as int -&gt; ob.value = (int.value);\n  obs.value : CD as val then {\n    val -&gt; ob.value = create('CodeableConcept') as ce then {\n      val.originalText -&gt; ce.text;\n      val -&gt; ce.coding as coding then {\n        val.code as code -&gt; coding.code = cast(code, 'string');\n        val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        val.displayName as display -&gt; coding.display = cast(display, 'string');\n      } &quot;code&quot;;\n      val.translation as translation -&gt; ce.coding as coding then {\n        translation.code as code -&gt; coding.code = cast(code, 'string');\n        translation.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        translation.displayName as display -&gt; coding.display = cast(display, 'string');\n        translation.qualifier as qualifier then {\n          qualifier.value as value -&gt; ce.coding as coding then {\n            value.code as code -&gt; coding.code = cast(code, 'string');\n            value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n            value.displayName as display -&gt; coding.display = cast(display, 'string');\n          };\n        } &quot;translation1&quot;;\n      };\n    } &quot;coding&quot;;\n  } &quot;val&quot;;\n  obs.value : CE as val then {\n    val -&gt; ob.value = create('CodeableConcept') as ce then {\n      val.originalText -&gt; ce.text;\n      val -&gt; ce.coding as coding then {\n        val.code as code -&gt; coding.code = cast(code, 'string');\n        val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        val.displayName as display -&gt; coding.display = cast(display, 'string');\n      } &quot;code&quot;;\n      val.translation as translation -&gt; ce.coding as coding then {\n        translation.code as code -&gt; coding.code = cast(code, 'string');\n        translation.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        translation.displayName as display -&gt; coding.display = cast(display, 'string');\n        translation.qualifier as qualifier then {\n          qualifier.value as value -&gt; ce.coding as coding then {\n            value.code as code -&gt; coding.code = cast(code, 'string');\n            value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n            value.displayName as display -&gt; coding.display = cast(display, 'string');\n          };\n        } &quot;translation1&quot;;\n      };\n    } &quot;coding&quot;;\n  } &quot;val&quot;;\n  obs.value : PQ as val then {\n    val -&gt; ob.value = create('Quantity') as quantity then {\n      val.value as value -&gt; quantity.value = value;\n      val.unit as unit -&gt; quantity.unit = unit;\n    } &quot;quantity&quot;;\n  } &quot;valueQuantity&quot;;\n  obs.value : BL as value -&gt;  ob.value = create('boolean'),  ob.value = (value.value);\n  obs.value : ST as value -&gt;  ob.value = create('string'),  ob.value = (value.dataString);\n  obs.interpretationCode -&gt; ob.interpretation;\n  obs.methodCode -&gt; ob.method;\n  obs.performer as performer -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner then {\n    performer.assignedEntity as entity then {\n      entity -&gt; practitioner.meta as meta then {\n        entity -&gt; meta.tag = create('Coding') as coding then {\n          entity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n          entity -&gt; coding.code = 'ClinicalDocument/body/observation/performer' &quot;code&quot;;\n        } &quot;coding&quot;;\n      } &quot;meta&quot;;\n      entity.id as id -&gt; practitioner.identifier as identifier then {\n        id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n        id.extension as ext -&gt; identifier.value = ext then {\n          entity -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n        } &quot;ext&quot;;\n        id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n        id.root as r then {\n          id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  ob.performer = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;performer&quot;;\n        } &quot;r&quot;;\n      } &quot;identifier&quot;;\n      entity.assignedPerson as person then {\n        person.name -&gt; practitioner.name;\n        person.birthTime as birthTime then {\n          birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n        } &quot;birth&quot;;\n      } &quot;name&quot;;\n    };\n  };\n  obs.referenceRange as refRange -&gt; ob.referenceRange = create('BackboneElement') as ref then {\n    refRange.observationRange as obsRange -&gt; ref.low = create('SimpleQuantity') as Low then {\n      obsRange.value : IVL_PQ as v then {\n        v.low as l1 then {\n          l1.value as decValue -&gt; Low.value = decValue;\n          l1.unit as Unit -&gt; Low.unit = Unit;\n        } &quot;decValue&quot;;\n      } &quot;IVL-PQ&quot;;\n    } &quot;obsRange&quot;;\n  } &quot;refRange&quot;;\n}\n\n// ------------------------------------------------------------------------------------------------------\n// Sezione Decorso Ospedaliero----------------------------------------------------------------------------\ngroup ClinicalDocumentSectionDecorsoOspedaliero(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id),  observation.note as note then {\n    src.code -&gt; observation.code;\n    src where observation.statusCode.exists().not() then {\n      src -&gt; observation.status = 'final' &quot;status&quot;;\n    } &quot;statuscode&quot;;\n    src -&gt;  observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n    src -&gt;  observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n    src.text as t -&gt; note.text = t &quot;reference&quot;;\n    src.author as auth -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n      auth.time as ti -&gt; note.time = create('dateTime') as value then TSDateTime(ti, value);\n      auth.assignedAuthor as assAuth then {\n        // meta+identifier\n        assAuth -&gt; practitioner.meta as meta then {\n          assAuth -&gt; meta.tag = create('Coding') as coding then {\n            assAuth -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            assAuth -&gt; coding.code = 'ClinicalDocument/body/DecorsoOspedaliero/author' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        assAuth.id as id -&gt; practitioner.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  note.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        assAuth.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n        } &quot;2&quot;;\n        assAuth.assignedPerson as assPers then {\n          assPers.name -&gt; practitioner.name;\n        } &quot;assPers&quot;;\n      } &quot;assAuth&quot;;\n    } &quot;Auth&quot;;\n  } &quot;OB-note&quot;;\n}\n\n// --------------------------------------------------------------------------------------------------------\n// Sezione Encounter---------------------------------------------------------------------------------------\ngroup ClinicalDocumentSectionEncounter(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc1 : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src.text as cdaText -&gt; tgt.text as fhirText then {\n    cdaText -&gt; fhirText.status = 'generated' &quot;narrativeStatus&quot;;\n    cdaText as t -&gt; fhirText.div = t &quot;narrativeText&quot;;\n  } &quot;cdaText&quot;;\n  src.entry as entry1 -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Encounter') as encounter,  encounter.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Encounter/', uuid1),  request.url = 'Encounter',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) then {\n    entry1 -&gt;  encounter.partOf = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc1.id) &quot;refer&quot;;\n    entry1 -&gt;  encounter.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;refer&quot;;\n    entry1 -&gt; encounter.status = 'finished' &quot;status&quot;;\n    entry1 -&gt; encounter.class = create('Coding') as cl then {\n      entry1 -&gt; cl.code = 'AMB' &quot;code&quot;;\n      entry1 -&gt; cl.display = 'ambulatory' &quot;code&quot;;\n    } &quot;class&quot;;\n    entry1.encounter as enc then {\n      enc.code -&gt; encounter.type;\n      // effectiveTime=period\n      enc where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n        enc.effectiveTime as eff -&gt; encounter.period = create('Period') as period then IVLTSPeriod(eff, period);\n      } &quot;where&quot;;\n      // effectiveTime = time-stamp\n      enc where effectiveTime.low.exists().not() or effectiveTime.high.exists().not() then {\n        enc.effectiveTime as effectivetime1 -&gt; encounter.period = create('Period') as period then {\n          effectivetime1 -&gt; period.start = create('dateTime') as start then TSDateTime(effectivetime1, start) &quot;val&quot;;\n        } &quot;efft&quot;;\n      } &quot;where&quot;;\n      // enc.effectiveTime as eff -&gt; encounter.period = create('Period') as period then{\n      enc.participant as part where (typeCode != 'LOC') -&gt; encounter.participant = create('BackboneElement') as patarg then {\n        part -&gt; patarg.type as type then {\n          part -&gt; type.coding as coding then {\n            part -&gt; coding.code = (part.typeCode) &quot;codice&quot;;\n            part -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' &quot;system&quot;;\n          } &quot;codeType&quot;;\n        } &quot;type&quot;;\n        part.time as time1 -&gt; patarg.period = create('Period') as period then {\n          time1 -&gt; period.start = create('dateTime') as start then TSDateTime(time1, start) &quot;val&quot;;\n        };\n        part.time as ti -&gt; patarg.period = create('Period') as period then IVLTSPeriod(ti, period);\n        part.participantRole as partRole -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n          // modifica meta+identifier\n          partRole -&gt; practitioner.meta as meta then {\n            partRole -&gt; meta.tag = create('Coding') as coding then {\n              partRole -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              partRole -&gt; coding.code = 'ClinicalDocument/body/Encounter/participant' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          partRole.id as id -&gt; practitioner.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  patarg.individual = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          partRole.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          partRole.playingEntity as playEnt then {\n            playEnt.name -&gt; practitioner.name;\n          } &quot;playEnt&quot;;\n        } &quot;partRole&quot;;\n      } &quot;participant-ADM&quot;;\n      enc.participant as part where (typeCode = 'LOC') then {\n        part.time as tim -&gt; encounter.location as locat then {\n          tim -&gt; locat.period = create('Period') as period then IVLTSPeriod(tim, period) &quot;time&quot;;\n          part.time as tim -&gt; locat.period = create('Period') as period then {\n            tim -&gt; period.start = create('dateTime') as start then TSDateTime(tim, start) &quot;val&quot;;\n          };\n          part.participantRole as partRole -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Location') as location,  location.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Location/', uuid1) then {\n            part -&gt; location.meta as meta then {\n              part -&gt; meta.tag = create('Coding') as coding then {\n                part -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                part -&gt; coding.code = 'ClinicalDocument/body/Encounter/participant' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            partRole.id as id -&gt; location.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext then {\n                partRole -&gt; request.url = append('Location?identifier=', ext) &quot;UUID&quot;;\n              } &quot;ext&quot;;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  location.id = (r + '-' + ext) as uuid,  e1.fullUrl = append('https://example/Location/', uuid),  locat.location = create('Reference') as reference,  reference.reference = ('https://example/Location/' + %location.id) &quot;idasi&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            partRole.code -&gt; location.type;\n          } &quot;partRole&quot;;\n        } &quot;location&quot;;\n      } &quot;participant2&quot;;\n      enc.entryRelationship as entr -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  encounter.reasonReference = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n        entr.act as act then {\n          act.code -&gt; observation.code;\n          act -&gt;  observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n          act -&gt;  observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc1.id) &quot;reference&quot;;\n          act where act.statusCode.exists().not() then {\n            act -&gt; observation.status = 'final' &quot;status&quot;;\n          } &quot;statuscode&quot;;\n          act -&gt; observation.note = create('Annotation') as note then {\n            act.text as text then {\n              text.reference as reff -&gt; note.text = (reff.value);\n            };\n            act.text as tx then {\n              tx.reference as ref -&gt; note.text = (ref.value) &quot;val&quot;;\n            } &quot;String&quot;;\n            act.author as auth -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n              auth.time as ti -&gt; note.time = create('dateTime') as value then TSDateTime(ti, value) &quot;notetime&quot;;\n              auth.assignedAuthor as assAuth then {\n                assAuth -&gt; practitioner.meta as meta then {\n                  assAuth -&gt; meta.tag = create('Coding') as coding then {\n                    assAuth -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                    assAuth -&gt; coding.code = 'ClinicalDocument/body/Encounter/author' &quot;code&quot;;\n                  } &quot;coding&quot;;\n                } &quot;meta&quot;;\n                assAuth.id as id -&gt; practitioner.identifier as identifier then {\n                  id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                  id.extension as ext -&gt; identifier.value = ext;\n                  id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                  id.root as r then {\n                    id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  note.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n                  } &quot;r&quot;;\n                } &quot;identifier&quot;;\n                assAuth.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n                  id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n                } &quot;2&quot;;\n                // fine modifica\n                assAuth.time as t -&gt; note.text = create('dateTime') as value then TSDateTime(t, value);\n                assAuth.assignedPerson as assPers then {\n                  assPers.name -&gt; practitioner.name;\n                } &quot;name&quot;;\n              } &quot;assAush&quot;;\n            } &quot;practitioner&quot;;\n          } &quot;note&quot;;\n        };\n      } &quot;entryRel-SUBJ&quot;;\n    };\n  };\n}\n\n// --------------------------------------------------------------------------------------------------------\n// Sezione Consulenza--------------------------------------------------------------------------------------\ngroup ClinicalDocumentSectionConsulenza(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src where src.entry.exists() then {\n    src.text as cdaText -&gt; tgt.text as fhirText then {\n      cdaText -&gt; fhirText.status = 'generated' &quot;narrativeStatus&quot;;\n      cdaText as t -&gt; fhirText.div = t &quot;narrativeText&quot;;\n    } &quot;cdaText&quot;;\n  } &quot;entry-exists&quot;;\n  // Sezione Narrativa--------------------------------------------------------------------------------------------------------------------------------------------------\n  src where src.entry.exists().not() then {\n    src.text as cdaText -&gt;  bundle.entry as e8,  e8.request = create('BackboneElement') as request,  request.method = 'POST',  e8.resource = create('ServiceRequest') as ServiceRequest,  ServiceRequest.id = uuid() as uuid8,  e8.fullUrl = append('https://example/ServiceRequest/', uuid8),  request.url = 'ServiceRequest',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/ServiceRequest/' + %ServiceRequest.id) then {\n      src -&gt;  ServiceRequest.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n      src -&gt;  ServiceRequest.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n      src -&gt; ServiceRequest.status = 'active' &quot;status&quot;;\n      src -&gt; ServiceRequest.intent = 'order' &quot;intent&quot;;\n      cdaText -&gt; ServiceRequest.note as note then {\n        cdaText as t -&gt; note.text = t &quot;reference&quot;;\n      } &quot;reference&quot;;\n    } &quot;cdaText&quot;;\n  } &quot;where&quot;;\n  // Sezione Strutturata--------------------------------------------------------------------------------------------------------------------------------------------\n  src.entry as entry1 -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('ServiceRequest') as serviceRequest,  serviceRequest.id = uuid() as uuid1,  e1.fullUrl = append('https://example/ServiceRequest/', uuid1),  request.url = 'ServiceRequest',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/ServiceRequest/' + %serviceRequest.id),  serviceRequest.note as note then {\n    entry1 -&gt;  serviceRequest.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n    entry1 -&gt;  serviceRequest.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n    entry1 -&gt; serviceRequest.status = 'active' &quot;status&quot;;\n    entry1 -&gt; serviceRequest.intent = 'order' &quot;intent&quot;;\n    entry1.act as act then {\n      act.code -&gt; serviceRequest.code;\n      act.text as t -&gt; note.text = (t.dataString);\n      act.statusCode as code -&gt; serviceRequest.status = (code.code);\n      act.performer as perf -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n        perf.time as time -&gt; serviceRequest.occurrence = create('dateTime') as t then TSDateTime(time, t);\n        perf.assignedEntity as assEnt then {\n          assEnt -&gt; practitioner.meta as meta then {\n            assEnt -&gt; meta.tag = create('Coding') as coding then {\n              assEnt -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              assEnt -&gt; coding.code = 'ClinicalDocument/body/Consulenze/performer' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          assEnt.id as id -&gt; practitioner.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  serviceRequest.performer = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          assEnt.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          assEnt.assignedPerson as assPer then {\n            assPer.name -&gt; practitioner.name;\n          } &quot;assPer&quot;;\n        } &quot;assEnt&quot;;\n      };\n      act.participant as parti -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n        parti.time as time -&gt; serviceRequest.authoredOn = create('dateTime') as t then TSDateTime(time, t);\n        parti.participantRole as partRole then {\n          partRole -&gt; practitioner.meta as meta then {\n            partRole -&gt; meta.tag = create('Coding') as coding then {\n              partRole -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              partRole -&gt; coding.code = 'ClinicalDocument/body/Consulenze/participant' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          partRole.id as id -&gt; practitioner.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  serviceRequest.requester = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          partRole.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          partRole.playingEntity as entity then {\n            entity.name -&gt; practitioner.name;\n          } &quot;entity&quot;;\n        } &quot;partRole&quot;;\n      };\n    } &quot;ACT&quot;;\n  };\n}\n\n// ---------------------------------------------------------------------------------------------------------\n// Sezione Accertamenti--------------------------------------------------------------------------------------\ngroup ClinicalDocumentSectionAccertamenti(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src where src.entry.exists() then {\n    src.text as cdaText -&gt; tgt.text as fhirText then {\n      cdaText -&gt; fhirText.status = 'generated' &quot;narrativeStatus&quot;;\n      cdaText as t -&gt; fhirText.div = t &quot;narrativeText&quot;;\n    } &quot;cdaText&quot;;\n  } &quot;entryExists&quot;;\n  // Sezione Strutturata---------------------------------------------------------------------------------------------------------------------------------------------\n  src.entry as entry1 -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n    entry1.organizer as obs then {\n      src.code -&gt; observation.code;\n      obs then ObservationAccertamenti(obs, patient, enc, observation, bundle) &quot;act&quot;;\n    } &quot;obs&quot;;\n  };\n  // Sezione Narrativa--------------------------------------------------------------------------------------------------------------------------------------------\n  src where src.entry.exists().not() then {\n    src.text as cdaText -&gt;  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 -&gt;  Observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n      src -&gt;  Observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n      src.code -&gt; Observation.code;\n      src where observation.statusCode.exists().not() then {\n        src -&gt; Observation.status = 'final' &quot;status&quot;;\n      } &quot;statuscode&quot;;\n      cdaText -&gt; Observation.note as note then {\n        cdaText as t -&gt; note.text = t &quot;reference&quot;;\n      } &quot;reference&quot;;\n    } &quot;cdaText&quot;;\n  } &quot;where&quot;;\n}\n\ngroup ObservationAccertamenti(source obs : Observation, target patient : Patient, target encounter : Encounter, target ob : Observation, target bundle : Bundle) {\n  obs.code -&gt; ob.code;\n  obs.statusCode as statusc where (code = 'completed') -&gt; ob.status = 'final';\n  obs.statusCode as statusc where (code = 'active') -&gt; ob.status = 'registered';\n  obs.statusCode as statusc where (code = 'aborted') -&gt; ob.status = 'cancelled';\n  obs.statusCode as statusc where (code = 'suspended') -&gt; ob.status = 'partial';\n  obs where obs.statusCode.exists().not() then {\n    obs -&gt; ob.status = 'final' &quot;status&quot;;\n  } &quot;statuscode&quot;;\n  obs.effectiveTime as effectiveTime -&gt; ob.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;value2&quot;;\n  obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n    obs.effectiveTime as eff -&gt; ob.effective = create('Period') as period then IVLTSPeriod(eff, period);\n  } &quot;where&quot;;\n  obs.value : CD as val then {\n    val -&gt; ob.value = create('CodeableConcept') as ce then {\n      val.originalText -&gt; ce.text;\n      val -&gt; ce.coding as coding then {\n        val.code as code -&gt; coding.code = cast(code, 'string');\n        val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        val.displayName as display -&gt; coding.display = cast(display, 'string');\n      } &quot;code&quot;;\n      val.translation as translation -&gt; ce.coding as coding then {\n        translation.code as code -&gt; coding.code = cast(code, 'string');\n        translation.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        translation.displayName as display -&gt; coding.display = cast(display, 'string');\n        translation.qualifier as qualifier then {\n          qualifier.value as value -&gt; ce.coding as coding then {\n            value.code as code -&gt; coding.code = cast(code, 'string');\n            value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n            value.displayName as display -&gt; coding.display = cast(display, 'string');\n          };\n        } &quot;qual&quot;;\n      };\n    } &quot;coding&quot;;\n  } &quot;val&quot;;\n  obs.value : CE as val then {\n    val -&gt; ob.value = create('CodeableConcept') as ce then {\n      val.originalText -&gt; ce.text;\n      val -&gt; ce.coding as coding then {\n        val.code as code -&gt; coding.code = cast(code, 'string');\n        val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        val.displayName as display -&gt; coding.display = cast(display, 'string');\n      } &quot;code&quot;;\n      val.translation as translation -&gt; ce.coding as coding then {\n        translation.code as code -&gt; coding.code = cast(code, 'string');\n        translation.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        translation.displayName as display -&gt; coding.display = cast(display, 'string');\n        translation.qualifier as qualifier then {\n          qualifier.value as value -&gt; ce.coding as coding then {\n            value.code as code -&gt; coding.code = cast(code, 'string');\n            value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n            value.displayName as display -&gt; coding.display = cast(display, 'string');\n          };\n        } &quot;qual&quot;;\n      };\n    } &quot;coding&quot;;\n  } &quot;val&quot;;\n  obs.value : PQ as val then {\n    val -&gt; ob.value = create('Quantity') as quantity then {\n      val.value as value -&gt; quantity.value = value;\n      val.unit as unit -&gt; quantity.unit = unit;\n    } &quot;quantity&quot;;\n  } &quot;valueQuantity&quot;;\n  obs.value : ST as value -&gt;  ob.value = create('string'),  ob.value = (value.dataString);\n  obs.value : INT as int -&gt; ob.value = (int.value);\n  obs.value : BL as boolean -&gt; ob.value = (boolean.value) &quot;boolean&quot;;\n  obs -&gt;  ob.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n  obs -&gt;  ob.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;\n  obs.interpretationCode -&gt; ob.interpretation;\n  obs.methodCode -&gt; ob.method;\n  obs.referenceRange as refRange -&gt; ob.referenceRange = create('BackboneElement') as ref then {\n    refRange.observationRange as obsRange -&gt; ref.low = create('SimpleQuantity') as Low then {\n      obsRange.value : IVL_PQ as v then {\n        v.low as l1 then {\n          l1.value as decValue -&gt; Low.value = decValue;\n          l1.unit as Unit -&gt; Low.unit = Unit;\n        } &quot;decValue&quot;;\n      } &quot;IVL-PQ&quot;;\n    } &quot;obsRange&quot;;\n  } &quot;refRange&quot;;\n  obs.performer as performer -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n    performer.assignedEntity as assEntity then {\n      // inizio modifica identifier+meta\n      assEntity -&gt; practitioner.meta as meta then {\n        assEntity -&gt; meta.tag = create('Coding') as coding then {\n          assEntity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n          assEntity -&gt; coding.code = 'ClinicalDocument/body/Accertamenti/performer' &quot;code&quot;;\n        } &quot;coding&quot;;\n      } &quot;meta&quot;;\n      assEntity.id as id -&gt; practitioner.identifier as identifier then {\n        id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n        id.extension as ext -&gt; identifier.value = ext;\n        id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n        id.root as r then {\n          id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  ob.performer = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n        } &quot;r&quot;;\n      } &quot;identifier&quot;;\n      assEntity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n        id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n      } &quot;2&quot;;\n      // fine modifica\n      assEntity.assignedPerson as assi then {\n        assi.name -&gt; practitioner.name;\n      } &quot;assi&quot;;\n    } &quot;assEntity&quot;;\n  } &quot;perf&quot;;\n  obs.participant as participant -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('ServiceRequest') as serviceRequest,  serviceRequest.id = uuid() as uuid1,  e1.fullUrl = append('https://example/ServiceRequest/', uuid1),  request.url = 'ServiceRequest',  ob.basedOn = create('Reference') as reference,  reference.reference = ('https://example/ServiceRequest/' + %serviceRequest.id) then {\n    // participant.time as t -&gt; serviceRequest.authoredOn = (t.value);\n    participant.time as t -&gt; serviceRequest.authoredOn = create('dateTime') as value then TSDateTime(t, value) &quot;value2&quot;;\n    obs -&gt;  serviceRequest.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n    obs -&gt;  serviceRequest.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;\n    obs -&gt; serviceRequest.status = 'active' &quot;status&quot;;\n    obs -&gt; serviceRequest.intent = 'order' &quot;intent&quot;;\n    participant.participantRole as participantRole -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n      // modifica meta+identifier\n      participantRole -&gt; practitioner.meta as meta then {\n        participantRole -&gt; meta.tag = create('Coding') as coding then {\n          participantRole -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n          participantRole -&gt; coding.code = 'ClinicalDocument/body/Accertamenti/participant' &quot;code&quot;;\n        } &quot;coding&quot;;\n      } &quot;meta&quot;;\n      participantRole.id as id -&gt; practitioner.identifier as identifier then {\n        id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n        id.extension as ext -&gt; identifier.value = ext;\n        id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n        id.root as r then {\n          id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  serviceRequest.requester = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n        } &quot;r&quot;;\n      } &quot;identifier&quot;;\n      participantRole.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n        id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n      } &quot;2&quot;;\n      // fine modifica\n      participantRole.playingEntity as pe then {\n        pe.name -&gt; practitioner.name;\n      } &quot;pe&quot;;\n    };\n  };\n  obs.component as comp -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  ob.hasMember = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n    comp.observation as obs then {\n      obs.code -&gt; observation.code;\n      obs.statusCode as statusc where (code = 'completed') -&gt; observation.status = 'final';\n      obs.statusCode as statusc where (code = 'active') -&gt; observation.status = 'registered';\n      obs.statusCode as statusc where (code = 'aborted') -&gt; observation.status = 'cancelled';\n      obs.statusCode as statusc where (code = 'suspended') -&gt; observation.status = 'partial';\n      obs where obs.statusCode.exists().not() then {\n        obs -&gt; observation.status = 'final' &quot;status&quot;;\n      } &quot;statuscode&quot;;\n      obs -&gt;  observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n      obs -&gt;  observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;\n      obs.effectiveTime as effectiveTime -&gt; ob.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;value2&quot;;\n      obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n        obs.effectiveTime as eff -&gt; ob.effective = create('Period') as period then IVLTSPeriod(eff, period);\n      } &quot;where&quot;;\n      obs.value as val -&gt; observation.value = (val.dataString);\n    } &quot;obs&quot;;\n  } &quot;observation&quot;;\n}\n\n// -----------------------------------------------------------------------------------------------------------\n// Sezione ParametriVitali--------------------------------------------------------------------------------------\ngroup ClinicalDocumentSectionParametriVitali(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src where src.entry.exists() then {\n    src.text as cdaText -&gt; tgt.text as fhirText then {\n      cdaText -&gt; fhirText.status = 'generated' &quot;narrativeStatus&quot;;\n      cdaText as t -&gt; fhirText.div = t &quot;narrativeText&quot;;\n    } &quot;cdaText&quot;;\n  } &quot;entry-exists&quot;;\n  // Sezione Narrativa----------------------------------------------------------------------------------------------------------------------------------------------------\n  src where src.entry.exists().not() then {\n    src.text as cdaText -&gt;  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 -&gt;  Observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n      src -&gt;  Observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n      src.code -&gt; Observation.code;\n      src where observation.statusCode.exists().not() then {\n        src -&gt; Observation.status = 'final' &quot;status&quot;;\n      } &quot;statuscode&quot;;\n      cdaText -&gt; Observation.note as note then {\n        cdaText as t -&gt; note.text = t &quot;reference&quot;;\n      } &quot;reference&quot;;\n    } &quot;cdaText&quot;;\n  } &quot;where&quot;;\n  // Sezione Strutturata --------------------------------------------------------------------------------------------------------------------------------------------------------\n  src.entry as entry1 -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n    entry1.organizer as org then {\n      org -&gt;  observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n      org -&gt;  observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n      org.statusCode as statusc where (code = 'completed') -&gt; observation.status = 'final';\n      org.statusCode as statusc where (code = 'active') -&gt; observation.status = 'registered';\n      org.statusCode as statusc where (code = 'aborted') -&gt; observation.status = 'cancelled';\n      org.statusCode as statusc where (code = 'suspended') -&gt; observation.status = 'partial';\n      org where obs.statusCode.exists().not() then {\n        org -&gt; observation.status = 'final' &quot;status&quot;;\n      } &quot;statuscode&quot;;\n      org.code -&gt; observation.code;\n      org where org.code.exists().not() then {\n        src.code -&gt; observation.code;\n      } &quot;code&quot;;\n      org.component as component -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation1,  observation1.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  observation.hasMember = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation1.id) then {\n        component.observation as obs then {\n          obs -&gt;  observation1.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n          obs -&gt;  observation1.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n          obs.code -&gt; observation1.code;\n          obs.statusCode -&gt; observation1.status;\n          obs.statusCode as statusc where (code = 'completed') -&gt; observation1.status = 'final';\n          obs.statusCode as statusc where (code = 'active') -&gt; observation1.status = 'registered';\n          obs.statusCode as statusc where (code = 'aborted') -&gt; observation1.status = 'cancelled';\n          obs.statusCode as statusc where (code = 'suspended') -&gt; observation1.status = 'partial';\n          obs where obs.statusCode.exists().not() then {\n            obs -&gt; observation1.status = 'final' &quot;status&quot;;\n          } &quot;statuscode&quot;;\n          obs -&gt; observation1.value = create('Quantity') as quant then {\n            obs.value as v -&gt; quant.value = (v.value);\n            obs.value as v -&gt; quant.unit = (v.unit);\n          } &quot;quant&quot;;\n          obs.value : CE as val then {\n            val -&gt; ob.value = create('CodeableConcept') as ce then {\n              val.originalText as originalText then {\n                originalText.reference as reference -&gt; ce.text = reference;\n              } &quot;originltext&quot;;\n              val -&gt; ce.coding as coding then {\n                val.code as code -&gt; coding.code = cast(code, 'string');\n                val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                val.displayName as display -&gt; coding.display = cast(display, 'string');\n                val.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n              } &quot;code&quot;;\n              val.translation as translation -&gt; ce.coding as coding then {\n                translation.code as code -&gt; coding.code = cast(code, 'string');\n                translation.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                translation.displayName as display -&gt; coding.display = cast(display, 'string');\n                translation.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                translation.qualifier as qualifier then {\n                  qualifier.value as value -&gt; ce.coding as coding then {\n                    value.code as code -&gt; coding.code = cast(code, 'string');\n                    value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                    value.displayName as display -&gt; coding.display = cast(display, 'string');\n                    value.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                  };\n                };\n              };\n            } &quot;coding&quot;;\n          } &quot;val&quot;;\n          obs.value : CD as val then {\n            val -&gt; ob.value = create('CodeableConcept') as ce then {\n              val.originalText as originalText then {\n                originalText.reference as reference -&gt; ce.text = reference;\n              } &quot;originltext&quot;;\n              val -&gt; ce.coding as coding then {\n                val.code as code -&gt; coding.code = cast(code, 'string');\n                val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                val.displayName as display -&gt; coding.display = cast(display, 'string');\n                val.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n              } &quot;code&quot;;\n              val.translation as translation -&gt; ce.coding as coding then {\n                translation.code as code -&gt; coding.code = cast(code, 'string');\n                translation.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                translation.displayName as display -&gt; coding.display = cast(display, 'string');\n                translation.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                translation.qualifier as qualifier then {\n                  qualifier.value as value -&gt; ce.coding as coding then {\n                    value.code as code -&gt; coding.code = cast(code, 'string');\n                    value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                    value.displayName as display -&gt; coding.display = cast(display, 'string');\n                    value.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                  };\n                };\n              };\n            } &quot;coding&quot;;\n          } &quot;val&quot;;\n          obs.value : ST as value -&gt;  ob.value = create('string'),  ob.value = (value.dataString);\n          obs.value : INT as int -&gt; ob.value = (int.value);\n          obs.value : BL as boolean -&gt; ob.value = (boolean.value) &quot;boolean&quot;;\n          obs.interpretationCode -&gt; observation1.interpretation;\n          obs.methodCode -&gt; observation1.method;\n          obs.targetSiteCode -&gt; observation1.bodySite;\n          obs.performer as performer -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n            performer.time as t -&gt; observation1.issued = create('dateTime') as date then TSDateTime(t, date);\n            performer.assignedEntity as assEntity then {\n              // inizio modifica meta+ identifier\n              assEntity -&gt; practitioner.meta as meta then {\n                assEntity -&gt; meta.tag = create('Coding') as coding then {\n                  assEntity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  assEntity -&gt; coding.code = 'ClinicalDocument/body/ParametriVitali/performer' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              assEntity.id as id -&gt; practitioner.identifier as identifier then {\n                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                id.extension as ext -&gt; identifier.value = ext;\n                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                id.root as r then {\n                  id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  observation1.performer = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              assEntity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n                id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n              } &quot;2&quot;;\n              // fine modifica\n              assEntity.assignedPerson as assPerson then {\n                assPerson.name -&gt; practitioner.name;\n              } &quot;assPerson&quot;;\n            } &quot;assEntity&quot;;\n          };\n          obs.participant as parti -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('ServiceRequest') as serviceRequest,  serviceRequest.id = uuid() as uuid1,  e1.fullUrl = append('https://example/ServiceRequest/', uuid1),  request.url = 'ServiceRequest',  observation1.basedOn = create('Reference') as reference,  reference.reference = ('https://example/ServiceRequest/' + %serviceRequest.id) then {\n            parti -&gt;  serviceRequest.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n            parti -&gt;  serviceRequest.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n            parti -&gt; serviceRequest.status = 'active' &quot;status&quot;;\n            parti -&gt; serviceRequest.intent = 'order' &quot;intent&quot;;\n            parti.time as t -&gt; serviceRequest.authoredOn = create('dateTime') as value then TSDateTime(t, value) &quot;value2&quot;;\n            parti.participantRole as partRole -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n              // inizio modifica meta + identifier\n              partRole -&gt; practitioner.meta as meta then {\n                partRole -&gt; meta.tag = create('Coding') as coding then {\n                  partRole -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  partRole -&gt; coding.code = 'ClinicalDocument/body/ParametriVitali/participant' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              partRole.id as id -&gt; practitioner.identifier as identifier then {\n                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                id.extension as ext -&gt; identifier.value = ext;\n                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                id.root as r then {\n                  id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  serviceRequest.requester = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              partRole.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n                id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n              } &quot;2&quot;;\n              // fine modifica\n              partRole.playingEntity as playingEntity then {\n                playingEntity.name -&gt; practitioner.name;\n              } &quot;name&quot;;\n            } &quot;partRole&quot;;\n          } &quot;parti&quot;;\n        } &quot;obs&quot;;\n      };\n    } &quot;obs&quot;;\n  } &quot;Observation&quot;;\n}\n\n// -----------------------------------------------------------------------------------------------------------------\n// Sezione terapia Farma in Pronto----------------------------------------------------------------------------------\ngroup ClinicalDocumentSectionTerapiaFarmacoInPronto(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src where src.entry.exists() then {\n    src.text as cdaText -&gt; tgt.text as fhirText then {\n      cdaText -&gt; fhirText.status = 'generated' &quot;narrativeStatus&quot;;\n      cdaText as t -&gt; fhirText.div = t &quot;narrativeText&quot;;\n    } &quot;cdaText&quot;;\n  } &quot;entry-exists&quot;;\n  // Sezione Narrativa------------------------------------------------------------------------------------------------------------------------------------------------\n  src where src.entry.exists().not() then {\n    src.text as cdaText -&gt;  bundle.entry as e8,  e8.request = create('BackboneElement') as request,  request.method = 'POST',  e8.resource = create('MedicationAdministration') as MedicationAdministration,  MedicationAdministration.id = uuid() as uuid8,  e8.fullUrl = append('https://example/MedicationAdministration/', uuid8),  request.url = 'MedicationAdministration',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/MedicationAdministration/' + %MedicationAdministration.id) then {\n      src -&gt;  MedicationAdministration.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n      src -&gt;  MedicationAdministration.context = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n      src -&gt; MedicationAdministration.effective = create('Period') as period then {\n        src -&gt; period.start = (start.now()) &quot;low&quot;;\n        src -&gt; period.end = (end.now()) &quot;high&quot;;\n      } &quot;Period&quot;;\n      src where sub.statusCode.exists().not() then {\n        src -&gt; MedicationAdministration.status = 'completed' &quot;status&quot;;\n      } &quot;statuscode&quot;;\n      cdaText -&gt; MedicationAdministration.note as note then {\n        cdaText as t -&gt; note.text = t &quot;reference&quot;;\n        cdaText -&gt; MedicationAdministration.medication = create('CodeableConcept') as medication then {\n          cdaText as txt -&gt; medication.text = txt &quot;text&quot;;\n        } &quot;medication&quot;;\n      } &quot;reference&quot;;\n    } &quot;cdaText&quot;;\n  } &quot;where&quot;;\n  // Sezione Strutturata-------------------------------------------------------------------------------------------------------------------------------------------------\n  src.entry as entry1 -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('MedicationAdministration') as medAdm,  medAdm.id = uuid() as uuid1,  e1.fullUrl = append('https://example/MedicationAdministration/', uuid1),  request.url = 'MedicationAdministration',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/MedicationAdministration/' + %medAdm.id),  medAdm.note as note then {\n    entry1 -&gt;  medAdm.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n    entry1 -&gt;  medAdm.context = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n    entry1.substanceAdministration as sub then {\n      sub.text as tx then {\n        tx.reference as reff -&gt; note.text = (reff.value);\n      } &quot;txx&quot;;\n      sub.statusCode -&gt; medAdm.status;\n      // sub.effectiveTime: IVL_TS as eff -&gt; medAdm.effective =create('Period') as period then IVLTSPeriod(eff,period); CHECK THIS\n      sub.effectiveTime as eff -&gt; medAdm.effective = create('Period') as period then IVLTSPeriod(eff, period);\n      sub.effectiveTime : PIVL_TS as eff -&gt; medAdm.dosage as dosage then {\n        eff -&gt; dosage.rate = create('Ratio') as ratio then {\n          eff -&gt; ratio.numerator = create('Quantity') as num then {\n            eff.period as per -&gt; num.value = (per.value);\n            eff.period as per -&gt; num.unit = (per.unit);\n          } &quot;num&quot;;\n          eff -&gt; ratio.denominator = create('Quantity') as num then {\n            eff.period as per -&gt; num.value = '1';\n            eff.period as per -&gt; num.unit = (per.unit);\n          } &quot;den&quot;;\n        } &quot;ratio&quot;;\n      } &quot;eff2&quot;;\n      sub -&gt; medAdm.dosage as dosage then {\n        sub.routeCode -&gt; dosage.route;\n      } &quot;route&quot;;\n      sub -&gt; medAdm.dosage as dosage then {\n        sub.approachSiteCode -&gt; dosage.site;\n      } &quot;route&quot;;\n      sub -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('MedicationRequest') as medRq,  medRq.id = uuid() as uuid1,  e1.fullUrl = append('https://example/MedicationRequest/', uuid1),  request.url = 'MedicationRequest',  medAdm.request = create('Reference') as reference,  reference.reference = ('https://example/MedicationRequest/' + %medRq.id) then {\n        sub.entryRelationship as rel then {\n          rel.supply as supl -&gt; medRq.dispenseRequest = create('BackboneElement') as disp then {\n            supl -&gt; disp.quantity = create('SimpleQuantity') as q then {\n              supl.quantity as qua -&gt; q.value = (qua.value) &quot;fds&quot;;\n            } &quot;SimpleQuantity&quot;;\n          } &quot;obs&quot;;\n        } &quot;rel&quot;;\n        sub -&gt;  medRq.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n        sub -&gt;  medRq.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n        sub -&gt; medRq.status = 'active' &quot;status&quot;;\n        sub -&gt; medRq.intent = 'order' &quot;intent&quot;;\n        sub -&gt; medRq.medication = create('CodeableConcept') as cod then {\n          sub -&gt; cod.text = 'medication' &quot;Medi&quot;;\n        } &quot;code&quot;;\n        sub.doseQuantity as quantity then {\n          quantity -&gt; medRq.dosageInstruction = create('Dosage') as dosage then {\n            quantity -&gt; dosage.doseAndRate as dosRange then {\n              quantity -&gt; dosRange.dose = create('Range') as range then {\n                quantity -&gt; range.low = create('SimpleQuantity') as quant then {\n                  quantity.low as l -&gt; quant.value = (l.value) &quot;v1&quot;;\n                  quantity.low as l -&gt; quant.unit = (l.unit) &quot;v1&quot;;\n                } &quot;low&quot;;\n                quantity -&gt; range.high = create('SimpleQuantity') as quant then {\n                  quantity.high as h -&gt; quant.value = (h.value) &quot;v1&quot;;\n                  quantity.high as h -&gt; quant.unit = (h.unit) &quot;v1&quot;;\n                } &quot;high&quot;;\n              } &quot;range&quot;;\n            } &quot;dos&quot;;\n          } &quot;dosage&quot;;\n        } &quot;dose-quantity&quot;;\n        sub.rateQuantity as rate then {\n          rate -&gt; medRq.dosageInstruction = create('Dosage') as dosage then {\n            rate -&gt; dosage.doseAndRate as dosRange then {\n              rate -&gt; dosRange.dose = create('Range') as range then {\n                rate -&gt; range.low = create('SimpleQuantity') as quant then {\n                  rate.low as l -&gt; quant.value = (l.value) &quot;v1&quot;;\n                  rate.low as l -&gt; quant.unit = (l.unit) &quot;v1&quot;;\n                } &quot;low&quot;;\n                rate -&gt; range.high = create('SimpleQuantity') as quant then {\n                  rate.high as h -&gt; quant.value = (h.value) &quot;v1&quot;;\n                  rate.high as h -&gt; quant.unit = (h.unit) &quot;v1&quot;;\n                } &quot;high&quot;;\n              } &quot;range&quot;;\n            } &quot;dos&quot;;\n          } &quot;dosage&quot;;\n        } &quot;Rate-quantity&quot;;\n        sub.participant as part then {\n          part.time as t -&gt; medRq.authoredOn = create('dateTime') as date then TSDateTime(t, date);\n          part.participantRole as partRole -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n            // inizio meta+identifier\n            partRole -&gt; practitioner.meta as meta then {\n              partRole -&gt; meta.tag = create('Coding') as coding then {\n                partRole -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                partRole -&gt; coding.code = 'ClinicalDocument/body/TerapiaFarmacologicaPS/participant' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            partRole.id as id -&gt; practitioner.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  medRq.requester = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            partRole.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n              id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n            } &quot;2&quot;;\n            // fine modifiche\n            partRole.id -&gt; practitioner.identifier;\n            partRole.playingEntity as play then {\n              play.name -&gt; practitioner.name;\n            } &quot;play&quot;;\n          } &quot;Part&quot;;\n        } &quot;part&quot;;\n      } &quot;medicationRequest&quot;;\n      sub -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Medication') as med,  med.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Medication/', uuid1),  request.url = 'Medication',  medAdm.medication = create('Reference') as reference,  reference.reference = ('https://example/Medication/' + %med.id) then {\n        sub.administrationUnitCode as adduni then {\n          sub.administrationUnitCode -&gt; med.form;\n          sub.consumable as consum then {\n            consum.manufacturedProduct as manuProd then {\n              manuProd.manufacturedMaterial as manuMt then {\n                manuMt.code -&gt; med.code;\n              } &quot;manuMat&quot;;\n            } &quot;manuMat&quot;;\n          } &quot;consum&quot;;\n        } &quot;unicode&quot;;\n        sub.entryRelationship as entryR then {\n          entryR.observation as observation then {\n            observation.code where displayName = 'Grammatura' -&gt; med.ingredient as ingredient then {\n              sub.consumable as consumable then {\n                consumable.manufacturedProduct as manufacturedProduct then {\n                  manufacturedProduct.manufacturedMaterial as manufacturedMaterial then {\n                    manufacturedMaterial.code as code -&gt; ingredient.item = create('CodeableConcept') as value then CECodeableConcept(code, value) &quot;CE&quot;;\n                  } &quot;material&quot;;\n                } &quot;product&quot;;\n              };\n              observation.value as value -&gt; ingredient.strength as strength then {\n                value -&gt; strength.numerator as numerator then {\n                  value -&gt; numerator.value = (value.value) &quot;valueN&quot;;\n                } &quot;numerator&quot;;\n                value -&gt; strength.denominator as denominator then {\n                  value -&gt; denominator.value = 1 &quot;valueD&quot;;\n                } &quot;denominator&quot;;\n              } &quot;strenght&quot;;\n            } &quot;ingredient&quot;;\n            observation.code where displayName = 'Quantità nella Confezione' then {\n              observation.value as value -&gt; med.amount as amount then {\n                value -&gt; amount.numerator as numerator then {\n                  value -&gt; numerator.value = (value.value) &quot;valueN&quot;;\n                } &quot;numerator&quot;;\n                value -&gt; amount.denominator as denominator then {\n                  value -&gt; denominator.value = 1 &quot;valueD&quot;;\n                } &quot;denominator&quot;;\n              } &quot;amount&quot;;\n            } &quot;quantita&quot;;\n          } &quot;obs&quot;;\n        } &quot;entry-R&quot;;\n      } &quot;med&quot;;\n      sub.performer as perf -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n        perf -&gt; medAdm.note as note then {\n          perf -&gt; note.text = 'performertime' &quot;notaa&quot;;\n          perf.time as t -&gt; note.time = create('dateTime') as value then TSDateTime(t, value) &quot;notetime&quot;;\n        } &quot;preftime&quot;;\n        perf.assignedEntity as ent then {\n          // inizio modifica meta+identifier\n          ent -&gt; practitioner.meta as meta then {\n            ent -&gt; meta.tag = create('Coding') as coding then {\n              ent -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              ent -&gt; coding.code = 'ClinicalDocument/body/TerapiaFarmacologicaPS/performer' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          ent.id as id -&gt; practitioner.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  medAdm.performer as p,  p.actor = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          ent.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          // fine modifica\n          ent.assignedPerson as assPerson then {\n            assPerson.name -&gt; practitioner.name;\n          } &quot;assperson&quot;;\n        } &quot;ent&quot;;\n      } &quot;perform&quot;;\n    } &quot;MedAdm&quot;;\n  };\n}\n\n// ------------------------------------------------------------------------------------------------------------------\n// -\ngroup ClinicalDocumentSectionPianoCuraDimissione(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src as entry1 -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('CarePlan') as careplan,  careplan.id = uuid() as uuid1,  e1.fullUrl = append('https://example/CarePlan/', uuid1),  request.url = 'CarePlan',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/CarePlan/' + %careplan.id) then {\n    src -&gt;  careplan.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n    src -&gt;  careplan.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n    src -&gt; careplan.status = 'active' &quot;status&quot;;\n    src -&gt; careplan.intent = 'order' &quot;intent&quot;;\n    src.text as cdaText -&gt; careplan.note as carenote then {\n      cdaText as t -&gt; carenote.text = t &quot;notetxt&quot;;\n      entry1.author as author then {\n        author.time as t -&gt; carenote.time = create('dateTime') as value then TSDateTime(t, value) &quot;notetime&quot;;\n        author.assignedAuthor as assauthor -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n          // inizio modifica meta+identifier\n          assauthor -&gt; practitioner.meta as meta then {\n            assauthor -&gt; meta.tag = create('Coding') as coding then {\n              assauthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              assauthor -&gt; coding.code = 'ClinicalDocument/body/PianoCuraDimissione/author' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          assauthor.id as id -&gt; practitioner.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  carenote.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          assauthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          // fine modifica\n          assauthor.assignedPerson as pers then {\n            pers.name -&gt; practitioner.name;\n          } &quot;namepers&quot;;\n        } &quot;authpract&quot;;\n      } &quot;CFauthor&quot;;\n    } &quot;author&quot;;\n    entry1.entry as entry2 then {\n      entry2.act as entryact -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('ServiceRequest') as servicerequest,  servicerequest.id = uuid() as uuid1,  e1.fullUrl = append('https://example/ServiceRequest/', uuid1),  request.url = 'ServiceRequest',  careplan.activity = create('BackboneElement') as activ,  activ.reference = create('Reference') as reference,  reference.reference = ('https://example/ServiceRequest/' + %servicerequest.id) then {\n        entryact -&gt;  servicerequest.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n        entryact -&gt;  servicerequest.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n        entryact -&gt; servicerequest.status = 'active' &quot;status&quot;;\n        entryact -&gt; servicerequest.intent = 'order' &quot;intent&quot;;\n        entryact -&gt; servicerequest.identifier = create('BackboneElement') as identif then {\n          entryact.reference as actref then {\n            actref.externalAct as extact then {\n              extact -&gt; servicerequest.identifier = create('BackboneElement') as identif3 then {\n                extact.id as id then {\n                  id.root as r -&gt; identif3.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                  id.extension as ext -&gt; identif3.value = ext then {\n                    id.assigningAuthorityName as s -&gt;  identif3.assigner as a,  a.display = s;\n                  } &quot;ext&quot;;\n                } &quot;idnetn&quot;;\n              } &quot;extact&quot;;\n            } &quot;actref&quot;;\n          } &quot;jarilemes&quot;;\n          entryact.code -&gt; servicerequest.code;\n          entryact.statusCode -&gt; servicerequest.status;\n          entryact.author as actauthor then {\n            actauthor.time as t -&gt; servicerequest.authoredOn = create('dateTime') as date then TSDateTime(t, date);\n            actauthor.assignedAuthor as assauthor -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n              // inizio modifica identifier\n              assauthor -&gt; practitioner.meta as meta then {\n                assauthor -&gt; meta.tag = create('Coding') as coding then {\n                  assauthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  assauthor -&gt; coding.code = 'ClinicalDocument/body/PianoCuraDimissione/author' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              assauthor.id as id -&gt; practitioner.identifier as identifier then {\n                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                id.extension as ext -&gt; identifier.value = ext;\n                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                id.root as r then {\n                  id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  servicerequest.requester = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              assauthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n                id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n              } &quot;2&quot;;\n              // fine modifica\n              assauthor.assignedPerson as pers then {\n                pers.name -&gt; practitioner.name;\n              } &quot;namepers&quot;;\n            } &quot;author&quot;;\n          } &quot;servReq&quot;;\n        } &quot;entry2&quot;;\n      } &quot;carnote&quot;;\n    } &quot;entry1&quot;;\n  } &quot;entryident3&quot;;\n}\n\n// -------Dimissione------------------------------------------------------------------------------------------------------\ngroup ClinicalDocumentSectionDimissione(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src.text as cdaText -&gt; tgt.text as fhirText then {\n    cdaText -&gt; fhirText.status = 'generated' &quot;narrativeStatus&quot;;\n    cdaText as t -&gt; fhirText.div = t &quot;narrativeText&quot;;\n  } &quot;cdaText&quot;;\n  src.entry as entry1 then {\n    entry1.act as act -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Encounter') as encountert,  encountert.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Encounter/', uuid1),  request.url = 'Encounter',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encountert.id) then {\n      act -&gt; encountert.status = 'finished' &quot;status&quot;;\n      act -&gt; encountert.class = create('Coding') as cl then {\n        act -&gt; cl.code = 'AMB' &quot;code&quot;;\n        act -&gt; cl.display = 'ambulatory' &quot;code&quot;;\n      } &quot;class&quot;;\n      act -&gt;  encountert.partOf = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + enc.id) &quot;refenc&quot;;\n      act -&gt;  encountert.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + patient.id) &quot;refpatient&quot;;\n      act.code -&gt; encountert.type;\n      act where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n        act.effectiveTime as eff -&gt; encountert.period = create('Period') as period then IVLTSPeriod(eff, period);\n      } &quot;where&quot;;\n      // effectiveTime = time-stamp\n      act where effectiveTime.low.exists().not() or effectiveTime.high.exists().not() then {\n        act.effectiveTime as effectivetime1 -&gt; encountert.period = create('Period') as period then {\n          effectivetime1 -&gt; period.start = create('dateTime') as start then TSDateTime(effectivetime1, start) &quot;val&quot;;\n        } &quot;efft&quot;;\n      } &quot;where&quot;;\n      act.performer as performer -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n        // performer.time as ti -&gt; note.time = (ti.value);\n        performer.assignedEntity as assEnty then {\n          assEnty -&gt; practitioner.meta as meta then {\n            assEnty -&gt; meta.tag = create('Coding') as coding then {\n              assEnty -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              assEnty -&gt; coding.code = 'ClinicalDocument/body/Dimissione/performer' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          assEnty.id as id -&gt; practitioner.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  encountert.participant as perf then {\n                performer -&gt; perf.period = create('Period') as period then {\n                  performer.time as time -&gt; period.start = create('dateTime') as start then TSDateTime(time, start);\n                } &quot;period&quot;;\n                performer -&gt;  perf.individual = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n              } &quot;perf&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          assEnty.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          assEnty.assignedPerson as assPers then {\n            assPers.name -&gt; practitioner.name;\n          } &quot;assPer&quot;;\n        } &quot;ass&quot;;\n      } &quot;erformer&quot;;\n      // Encounter Post dimissione---------------------------------------------------------------------------------------------------------------------------------------\n      act.entryRelationship as entriRel then {\n        entriRel.encounter as enc1 then {\n          enc1 -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Encounter') as encountert1,  encountert1.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Encounter/', uuid1),  request.url = 'Encounter',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encountert1.id),  encountert1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + encountert.id) then {\n            enc1 -&gt; encountert1.status = 'finished' &quot;status&quot;;\n            enc1 -&gt; encountert1.class = create('Coding') as cl then {\n              enc1 -&gt; cl.code = 'AMB' &quot;code&quot;;\n              enc1 -&gt; cl.display = 'ambulatory' &quot;code&quot;;\n            } &quot;class&quot;;\n            enc1 -&gt;  encountert1.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + patient.id) &quot;refpatient&quot;;\n            enc1.id -&gt; encountert1.identifier;\n            // enc1.code -&gt; encountert1.type;\n            enc1 -&gt; encountert1.type = create('CodeableConcept') as ti then {\n              enc1 -&gt; ti.coding = create('Coding') as cod then {\n                enc1.code as c -&gt; cod.code = (c.code);\n                enc1.code as c then {\n                  c.codeSystem as s -&gt; cod.system = translate(s, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;system&quot;;\n                } &quot;syst&quot;;\n                enc1.code as c -&gt; cod.display = (c.displayName) &quot;dispaly&quot;;\n              } &quot;coding&quot;;\n              enc1.text as tx then {\n                tx.reference as ref -&gt; ti.text = (ref.value) &quot;val&quot;;\n              };\n            } &quot;code&quot;;\n            enc1 where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n              enc1.effectiveTime as eff -&gt; encountert1.period = create('Period') as period then IVLTSPeriod(eff, period);\n            } &quot;where&quot;;\n            // effectiveTime = time-stamp\n            enc1 where effectiveTime.low.exists().not() or effectiveTime.high.exists().not() then {\n              enc1.effectiveTime as effectivetime1 -&gt; encountert1.period = create('Period') as period then {\n                effectivetime1 -&gt; period.start = create('dateTime') as start then TSDateTime(effectivetime1, start) &quot;val&quot;;\n              } &quot;efft&quot;;\n            } &quot;where&quot;;\n            enc1.participant as part where (typeCode = 'LOC') -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Location') as location,  location.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Location/', uuid1),  request.url = append('Location/', uuid1) then {\n              part -&gt; location.meta as meta then {\n                part -&gt; meta.tag = create('Coding') as coding then {\n                  part -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  part -&gt; coding.code = 'ClinicalDocument/body/Dimissione/participant' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              part.time as tim -&gt; encountert1.location as locat then {\n                tim -&gt; locat.period = create('Period') as period then IVLTSPeriod(tim, period) &quot;time&quot;;\n                part.time as tim -&gt; locat.period = create('Period') as period then {\n                  tim -&gt; period.start = create('dateTime') as start then TSDateTime(tim, start) &quot;val&quot;;\n                };\n                part.participantRole as partRole then {\n                  partRole.id as id -&gt; location.identifier as identifier then {\n                    id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                    id.extension as ext -&gt; identifier.value = ext then {\n                      partRole -&gt; request.url = append('Location?identifier=', ext) &quot;UUID&quot;;\n                    } &quot;ext&quot;;\n                    id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                    id.root as r then {\n                      id.extension as ext -&gt;  location.id = (r + '-' + ext) as uuid,  e1.fullUrl = append('https://example/Location/', uuid),  locat.location = create('Reference') as reference,  reference.reference = ('https://example/Location/' + %location.id) &quot;idasi&quot;;\n                    } &quot;r&quot;;\n                  } &quot;identifier&quot;;\n                  // partRole.id -&gt; location.identifier;\n                  partRole.code -&gt; location.type;\n                } &quot;partRole&quot;;\n              } &quot;location1&quot;;\n            } &quot;Location&quot;;\n            enc1.entryRelationship as entryrel2 -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  encountert1.reasonReference = create('BackboneElement') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n              entryrel2.observation as obs then {\n                obs -&gt;  observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n                obs -&gt;  observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encountert1.id) &quot;reference&quot;;\n                obs.code -&gt; observation.code;\n                obs.statusCode as statusc where (code = 'completed') -&gt; observation.status = 'final';\n                obs.statusCode as statusc where (code = 'active') -&gt; observation.status = 'registered';\n                obs.statusCode as statusc where (code = 'aborted') -&gt; observation.status = 'cancelled';\n                obs.statusCode as statusc where (code = 'suspended') -&gt; observation.status = 'partial';\n                obs -&gt; observation.status = 'final' &quot;notpresent&quot;;\n                obs.effectiveTime as effectiveTime -&gt; observation.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;value2&quot;;\n                obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n                  obs.effectiveTime as eff -&gt; observation.effective = create('Period') as period then IVLTSPeriod(eff, period);\n                } &quot;where&quot;;\n                obs.value : INT as int -&gt; observation.value = (int.value);\n                obs.value : BL as boolean -&gt; observation.value = (boolean.value) &quot;boolean&quot;;\n                obs.value : CE as val then {\n                  val -&gt; observation.value = create('CodeableConcept') as ce then {\n                    val.originalText as originalText then {\n                      originalText.reference as reference -&gt; ce.text = reference;\n                    } &quot;originltext&quot;;\n                    val -&gt; ce.coding as coding then {\n                      val.code as code -&gt; coding.code = cast(code, 'string');\n                      val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                      val.displayName as display -&gt; coding.display = cast(display, 'string');\n                      val.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                    } &quot;code&quot;;\n                    val.translation as translation -&gt; ce.coding as coding then {\n                      translation.code as code -&gt; coding.code = cast(code, 'string');\n                      translation.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                      translation.displayName as display -&gt; coding.display = cast(display, 'string');\n                      translation.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                      translation.qualifier as qualifier then {\n                        qualifier.value as value -&gt; ce.coding as coding then {\n                          value.code as code -&gt; coding.code = cast(code, 'string');\n                          value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                          value.displayName as display -&gt; coding.display = cast(display, 'string');\n                          value.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                        };\n                      };\n                    };\n                  } &quot;coding&quot;;\n                } &quot;val&quot;;\n                obs.value : CD as val then {\n                  val -&gt; observation.value = create('CodeableConcept') as ce then {\n                    val.originalText as originalText then {\n                      originalText.reference as reference -&gt; ce.text = reference;\n                    } &quot;originltext&quot;;\n                    val -&gt; ce.coding as coding then {\n                      val.code as code -&gt; coding.code = cast(code, 'string');\n                      val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                      val.displayName as display -&gt; coding.display = cast(display, 'string');\n                      val.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                    } &quot;code&quot;;\n                    val.translation as translation -&gt; ce.coding as coding then {\n                      translation.code as code -&gt; coding.code = cast(code, 'string');\n                      translation.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                      translation.displayName as display -&gt; coding.display = cast(display, 'string');\n                      translation.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                      translation.qualifier as qualifier then {\n                        qualifier.value as value -&gt; ce.coding as coding then {\n                          value.code as code -&gt; coding.code = cast(code, 'string');\n                          value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                          value.displayName as display -&gt; coding.display = cast(display, 'string');\n                          value.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                        };\n                      };\n                    };\n                  } &quot;coding&quot;;\n                } &quot;val&quot;;\n                obs.value : PQ as val then {\n                  val -&gt; observation.value = create('Quantity') as quantity then {\n                    val.value as value -&gt; quantity.value = value;\n                    val.unit as unit -&gt; quantity.unit = unit;\n                  } &quot;quantity&quot;;\n                } &quot;valueQuantity&quot;;\n                obs.value : ST as value -&gt;  observation.value = create('string'),  observation.value = (value.dataString);\n              } &quot;obs&quot;;\n            } &quot;entryrel2&quot;;\n          } &quot;enc1&quot;;\n        } &quot;enc&quot;;\n      } &quot;entriRel&quot;;\n      // Trasferimento post dimissione-------------------------------------------------------------------------------------------------------------------------------------\n      act.entryRelationship as entriRel2 then {\n        entriRel2.act as a then {\n          a -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Encounter') as encountert2,  encountert2.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Encounter/', uuid1),  request.url = 'Encounter',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + encountert2.id),  encountert2.partOf = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + encountert.id) then {\n            a -&gt; encountert2.status = 'finished' &quot;status&quot;;\n            a -&gt; encountert2.class = create('Coding') as cl then {\n              a -&gt; cl.code = 'AMB' &quot;code&quot;;\n              a -&gt; cl.display = 'ambulatory' &quot;code&quot;;\n            } &quot;class&quot;;\n            a -&gt;  encountert2.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + patient.id) &quot;refpatient&quot;;\n            a where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n              a.effectiveTime as eff -&gt; encountert2.period = create('Period') as period then IVLTSPeriod(eff, period);\n            } &quot;where&quot;;\n            // effectiveTime = time-stamp\n            a where effectiveTime.low.exists().not() or effectiveTime.high.exists().not() then {\n              a.effectiveTime as effectivetime1 -&gt; encountert2.period = create('Period') as period then {\n                effectivetime1 -&gt; period.start = create('dateTime') as start then TSDateTime(effectivetime1, start) &quot;val&quot;;\n              } &quot;efft&quot;;\n            } &quot;where&quot;;\n            a -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Location') as location,  location.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Location/', uuid1),  request.url = append('Location/', uuid1) then {\n              a.text as tx then {\n                tx.reference as ref -&gt; location.description = (ref.value) &quot;dfs&quot;;\n              };\n              a.participant as part then {\n                part -&gt; location.meta as meta then {\n                  part -&gt; meta.tag = create('Coding') as coding then {\n                    part -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                    part -&gt; coding.code = 'ClinicalDocument/body/Dimissione/act' &quot;code&quot;;\n                  } &quot;coding&quot;;\n                } &quot;meta&quot;;\n                part.time as tim -&gt; encountert2.location as locat then {\n                  tim -&gt; locat.period = create('Period') as period then IVLTSPeriod(tim, period) &quot;time&quot;;\n                  part.time as tim -&gt; locat.period = create('Period') as period then {\n                    tim -&gt; period.start = create('dateTime') as start then TSDateTime(tim, start) &quot;val&quot;;\n                  };\n                  part.participantRole as partRole then {\n                    partRole.id as id -&gt; location.identifier as identifier then {\n                      id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                      id.extension as ext -&gt; identifier.value = ext then {\n                        partRole -&gt; request.url = append('Location?identifier=', ext) &quot;UUID&quot;;\n                      } &quot;ext&quot;;\n                      id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                      id.root as r then {\n                        id.extension as ext -&gt;  location.id = (r + '-' + ext) as uuid,  e1.fullUrl = append('https://example/Location/', uuid),  locat.location = create('Reference') as reference,  reference.reference = ('https://example/Location/' + %location.id) &quot;idasi&quot;;\n                      } &quot;r&quot;;\n                    } &quot;identifier&quot;;\n                    // partRole.id -&gt; location.identifier;\n                    partRole.code -&gt; location.type;\n                  } &quot;partRole&quot;;\n                } &quot;loc2&quot;;\n              } &quot;Location&quot;;\n            } &quot;loc&quot;;\n            a.entryRelationship as entryrel2 -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  encountert2.reasonReference = create('BackboneElement') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n              entryrel2.observation as obs then {\n                obs -&gt;  observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n                obs -&gt;  observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encountert2.id) &quot;reference&quot;;\n                obs.code -&gt; observation.code;\n                obs.statusCode as statusc where (code = 'completed') -&gt; observation.status = 'final';\n                obs.statusCode as statusc where (code = 'active') -&gt; observation.status = 'registered';\n                obs.statusCode as statusc where (code = 'aborted') -&gt; observation.status = 'cancelled';\n                obs.statusCode as statusc where (code = 'suspended') -&gt; observation.status = 'partial';\n                obs -&gt; observation.status = 'final' &quot;notpresent&quot;;\n                obs.effectiveTime as effectiveTime -&gt; observation.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;value2&quot;;\n                obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n                  obs.effectiveTime as eff -&gt; observation.effective = create('Period') as period then IVLTSPeriod(eff, period);\n                } &quot;where&quot;;\n                obs.value : INT as int -&gt; observation.value = (int.value);\n                obs.value : BL as boolean -&gt; observation.value = (boolean.value) &quot;boolean&quot;;\n                obs.value : CE as val then {\n                  val -&gt; observation.value = create('CodeableConcept') as ce then {\n                    val.originalText as originalText then {\n                      originalText.reference as reference -&gt; ce.text = reference;\n                    } &quot;originltext&quot;;\n                    val -&gt; ce.coding as coding then {\n                      val.code as code -&gt; coding.code = cast(code, 'string');\n                      val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                      val.displayName as display -&gt; coding.display = cast(display, 'string');\n                      val.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                    } &quot;code&quot;;\n                    val.translation as translation -&gt; ce.coding as coding then {\n                      translation.code as code -&gt; coding.code = cast(code, 'string');\n                      translation.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                      translation.displayName as display -&gt; coding.display = cast(display, 'string');\n                      translation.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                      translation.qualifier as qualifier then {\n                        qualifier.value as value -&gt; ce.coding as coding then {\n                          value.code as code -&gt; coding.code = cast(code, 'string');\n                          value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                          value.displayName as display -&gt; coding.display = cast(display, 'string');\n                          value.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                        };\n                      };\n                    };\n                  } &quot;coding&quot;;\n                } &quot;val&quot;;\n                obs.value : CD as val then {\n                  val -&gt; observation.value = create('CodeableConcept') as ce then {\n                    val.originalText as originalText then {\n                      originalText.reference as reference -&gt; ce.text = reference;\n                    } &quot;originltext&quot;;\n                    val -&gt; ce.coding as coding then {\n                      val.code as code -&gt; coding.code = cast(code, 'string');\n                      val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                      val.displayName as display -&gt; coding.display = cast(display, 'string');\n                      val.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                    } &quot;code&quot;;\n                    val.translation as translation -&gt; ce.coding as coding then {\n                      translation.code as code -&gt; coding.code = cast(code, 'string');\n                      translation.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                      translation.displayName as display -&gt; coding.display = cast(display, 'string');\n                      translation.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                      translation.qualifier as qualifier then {\n                        qualifier.value as value -&gt; ce.coding as coding then {\n                          value.code as code -&gt; coding.code = cast(code, 'string');\n                          value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                          value.displayName as display -&gt; coding.display = cast(display, 'string');\n                          value.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                        };\n                      };\n                    };\n                  } &quot;coding&quot;;\n                } &quot;val&quot;;\n                obs.value : PQ as val then {\n                  val -&gt; observation.value = create('Quantity') as quantity then {\n                    val.value as value -&gt; quantity.value = value;\n                    val.unit as unit -&gt; quantity.unit = unit;\n                  } &quot;quantity&quot;;\n                } &quot;valueQuantity&quot;;\n                obs.value : ST as value -&gt;  observation.value = create('string'),  observation.value = (value.dataString);\n              } &quot;obs&quot;;\n            } &quot;entryrel2&quot;;\n          } &quot;act&quot;;\n        } &quot;a&quot;;\n      } &quot;entri-act&quot;;\n      // --------------Diagnosi alla dimissione-------------------------------------------------------------\n      act.entryRelationship as entryrel2 then {\n        entryrel2.observation as obs then {\n          obs.code as code where (code = '29308-4') -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  encountert.reasonReference = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n            obs -&gt;  observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n            obs -&gt;  observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encountert.id) &quot;reference&quot;;\n            obs.code -&gt; observation.code;\n            obs.statusCode as statusc where (code = 'completed') -&gt; observation.status = 'final';\n            obs.statusCode as statusc where (code = 'active') -&gt; observation.status = 'registered';\n            obs.statusCode as statusc where (code = 'aborted') -&gt; observation.status = 'cancelled';\n            obs.statusCode as statusc where (code = 'suspended') -&gt; observation.status = 'partial';\n            // obs where obs.statusCode.exists().not() then {\n            obs -&gt; observation.status = 'final' &quot;status&quot;;\n            // }&quot;statuscode&quot;;\n            obs.effectiveTime as effectiveTime -&gt; observation.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;value2&quot;;\n            obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n              obs.effectiveTime as eff -&gt; observation.effective = create('Period') as period then IVLTSPeriod(eff, period);\n            } &quot;where&quot;;\n            obs.value as val then {\n              val -&gt; observation.value = create('CodeableConcept') as ce then {\n                val.originalText as originalText then {\n                  originalText.reference as reference -&gt; ce.text = reference;\n                } &quot;originltext&quot;;\n                val -&gt; ce.coding as coding then {\n                  val.code as code -&gt; coding.code = cast(code, 'string');\n                  val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                  val.displayName as display -&gt; coding.display = cast(display, 'string');\n                  val.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                } &quot;code&quot;;\n                val.translation as translation -&gt; ce.coding as coding then {\n                  translation.code as code -&gt; coding.code = cast(code, 'string');\n                  translation.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                  translation.displayName as display -&gt; coding.display = cast(display, 'string');\n                  translation.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                  translation.qualifier as qualifier then {\n                    qualifier.value as value -&gt; ce.coding as coding then {\n                      value.code as code -&gt; coding.code = cast(code, 'string');\n                      value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                      value.displayName as display -&gt; coding.display = cast(display, 'string');\n                      value.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                    };\n                  };\n                };\n              } &quot;coding&quot;;\n            } &quot;val&quot;;\n            obs.value : INT as int -&gt; ob.value = (int.value);\n            obs.value : BL as boolean -&gt; ob.value = (boolean.value) &quot;boolean&quot;;\n            obs.value : PQ as val then {\n              val -&gt; ob.value = create('Quantity') as quantity then {\n                val.value as value -&gt; quantity.value = value;\n                val.unit as unit -&gt; quantity.unit = unit;\n              } &quot;quantity&quot;;\n            } &quot;valueQuantity&quot;;\n            obs.value : ST as value -&gt;  ob.value = create('string'),  ob.value = (value.dataString);\n          } &quot;222&quot;;\n        } &quot;obs&quot;;\n      } &quot;entryrel2&quot;;\n      // --------Esito----------------------------\n      act.entryRelationship as entriRel3 then {\n        entriRel3.observation as obs2 then {\n          obs2.code as code then {\n            code.code where (code.code = '11302-7') then {\n              obs2 -&gt; encountert.hospitalization as hospital then {\n                obs2.value -&gt; hospital.dischargeDisposition;\n              } &quot;hospital&quot;;\n            } &quot;entry-obs1&quot;;\n          } &quot;act&quot;;\n        } &quot;x&quot;;\n      } &quot;3&quot;;\n    };\n  } &quot;entry1&quot;;\n  src.entry as entry1 then {\n    entry1.observation as obs then {\n      obs -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n        obs.value as val where ('xsi:type' = 'BL') -&gt; observation.value = (val.value);\n        obs then Observation(obs, patient, enc, observation, bundle) &quot;act&quot;;\n      } &quot;obstarg&quot;;\n    } &quot;obs&quot;;\n  };\n}\n\n// -----------------------------------------------------------------------------------------------------------------------\n// ------------------------------TerapiaFarmacologicaDimissione-----------------------------------------------------------------------------------------\ngroup ClinicalDocumentSectionTerapiaFarmacologicaDimissione(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  // Sezione Narrativa------------------------------------------------------------------------------------------------------------------------------------------------\n  src where src.entry.exists().not() then {\n    src.text as cdaText -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('MedicationRequest') as medRq,  medRq.id = uuid() as uuid1,  e1.fullUrl = append('https://example/MedicationRequest/', uuid1),  request.url = 'MedicationRequest',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/MedicationRequest/' + %medRq.id),  medRq.note = create('Annotation') as note then {\n      cdaText -&gt; note.text = cdaText &quot;reference&quot;;\n      cdaText -&gt;  medRq.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n      cdaText -&gt;  medRq.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n      cdaText -&gt; medRq.status = 'active' &quot;status&quot;;\n      cdaText -&gt; medRq.intent = 'order' &quot;intent&quot;;\n      src.author as auth -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n        auth.time as t -&gt; note.time = create('dateTime') as value then TSDateTime(t, value);\n        auth.assignedAuthor as assAuth then {\n          // assAuth.time -&gt; note.time;\n          assAuth -&gt; practitioner.meta as meta then {\n            assAuth -&gt; meta.tag = create('Coding') as coding then {\n              assAuth -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              assAuth -&gt; coding.code = 'ClinicalDocument/body/TerapiaFarmacologicaDimissione/author' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          assAuth.id as id -&gt; practitioner.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  note.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          assAuth.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          assAuth.assignedPerson as asspers then {\n            asspers.name -&gt; practitioner.name;\n          } &quot;assPers&quot;;\n        } &quot;assAuth&quot;;\n      } &quot;auth&quot;;\n      src -&gt; medRq.medication = create('CodeableConcept') as medication then {\n        src.text as txt -&gt; medication.text = txt;\n      } &quot;medicationesiste&quot;;\n    } &quot;note&quot;;\n  } &quot;text&quot;;\n  // Sezione Strutturata------------------------------------------------------------------------------------------------------------------------------------------\n  src where src.entry.exists() then {\n    src -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('MedicationRequest') as medRq,  medRq.id = uuid() as uuid1,  e1.fullUrl = append('https://example/MedicationRequest/', uuid1),  request.url = 'MedicationRequest',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/MedicationRequest/' + %medRq.id),  medRq.note = create('Annotation') as note then {\n      src.text as t -&gt; note.text = t &quot;reference&quot;;\n      src -&gt;  medRq.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n      src -&gt;  medRq.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n      src -&gt; medRq.status = 'active' &quot;status&quot;;\n      src -&gt; medRq.intent = 'order' &quot;intent&quot;;\n      src.author as auth -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Practitioner/', uuid1),  request.url = append('Practitioner/', uuid1) then {\n        auth.time as t -&gt; note.time = create('dateTime') as value then TSDateTime(t, value);\n        auth.assignedAuthor as assAuth then {\n          // assAuth.time -&gt; note.time;\n          assAuth -&gt; practitioner.meta as meta then {\n            assAuth -&gt; meta.tag = create('Coding') as coding then {\n              assAuth -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              assAuth -&gt; coding.code = 'ClinicalDocument/body/TerapiaFarmacologicaDimissione/author' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          assAuth.id as id -&gt; practitioner.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  note.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          assAuth.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          assAuth.assignedPerson as asspers then {\n            asspers.name -&gt; practitioner.name;\n          } &quot;assPers&quot;;\n        } &quot;assAuth&quot;;\n      } &quot;auth&quot;;\n      src.entry as entry1 then {\n        entry1.substanceAdministration as sub then {\n          sub.statusCode -&gt; medRq.status;\n          sub -&gt; medRq.dosageInstruction = create('Dosage') as dosage then {\n            sub -&gt; dosage.timing = create('Timing') as tim then {\n              sub.effectiveTime as eff -&gt; tim.repeat as repeat then {\n                eff -&gt; repeat.bounds = create('Period') as period then IVLTSPeriod(eff, period) &quot;boundsperiod&quot;;\n              } &quot;repeat&quot;;\n            } &quot;timing&quot;;\n          } &quot;dosage&quot;;\n          sub.effectiveTime : PIVL_TS as eff -&gt; medRq.dosageInstruction = create('Dosage') as dosage then {\n            eff -&gt; dosage.timing = create('Timing') as timing then periodTiming(eff, timing) &quot;cod&quot;;\n          } &quot;eff&quot;;\n          sub -&gt; medRq.dosageInstruction = create('Dosage') as dosage then {\n            sub.routeCode -&gt; dosage.route;\n          } &quot;dosage&quot;;\n          sub -&gt; medRq.dosageInstruction = create('Dosage') as dosage then {\n            sub.approachSiteCode -&gt; dosage.site;\n          } &quot;dosage&quot;;\n          sub.doseQuantity as doseQuant then {\n            doseQuant -&gt; medRq.dosageInstruction = create('Dosage') as dosageInstruction then {\n              doseQuant.originalText as ot then {\n                ot.reference -&gt; dosageInstruction.text;\n              } &quot;ot&quot;;\n              doseQuant -&gt; dosageInstruction.doseAndRate as dosageRate then {\n                doseQuant -&gt; dosageRate.dose = create('Range') as d then {\n                  doseQuant -&gt; d.low = create('SimpleQuantity') as l then {\n                    doseQuant.low as lo -&gt; l.value = (lo.value);\n                    doseQuant.low as lo -&gt; l.unit = (lo.unit);\n                  } &quot;low&quot;;\n                  doseQuant -&gt; d.high = create('SimpleQuantity') as h then {\n                    doseQuant.high as hi -&gt; h.value = (hi.value);\n                    doseQuant.high as hi -&gt; h.unit = (hi.unit);\n                  } &quot;low&quot;;\n                } &quot;d&quot;;\n              } &quot;dosageRate&quot;;\n              sub.rateQuantity as rateQuantity -&gt; medRq.dosageInstruction = create('Dosage') as dosageInstruction1 then {\n                rateQuantity.originalText as ot then {\n                  ot.reference -&gt; dosageInstruction1.text;\n                } &quot;ot&quot;;\n                rateQuantity -&gt; dosageInstruction1.doseAndRate as dosageRate then {\n                  rateQuantity -&gt; dosageRate.rate = create('Range') as d then {\n                    rateQuantity -&gt; d.low = create('SimpleQuantity') as l then {\n                      rateQuantity.low as lo -&gt; l.value = (lo.value);\n                      rateQuantity.low as lo -&gt; l.unit = (lo.unit);\n                    } &quot;low&quot;;\n                    rateQuantity -&gt; d.high = create('SimpleQuantity') as h then {\n                      rateQuantity.high as hi -&gt; h.value = (hi.value);\n                      rateQuantity.high as hi -&gt; h.unit = (hi.unit);\n                    } &quot;low&quot;;\n                  } &quot;d&quot;;\n                } &quot;qualcosa&quot;;\n              } &quot;dosageRate&quot;;\n            } &quot;Dosage&quot;;\n          } &quot;doseQuant&quot;;\n          sub -&gt;  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            sub.administrationUnitCode -&gt; medication.form;\n            sub.consumable as cons then {\n              cons.manufacturedProduct as manuprod then {\n                manuprod.manufacturedMaterial as manufact then {\n                  manufact.code -&gt; medication.code;\n                } &quot;manuFact&quot;;\n              } &quot;manumat&quot;;\n            } &quot;cons&quot;;\n            sub.entryRelationship as entryR then {\n              entryR.observation as observation then {\n                observation.code where displayName = 'Grammatura' -&gt; medication.ingredient as ingredient then {\n                  sub.consumable as consumable then {\n                    consumable.manufacturedProduct as manufacturedProduct then {\n                      manufacturedProduct.manufacturedMaterial as manufacturedMaterial then {\n                        manufacturedMaterial.code as code -&gt; ingredient.item = create('CodeableConcept') as value then CECodeableConcept(code, value) &quot;CE&quot;;\n                      } &quot;material&quot;;\n                    } &quot;product&quot;;\n                  };\n                  observation.value as value -&gt; ingredient.strength as strength then {\n                    value -&gt; strength.numerator as numerator then {\n                      value -&gt; numerator.value = (value.value) &quot;valueN&quot;;\n                    } &quot;numerator&quot;;\n                    value -&gt; strength.denominator as denominator then {\n                      value -&gt; denominator.value = 1 &quot;valueD&quot;;\n                    } &quot;denominator&quot;;\n                  } &quot;strenght&quot;;\n                } &quot;ingredient&quot;;\n                observation.code where displayName = 'Quantità nella Confezione' then {\n                  observation.value as value -&gt; medication.amount as amount then {\n                    value -&gt; amount.numerator as numerator then {\n                      value -&gt; numerator.value = (value.value) &quot;valueN&quot;;\n                    } &quot;numerator&quot;;\n                    value -&gt; amount.denominator as denominator then {\n                      value -&gt; denominator.value = 1 &quot;valueD&quot;;\n                    } &quot;denominator&quot;;\n                  } &quot;amount&quot;;\n                } &quot;quantita&quot;;\n              } &quot;obs&quot;;\n            } &quot;entryR&quot;;\n            sub.participant as part -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as participant,  participant.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Participant/', uuid1),  request.url = append('Participant/', uuid1) then {\n              part.time as t -&gt; medRq.authoredOn = create('dateTime') as date then TSDateTime(t, date) &quot;authoredOn&quot;;\n              part.participantRole as partRole then {\n                partRole -&gt; participant.meta as meta then {\n                  partRole -&gt; meta.tag = create('Coding') as coding then {\n                    partRole -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                    partRole -&gt; coding.code = 'ClinicalDocument/body/TerapiaFarmacologicaDimissione/participant' &quot;code&quot;;\n                  } &quot;coding&quot;;\n                } &quot;meta&quot;;\n                partRole.id as id -&gt; participant.identifier as identifier then {\n                  id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                  id.extension as ext -&gt; identifier.value = ext;\n                  id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                  id.root as r then {\n                    id.extension as ext -&gt;  participant.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  medRq.requester = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %participant.id) &quot;aut&quot;;\n                  } &quot;r&quot;;\n                } &quot;identifier&quot;;\n                partRole.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n                  id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n                } &quot;2&quot;;\n                partRole.playingEntity as playent then {\n                  playent.name -&gt; participant.name;\n                } &quot;playent&quot;;\n              } &quot;partRole&quot;;\n            };\n            sub.reference as ref then {\n              ref.externalAct as external then {\n                external.id -&gt; medRq.identifier;\n              } &quot;external&quot;;\n            } &quot;ref&quot;;\n            sub.entryRelationship as entryRelationship then {\n              entryRelationship.supply as sup -&gt; medRq.dispenseRequest as dispreq then {\n                sup -&gt; dispreq.quantity = create('SimpleQuantity') as quantity then {\n                  sup.quantity as q -&gt; quantity.value = (q.value);\n                } &quot;quantity&quot;;\n              } &quot;sub&quot;;\n            } &quot;med&quot;;\n          } &quot;admnistrationUnicode&quot;;\n        } &quot;sub&quot;;\n      };\n    } &quot;medication&quot;;\n  } &quot;sezioneesiste&quot;;\n}\n\n// -----------------------------------------------------------------------------------------------------------------------\n// ______1._____________Sections________________________\ngroup ModalitadiTrasposto(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src.text as cdaText -&gt; tgt.text as fhirText then {\n    cdaText -&gt; fhirText.status = 'generated' &quot;narrativeStatus&quot;;\n    cdaText as t -&gt; fhirText.div = t &quot;narrativeText&quot;;\n  } &quot;cdaText&quot;;\n  src.entry as entry1 then {\n    src.entry as entry1 -&gt;  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) then {\n      entry1.act as act1 then Act(act1, patient, enc, bundle);\n    } &quot;entry1&quot;;\n  };\n}\n\ngroup MotivoDellaVisita(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src.text as cdaText -&gt; tgt.text as fhirText then {\n    cdaText -&gt; fhirText.status = 'generated' &quot;narrativeStatus&quot;;\n    cdaText as t -&gt; fhirText.div = t &quot;narrativeText&quot;;\n  } &quot;cdaText&quot;;\n  src.entry as entry -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'POST',  e2.resource = create('Observation') as observation,  observation.id = uuid() as uuid2,  e2.fullUrl = append('https://example/Observation/', uuid2),  request.url = 'Observation',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n    entry.observation as obs then Observation(obs, patient, enc, observation, bundle);\n  };\n}\n\ngroup Triage(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src.text as cdaText -&gt; tgt.text as fhirText then {\n    cdaText -&gt; fhirText.status = 'generated' &quot;narrativeStatus&quot;;\n    cdaText as t -&gt; fhirText.div = t &quot;narrativeText&quot;;\n  } &quot;cdaText&quot;;\n  src.entry as entry -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'POST',  e2.resource = create('Observation') as observation,  observation.id = uuid() as uuid2,  e2.fullUrl = append('https://example/Observation/', uuid2),  request.url = 'Observation',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n    entry.observation as obs then Observation(obs, patient, enc, observation, bundle);\n  };\n}\n\ngroup InquadramentoClinicoIniziale(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src.text as cdaText -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id),  tgt.text as fhirText then {\n    src.code -&gt; observation.code;\n    src where observation.statusCode.exists().not() then {\n      src -&gt; observation.status = 'final' &quot;status&quot;;\n    } &quot;statuscode&quot;;\n    src -&gt;  observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n    src -&gt;  observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n    cdaText -&gt; observation.note as note then {\n      src.author as author then {\n        author -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'PUT',  e2.resource = create('Practitioner') as practitioner then {\n          author.assignedAuthor as assignedAuthor then {\n            assignedAuthor -&gt; practitioner.meta as meta then {\n              assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n                assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/InquadramentoClinicoIniziale/author' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e2.fullUrl = append('https://example/Practitioner/', uuid2),  request.url = append('Practitioner/', uuid2),  note.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n              id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n            } &quot;2&quot;;\n            assignedAuthor.assignedPerson as person then {\n              person.name -&gt; practitioner.name;\n            } &quot;name&quot;;\n          };\n        } &quot;practitioner&quot;;\n        author.time as t -&gt; note.time = create('dateTime') as value then TSDateTime(t, value);\n      } &quot;Author&quot;;\n      cdaText as t -&gt; note.text = t &quot;reference&quot;;\n    } &quot;reference&quot;;\n  } &quot;cdaText&quot;;\n  // START sottosections\n  src.component as component then {\n    component.section as sottosection then {\n      sottosection -&gt; tgt.section as section then {\n        // 1. Anamnesi Narrativa-------------------------------------------------------------------------------------------------------------------------------------------\n        sottosection.code where (code = '11329-0') -&gt; section.code;\n        sottosection.code as code1 where (code = '11329-0') then {\n          src where sottosection.entry.exists().not() then {\n            sottosection.title as t -&gt; section.title = (t.dataString);\n            sottosection.text as cdaText -&gt;  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',  section.entry = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n              cdaText -&gt;  observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n              cdaText -&gt;  observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n              sottosection.code -&gt; observation.code;\n              src where observation.statusCode.exists().not() then {\n                src -&gt; observation.status = 'final' &quot;status&quot;;\n              } &quot;statuscode&quot;;\n              cdaText -&gt; observation.note as note then {\n                cdaText as t -&gt; note.text = t &quot;reference&quot;;\n                sottosection.author as authors then {\n                  authors.time as time -&gt; note.time = create('dateTime') as value then TSDateTime(time, value) &quot;timeAuthor&quot;;\n                  authors.assignedAuthor as assignedAuthor -&gt;  bundle.entry as e9,  e9.request = create('BackboneElement') as request,  request.method = 'PUT',  e9.resource = create('Practitioner') as practitioner then {\n                    assignedAuthor -&gt; practitioner.meta as meta then {\n                      assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n                        assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                        assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/EsameObiettivo/author' &quot;code&quot;;\n                      } &quot;coding&quot;;\n                    } &quot;meta&quot;;\n                    assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n                      id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                      id.extension as ext -&gt; identifier.value = ext;\n                      id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                      id.root as r then {\n                        id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid9,  e9.fullUrl = append('https://example/Practitioner/', uuid9),  request.url = append('Practitioner/', uuid9),  note.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;autore&quot;;\n                      } &quot;r&quot;;\n                    } &quot;identifier&quot;;\n                    assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n                      id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n                    } &quot;2&quot;;\n                    assignedAuthor.assignedPerson as person then {\n                      person.name -&gt; practitioner.name;\n                    };\n                  } &quot;assighedAuthor&quot;;\n                };\n              } &quot;reference&quot;;\n            } &quot;cdaText&quot;;\n          } &quot;where&quot;;\n          // Anamnesi Strutturata-----------------------------------------------------------------------------------------------------------------------------------------\n          sottosection.entry as entry1 then {\n            entry1.observation as obs then {\n              obs.code where (code = '75326-9') then {\n                obs -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Condition') as condition,  condition.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Condition/', uuid1),  request.url = 'Condition',  section.entry = create('Reference') as reference,  reference.reference = ('https://example/Condition/' + %condition.id) then {\n                  obs.code -&gt; condition.category;\n                  obs -&gt;  condition.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n                  obs -&gt;  condition.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n                  obs.statusCode as status where (code = 'completed') -&gt; condition.verificationStatus as status2 then {\n                    status -&gt; status2.coding as status3 then {\n                      status -&gt; status3.code = 'confirmed' &quot;finald&quot;;\n                      status -&gt; status3.system = 'http://terminology.hl7.org/CodeSystem/condition-ver-status' &quot;system&quot;;\n                    } &quot;st3&quot;;\n                  } &quot;status&quot;;\n                  // blocco Narrativo\n                  sottosection.text as cdaText1 -&gt; condition.note as note then {\n                    cdaText1 as t -&gt; note.text = t &quot;reference&quot;;\n                    sottosection.author as authors then {\n                      authors.time as time -&gt; note.time = create('dateTime') as value then TSDateTime(time, value) &quot;timeAuthor&quot;;\n                      authors.assignedAuthor as assignedAuthor -&gt;  bundle.entry as e5,  e5.request = create('BackboneElement') as request,  request.method = 'PUT',  e5.resource = create('Practitioner') as practitioner then {\n                        assignedAuthor -&gt; practitioner.meta as meta then {\n                          assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n                            assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                            assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/Anamnesi/author' &quot;code&quot;;\n                          } &quot;coding&quot;;\n                        } &quot;meta&quot;;\n                        assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n                          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                          id.extension as ext -&gt; identifier.value = ext;\n                          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                          id.root as r then {\n                            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid5,  e5.fullUrl = append('https://example/Practitioner/', uuid5),  request.url = append('Practitioner/', uuid5),  note.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id);\n                          } &quot;r&quot;;\n                        } &quot;identifier&quot;;\n                        assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n                          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n                        } &quot;2&quot;;\n                        assignedAuthor.assignedPerson as person then {\n                          person.name -&gt; practitioner.name;\n                        };\n                      } &quot;assighedAuthor&quot;;\n                    };\n                  } &quot;cdaText1&quot;;\n                  obs.effectiveTime as effective1 then {\n                    effective1 where effective1.low.exists() or effective1.high.exists() then {\n                      effective1 -&gt; condition.onset = create('Period') as periodonset then IVLTSPeriod(effective1, periodonset) &quot;onsetperiod&quot;;\n                    } &quot;ef&quot;;\n                  } &quot;effectivetime1&quot;;\n                  obs.effectiveTime as effectiveTime -&gt; condition.onset = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;onsetDateTime&quot;;\n                  obs.value : INT as int -&gt; ob.value = (int.value);\n                  obs.value : BL as boolean -&gt; ob.value = (boolean.value) &quot;boolean&quot;;\n                  obs.value : ST as value -&gt;  ob.value = create('string'),  ob.value = (value.dataString);\n                  obs.value : CE as val then {\n                    val -&gt; ob.value = create('CodeableConcept') as ce then {\n                      val.originalText as originalText then {\n                        originalText.reference as reference -&gt; ce.text = reference;\n                      } &quot;originltext&quot;;\n                      val -&gt; ce.coding as coding then {\n                        val.code as code -&gt; coding.code = cast(code, 'string');\n                        val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                        val.displayName as display -&gt; coding.display = cast(display, 'string');\n                        val.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                      } &quot;code&quot;;\n                      val.translation as translation -&gt; ce.coding as coding then {\n                        translation.code as code -&gt; coding.code = cast(code, 'string');\n                        translation.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                        translation.displayName as display -&gt; coding.display = cast(display, 'string');\n                        translation.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                        translation.qualifier as qualifier then {\n                          qualifier.value as value -&gt; ce.coding as coding then {\n                            value.code as code -&gt; coding.code = cast(code, 'string');\n                            value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                            value.displayName as display -&gt; coding.display = cast(display, 'string');\n                            value.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n                          };\n                        };\n                      };\n                    } &quot;coding&quot;;\n                  } &quot;val&quot;;\n                  obs.value : CD as val then {\n                    val -&gt; condition.code = create('CodeableConcept') as ce then {\n                      val.originalText -&gt; ce.text;\n                      val -&gt; ce.coding as coding then {\n                        val.code as code -&gt; coding.code = cast(code, 'string');\n                        val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                        val.displayName as display -&gt; coding.display = cast(display, 'string');\n                      } &quot;coding&quot;;\n                    } &quot;Ce&quot;;\n                  } &quot;Value&quot;;\n                  obs.entryRelationship as entriRel then {\n                    entriRel -&gt; condition.evidence = create('BackboneElement') as evidence then {\n                      entriRel.observation as observation2 then {\n                        observation2.code as code then {\n                          code.code where (code.code = '89261-2') then {\n                            obs -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observation,  observation.id = uuid() as uuid1,  e1.fullUrl = append('https://example/Observation/', uuid1),  request.url = 'Observation' then {\n                              entriRel -&gt;  evidence.detail = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) &quot;ref&quot;;\n                              observation2.code -&gt; observation.code;\n                              observation2 where observation.statusCode.exists().not() then {\n                                observation2 -&gt; observation.status = 'final' &quot;status&quot;;\n                              } &quot;statuscode&quot;;\n                              observation2.text as text -&gt; observation.note = create('Annotation') as note then {\n                                text.reference as ref -&gt; note.text = (ref.value) &quot;val&quot;;\n                              } &quot;Annontation&quot;;\n                              obs -&gt;  observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n                              obs -&gt;  observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n                              observation2.statusCode as statusc where (code = 'completed') -&gt; ob.status = 'final';\n                              observation2.statusCode as statusc where (code = 'active') -&gt; ob.status = 'registered';\n                              observation2.statusCode as statusc where (code = 'aborted') -&gt; ob.status = 'cancelled';\n                              observation2.statusCode as statusc where (code = 'suspended') -&gt; ob.status = 'partial';\n                              observation2.value : INT as int -&gt; observation.value = (int.value);\n                              observation2.value : BL as boolean -&gt; observation.value = (boolean.value) &quot;boolean&quot;;\n                              observation2.value : ST as value -&gt;  observation.value = create('string'),  observation.value = (value.dataString);\n                              observation2.effectiveTime as effectiveTime -&gt; observation.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;value2&quot;;\n                              observation2 where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n                                observation2.effectiveTime as eff -&gt; observation.effective = create('Period') as period then IVLTSPeriod(eff, period);\n                              } &quot;where&quot;;\n                              observation2.value : PQ as val then {\n                                val -&gt; observation.value = create('Quantity') as quantity then {\n                                  val.value as value -&gt; quantity.value = value;\n                                  val.unit as unit -&gt; quantity.unit = unit;\n                                } &quot;quantity&quot;;\n                              } &quot;valueQuantity&quot;;\n                              observation2.value : CE as val then {\n                                val -&gt; observation.value = create('CodeableConcept') as ce then {\n                                  val.originalText -&gt; ce.text;\n                                  val -&gt; ce.coding as coding then {\n                                    val.code as code -&gt; coding.code = cast(code, 'string');\n                                    val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n                                    val.displayName as display -&gt; coding.display = cast(display, 'string');\n                                  } &quot;coding&quot;;\n                                } &quot;Ce&quot;;\n                              } &quot;Value&quot;;\n                            } &quot;obser&quot;;\n                          } &quot;whereDecorsoClinico&quot;;\n                        };\n                      } &quot;Observation2&quot;;\n                    } &quot;evidence&quot;;\n                  } &quot;EntryRelationship1&quot;;\n                  obs.entryRelationship as entriRel then {\n                    entriRel.observation as observation2 then {\n                      observation2.code as code then {\n                        code.code where (code.code = '33999-4') then {\n                          observation2 -&gt; condition.clinicalStatus = create('CodeableConcept') as status then {\n                            observation2.text as text then {\n                              text.reference as refstat -&gt; status.text = (refstat.value) &quot;statref&quot;;\n                            } &quot;textstat&quot;;\n                            observation2 -&gt; status.coding = create('Coding') as coding then {\n                              observation2.value as value then {\n                                value.code where (value.code = 'LA16666-2') -&gt; coding.code = 'active' &quot;active&quot;;\n                                value.code where (value.code = 'LA18632-2') -&gt; coding.code = 'inactive' &quot;inactive&quot;;\n                                value.codeSystem as system -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/condition-clinical' &quot;system&quot;;\n                                value.displayName as display -&gt; coding.display = cast(display, 'string');\n                              } &quot;value1&quot;;\n                            } &quot;coding&quot;;\n                          } &quot;code&quot;;\n                        } &quot;whereDecorsoClinico&quot;;\n                      } &quot;codestatus&quot;;\n                    } &quot;observationstatus&quot;;\n                  } &quot;entryrelationshipstatus&quot;;\n                } &quot;condition&quot;;\n              } &quot;89261-2&quot;;\n            } &quot;entryobservation1&quot;;\n            // Anamnesi Familiare---------------------------------------------------------------------------------------------------------------------------------------------\n            entry1.organizer as organizer then {\n              organizer.code where (code = '10157-6') then {\n                organizer -&gt;  bundle.entry as e4,  e4.request = create('BackboneElement') as request,  request.method = 'POST',  e4.resource = create('FamilyMemberHistory') as FamilyMemberHistory,  FamilyMemberHistory.id = uuid() as uuid5,  e4.fullUrl = append('https://example/FamilyMemberHistory/', uuid5),  request.url = 'FamilyMemberHistory',  section.entry = create('Reference') as reference,  reference.reference = ('https://example/FamilyMemberHistory/' + %FamilyMemberHistory.id) then {\n                  organizer.effectiveTime as effective then {\n                    effective.value as eff -&gt; FamilyMemberHistory.date = create('dateTime') as value then TSDateTime(eff, value) &quot;date&quot;;\n                  } &quot;effective&quot;;\n                  organizer -&gt;  FamilyMemberHistory.patient = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n                  organizer.subject as subject then {\n                    subject.relatedSubject as relatedSubject then {\n                      relatedSubject.code -&gt; FamilyMemberHistory.relationship &quot;relationship&quot;;\n                      relatedSubject.subject as subject -&gt; FamilyMemberHistory.sex as sex then {\n                        subject.administrativeGenderCode as administrativeGenderCode -&gt; sex.coding as coding then {\n                          administrativeGenderCode.code as code -&gt; coding.code = translate(code, '#AdministrativeGender', 'code') &quot;gender&quot;;\n                          administrativeGenderCode -&gt; coding.system = 'http://hl7.org/fhir/administrative-gender' &quot;system&quot;;\n                        } &quot;coding&quot;;\n                      } &quot;subject1&quot;;\n                    };\n                  };\n                  // blocco Narrativo\n                  sottosection.text as cdaText1 -&gt; FamilyMemberHistory.note as note then {\n                    cdaText1 as t -&gt; note.text = t &quot;reference&quot;;\n                    sottosection.author as authors then {\n                      authors.time as time -&gt; note.time = create('dateTime') as value then TSDateTime(time, value) &quot;timeAuthor&quot;;\n                      authors.assignedAuthor as assignedAuthor -&gt;  bundle.entry as e7,  e7.request = create('BackboneElement') as request,  request.method = 'PUT',  e7.resource = create('Practitioner') as practitioner then {\n                        assignedAuthor -&gt; practitioner.meta as meta then {\n                          assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n                            assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                            assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/Anamnesi/author' &quot;code&quot;;\n                          } &quot;coding&quot;;\n                        } &quot;meta&quot;;\n                        assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n                          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                          id.extension as ext -&gt; identifier.value = ext;\n                          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                          id.root as r then {\n                            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid7,  e7.fullUrl = append('https://example/Practitioner/', uuid7),  request.url = append('Practitioner/', uuid7),  note.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id);\n                          } &quot;r&quot;;\n                        } &quot;identifier&quot;;\n                        assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n                          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n                        } &quot;2&quot;;\n                        assignedAuthor.assignedPerson as person then {\n                          person.name -&gt; practitioner.name;\n                        };\n                      } &quot;assighedAuthor&quot;;\n                    };\n                  } &quot;cdaText1&quot;;\n                  organizer.component as component -&gt; FamilyMemberHistory.condition as condition then {\n                    component.observation as observation then {\n                      observation.code -&gt; condition.code;\n                      observation.text as text -&gt; FamilyMemberHistory.note as note then {\n                        text.reference as reference -&gt; note.text = (reference.value) &quot;value&quot;;\n                      } &quot;reference&quot;;\n                      observation.statusCode -&gt; FamilyMemberHistory.status;\n                      observation.value -&gt; condition.outcome &quot;codeable&quot;;\n                      observation.entryRelationship as entryRelationship then {\n                        entryRelationship.observation as obsservation1 then {\n                          obsservation1.code as code then {\n                            code.code where (code.code = '35267-4') then {\n                              obsservation1.value as value -&gt; condition.onset = create('Age') as Age then {\n                                value.value as valueAge -&gt; Age.value = valueAge &quot;age&quot;;\n                                value.unit as unit -&gt; Age.code = unit;\n                                value.unit as unit -&gt; Age.unit = unit;\n                                value -&gt; Age.system = 'http://unitsofmeasure.org' &quot;system&quot;;\n                              };\n                            } &quot;insorgenza&quot;;\n                          };\n                          obsservation1.code as code then {\n                            code.code where (code.code = '39016-1') then {\n                              obsservation1.value as value -&gt; FamilyMemberHistory.deceased = create('Age') as Age then {\n                                value.value as valueAge -&gt; Age.value = valueAge &quot;age&quot;;\n                                value.unit as unit -&gt; Age.code = unit;\n                                value.unit as unit -&gt; Age.unit = unit;\n                                value -&gt; Age.system = 'http://unitsofmeasure.org' &quot;system&quot;;\n                              };\n                            } &quot;deceased&quot;;\n                          };\n                        } &quot;obser&quot;;\n                      } &quot;EntryRel&quot;;\n                      observation where observation.effectiveTime.exists() then {\n                        observation.effectiveTime as effectiveTime -&gt; FamilyMemberHistory.condition = create('BackboneElement') as condition then {\n                          effectiveTime -&gt; condition.onset = create('Period') as period then {\n                            effectiveTime -&gt; period.start = create('dateTime') as start then TSDateTime(effectiveTime, start) &quot;val&quot;;\n                          } &quot;efft&quot;;\n                          observation.code -&gt; condition.code;\n                          observation.value -&gt; condition.outcome &quot;codeable&quot;;\n                        } &quot;effttemp&quot;;\n                      } &quot;cont&quot;;\n                    } &quot;observationCondition&quot;;\n                  };\n                } &quot;organizer&quot;;\n              } &quot;10157-6&quot;;\n            } &quot;observation1&quot;;\n          } &quot;subsection1&quot;;\n        } &quot;11329-0&quot;;\n        // 2. Esame Obiettivo Narrativa-----------------------------------------------------------------------------------------------------------------------------------\n        sottosection.code where (code = '29545-1') -&gt; section.code;\n        sottosection.code as code1 where (code = '29545-1') then {\n          sottosection.title as t -&gt; section.title = (t.dataString);\n          sottosection.text as cdaText -&gt;  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',  section.entry = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observation.id) then {\n            cdaText -&gt;  observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n            cdaText -&gt;  observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n            sottosection.code -&gt; observation.code;\n            sottosection where observation.statusCode.exists().not() then {\n              sottosection -&gt; observation.status = 'final' &quot;status&quot;;\n            } &quot;statuscode&quot;;\n            cdaText -&gt; observation.note as note then {\n              cdaText as t -&gt; note.text = t &quot;reference&quot;;\n              sottosection.author as authors then {\n                authors.time as time -&gt; note.time = create('dateTime') as value then TSDateTime(time, value) &quot;timeAuthor&quot;;\n                authors.assignedAuthor as assignedAuthor -&gt;  bundle.entry as e9,  e9.request = create('BackboneElement') as request,  request.method = 'PUT',  e9.resource = create('Practitioner') as practitioner then {\n                  assignedAuthor -&gt; practitioner.meta as meta then {\n                    assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n                      assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                      assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/EsameObiettivo/author' &quot;code&quot;;\n                    } &quot;coding&quot;;\n                  } &quot;meta&quot;;\n                  assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n                    id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                    id.extension as ext -&gt; identifier.value = ext;\n                    id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                    id.root as r then {\n                      id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid9,  e9.fullUrl = append('https://example/Practitioner/', uuid9),  request.url = append('Practitioner/', uuid9),  note.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;autore&quot;;\n                    } &quot;r&quot;;\n                  } &quot;identifier&quot;;\n                  assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n                    id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n                  } &quot;2&quot;;\n                  assignedAuthor.assignedPerson as person then {\n                    person.name -&gt; practitioner.name;\n                  };\n                } &quot;assighedAuthor&quot;;\n              };\n            } &quot;reference&quot;;\n          } &quot;cdaText&quot;;\n        } &quot;condizioneesameObiettivo&quot;;\n        // 3. Terapia Farmacologica all'ingresso Narrativa --------------------------------------------------------------------------------------------------------------\n        sottosection.code where (code = '42346-7') -&gt; section.code;\n        sottosection.code as code1 where (code = '42346-7') then {\n          sottosection.title as t -&gt; section.title = (t.dataString);\n          sottosection.text as cdaText -&gt;  bundle.entry as e10,  e10.request = create('BackboneElement') as request,  request.method = 'POST',  e10.resource = create('MedicationStatement') as medicStatement,  medicStatement.id = uuid() as uuid10,  e10.fullUrl = append('https://example/MedicationStatement/', uuid10),  request.url = 'MedicationStatement',  section.entry = create('Reference') as reference,  reference.reference = ('https://example/MedicationStatement/' + %medicStatement.id) then {\n            cdaText -&gt;  medicStatement.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n            sottosection where medicStatement.statusCode.exists().not() then {\n              sottosection -&gt; medicStatement.status = 'completed' &quot;status&quot;;\n            } &quot;statuscode&quot;;\n            cdaText -&gt; medicStatement.medication = create('CodeableConcept') as medication then {\n              cdaText as txt -&gt; medication.text = txt &quot;text&quot;;\n            } &quot;medication&quot;;\n            cdaText -&gt; medicStatement.note as note then {\n              cdaText as t -&gt; note.text = t &quot;reference&quot;;\n              sottosection.author as authors then {\n                authors.time as time -&gt; note.time = create('dateTime') as value then TSDateTime(time, value) &quot;timeAuthor&quot;;\n                authors.assignedAuthor as assignedAuthor -&gt;  bundle.entry as e11,  e11.request = create('BackboneElement') as request,  request.method = 'PUT',  e11.resource = create('Practitioner') as practitioner then {\n                  assignedAuthor -&gt; practitioner.meta as meta then {\n                    assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n                      assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                      assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/TerapiaFarmacologicaIngresso/author' &quot;code&quot;;\n                    } &quot;coding&quot;;\n                  } &quot;meta&quot;;\n                  assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n                    id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                    id.extension as ext -&gt; identifier.value = ext;\n                    id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                    id.root as r then {\n                      id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid11,  e11.fullUrl = append('https://example/Practitioner/', uuid11),  request.url = append('Practitioner/', uuid11),  note.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id);\n                    } &quot;r&quot;;\n                  } &quot;identifier&quot;;\n                  assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n                    id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n                  } &quot;2&quot;;\n                  assignedAuthor.assignedPerson as person then {\n                    person.name -&gt; practitioner.name;\n                  };\n                } &quot;assighedAuthor&quot;;\n              };\n            } &quot;reference&quot;;\n          } &quot;cdaText&quot;;\n        } &quot;condizioneterapiaingresso&quot;;\n        // 4. Allergie\n        sottosection.code where (code = '48765-2') -&gt; section.code;\n        sottosection.code as code1 where (code = '48765-2') then {\n          sottosection.title as t -&gt; section.title = (t.dataString);\n          // Allergia Narrativa-------------------------------------------------------------------------------------------------------------------------------------------\n          src where sottosection.entry.exists().not() then {\n            sottosection.title as t -&gt; section.title = (t.dataString);\n            sottosection.text as cdaText -&gt;  bundle.entry as e8,  e8.request = create('BackboneElement') as request,  request.method = 'POST',  e8.resource = create('AllergyIntolerance') as AllergyIntolerance,  AllergyIntolerance.id = uuid() as uuid8,  e8.fullUrl = append('https://example/AllergyIntolerance/', uuid8),  request.url = 'AllergyIntolerance',  section.entry = create('Reference') as reference,  reference.reference = ('https://example/AllergyIntolerance/' + %AllergyIntolerance.id) then {\n              cdaText -&gt;  AllergyIntolerance.patient = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n              cdaText -&gt;  AllergyIntolerance.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n              cdaText -&gt; AllergyIntolerance.clinicalStatus = create('CodeableConcept') as status then {\n                cdaText -&gt; status.coding = create('Coding') as coding then {\n                  cdaText -&gt; coding.code = 'active' &quot;active&quot;;\n                  cdaText -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical' &quot;system&quot;;\n                  cdaText -&gt; coding.display = 'active' &quot;active&quot;;\n                } &quot;coding&quot;;\n              } &quot;clinicalStatus&quot;;\n              cdaText -&gt; AllergyIntolerance.note as note then {\n                cdaText as t -&gt; note.text = t &quot;reference&quot;;\n                sottosection.author as authors then {\n                  authors.time as time -&gt; note.time = create('dateTime') as value then TSDateTime(time, value) &quot;timeAuthor&quot;;\n                  authors.assignedAuthor as assignedAuthor -&gt;  bundle.entry as e9,  e9.request = create('BackboneElement') as request,  request.method = 'PUT',  e9.resource = create('Practitioner') as practitioner then {\n                    assignedAuthor -&gt; practitioner.meta as meta then {\n                      assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n                        assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                        assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/EsameObiettivo/author' &quot;code&quot;;\n                      } &quot;coding&quot;;\n                    } &quot;meta&quot;;\n                    assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n                      id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                      id.extension as ext -&gt; identifier.value = ext;\n                      id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                      id.root as r then {\n                        id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid9,  e9.fullUrl = append('https://example/Practitioner/', uuid9),  request.url = append('Practitioner/', uuid9),  note.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;autore&quot;;\n                      } &quot;r&quot;;\n                    } &quot;identifier&quot;;\n                    assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n                      id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n                    } &quot;2&quot;;\n                    assignedAuthor.assignedPerson as person then {\n                      person.name -&gt; practitioner.name;\n                    };\n                  } &quot;assighedAuthor&quot;;\n                };\n              } &quot;reference&quot;;\n            } &quot;cdaText&quot;;\n          } &quot;where&quot;;\n          // Allergia Strutturata----------------------------------------------------------------------------------------------------------------------------------------\n          sottosection.entry as entry1 -&gt;  bundle.entry as e12,  e12.request = create('BackboneElement') as request,  request.method = 'POST',  e12.resource = create('AllergyIntolerance') as allergy,  allergy.id = uuid() as uuid12,  e12.fullUrl = append('https://example/AllergyIntolerance/', uuid12),  request.url = 'AllergyIntolerance',  section.entry = create('Reference') as reference,  reference.reference = ('https://example/AllergyIntolerance/' + %allergy.id) then {\n            src -&gt;  allergy.patient = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n            src -&gt;  allergy.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n            entry1.act as actallint then {\n              actallint.effectiveTime as effectiveTime -&gt; allergy.onset = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;onsetDateTime&quot;;\n              actallint where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n                actallint.effectiveTime as eff -&gt; allergy.onset = create('Period') as period then IVLTSPeriod(eff, period) &quot;onsetPeriod&quot;;\n              } &quot;where&quot;;\n              // mapping note\n              sottosection.text as cdaText1 -&gt; allergy.note as note then {\n                cdaText1 as t -&gt; note.text = t &quot;reference&quot;;\n                sottosection.author as authors then {\n                  authors.time as time -&gt; note.time = create('dateTime') as value then TSDateTime(time, value) &quot;timeAuthor&quot;;\n                  authors.assignedAuthor as assignedAuthor -&gt;  bundle.entry as e13,  e13.request = create('BackboneElement') as request,  request.method = 'PUT',  e13.resource = create('Practitioner') as practitioner then {\n                    assignedAuthor -&gt; practitioner.meta as meta then {\n                      assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n                        assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                        assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/Allergie/author' &quot;code&quot;;\n                      } &quot;coding&quot;;\n                    } &quot;meta&quot;;\n                    assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n                      id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                      id.extension as ext -&gt; identifier.value = ext;\n                      id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                      id.root as r then {\n                        id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid13,  e13.fullUrl = append('https://example/Practitioner/', uuid13),  request.url = append('Practitioner/', uuid13),  note.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id);\n                      } &quot;r&quot;;\n                    } &quot;identifier&quot;;\n                    assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n                      id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n                    } &quot;2&quot;;\n                    assignedAuthor.assignedPerson as person then {\n                      person.name -&gt; practitioner.name;\n                    };\n                  } &quot;assighedAuthor&quot;;\n                };\n              } &quot;cdaText1&quot;;\n              actallint.entryRelationship as entryact then {\n                entryact.observation as entryobs then {\n                  entryobs.value as code then {\n                    code.code as code1 -&gt; allergy.type = translate(code1, '#AllergyTypeMap', 'code') &quot;type&quot;;\n                    code.code as code2 -&gt; allergy.category = translate(code2, '#AllergyCategoryMap', 'code') &quot;category&quot;;\n                  } &quot;code&quot;;\n                  entryobs.participant as partic then {\n                    partic.participantRole as pratRole then {\n                      pratRole.playingEntity as pratent then {\n                        pratent -&gt; allergy.reaction = create('BackboneElement') as reaction then {\n                          pratent.code -&gt; reaction.substance &quot;subs&quot;;\n                          entryobs.entryRelationship as entryobs1 where (typeCode = 'MFST') then {\n                            entryobs1.observation as entobs then {\n                              entobs.effectiveTime as eff then {\n                                eff.low as l -&gt; reaction.onset = create('dateTime') as value then TSDateTime(l, value);\n                              } &quot;eff&quot;;\n                              entobs.value -&gt; reaction.manifestation &quot;manifest&quot;;\n                            } &quot;entryobservation&quot;;\n                          };\n                        } &quot;reaction&quot;;\n                      };\n                    };\n                  };\n                  entryobs.entryRelationship as entryobs2 then {\n                    entryobs2.observation as entobs then {\n                      entobs.code as code where (code = 'SEV') then {\n                        entobs.value as value then {\n                          value.code where (value.code = 'M') -&gt; allergy.criticality = 'unable-to-assess' &quot;active&quot;;\n                          value.code where (value.code = 'L') -&gt; allergy.criticality = 'low' &quot;active&quot;;\n                          value.code where (value.code = 'H') -&gt; allergy.criticality = 'high' &quot;active&quot;;\n                        };\n                      } &quot;severity&quot;;\n                    } &quot;entryobservation2&quot;;\n                  } &quot;entryrelationship2&quot;;\n                  entryobs.entryRelationship as entryobs3 then {\n                    entryobs3.observation as entobs then {\n                      entobs.code as code where (code = '33999-4') then {\n                        // entobs.value-&gt;allergy.clinicalStatus &quot;cstatus&quot;;\n                        entobs -&gt; allergy.clinicalStatus = create('CodeableConcept') as status then {\n                          entobs -&gt; status.coding = create('Coding') as coding then {\n                            entobs.value as value then {\n                              value.code where (value.code = 'LA16666-2') -&gt; coding.code = 'active' &quot;active&quot;;\n                              value.code where (value.code = 'LA18632-2') -&gt; coding.code = 'inactive' &quot;active&quot;;\n                              value.codeSystem as system -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical' &quot;system&quot;;\n                              // value-&gt;coding.version='ConditionClinicalStatusCodes 4.0.1'&quot;version&quot;;\n                              value.displayName as display -&gt; coding.display = cast(display, 'string');\n                            } &quot;value1&quot;;\n                          } &quot;coding&quot;;\n                        } &quot;clinicalStatus&quot;;\n                      } &quot;33999-4&quot;;\n                    } &quot;entryobservation3&quot;;\n                  } &quot;entryrelationship3&quot;;\n                  entryobs.entryRelationship as entryobs4 then {\n                    entryobs4.act as entact then {\n                      entact.text as actext then {\n                        actext.reference as reftxt -&gt; allergy.note = create('BackboneElement') as note then {\n                          reftxt as ref -&gt; note.text = (ref.value) &quot;notxt&quot;;\n                        } &quot;notetxt&quot;;\n                      } &quot;txtact&quot;;\n                    } &quot;entryact1&quot;;\n                  } &quot;entryrelationshi4&quot;;\n                } &quot;entryobservation&quot;;\n              } &quot;entryrelationshipact&quot;;\n            } &quot;entryact2&quot;;\n          } &quot;allergy&quot;;\n        } &quot;condizioneallergie&quot;;\n        // 5. Problemi aperti\n        sottosection.code where (code = '11450-4') -&gt; section.code;\n        sottosection.code as code1 where (code = '11450-4') then {\n          sottosection.title as t -&gt; section.title = (t.dataString);\n          sottosection.text as cdaText -&gt;  bundle.entry as e14,  e14.request = create('BackboneElement') as request,  request.method = 'POST',  e14.resource = create('Condition') as condition,  condition.id = uuid() as uuid14,  e14.fullUrl = append('https://example/Condition/', uuid14),  request.url = 'Condition',  section.entry = create('Reference') as reference,  reference.reference = ('https://example/Condition/' + %condition.id) then {\n            cdaText -&gt;  condition.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n            cdaText -&gt;  condition.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n            sottosection.code -&gt; condition.code;\n            cdaText -&gt; condition.note as note then {\n              cdaText as t -&gt; note.text = t &quot;reference&quot;;\n              sottosection.author as authors then {\n                authors.time as time -&gt; note.time = create('dateTime') as value then TSDateTime(time, value) &quot;timeAuthor&quot;;\n                authors.assignedAuthor as assignedAuthor -&gt;  bundle.entry as e15,  e15.request = create('BackboneElement') as request,  request.method = 'PUT',  e15.resource = create('Practitioner') as practitioner then {\n                  assignedAuthor -&gt; practitioner.meta as meta then {\n                    assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n                      assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                      assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/ProblemiAperti/author' &quot;code&quot;;\n                    } &quot;coding&quot;;\n                  } &quot;meta&quot;;\n                  assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n                    id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                    id.extension as ext -&gt; identifier.value = ext;\n                    id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                    id.root as r then {\n                      id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid15,  e15.fullUrl = append('https://example/Practitioner/', uuid15),  request.url = append('Practitioner/', uuid15),  note.author = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n                    } &quot;r&quot;;\n                  } &quot;identifier&quot;;\n                  assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n                    id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n                  } &quot;2&quot;;\n                  assignedAuthor.assignedPerson as person then {\n                    person.name -&gt; practitioner.name;\n                  };\n                } &quot;assighedAuthor&quot;;\n              };\n            } &quot;reference&quot;;\n          } &quot;cdaText&quot;;\n        } &quot;condizioneproblemiaperti&quot;;\n      } &quot;Sectionfhir&quot;;\n    } &quot;Sottosection&quot;;\n  };\n}\n\n// ______2._____________ClinicalStatements________________________\ngroup Act(source cda : Act, target pat : Patient, target enc : Encounter, target bundle : Bundle) {\n  cda.code as code -&gt; enc.extension as extension2 then modeOfArrival(code, extension2);\n  cda.participant as participant then {\n    participant -&gt; enc.participant as FhirParticipant then {\n      participant as p -&gt; FhirParticipant.type as type then {\n        p -&gt; type.coding as coding then {\n          p -&gt; coding.code = (p.typeCode) &quot;codice&quot;;\n          p -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' &quot;system&quot;;\n        } &quot;codeType&quot;;\n      } &quot;type&quot;;\n    } &quot;fhirParticipant&quot;;\n    participant.participantRole as participantRole -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e1.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole',  enc.participant = create('BackboneElement') as participant1,  participant1.individual = create('Reference') as referencepart,  referencepart.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n      participantRole.code -&gt; practitionerRole.code;\n    } &quot;participantrole&quot;;\n  };\n}\n\n// ______3._____________Extensions_DtType________________________\ngroup modeOfArrival(source src : CE, target ext : Extension) {\n  src -&gt; ext.url = 'http://hl7.org/fhir/StructureDefinition/encounter-modeOfArrival' &quot;url&quot;;\n  src -&gt; ext.value = create('Coding') as code1 then coding(src, code1) &quot;coding&quot;;\n}\n\ngroup coding(source src : CE, target tgt : Coding) {\n  src.code as code -&gt; tgt.code = cast(code, 'string');\n  src.codeSystem as system -&gt; tgt.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n  src.displayName as display -&gt; tgt.display = cast(display, 'string');\n  src.codeSystemVersion as version -&gt; tgt.version = cast(version, 'string');\n}\n\ngroup periodTiming(source effectiveTime : PIVL_TS, target timing : Timing) {\n  effectiveTime -&gt; timing.repeat as r then {\n    effectiveTime.period as p -&gt; r.period = (p.value);\n    effectiveTime.period as p -&gt; r.periodUnit = (p.unit);\n  } &quot;repeat&quot;;\n}\n\n</pre>\n      </div>"
  ] ; # 
  fhir:url [ fhir:v "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirEdReport"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "0.1.0"] ; # 
  fhir:name [ fhir:v "cda2fhirEdReport"] ; # 
  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/IVL-TS"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/cda/StructureDefinition/IVL-TS>     ] ;
fhir:mode [ fhir:v "source" ]
  ] [
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:documentation [ fhir:v "--------------------------------------------------------------------------------------------" ] ;
    ( 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 "e6" ]       ] [
fhir:context [ fhir:v "e6" ] ;
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 "e6" ] ;
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 "uuid6" ] ;
fhir:transform [ fhir:v "uuid" ]       ] [
fhir:context [ fhir:v "e6" ] ;
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 "uuid6" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "DocumentReference" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "cdatobundle" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cda" ]         ] ) ;
        ( fhir:dependent [
fhir:name [ fhir:v "ClinicalDocumentToBundle" ] ;
          ( fhir:variable [ fhir:v "cda" ] [ fhir:v "patient" ] [ fhir:v "composition" ] [ fhir:v "encounter" ] [ fhir:v "bundle" ] [ fhir:v "DocumentReference" ] )         ] )       ] [
fhir:name [ fhir:v "recPat" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cda" ] ;
fhir:element [ fhir:v "recordTarget" ] ;
fhir:variable [ fhir:v "recordTarget" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "record" ] ;
          ( fhir:source [
fhir:context [ fhir:v "recordTarget" ] ;
fhir:element [ fhir:v "patientRole" ] ;
fhir:variable [ fhir:v "patient" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "idfr" ] ;
            ( fhir:source [
fhir:context [ fhir:v "patient" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "root1" ] ;
              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "r" ]                 ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                 ] [
fhir:value [ fhir:v "uri" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "value" ] ;
              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext1" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "ext1" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "assigningAuthorityName" ] ;
              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "assigningAuthorityName" ] ;
fhir:variable [ fhir:v "s" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "assigner" ] ;
fhir:variable [ fhir:v "a" ]               ] [
fhir:context [ fhir:v "a" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "s" ]                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "ext" ] ;
            ( fhir:source [
fhir:context [ fhir:v "patient" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ] ;
fhir:condition [ fhir:v "(root = '2.16.840.1.113883.2.9.4.3.2') or (root = '2.16.840.1.113883.2.9.4.3.7') or (root = '2.16.840.1.113883.2.9.4.3.3') or (root = '2.16.840.1.113883.2.9.4.3.17') or (root = '2.16.840.1.113883.2.9.4.3.18') or (root = '2.16.840.1.113883.2.9.2.10.4.1.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1.1') or (root = '2.16.840.1.113883.2.9.2.10.4.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1') or (root = '2.16.840.1.113883.2.9.4.3.15')" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "UUID" ] ;
              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "requestPAT" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Patient?identifier=" ]                 ] [
fhir:value [ fhir:v "ext" ]                 ] )               ] )             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ClinicalDocumentToBundle" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "cda" ] ;
fhir:type [ fhir:v "ClinicalDocument" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "composition" ] ;
fhir:type [ fhir:v "Composition" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "encounter" ] ;
fhir:type [ fhir:v "Encounter" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "documentreference" ] ;
fhir:type [ fhir:v "DocumentReference" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "id" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:transform [ fhir:v "uuid" ]       ] )     ] [
fhir:name [ fhir:v "identifier" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] )     ] [
fhir:name [ fhir:v "type" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "transaction" ]         ] )       ] )     ] [
fhir:name [ fhir:v "date" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "timestamp" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "timestamp.now()" ]         ] )       ] )     ] [
fhir:name [ fhir:v "composition" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "ClinicalDocumentComposition" ] ;
        ( fhir:variable [ fhir:v "cda" ] [ fhir:v "composition" ] [ fhir:v "patient" ] [ fhir:v "encounter" ] [ fhir:v "bundle" ] [ fhir:v "documentreference" ] )       ] )     ] [
fhir:name [ fhir:v "component" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ] ;
fhir:element [ fhir:v "component" ] ;
fhir:variable [ fhir:v "component" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "body" ] ;
        ( fhir:source [
fhir:context [ fhir:v "component" ] ;
fhir:element [ fhir:v "structuredBody" ] ;
fhir:variable [ fhir:v "body" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "component" ] ;
          ( fhir:source [
fhir:context [ fhir:v "body" ] ;
fhir:element [ fhir:v "component" ] ;
fhir:variable [ fhir:v "component" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "section" ] ;
            ( fhir:source [
fhir:context [ fhir:v "component" ] ;
fhir:element [ fhir:v "section" ] ;
fhir:variable [ fhir:v "srcSection" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "Modalitaditrasporto" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '11459-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 "ModalitadiTrasposto" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] [
fhir:name [ fhir:v "Inquadramentoclinico" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '78337-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 "InquadramentoClinicoIniziale" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] [
fhir:name [ fhir:v "Inquadramentoclinico" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '46239-0')" ]               ] ) ;
              ( 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 "MotivoDellaVisita" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] [
fhir:name [ fhir:v "Triage" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '54094-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 "Triage" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] [
fhir:name [ fhir:v "motivoricovero" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '46240-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 "ClinicalDocumentSectionEncounter" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] [
fhir:name [ fhir:v "DecorsoOspedaliero" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '8648-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 "ClinicalDocumentSectionDecorsoOspedaliero" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] [
fhir:name [ fhir:v "Complicazioni" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '55109-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 "ClinicalDocumentSectionComplicanze" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] [
fhir:name [ fhir:v "Hospitaldischargestudiessummary" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '62387-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 "ClinicalDocumentSectionConsulenza" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] [
fhir:name [ fhir:v "Accertamenti" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '30954-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 "ClinicalDocumentSectionAccertamenti" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] [
fhir:name [ fhir:v "Accertamenti" ] ;
              ( 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 "Accertamenti" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '29549-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 "ClinicalDocumentSectionTerapiaFarmacoInPronto" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] [
fhir:name [ fhir:v "Pianodicuraalladimissione" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '18776-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 "ClinicalDocumentSectionPianoCuraDimissione" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] [
fhir:name [ fhir:v "Dimissione" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '28574-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 "ClinicalDocumentSectionDimissione" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] [
fhir:name [ fhir:v "TerapiaFarmacologicaDimissione" ] ;
              ( fhir:source [
fhir:context [ fhir:v "srcSection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '75311-1')" ]               ] ) ;
              ( 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 "ClinicalDocumentSectionTerapiaFarmacologicaDimissione" ] ;
                ( fhir:variable [ fhir:v "cda" ] [ fhir:v "srcSection" ] [ fhir:v "patient" ] [ fhir:v "tgtSection" ] [ fhir:v "bundle" ] [ fhir:v "encounter" ] )               ] )             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ClinicalDocumentSectionComplicanze" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "Sezione complicanze--------------------------------------------------------------------------" ] ;
    ( 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 "entryexists" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "src.entry.exists()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "cdaText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "fhirText" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "narrativeStatus" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "generated" ]             ] )           ] )         ] [
fhir:name [ fhir:v "narrativeText" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ] ;
fhir:variable [ fhir:v "t" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "div" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "t" ]             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "entry" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry1" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "POST" ]         ] )       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]         ] )       ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]         ] [
fhir:value [ fhir:v "uuid1" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]         ] )       ] [
fhir:context [ fhir:v "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 "act" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]         ] ) ;
        ( fhir:dependent [
fhir:name [ fhir:v "Observation" ] ;
          ( fhir:variable [ fhir:v "obs" ] [ fhir:v "patient" ] [ fhir:v "enc" ] [ fhir:v "observation" ] [ fhir:v "bundle" ] )         ] )       ] ) ;
fhir:documentation [ fhir:v "Sezione Strutturata-----------------------------------------------------------------------------------------------------------------------------------------------" ]     ] [
fhir:name [ fhir:v "where" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "src.entry.exists().not()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "cdaText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "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:documentation [ fhir:v "Sezione Narrativa---------------------------------------------------------------------------------------------------------------------------------------------" ]     ] )
  ] [
fhir:name [ fhir:v "Observation" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "obs" ] ;
fhir:type [ fhir:v "Observation" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "encounter" ] ;
fhir:type [ fhir:v "Encounter" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "ob" ] ;
fhir:type [ fhir:v "Observation" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
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 "obs" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
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/' + %encounter.id" ]         ] )       ] )     ] [
fhir:name [ fhir:v "code" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
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 "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "final" ]         ] )       ] )     ] [
fhir:name [ fhir:v "statusCode" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'active')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "registered" ]         ] )       ] )     ] [
fhir:name [ fhir:v "statusCode" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'aborted')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "cancelled" ]         ] )       ] )     ] [
fhir:name [ fhir:v "statusCode" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'suspended')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "partial" ]         ] )       ] )     ] [
fhir:name [ fhir:v "statuscode" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:condition [ fhir:v "obs.statusCode.exists().not()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "status" ] ;
        ( fhir:source [
fhir:context [ fhir:v "obs" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
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 "value2" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectiveTime" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]         ] )       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
        ( fhir:variable [ fhir:v "effectiveTime" ] [ fhir:v "value" ] )       ] )     ] [
fhir:name [ fhir:v "where" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists() or effectiveTime.high.exists()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "effectiveTime" ] ;
        ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Period" ]           ] )         ] ) ;
        ( fhir:dependent [
fhir:name [ fhir:v "IVLTSPeriod" ] ;
          ( fhir:variable [ fhir:v "eff" ] [ fhir:v "period" ] )         ] )       ] )     ] [
fhir:name [ fhir:v "value" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "INT" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "int" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "int.value" ]         ] )       ] )     ] [
fhir:name [ fhir:v "val" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "CD" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
        ( fhir:source [
fhir:context [ fhir:v "val" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "originalText" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "vvv" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]           ] )         ] [
fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "code" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] [
fhir:name [ fhir:v "codeSystem" ] ;
            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "system" ]               ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]               ] [
fhir:value [ fhir:v "uri" ]               ] )             ] )           ] [
fhir:name [ fhir:v "displayName" ] ;
            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "display" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "translation" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "translation" ] ;
fhir:variable [ fhir:v "translation" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "code" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] [
fhir:name [ fhir:v "codeSystem" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "system" ]               ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]               ] [
fhir:value [ fhir:v "uri" ]               ] )             ] )           ] [
fhir:name [ fhir:v "displayName" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "display" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] [
fhir:name [ fhir:v "translation1" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "qualifier" ] ;
fhir:variable [ fhir:v "qualifier" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
              ( fhir:source [
fhir:context [ fhir:v "qualifier" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "code" ]                   ] [
fhir:value [ fhir:v "string" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "codeSystem" ] ;
                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "system" ]                   ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                   ] [
fhir:value [ fhir:v "uri" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "displayName" ] ;
                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "display" ]                   ] [
fhir:value [ fhir:v "string" ]                   ] )                 ] )               ] )             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "val" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "CE" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
        ( fhir:source [
fhir:context [ fhir:v "val" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "originalText" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "vvv" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]           ] )         ] [
fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "code" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] [
fhir:name [ fhir:v "codeSystem" ] ;
            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "system" ]               ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]               ] [
fhir:value [ fhir:v "uri" ]               ] )             ] )           ] [
fhir:name [ fhir:v "displayName" ] ;
            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "display" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "translation" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "translation" ] ;
fhir:variable [ fhir:v "translation" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "code" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] [
fhir:name [ fhir:v "codeSystem" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "system" ]               ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]               ] [
fhir:value [ fhir:v "uri" ]               ] )             ] )           ] [
fhir:name [ fhir:v "displayName" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "display" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] [
fhir:name [ fhir:v "translation1" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "qualifier" ] ;
fhir:variable [ fhir:v "qualifier" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
              ( fhir:source [
fhir:context [ fhir:v "qualifier" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "code" ]                   ] [
fhir:value [ fhir:v "string" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "codeSystem" ] ;
                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "system" ]                   ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                   ] [
fhir:value [ fhir:v "uri" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "displayName" ] ;
                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "display" ]                   ] [
fhir:value [ fhir:v "string" ]                   ] )                 ] )               ] )             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "valueQuantity" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "PQ" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "quantity" ] ;
        ( fhir:source [
fhir:context [ fhir:v "val" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "quantity" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Quantity" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
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 "val" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:variable [ fhir:v "unit" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "unit" ]             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "value" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "BL" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "boolean" ]         ] )       ] [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "value.value" ]         ] )       ] )     ] [
fhir:name [ fhir:v "value" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "ST" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "string" ]         ] )       ] [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "value.dataString" ]         ] )       ] )     ] [
fhir:name [ fhir:v "interpretationCode" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "interpretationCode" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "interpretation" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] )     ] [
fhir:name [ fhir:v "methodCode" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "methodCode" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] )     ] [
fhir:name [ fhir:v "performer" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "performer" ] ;
fhir:variable [ fhir:v "performer" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]         ] )       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "assignedEntity" ] ;
        ( fhir:source [
fhir:context [ fhir:v "performer" ] ;
fhir:element [ fhir:v "assignedEntity" ] ;
fhir:variable [ fhir:v "entity" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
          ( fhir:source [
fhir:context [ fhir:v "entity" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
            ( fhir:source [
fhir:context [ fhir:v "entity" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
              ( fhir:source [
fhir:context [ fhir:v "entity" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "code" ] ;
              ( fhir:source [
fhir:context [ fhir:v "entity" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/observation/performer" ]                 ] )               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "identifier" ] ;
          ( fhir:source [
fhir:context [ fhir:v "entity" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "root1" ] ;
            ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "r" ]               ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]               ] [
fhir:value [ fhir:v "uri" ]               ] )             ] )           ] [
fhir:name [ fhir:v "ext" ] ;
            ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "ext" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "UUID" ] ;
              ( fhir:source [
fhir:context [ fhir:v "entity" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                 ] [
fhir:value [ fhir:v "ext" ]                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "assigningAuthorityName" ] ;
            ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "assigningAuthorityName" ] ;
fhir:variable [ fhir:v "s" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "assigner" ] ;
fhir:variable [ fhir:v "a" ]             ] [
fhir:context [ fhir:v "a" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "s" ]               ] )             ] )           ] [
fhir:name [ fhir:v "r" ] ;
            ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "performer" ] ;
              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                 ] )               ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                 ] [
fhir:value [ fhir:v "uuid1" ]                 ] )               ] [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "performer" ] ;
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/Practitioner/' + %practitioner.id" ]                 ] )               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "name" ] ;
          ( fhir:source [
fhir:context [ fhir:v "entity" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "person" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
            ( fhir:source [
fhir:context [ fhir:v "person" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]             ] )           ] [
fhir:name [ fhir:v "birth" ] ;
            ( fhir:source [
fhir:context [ fhir:v "person" ] ;
fhir:element [ fhir:v "birthTime" ] ;
fhir:variable [ fhir:v "birthTime" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
              ( fhir:source [
fhir:context [ fhir:v "birthTime" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "date" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "birthDate" ] ;
fhir:transform [ fhir:v "truncate" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "date" ]                 ] [
fhir:value [ fhir:v "10"^^xsd:integer ]                 ] )               ] )             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "refRange" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "referenceRange" ] ;
fhir:variable [ fhir:v "refRange" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "referenceRange" ] ;
fhir:variable [ fhir:v "ref" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "obsRange" ] ;
        ( fhir:source [
fhir:context [ fhir:v "refRange" ] ;
fhir:element [ fhir:v "observationRange" ] ;
fhir:variable [ fhir:v "obsRange" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "ref" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "low" ] ;
fhir:variable [ fhir:v "Low" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "SimpleQuantity" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "IVL-PQ" ] ;
          ( fhir:source [
fhir:context [ fhir:v "obsRange" ] ;
fhir:type [ fhir:v "IVL_PQ" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "v" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "decValue" ] ;
            ( fhir:source [
fhir:context [ fhir:v "v" ] ;
fhir:element [ fhir:v "low" ] ;
fhir:variable [ fhir:v "l1" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
              ( fhir:source [
fhir:context [ fhir:v "l1" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "decValue" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "Low" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "decValue" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "unit" ] ;
              ( fhir:source [
fhir:context [ fhir:v "l1" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:variable [ fhir:v "Unit" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "Low" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Unit" ]                 ] )               ] )             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ClinicalDocumentSectionDecorsoOspedaliero" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "------------------------------------------------------------------------------------------------------\r\nSezione Decorso Ospedaliero----------------------------------------------------------------------------" ] ;
    ( 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 "OB-note" ] ;
      ( 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 "e1" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "POST" ]         ] )       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]         ] )       ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]         ] [
fhir:value [ fhir:v "uuid1" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]         ] )       ] [
fhir:context [ fhir:v "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: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 "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 "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 "reference" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ 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 "Auth" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "auth" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]         ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]           ] )         ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]           ] )         ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]           ] )         ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]           ] [
fhir:value [ fhir:v "uuid1" ]           ] )         ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]           ] [
fhir:value [ fhir:v "uuid1" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "time" ] ;
          ( fhir:source [
fhir:context [ fhir:v "auth" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "ti" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]             ] )           ] ) ;
          ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
            ( fhir:variable [ fhir:v "ti" ] [ fhir:v "value" ] )           ] )         ] [
fhir:name [ fhir:v "assAuth" ] ;
          ( fhir:source [
fhir:context [ fhir:v "auth" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assAuth" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
            ( fhir:source [
fhir:context [ fhir:v "assAuth" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assAuth" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assAuth" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "code" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assAuth" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/DecorsoOspedaliero/author" ]                   ] )                 ] )               ] )             ] ) ;
fhir:documentation [ fhir:v "meta+identifier" ]           ] [
fhir:name [ fhir:v "identifier" ] ;
            ( fhir:source [
fhir:context [ fhir:v "assAuth" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                   ] )                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                   ] [
fhir:value [ fhir:v "uuid2" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                   ] [
fhir:value [ fhir:v "uuid2" ]                   ] )                 ] [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
            ( fhir:source [
fhir:context [ fhir:v "assAuth" ] ;
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')" ]             ] ) ;
            ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                 ] [
fhir:value [ fhir:v "ext" ]                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "assPers" ] ;
            ( fhir:source [
fhir:context [ fhir:v "assAuth" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "assPers" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assPers" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]               ] )             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ClinicalDocumentSectionEncounter" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "--------------------------------------------------------------------------------------------------------\r\nSezione Encounter---------------------------------------------------------------------------------------" ] ;
    ( 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 "enc1" ] ;
fhir:type [ fhir:v "Encounter" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "title" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:variable [ fhir:v "t" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "t.dataString" ]         ] )       ] )     ] [
fhir:name [ fhir:v "code" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] )     ] [
fhir:name [ fhir:v "cdaText" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "fhirText" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "narrativeStatus" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "generated" ]           ] )         ] )       ] [
fhir:name [ fhir:v "narrativeText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cdaText" ] ;
fhir:variable [ fhir:v "t" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "div" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "t" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "entry" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry1" ]       ] ) ;
      ( fhir: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 "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 "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/Encounter/" ]         ] [
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 "Encounter" ]         ] )       ] [
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/Encounter/' + %encounter.id" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "refer" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "partOf" ] ;
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/' + %enc1.id" ]           ] )         ] )       ] [
fhir:name [ fhir:v "refer" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "encounter" ] ;
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 "status" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "finished" ]           ] )         ] )       ] [
fhir:name [ fhir:v "class" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "class" ] ;
fhir:variable [ fhir:v "cl" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "entry1" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "cl" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "AMB" ]             ] )           ] )         ] [
fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "entry1" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "cl" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "ambulatory" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "encounter" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "encounter" ] ;
fhir:variable [ fhir:v "enc" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "enc" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]           ] )         ] [
fhir:name [ fhir:v "where" ] ;
          ( fhir:source [
fhir:context [ fhir:v "enc" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists() or effectiveTime.high.exists()" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "effectiveTime" ] ;
            ( fhir:source [
fhir:context [ fhir:v "enc" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
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:documentation [ fhir:v "effectiveTime=period" ]         ] [
fhir:name [ fhir:v "where" ] ;
          ( fhir:source [
fhir:context [ fhir:v "enc" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists().not() or effectiveTime.high.exists().not()" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "efft" ] ;
            ( fhir:source [
fhir:context [ fhir:v "enc" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectivetime1" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Period" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
              ( fhir:source [
fhir:context [ fhir:v "effectivetime1" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:variable [ fhir:v "start" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                 ] )               ] ) ;
              ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                ( fhir:variable [ fhir:v "effectivetime1" ] [ fhir:v "start" ] )               ] )             ] )           ] ) ;
fhir:documentation [ fhir:v "effectiveTime = time-stamp" ]         ] [
fhir:name [ fhir:v "participant-ADM" ] ;
          ( fhir:source [
fhir:context [ fhir:v "enc" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "part" ] ;
fhir:condition [ fhir:v "(typeCode != 'LOC')" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "patarg" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "type" ] ;
            ( fhir:source [
fhir:context [ fhir:v "part" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "patarg" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "type" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "codeType" ] ;
              ( fhir:source [
fhir:context [ fhir:v "part" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "type" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "codice" ] ;
                ( fhir:source [
fhir:context [ fhir:v "part" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "part.typeCode" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "system" ] ;
                ( fhir:source [
fhir:context [ fhir:v "part" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "http://terminology.hl7.org/CodeSystem/v3-ParticipationType" ]                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "time" ] ;
            ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "time1" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "patarg" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Period" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
              ( fhir:source [
fhir:context [ fhir:v "time1" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:variable [ fhir:v "start" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                 ] )               ] ) ;
              ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                ( fhir:variable [ fhir:v "time1" ] [ fhir:v "start" ] )               ] )             ] )           ] [
fhir:name [ fhir:v "time" ] ;
            ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "ti" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "patarg" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
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 "ti" ] [ fhir:v "period" ] )             ] )           ] [
fhir:name [ fhir:v "partRole" ] ;
            ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "participantRole" ] ;
fhir:variable [ fhir:v "partRole" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]             ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]               ] )             ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]               ] )             ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]               ] )             ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]               ] [
fhir:value [ fhir:v "uuid1" ]               ] )             ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]               ] [
fhir:value [ fhir:v "uuid1" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
              ( fhir:source [
fhir:context [ fhir:v "partRole" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                ( fhir:source [
fhir:context [ fhir:v "partRole" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "partRole" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "partRole" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/Encounter/participant" ]                     ] )                   ] )                 ] )               ] ) ;
fhir:documentation [ fhir:v "modifica meta+identifier" ]             ] [
fhir:name [ fhir:v "identifier" ] ;
              ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                     ] )                   ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "patarg" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "individual" ] ;
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/Practitioner/' + %practitioner.id" ]                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
              ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
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')" ]               ] ) ;
              ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                   ] [
fhir:value [ fhir:v "ext" ]                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "playEnt" ] ;
              ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "playingEntity" ] ;
fhir:variable [ fhir:v "playEnt" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                ( fhir:source [
fhir:context [ fhir:v "playEnt" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                 ] )               ] )             ] )           ] ) ;
fhir:documentation [ fhir:v "enc.effectiveTime as eff -> encounter.period = create('Period') as period then{" ]         ] [
fhir:name [ fhir:v "participant2" ] ;
          ( fhir:source [
fhir:context [ fhir:v "enc" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "part" ] ;
fhir:condition [ fhir:v "(typeCode = 'LOC')" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "location" ] ;
            ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "tim" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "location" ] ;
fhir:variable [ fhir:v "locat" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "time" ] ;
              ( fhir:source [
fhir:context [ fhir:v "tim" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "locat" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
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 "tim" ] [ fhir:v "period" ] )               ] )             ] [
fhir:name [ fhir:v "time" ] ;
              ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "tim" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "locat" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Period" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
                ( fhir:source [
fhir:context [ fhir:v "tim" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:variable [ fhir:v "start" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                   ] )                 ] ) ;
                ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                  ( fhir:variable [ fhir:v "tim" ] [ fhir:v "start" ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "partRole" ] ;
              ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "participantRole" ] ;
fhir:variable [ fhir:v "partRole" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]               ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                 ] )               ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]                 ] )               ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "location" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Location" ]                 ] )               ] [
fhir:context [ fhir:v "location" ] ;
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/Location/" ]                 ] [
fhir:value [ fhir:v "uuid1" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                ( fhir:source [
fhir:context [ fhir:v "part" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "part" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                     ] )                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "part" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "code" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "part" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/Encounter/participant" ]                       ] )                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "identifier" ] ;
                ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "root1" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "r" ]                     ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                     ] [
fhir:value [ fhir:v "uri" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "ext" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "ext" ]                     ] )                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "UUID" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "partRole" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Location?identifier=" ]                       ] [
fhir:value [ fhir:v "ext" ]                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "assigningAuthorityName" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "assigningAuthorityName" ] ;
fhir:variable [ fhir:v "s" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "assigner" ] ;
fhir:variable [ fhir:v "a" ]                   ] [
fhir:context [ fhir:v "a" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "s" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "r" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "idasi" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                       ] )                     ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "https://example/Location/" ]                       ] [
fhir:value [ fhir:v "uuid" ]                       ] )                     ] [
fhir:context [ fhir:v "locat" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "location" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]                       ] )                     ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Location/' + %location.id" ]                       ] )                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "code" ] ;
                ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                 ] )               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "entryRel-SUBJ" ] ;
          ( fhir:source [
fhir:context [ fhir:v "enc" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entr" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "POST" ]             ] )           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]             ] )           ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]             ] )           ] [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reasonReference" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]             ] )           ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Observation/' + %observation.id" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "act" ] ;
            ( fhir:source [
fhir:context [ fhir:v "entr" ] ;
fhir:element [ fhir:v "act" ] ;
fhir:variable [ fhir:v "act" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
              ( fhir:source [
fhir:context [ fhir:v "act" ] ;
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 "reference" ] ;
              ( fhir:source [
fhir:context [ fhir:v "act" ]               ] ) ;
              ( 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 "act" ]               ] ) ;
              ( 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/' + %enc1.id" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "statuscode" ] ;
              ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:condition [ fhir:v "act.statusCode.exists().not()" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "status" ] ;
                ( fhir:source [
fhir:context [ fhir:v "act" ]                 ] ) ;
                ( 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 "note" ] ;
              ( fhir:source [
fhir:context [ fhir:v "act" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "note" ] ;
fhir:variable [ fhir:v "note" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Annotation" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "text" ] ;
                ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "text" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "text" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reff" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "reff.value" ]                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "String" ] ;
                ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "tx" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "tx" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "ref" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "ref.value" ]                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "practitioner" ] ;
                ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "auth" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]                   ] )                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                   ] )                 ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "notetime" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "auth" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "ti" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                     ] )                   ] ) ;
                  ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                    ( fhir:variable [ fhir:v "ti" ] [ fhir:v "value" ] )                   ] )                 ] [
fhir:name [ fhir:v "assAush" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "auth" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assAuth" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "assAuth" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assAuth" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assAuth" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                           ] )                         ] )                       ] [
fhir:name [ fhir:v "code" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assAuth" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/Encounter/author" ]                           ] )                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "identifier" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "assAuth" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                           ] )                         ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                           ] [
fhir:value [ fhir:v "uuid2" ]                           ] )                         ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                           ] [
fhir:value [ fhir:v "uuid2" ]                           ] )                         ] [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                           ] )                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "assAuth" ] ;
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')" ]                     ] ) ;
                    ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                         ] [
fhir:value [ fhir:v "ext" ]                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "time" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "assAuth" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "t" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                       ] )                     ] ) ;
                    ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                      ( fhir:variable [ fhir:v "t" ] [ fhir:v "value" ] )                     ] ) ;
fhir:documentation [ fhir:v "fine modifica" ]                   ] [
fhir:name [ fhir:v "name" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "assAuth" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "assPers" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assPers" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ClinicalDocumentSectionConsulenza" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "--------------------------------------------------------------------------------------------------------\r\nSezione Consulenza--------------------------------------------------------------------------------------" ] ;
    ( 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 "entry-exists" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "src.entry.exists()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "cdaText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "fhirText" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "narrativeStatus" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "generated" ]             ] )           ] )         ] [
fhir:name [ fhir:v "narrativeText" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ] ;
fhir:variable [ fhir:v "t" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "div" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "t" ]             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "where" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "src.entry.exists().not()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "cdaText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "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 "ServiceRequest" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "ServiceRequest" ]           ] )         ] [
fhir:context [ fhir:v "ServiceRequest" ] ;
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/ServiceRequest/" ]           ] [
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 "ServiceRequest" ]           ] )         ] [
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/ServiceRequest/' + %ServiceRequest.id" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
          ( fhir:source [
fhir:context [ fhir:v "src" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ServiceRequest" ] ;
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 "ServiceRequest" ] ;
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 "src" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ServiceRequest" ] ;
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 "src" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ServiceRequest" ] ;
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 "reference" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ServiceRequest" ] ;
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:documentation [ fhir:v "Sezione Narrativa--------------------------------------------------------------------------------------------------------------------------------------------------" ]     ] [
fhir:name [ fhir:v "entry" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry1" ]       ] ) ;
      ( 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 "serviceRequest" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "ServiceRequest" ]         ] )       ] [
fhir:context [ fhir:v "serviceRequest" ] ;
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/ServiceRequest/" ]         ] [
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 "ServiceRequest" ]         ] )       ] [
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/ServiceRequest/' + %serviceRequest.id" ]         ] )       ] [
fhir:context [ fhir:v "serviceRequest" ] ;
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 "entry1" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
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 "entry1" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
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 "entry1" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
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 "entry1" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
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 "ACT" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "act" ] ;
fhir:variable [ fhir:v "act" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]           ] )         ] [
fhir:name [ fhir:v "text" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ 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 "evaluate" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "t.dataString" ]             ] )           ] )         ] [
fhir:name [ fhir:v "statusCode" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "code" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "code.code" ]             ] )           ] )         ] [
fhir:name [ fhir:v "performer" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "performer" ] ;
fhir:variable [ fhir:v "perf" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]             ] )           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]             ] )           ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "time" ] ;
            ( fhir:source [
fhir:context [ fhir:v "perf" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "time" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "occurrence" ] ;
fhir:variable [ fhir:v "t" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]               ] )             ] ) ;
            ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
              ( fhir:variable [ fhir:v "time" ] [ fhir:v "t" ] )             ] )           ] [
fhir:name [ fhir:v "assEnt" ] ;
            ( fhir:source [
fhir:context [ fhir:v "perf" ] ;
fhir:element [ fhir:v "assignedEntity" ] ;
fhir:variable [ fhir:v "assEnt" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assEnt" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assEnt" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assEnt" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assEnt" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/Consulenze/performer" ]                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "identifier" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assEnt" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                     ] )                   ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "performer" ] ;
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/Practitioner/' + %practitioner.id" ]                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assEnt" ] ;
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')" ]               ] ) ;
              ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                   ] [
fhir:value [ fhir:v "ext" ]                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "assPer" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assEnt" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "assPer" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assPer" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                 ] )               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "participant" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "parti" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]             ] )           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]             ] )           ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "time" ] ;
            ( fhir:source [
fhir:context [ fhir:v "parti" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "time" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "authoredOn" ] ;
fhir:variable [ fhir:v "t" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]               ] )             ] ) ;
            ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
              ( fhir:variable [ fhir:v "time" ] [ fhir:v "t" ] )             ] )           ] [
fhir:name [ fhir:v "partRole" ] ;
            ( fhir:source [
fhir:context [ fhir:v "parti" ] ;
fhir:element [ fhir:v "participantRole" ] ;
fhir:variable [ fhir:v "partRole" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
              ( fhir:source [
fhir:context [ fhir:v "partRole" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                ( fhir:source [
fhir:context [ fhir:v "partRole" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "partRole" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "partRole" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/Consulenze/participant" ]                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "identifier" ] ;
              ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                     ] )                   ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "requester" ] ;
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/Practitioner/' + %practitioner.id" ]                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
              ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
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')" ]               ] ) ;
              ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                   ] [
fhir:value [ fhir:v "ext" ]                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "entity" ] ;
              ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "playingEntity" ] ;
fhir:variable [ fhir:v "entity" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                ( fhir:source [
fhir:context [ fhir:v "entity" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                 ] )               ] )             ] )           ] )         ] )       ] ) ;
fhir:documentation [ fhir:v "Sezione Strutturata--------------------------------------------------------------------------------------------------------------------------------------------" ]     ] )
  ] [
fhir:name [ fhir:v "ClinicalDocumentSectionAccertamenti" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "---------------------------------------------------------------------------------------------------------\r\nSezione Accertamenti--------------------------------------------------------------------------------------" ] ;
    ( 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 "entryExists" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "src.entry.exists()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "cdaText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "fhirText" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "narrativeStatus" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "generated" ]             ] )           ] )         ] [
fhir:name [ fhir:v "narrativeText" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ] ;
fhir:variable [ fhir:v "t" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "div" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "t" ]             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "entry" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry1" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "POST" ]         ] )       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]         ] )       ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]         ] [
fhir:value [ fhir:v "uuid1" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]         ] )       ] [
fhir:context [ fhir:v "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 "obs" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "organizer" ] ;
fhir:variable [ fhir:v "obs" ]         ] ) ;
        ( fhir:rule [
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 "act" ] ;
          ( fhir:source [
fhir:context [ fhir:v "obs" ]           ] ) ;
          ( fhir:dependent [
fhir:name [ fhir:v "ObservationAccertamenti" ] ;
            ( fhir:variable [ fhir:v "obs" ] [ fhir:v "patient" ] [ fhir:v "enc" ] [ fhir:v "observation" ] [ fhir:v "bundle" ] )           ] )         ] )       ] ) ;
fhir:documentation [ fhir:v "Sezione Strutturata---------------------------------------------------------------------------------------------------------------------------------------------" ]     ] [
fhir:name [ fhir:v "where" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "src.entry.exists().not()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "cdaText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "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:documentation [ fhir:v "Sezione Narrativa--------------------------------------------------------------------------------------------------------------------------------------------" ]     ] )
  ] [
fhir:name [ fhir:v "ObservationAccertamenti" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "obs" ] ;
fhir:type [ fhir:v "Observation" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "encounter" ] ;
fhir:type [ fhir:v "Encounter" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "ob" ] ;
fhir:type [ fhir:v "Observation" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
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 "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "final" ]         ] )       ] )     ] [
fhir:name [ fhir:v "statusCode" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'active')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "registered" ]         ] )       ] )     ] [
fhir:name [ fhir:v "statusCode" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'aborted')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "cancelled" ]         ] )       ] )     ] [
fhir:name [ fhir:v "statusCode" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'suspended')" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "partial" ]         ] )       ] )     ] [
fhir:name [ fhir:v "statuscode" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:condition [ fhir:v "obs.statusCode.exists().not()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "status" ] ;
        ( fhir:source [
fhir:context [ fhir:v "obs" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
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 "value2" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectiveTime" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]         ] )       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
        ( fhir:variable [ fhir:v "effectiveTime" ] [ fhir:v "value" ] )       ] )     ] [
fhir:name [ fhir:v "where" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists() or effectiveTime.high.exists()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "effectiveTime" ] ;
        ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Period" ]           ] )         ] ) ;
        ( fhir:dependent [
fhir:name [ fhir:v "IVLTSPeriod" ] ;
          ( fhir:variable [ fhir:v "eff" ] [ fhir:v "period" ] )         ] )       ] )     ] [
fhir:name [ fhir:v "val" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "CD" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
        ( fhir:source [
fhir:context [ fhir:v "val" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "originalText" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "vvv" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]           ] )         ] [
fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "code" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] [
fhir:name [ fhir:v "codeSystem" ] ;
            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "system" ]               ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]               ] [
fhir:value [ fhir:v "uri" ]               ] )             ] )           ] [
fhir:name [ fhir:v "displayName" ] ;
            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "display" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "translation" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "translation" ] ;
fhir:variable [ fhir:v "translation" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "code" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] [
fhir:name [ fhir:v "codeSystem" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "system" ]               ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]               ] [
fhir:value [ fhir:v "uri" ]               ] )             ] )           ] [
fhir:name [ fhir:v "displayName" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "display" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] [
fhir:name [ fhir:v "qual" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "qualifier" ] ;
fhir:variable [ fhir:v "qualifier" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
              ( fhir:source [
fhir:context [ fhir:v "qualifier" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "code" ]                   ] [
fhir:value [ fhir:v "string" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "codeSystem" ] ;
                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "system" ]                   ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                   ] [
fhir:value [ fhir:v "uri" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "displayName" ] ;
                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "display" ]                   ] [
fhir:value [ fhir:v "string" ]                   ] )                 ] )               ] )             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "val" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "CE" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
        ( fhir:source [
fhir:context [ fhir:v "val" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "originalText" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "vvv" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]           ] )         ] [
fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "code" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] [
fhir:name [ fhir:v "codeSystem" ] ;
            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "system" ]               ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]               ] [
fhir:value [ fhir:v "uri" ]               ] )             ] )           ] [
fhir:name [ fhir:v "displayName" ] ;
            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "display" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "translation" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "translation" ] ;
fhir:variable [ fhir:v "translation" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "code" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] [
fhir:name [ fhir:v "codeSystem" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "system" ]               ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]               ] [
fhir:value [ fhir:v "uri" ]               ] )             ] )           ] [
fhir:name [ fhir:v "displayName" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "display" ]               ] [
fhir:value [ fhir:v "string" ]               ] )             ] )           ] [
fhir:name [ fhir:v "qual" ] ;
            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "qualifier" ] ;
fhir:variable [ fhir:v "qualifier" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
              ( fhir:source [
fhir:context [ fhir:v "qualifier" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "code" ]                   ] [
fhir:value [ fhir:v "string" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "codeSystem" ] ;
                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "system" ]                   ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                   ] [
fhir:value [ fhir:v "uri" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "displayName" ] ;
                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "display" ]                   ] [
fhir:value [ fhir:v "string" ]                   ] )                 ] )               ] )             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "valueQuantity" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "PQ" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "quantity" ] ;
        ( fhir:source [
fhir:context [ fhir:v "val" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "quantity" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Quantity" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
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 "val" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:variable [ fhir:v "unit" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "unit" ]             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "value" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "ST" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "string" ]         ] )       ] [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "value.dataString" ]         ] )       ] )     ] [
fhir:name [ fhir:v "value" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "INT" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "int" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "int.value" ]         ] )       ] )     ] [
fhir:name [ fhir:v "boolean" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "BL" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "boolean" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "boolean.value" ]         ] )       ] )     ] [
fhir:name [ fhir:v "reference" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
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 "obs" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
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/' + %encounter.id" ]         ] )       ] )     ] [
fhir:name [ fhir:v "interpretationCode" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "interpretationCode" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "interpretation" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] )     ] [
fhir:name [ fhir:v "methodCode" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "methodCode" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] )     ] [
fhir:name [ fhir:v "refRange" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "referenceRange" ] ;
fhir:variable [ fhir:v "refRange" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "referenceRange" ] ;
fhir:variable [ fhir:v "ref" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "obsRange" ] ;
        ( fhir:source [
fhir:context [ fhir:v "refRange" ] ;
fhir:element [ fhir:v "observationRange" ] ;
fhir:variable [ fhir:v "obsRange" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "ref" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "low" ] ;
fhir:variable [ fhir:v "Low" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "SimpleQuantity" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "IVL-PQ" ] ;
          ( fhir:source [
fhir:context [ fhir:v "obsRange" ] ;
fhir:type [ fhir:v "IVL_PQ" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "v" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "decValue" ] ;
            ( fhir:source [
fhir:context [ fhir:v "v" ] ;
fhir:element [ fhir:v "low" ] ;
fhir:variable [ fhir:v "l1" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
              ( fhir:source [
fhir:context [ fhir:v "l1" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "decValue" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "Low" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "decValue" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "unit" ] ;
              ( fhir:source [
fhir:context [ fhir:v "l1" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:variable [ fhir:v "Unit" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "Low" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Unit" ]                 ] )               ] )             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "perf" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "performer" ] ;
fhir:variable [ fhir:v "performer" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]         ] )       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]         ] )       ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]         ] [
fhir:value [ fhir:v "uuid1" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]         ] [
fhir:value [ fhir:v "uuid1" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "assEntity" ] ;
        ( fhir:source [
fhir:context [ fhir:v "performer" ] ;
fhir:element [ fhir:v "assignedEntity" ] ;
fhir:variable [ fhir:v "assEntity" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
          ( fhir:source [
fhir:context [ fhir:v "assEntity" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
            ( fhir:source [
fhir:context [ fhir:v "assEntity" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assEntity" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "code" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assEntity" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/Accertamenti/performer" ]                 ] )               ] )             ] )           ] ) ;
fhir:documentation [ fhir:v "inizio modifica identifier+meta" ]         ] [
fhir:name [ fhir:v "identifier" ] ;
          ( fhir:source [
fhir:context [ fhir:v "assEntity" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
            ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                 ] )               ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                 ] [
fhir:value [ fhir:v "uuid2" ]                 ] )               ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                 ] [
fhir:value [ fhir:v "uuid2" ]                 ] )               ] [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "performer" ] ;
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/Practitioner/' + %practitioner.id" ]                 ] )               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
          ( fhir:source [
fhir:context [ fhir:v "assEntity" ] ;
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')" ]           ] ) ;
          ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]               ] [
fhir:value [ fhir:v "ext" ]               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "assi" ] ;
          ( fhir:source [
fhir:context [ fhir:v "assEntity" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "assi" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
            ( fhir:source [
fhir:context [ fhir:v "assi" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]             ] )           ] ) ;
fhir:documentation [ fhir:v "fine modifica" ]         ] )       ] )     ] [
fhir:name [ fhir:v "participant" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "participant" ]       ] ) ;
      ( 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 "serviceRequest" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "ServiceRequest" ]         ] )       ] [
fhir:context [ fhir:v "serviceRequest" ] ;
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/ServiceRequest/" ]         ] [
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 "ServiceRequest" ]         ] )       ] [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "basedOn" ] ;
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/ServiceRequest/' + %serviceRequest.id" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "value2" ] ;
        ( fhir:source [
fhir:context [ fhir:v "participant" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "t" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "authoredOn" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]           ] )         ] ) ;
        ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
          ( fhir:variable [ fhir:v "t" ] [ fhir:v "value" ] )         ] ) ;
fhir:documentation [ fhir:v "participant.time as t -> serviceRequest.authoredOn = (t.value);" ]       ] [
fhir:name [ fhir:v "reference" ] ;
        ( fhir:source [
fhir:context [ fhir:v "obs" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
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 "obs" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
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/' + %encounter.id" ]           ] )         ] )       ] [
fhir:name [ fhir:v "status" ] ;
        ( fhir:source [
fhir:context [ fhir:v "obs" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
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 "obs" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
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 "participantRole" ] ;
        ( fhir:source [
fhir:context [ fhir:v "participant" ] ;
fhir:element [ fhir:v "participantRole" ] ;
fhir:variable [ fhir:v "participantRole" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]         ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]           ] )         ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]           ] )         ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]           ] )         ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]           ] [
fhir:value [ fhir:v "uuid1" ]           ] )         ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]           ] [
fhir:value [ fhir:v "uuid1" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
          ( fhir:source [
fhir:context [ fhir:v "participantRole" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
            ( fhir:source [
fhir:context [ fhir:v "participantRole" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
              ( fhir:source [
fhir:context [ fhir:v "participantRole" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "code" ] ;
              ( fhir:source [
fhir:context [ fhir:v "participantRole" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/Accertamenti/participant" ]                 ] )               ] )             ] )           ] ) ;
fhir:documentation [ fhir:v "modifica meta+identifier" ]         ] [
fhir:name [ fhir:v "identifier" ] ;
          ( fhir:source [
fhir:context [ fhir:v "participantRole" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
            ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                 ] )               ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                 ] [
fhir:value [ fhir:v "uuid2" ]                 ] )               ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                 ] [
fhir:value [ fhir:v "uuid2" ]                 ] )               ] [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "requester" ] ;
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/Practitioner/' + %practitioner.id" ]                 ] )               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
          ( fhir:source [
fhir:context [ fhir:v "participantRole" ] ;
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')" ]           ] ) ;
          ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]               ] [
fhir:value [ fhir:v "ext" ]               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "pe" ] ;
          ( fhir:source [
fhir:context [ fhir:v "participantRole" ] ;
fhir:element [ fhir:v "playingEntity" ] ;
fhir:variable [ fhir:v "pe" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
            ( fhir:source [
fhir:context [ fhir:v "pe" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]             ] )           ] ) ;
fhir:documentation [ fhir:v "fine modifica" ]         ] )       ] )     ] [
fhir:name [ fhir:v "observation" ] ;
      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "component" ] ;
fhir:variable [ fhir:v "comp" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "POST" ]         ] )       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]         ] )       ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]         ] [
fhir:value [ fhir:v "uuid1" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]         ] )       ] [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "hasMember" ] ;
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 "obs" ] ;
        ( fhir:source [
fhir:context [ fhir:v "comp" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "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 "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]           ] ) ;
          ( 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 "statusCode" ] ;
          ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'active')" ]           ] ) ;
          ( 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 "registered" ]             ] )           ] )         ] [
fhir:name [ fhir:v "statusCode" ] ;
          ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'aborted')" ]           ] ) ;
          ( 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 "cancelled" ]             ] )           ] )         ] [
fhir:name [ fhir:v "statusCode" ] ;
          ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'suspended')" ]           ] ) ;
          ( 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 "partial" ]             ] )           ] )         ] [
fhir:name [ fhir:v "statuscode" ] ;
          ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:condition [ fhir:v "obs.statusCode.exists().not()" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "status" ] ;
            ( fhir:source [
fhir:context [ fhir:v "obs" ]             ] ) ;
            ( 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 "obs" ]           ] ) ;
          ( 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 "obs" ]           ] ) ;
          ( 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/' + %encounter.id" ]             ] )           ] )         ] [
fhir:name [ fhir:v "value2" ] ;
          ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectiveTime" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]             ] )           ] ) ;
          ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
            ( fhir:variable [ fhir:v "effectiveTime" ] [ fhir:v "value" ] )           ] )         ] [
fhir:name [ fhir:v "where" ] ;
          ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists() or effectiveTime.high.exists()" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "effectiveTime" ] ;
            ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Period" ]               ] )             ] ) ;
            ( fhir:dependent [
fhir:name [ fhir:v "IVLTSPeriod" ] ;
              ( fhir:variable [ fhir:v "eff" ] [ fhir:v "period" ] )             ] )           ] )         ] [
fhir:name [ fhir:v "value" ] ;
          ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "val.dataString" ]             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ClinicalDocumentSectionParametriVitali" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "-----------------------------------------------------------------------------------------------------------\r\nSezione ParametriVitali--------------------------------------------------------------------------------------" ] ;
    ( 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 "entry-exists" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "src.entry.exists()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "cdaText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "fhirText" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "narrativeStatus" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "generated" ]             ] )           ] )         ] [
fhir:name [ fhir:v "narrativeText" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ] ;
fhir:variable [ fhir:v "t" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "div" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "t" ]             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "where" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "src.entry.exists().not()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "cdaText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "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:documentation [ fhir:v "Sezione Narrativa----------------------------------------------------------------------------------------------------------------------------------------------------" ]     ] [
fhir:name [ fhir:v "Observation" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry1" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "POST" ]         ] )       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]         ] )       ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]         ] [
fhir:value [ fhir:v "uuid1" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]         ] )       ] [
fhir:context [ fhir:v "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 "obs" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "organizer" ] ;
fhir:variable [ fhir:v "org" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
          ( fhir:source [
fhir:context [ fhir:v "org" ]           ] ) ;
          ( 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 "org" ]           ] ) ;
          ( 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 "statusCode" ] ;
          ( fhir:source [
fhir:context [ fhir:v "org" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]           ] ) ;
          ( 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 "statusCode" ] ;
          ( fhir:source [
fhir:context [ fhir:v "org" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'active')" ]           ] ) ;
          ( 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 "registered" ]             ] )           ] )         ] [
fhir:name [ fhir:v "statusCode" ] ;
          ( fhir:source [
fhir:context [ fhir:v "org" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'aborted')" ]           ] ) ;
          ( 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 "cancelled" ]             ] )           ] )         ] [
fhir:name [ fhir:v "statusCode" ] ;
          ( fhir:source [
fhir:context [ fhir:v "org" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'suspended')" ]           ] ) ;
          ( 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 "partial" ]             ] )           ] )         ] [
fhir:name [ fhir:v "statuscode" ] ;
          ( fhir:source [
fhir:context [ fhir:v "org" ] ;
fhir:condition [ fhir:v "obs.statusCode.exists().not()" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "status" ] ;
            ( fhir:source [
fhir:context [ fhir:v "org" ]             ] ) ;
            ( 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 "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "org" ] ;
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 "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "org" ] ;
fhir:condition [ fhir:v "org.code.exists().not()" ]           ] ) ;
          ( fhir:rule [
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 "component" ] ;
          ( fhir:source [
fhir:context [ fhir:v "org" ] ;
fhir:element [ fhir:v "component" ] ;
fhir:variable [ fhir:v "component" ]           ] ) ;
          ( 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 "observation1" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]             ] )           ] [
fhir:context [ fhir:v "observation1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]             ] )           ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "hasMember" ] ;
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/' + %observation1.id" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "obs" ] ;
            ( fhir:source [
fhir:context [ fhir:v "component" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
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 "obs" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
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 "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
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 "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "vvv" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]               ] )             ] [
fhir:name [ fhir:v "statusCode" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "final" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "statusCode" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'active')" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "registered" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "statusCode" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'aborted')" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "cancelled" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "statusCode" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'suspended')" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "partial" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "statuscode" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:condition [ fhir:v "obs.statusCode.exists().not()" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "status" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
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 "quant" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "quant" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Quantity" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "v" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "quant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "v.value" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "value" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "v" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "quant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "v.unit" ]                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "val" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "CE" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                ( fhir:source [
fhir:context [ fhir:v "val" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "originltext" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "originalText" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "originalText" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reference" ]                     ] ) ;
                    ( 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 "reference" ]                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "val" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "code" ]                       ] [
fhir:value [ fhir:v "string" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "codeSystem" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "system" ]                       ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                       ] [
fhir:value [ fhir:v "uri" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "displayName" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "display" ]                       ] [
fhir:value [ fhir:v "string" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "version" ]                       ] [
fhir:value [ fhir:v "string" ]                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "translation" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "translation" ] ;
fhir:variable [ fhir:v "translation" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "code" ]                       ] [
fhir:value [ fhir:v "string" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "codeSystem" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "system" ]                       ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                       ] [
fhir:value [ fhir:v "uri" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "displayName" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "display" ]                       ] [
fhir:value [ fhir:v "string" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "version" ]                       ] [
fhir:value [ fhir:v "string" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "qualifier" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "qualifier" ] ;
fhir:variable [ fhir:v "qualifier" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "qualifier" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "code" ]                           ] [
fhir:value [ fhir:v "string" ]                           ] )                         ] )                       ] [
fhir:name [ fhir:v "codeSystem" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "system" ]                           ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                           ] [
fhir:value [ fhir:v "uri" ]                           ] )                         ] )                       ] [
fhir:name [ fhir:v "displayName" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "display" ]                           ] [
fhir:value [ fhir:v "string" ]                           ] )                         ] )                       ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "version" ]                           ] [
fhir:value [ fhir:v "string" ]                           ] )                         ] )                       ] )                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "val" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "CD" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                ( fhir:source [
fhir:context [ fhir:v "val" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "originltext" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "originalText" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "originalText" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reference" ]                     ] ) ;
                    ( 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 "reference" ]                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "val" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "code" ]                       ] [
fhir:value [ fhir:v "string" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "codeSystem" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "system" ]                       ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                       ] [
fhir:value [ fhir:v "uri" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "displayName" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "display" ]                       ] [
fhir:value [ fhir:v "string" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "version" ]                       ] [
fhir:value [ fhir:v "string" ]                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "translation" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "translation" ] ;
fhir:variable [ fhir:v "translation" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "code" ]                       ] [
fhir:value [ fhir:v "string" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "codeSystem" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "system" ]                       ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                       ] [
fhir:value [ fhir:v "uri" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "displayName" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "display" ]                       ] [
fhir:value [ fhir:v "string" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "version" ]                       ] [
fhir:value [ fhir:v "string" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "qualifier" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "qualifier" ] ;
fhir:variable [ fhir:v "qualifier" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "qualifier" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "code" ]                           ] [
fhir:value [ fhir:v "string" ]                           ] )                         ] )                       ] [
fhir:name [ fhir:v "codeSystem" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "system" ]                           ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                           ] [
fhir:value [ fhir:v "uri" ]                           ] )                         ] )                       ] [
fhir:name [ fhir:v "displayName" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "display" ]                           ] [
fhir:value [ fhir:v "string" ]                           ] )                         ] )                       ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "version" ]                           ] [
fhir:value [ fhir:v "string" ]                           ] )                         ] )                       ] )                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "value" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "ST" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "string" ]                 ] )               ] [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "value.dataString" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "value" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "INT" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "int" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "int.value" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "boolean" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "BL" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "boolean" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "boolean.value" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "interpretationCode" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "interpretationCode" ] ;
fhir:variable [ fhir:v "vvv" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "interpretation" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]               ] )             ] [
fhir:name [ fhir:v "methodCode" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "methodCode" ] ;
fhir:variable [ fhir:v "vvv" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]               ] )             ] [
fhir:name [ fhir:v "targetSiteCode" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "targetSiteCode" ] ;
fhir:variable [ fhir:v "vvv" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "bodySite" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]               ] )             ] [
fhir:name [ fhir:v "performer" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "performer" ] ;
fhir:variable [ fhir:v "performer" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]               ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                 ] )               ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]                 ] )               ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                 ] )               ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]                 ] [
fhir:value [ fhir:v "uuid1" ]                 ] )               ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                 ] [
fhir:value [ fhir:v "uuid1" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "time" ] ;
                ( fhir:source [
fhir:context [ fhir:v "performer" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "t" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "observation1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "issued" ] ;
fhir:variable [ fhir:v "date" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                   ] )                 ] ) ;
                ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                  ( fhir:variable [ fhir:v "t" ] [ fhir:v "date" ] )                 ] )               ] [
fhir:name [ fhir:v "assEntity" ] ;
                ( fhir:source [
fhir:context [ fhir:v "performer" ] ;
fhir:element [ fhir:v "assignedEntity" ] ;
fhir:variable [ fhir:v "assEntity" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assEntity" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "assEntity" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assEntity" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "code" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assEntity" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/ParametriVitali/performer" ]                         ] )                       ] )                     ] )                   ] ) ;
fhir:documentation [ fhir:v "inizio modifica meta+ identifier" ]                 ] [
fhir:name [ fhir:v "identifier" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assEntity" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                         ] )                       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                         ] [
fhir:value [ fhir:v "uuid2" ]                         ] )                       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                         ] [
fhir:value [ fhir:v "uuid2" ]                         ] )                       ] [
fhir:context [ fhir:v "observation1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "performer" ] ;
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/Practitioner/' + %practitioner.id" ]                         ] )                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assEntity" ] ;
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')" ]                   ] ) ;
                  ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                       ] [
fhir:value [ fhir:v "ext" ]                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "assPerson" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assEntity" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "assPerson" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "assPerson" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                     ] )                   ] ) ;
fhir:documentation [ fhir:v "fine modifica" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "parti" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "parti" ]               ] ) ;
              ( 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 "serviceRequest" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "ServiceRequest" ]                 ] )               ] [
fhir:context [ fhir:v "serviceRequest" ] ;
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/ServiceRequest/" ]                 ] [
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 "ServiceRequest" ]                 ] )               ] [
fhir:context [ fhir:v "observation1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "basedOn" ] ;
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/ServiceRequest/' + %serviceRequest.id" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                ( fhir:source [
fhir:context [ fhir:v "parti" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
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 "parti" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
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 "parti" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
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 "parti" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
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 "value2" ] ;
                ( fhir:source [
fhir:context [ fhir:v "parti" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "t" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "authoredOn" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                   ] )                 ] ) ;
                ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                  ( fhir:variable [ fhir:v "t" ] [ fhir:v "value" ] )                 ] )               ] [
fhir:name [ fhir:v "partRole" ] ;
                ( fhir:source [
fhir:context [ fhir:v "parti" ] ;
fhir:element [ fhir:v "participantRole" ] ;
fhir:variable [ fhir:v "partRole" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]                   ] )                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                   ] )                 ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "partRole" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "partRole" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "partRole" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "code" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "partRole" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/ParametriVitali/participant" ]                         ] )                       ] )                     ] )                   ] ) ;
fhir:documentation [ fhir:v "inizio modifica meta + identifier" ]                 ] [
fhir:name [ fhir:v "identifier" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                         ] )                       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                         ] [
fhir:value [ fhir:v "uuid2" ]                         ] )                       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                         ] [
fhir:value [ fhir:v "uuid2" ]                         ] )                       ] [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "requester" ] ;
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/Practitioner/' + %practitioner.id" ]                         ] )                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
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')" ]                   ] ) ;
                  ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                       ] [
fhir:value [ fhir:v "ext" ]                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "name" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "playingEntity" ] ;
fhir:variable [ fhir:v "playingEntity" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "playingEntity" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                     ] )                   ] ) ;
fhir:documentation [ fhir:v "fine modifica" ]                 ] )               ] )             ] )           ] )         ] )       ] ) ;
fhir:documentation [ fhir:v "Sezione Strutturata --------------------------------------------------------------------------------------------------------------------------------------------------------" ]     ] )
  ] [
fhir:name [ fhir:v "ClinicalDocumentSectionTerapiaFarmacoInPronto" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "-----------------------------------------------------------------------------------------------------------------\r\nSezione terapia Farma in Pronto----------------------------------------------------------------------------------" ] ;
    ( 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 "entry-exists" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "src.entry.exists()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "cdaText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "fhirText" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "narrativeStatus" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "generated" ]             ] )           ] )         ] [
fhir:name [ fhir:v "narrativeText" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ] ;
fhir:variable [ fhir:v "t" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "div" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "t" ]             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "where" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "src.entry.exists().not()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "cdaText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "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 "MedicationAdministration" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "MedicationAdministration" ]           ] )         ] [
fhir:context [ fhir:v "MedicationAdministration" ] ;
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/MedicationAdministration/" ]           ] [
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 "MedicationAdministration" ]           ] )         ] [
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/MedicationAdministration/' + %MedicationAdministration.id" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
          ( fhir:source [
fhir:context [ fhir:v "src" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "MedicationAdministration" ] ;
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 "MedicationAdministration" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "context" ] ;
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 "Period" ] ;
          ( fhir:source [
fhir:context [ fhir:v "src" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "MedicationAdministration" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Period" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "low" ] ;
            ( fhir:source [
fhir:context [ fhir:v "src" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "start.now()" ]               ] )             ] )           ] [
fhir:name [ fhir:v "high" ] ;
            ( fhir:source [
fhir:context [ fhir:v "src" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "end" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "end.now()" ]               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "statuscode" ] ;
          ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "sub.statusCode.exists().not()" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "status" ] ;
            ( fhir:source [
fhir:context [ fhir:v "src" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "MedicationAdministration" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "completed" ]               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "reference" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "MedicationAdministration" ] ;
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 "medication" ] ;
            ( fhir:source [
fhir:context [ fhir:v "cdaText" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "MedicationAdministration" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "medication" ] ;
fhir:variable [ fhir:v "medication" ] ;
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 "cdaText" ] ;
fhir:variable [ fhir:v "txt" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "medication" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "txt" ]                 ] )               ] )             ] )           ] )         ] )       ] ) ;
fhir:documentation [ fhir:v "Sezione Narrativa------------------------------------------------------------------------------------------------------------------------------------------------" ]     ] [
fhir:name [ fhir:v "entry" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry1" ]       ] ) ;
      ( 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 "medAdm" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "MedicationAdministration" ]         ] )       ] [
fhir:context [ fhir:v "medAdm" ] ;
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/MedicationAdministration/" ]         ] [
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 "MedicationAdministration" ]         ] )       ] [
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/MedicationAdministration/' + %medAdm.id" ]         ] )       ] [
fhir:context [ fhir:v "medAdm" ] ;
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 "entry1" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "medAdm" ] ;
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 "entry1" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "medAdm" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "context" ] ;
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 "MedAdm" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "substanceAdministration" ] ;
fhir:variable [ fhir:v "sub" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "txx" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "tx" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
            ( fhir:source [
fhir:context [ fhir:v "tx" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reff" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "reff.value" ]               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "statusCode" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "vvv" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "medAdm" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]           ] )         ] [
fhir:name [ fhir:v "effectiveTime" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "medAdm" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Period" ]             ] )           ] ) ;
          ( fhir:dependent [
fhir:name [ fhir:v "IVLTSPeriod" ] ;
            ( fhir:variable [ fhir:v "eff" ] [ fhir:v "period" ] )           ] ) ;
fhir:documentation [ fhir:v "sub.effectiveTime: IVL_TS as eff -> medAdm.effective =create('Period') as period then IVLTSPeriod(eff,period); CHECK THIS" ]         ] [
fhir:name [ fhir:v "eff2" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:type [ fhir:v "PIVL_TS" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "medAdm" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "dosage" ] ;
fhir:variable [ fhir:v "dosage" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "ratio" ] ;
            ( fhir:source [
fhir:context [ fhir:v "eff" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "dosage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "rate" ] ;
fhir:variable [ fhir:v "ratio" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Ratio" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "num" ] ;
              ( fhir:source [
fhir:context [ fhir:v "eff" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "ratio" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "numerator" ] ;
fhir:variable [ fhir:v "num" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Quantity" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "period" ] ;
                ( fhir:source [
fhir:context [ fhir:v "eff" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "per" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "num" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "per.value" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "period" ] ;
                ( fhir:source [
fhir:context [ fhir:v "eff" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "per" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "num" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "per.unit" ]                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "den" ] ;
              ( fhir:source [
fhir:context [ fhir:v "eff" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "ratio" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "denominator" ] ;
fhir:variable [ fhir:v "num" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Quantity" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "period" ] ;
                ( fhir:source [
fhir:context [ fhir:v "eff" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "per" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "num" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "1" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "period" ] ;
                ( fhir:source [
fhir:context [ fhir:v "eff" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "per" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "num" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "per.unit" ]                   ] )                 ] )               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "route" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sub" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "medAdm" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "dosage" ] ;
fhir:variable [ fhir:v "dosage" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "routeCode" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "routeCode" ] ;
fhir:variable [ fhir:v "vvv" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "dosage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "route" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]             ] )           ] )         ] [
fhir:name [ fhir:v "route" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sub" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "medAdm" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "dosage" ] ;
fhir:variable [ fhir:v "dosage" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "approachSiteCode" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "approachSiteCode" ] ;
fhir:variable [ fhir:v "vvv" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "dosage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "site" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]             ] )           ] )         ] [
fhir:name [ fhir:v "medicationRequest" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sub" ]           ] ) ;
          ( 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 "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 "e1" ] ;
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:context [ fhir:v "medAdm" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
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 "rel" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "rel" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "obs" ] ;
              ( fhir:source [
fhir:context [ fhir:v "rel" ] ;
fhir:element [ fhir:v "supply" ] ;
fhir:variable [ fhir:v "supl" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "medRq" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "dispenseRequest" ] ;
fhir:variable [ fhir:v "disp" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "SimpleQuantity" ] ;
                ( fhir:source [
fhir:context [ fhir:v "supl" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "disp" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "quantity" ] ;
fhir:variable [ fhir:v "q" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "SimpleQuantity" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "fds" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "supl" ] ;
fhir:element [ fhir:v "quantity" ] ;
fhir:variable [ fhir:v "qua" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "q" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "qua.value" ]                     ] )                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "reference" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sub" ]             ] ) ;
            ( 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 "sub" ]             ] ) ;
            ( 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 "sub" ]             ] ) ;
            ( 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 "sub" ]             ] ) ;
            ( 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 "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sub" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "medRq" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "medication" ] ;
fhir:variable [ fhir:v "cod" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "Medi" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sub" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "cod" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "medication" ]                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "dose-quantity" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "doseQuantity" ] ;
fhir:variable [ fhir:v "quantity" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "dosage" ] ;
              ( fhir:source [
fhir:context [ fhir:v "quantity" ]               ] ) ;
              ( 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 "dos" ] ;
                ( fhir:source [
fhir:context [ fhir:v "quantity" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "dosage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "doseAndRate" ] ;
fhir:variable [ fhir:v "dosRange" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "range" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "quantity" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "dosRange" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "dose" ] ;
fhir:variable [ fhir:v "range" ] ;
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 "quantity" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "range" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "low" ] ;
fhir:variable [ fhir:v "quant" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "SimpleQuantity" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "v1" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "quantity" ] ;
fhir:element [ fhir:v "low" ] ;
fhir:variable [ fhir:v "l" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "quant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "l.value" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "v1" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "quantity" ] ;
fhir:element [ fhir:v "low" ] ;
fhir:variable [ fhir:v "l" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "quant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "l.unit" ]                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "high" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "quantity" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "range" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "high" ] ;
fhir:variable [ fhir:v "quant" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "SimpleQuantity" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "v1" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "quantity" ] ;
fhir:element [ fhir:v "high" ] ;
fhir:variable [ fhir:v "h" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "quant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "h.value" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "v1" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "quantity" ] ;
fhir:element [ fhir:v "high" ] ;
fhir:variable [ fhir:v "h" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "quant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "h.unit" ]                         ] )                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "Rate-quantity" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "rateQuantity" ] ;
fhir:variable [ fhir:v "rate" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "dosage" ] ;
              ( fhir:source [
fhir:context [ fhir:v "rate" ]               ] ) ;
              ( 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 "dos" ] ;
                ( fhir:source [
fhir:context [ fhir:v "rate" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "dosage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "doseAndRate" ] ;
fhir:variable [ fhir:v "dosRange" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "range" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "rate" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "dosRange" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "dose" ] ;
fhir:variable [ fhir:v "range" ] ;
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 "rate" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "range" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "low" ] ;
fhir:variable [ fhir:v "quant" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "SimpleQuantity" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "v1" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "rate" ] ;
fhir:element [ fhir:v "low" ] ;
fhir:variable [ fhir:v "l" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "quant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "l.value" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "v1" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "rate" ] ;
fhir:element [ fhir:v "low" ] ;
fhir:variable [ fhir:v "l" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "quant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "l.unit" ]                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "high" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "rate" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "range" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "high" ] ;
fhir:variable [ fhir:v "quant" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "SimpleQuantity" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "v1" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "rate" ] ;
fhir:element [ fhir:v "high" ] ;
fhir:variable [ fhir:v "h" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "quant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "h.value" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "v1" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "rate" ] ;
fhir:element [ fhir:v "high" ] ;
fhir:variable [ fhir:v "h" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "quant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "h.unit" ]                         ] )                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "part" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "part" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "time" ] ;
              ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "t" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "medRq" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "authoredOn" ] ;
fhir:variable [ fhir:v "date" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                 ] )               ] ) ;
              ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                ( fhir:variable [ fhir:v "t" ] [ fhir:v "date" ] )               ] )             ] [
fhir:name [ fhir:v "Part" ] ;
              ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "participantRole" ] ;
fhir:variable [ fhir:v "partRole" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]               ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                 ] )               ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]                 ] )               ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                 ] )               ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]                 ] [
fhir:value [ fhir:v "uuid1" ]                 ] )               ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                 ] [
fhir:value [ fhir:v "uuid1" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                ( fhir:source [
fhir:context [ fhir:v "partRole" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "partRole" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                     ] )                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "partRole" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "code" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "partRole" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/TerapiaFarmacologicaPS/participant" ]                       ] )                     ] )                   ] )                 ] ) ;
fhir:documentation [ fhir:v "inizio meta+identifier" ]               ] [
fhir:name [ fhir:v "identifier" ] ;
                ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                       ] )                     ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                       ] [
fhir:value [ fhir:v "uuid2" ]                       ] )                     ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                       ] [
fhir:value [ fhir:v "uuid2" ]                       ] )                     ] [
fhir:context [ fhir:v "medRq" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "requester" ] ;
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/Practitioner/' + %practitioner.id" ]                       ] )                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
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')" ]                 ] ) ;
                ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                     ] [
fhir:value [ fhir:v "ext" ]                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "id" ] ;
                ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                 ] ) ;
fhir:documentation [ fhir:v "fine modifiche" ]               ] [
fhir:name [ fhir:v "play" ] ;
                ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "playingEntity" ] ;
fhir:variable [ fhir:v "play" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "play" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                   ] )                 ] )               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "med" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sub" ]           ] ) ;
          ( 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 "med" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Medication" ]             ] )           ] [
fhir:context [ fhir:v "med" ] ;
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 "medAdm" ] ;
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/' + %med.id" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "unicode" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "administrationUnitCode" ] ;
fhir:variable [ fhir:v "adduni" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "administrationUnitCode" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "administrationUnitCode" ] ;
fhir:variable [ fhir:v "vvv" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "med" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "form" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]               ] )             ] [
fhir:name [ fhir:v "consum" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "consumable" ] ;
fhir:variable [ fhir:v "consum" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "manuMat" ] ;
                ( fhir:source [
fhir:context [ fhir:v "consum" ] ;
fhir:element [ fhir:v "manufacturedProduct" ] ;
fhir:variable [ fhir:v "manuProd" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "manuMat" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "manuProd" ] ;
fhir:element [ fhir:v "manufacturedMaterial" ] ;
fhir:variable [ fhir:v "manuMt" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "manuMt" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "med" ] ;
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-R" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entryR" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "obs" ] ;
              ( fhir:source [
fhir:context [ fhir:v "entryR" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "observation" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "ingredient" ] ;
                ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "displayName = 'Grammatura'" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "med" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "ingredient" ] ;
fhir:variable [ fhir:v "ingredient" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "consumable" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "consumable" ] ;
fhir:variable [ fhir:v "consumable" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "product" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "consumable" ] ;
fhir:element [ fhir:v "manufacturedProduct" ] ;
fhir:variable [ fhir:v "manufacturedProduct" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "material" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "manufacturedProduct" ] ;
fhir:element [ fhir:v "manufacturedMaterial" ] ;
fhir:variable [ fhir:v "manufacturedMaterial" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "CE" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "manufacturedMaterial" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "ingredient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "value" ] ;
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 "value" ] )                         ] )                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "strenght" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "ingredient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "strength" ] ;
fhir:variable [ fhir:v "strength" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "numerator" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "value" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "strength" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "numerator" ] ;
fhir:variable [ fhir:v "numerator" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "valueN" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "value" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "numerator" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "value.value" ]                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "denominator" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "value" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "strength" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "denominator" ] ;
fhir:variable [ fhir:v "denominator" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "valueD" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "value" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "denominator" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "1"^^xsd:integer ]                         ] )                       ] )                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "quantita" ] ;
                ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "displayName = 'Quantità nella Confezione'" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "amount" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "med" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "amount" ] ;
fhir:variable [ fhir:v "amount" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "numerator" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "value" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "amount" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "numerator" ] ;
fhir:variable [ fhir:v "numerator" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "valueN" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "value" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "numerator" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "value.value" ]                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "denominator" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "value" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "amount" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "denominator" ] ;
fhir:variable [ fhir:v "denominator" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "valueD" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "value" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "denominator" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "1"^^xsd:integer ]                         ] )                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "perform" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "performer" ] ;
fhir:variable [ fhir:v "perf" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]             ] )           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]             ] )           ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "preftime" ] ;
            ( fhir:source [
fhir:context [ fhir:v "perf" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "medAdm" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "note" ] ;
fhir:variable [ fhir:v "note" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "notaa" ] ;
              ( fhir:source [
fhir:context [ fhir:v "perf" ]               ] ) ;
              ( 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 "performertime" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "notetime" ] ;
              ( fhir:source [
fhir:context [ fhir:v "perf" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "t" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                 ] )               ] ) ;
              ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                ( fhir:variable [ fhir:v "t" ] [ fhir:v "value" ] )               ] )             ] )           ] [
fhir:name [ fhir:v "ent" ] ;
            ( fhir:source [
fhir:context [ fhir:v "perf" ] ;
fhir:element [ fhir:v "assignedEntity" ] ;
fhir:variable [ fhir:v "ent" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
              ( fhir:source [
fhir:context [ fhir:v "ent" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                ( fhir:source [
fhir:context [ fhir:v "ent" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "ent" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "ent" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/TerapiaFarmacologicaPS/performer" ]                     ] )                   ] )                 ] )               ] ) ;
fhir:documentation [ fhir:v "inizio modifica meta+identifier" ]             ] [
fhir:name [ fhir:v "identifier" ] ;
              ( fhir:source [
fhir:context [ fhir:v "ent" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                     ] )                   ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "medAdm" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "performer" ] ;
fhir:variable [ fhir:v "p" ]                   ] [
fhir:context [ fhir:v "p" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "actor" ] ;
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/Practitioner/' + %practitioner.id" ]                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
              ( fhir:source [
fhir:context [ fhir:v "ent" ] ;
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')" ]               ] ) ;
              ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                   ] [
fhir:value [ fhir:v "ext" ]                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "assperson" ] ;
              ( fhir:source [
fhir:context [ fhir:v "ent" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "assPerson" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assPerson" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                 ] )               ] ) ;
fhir:documentation [ fhir:v "fine modifica" ]             ] )           ] )         ] )       ] ) ;
fhir:documentation [ fhir:v "Sezione Strutturata-------------------------------------------------------------------------------------------------------------------------------------------------" ]     ] )
  ] [
fhir:name [ fhir:v "ClinicalDocumentSectionPianoCuraDimissione" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "------------------------------------------------------------------------------------------------------------------\r\n-" ] ;
    ( 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 "entryident3" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:variable [ fhir:v "entry1" ]       ] ) ;
      ( 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 "careplan" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "CarePlan" ]         ] )       ] [
fhir:context [ fhir:v "careplan" ] ;
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/CarePlan/" ]         ] [
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 "CarePlan" ]         ] )       ] [
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/CarePlan/' + %careplan.id" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "careplan" ] ;
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 "careplan" ] ;
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 "src" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "careplan" ] ;
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 "src" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "careplan" ] ;
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 "author" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "careplan" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "note" ] ;
fhir:variable [ fhir:v "carenote" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "notetxt" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ] ;
fhir:variable [ fhir:v "t" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "carenote" ] ;
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 "CFauthor" ] ;
          ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "author" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "notetime" ] ;
            ( fhir:source [
fhir:context [ fhir:v "author" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "t" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "carenote" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]               ] )             ] ) ;
            ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
              ( fhir:variable [ fhir:v "t" ] [ fhir:v "value" ] )             ] )           ] [
fhir:name [ fhir:v "authpract" ] ;
            ( fhir:source [
fhir:context [ fhir:v "author" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assauthor" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]             ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]               ] )             ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]               ] )             ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]               ] )             ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]               ] [
fhir:value [ fhir:v "uuid1" ]               ] )             ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]               ] [
fhir:value [ fhir:v "uuid1" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assauthor" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assauthor" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assauthor" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assauthor" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/PianoCuraDimissione/author" ]                     ] )                   ] )                 ] )               ] ) ;
fhir:documentation [ fhir:v "inizio modifica meta+identifier" ]             ] [
fhir:name [ fhir:v "identifier" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assauthor" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                     ] )                   ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "carenote" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assauthor" ] ;
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')" ]               ] ) ;
              ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                   ] [
fhir:value [ fhir:v "ext" ]                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "namepers" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assauthor" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "pers" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                ( fhir:source [
fhir:context [ fhir:v "pers" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                 ] )               ] ) ;
fhir:documentation [ fhir:v "fine modifica" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "entry1" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry2" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "carnote" ] ;
          ( fhir:source [
fhir:context [ fhir:v "entry2" ] ;
fhir:element [ fhir:v "act" ] ;
fhir:variable [ fhir:v "entryact" ]           ] ) ;
          ( 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 "servicerequest" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "ServiceRequest" ]             ] )           ] [
fhir:context [ fhir:v "servicerequest" ] ;
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/ServiceRequest/" ]             ] [
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 "ServiceRequest" ]             ] )           ] [
fhir:context [ fhir:v "careplan" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "activity" ] ;
fhir:variable [ fhir:v "activ" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]             ] )           ] [
fhir:context [ fhir:v "activ" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
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/ServiceRequest/' + %servicerequest.id" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
            ( fhir:source [
fhir:context [ fhir:v "entryact" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "servicerequest" ] ;
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 "entryact" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "servicerequest" ] ;
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 "entryact" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "servicerequest" ] ;
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 "entryact" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "servicerequest" ] ;
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 "entry2" ] ;
            ( fhir:source [
fhir:context [ fhir:v "entryact" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "servicerequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identif" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "jarilemes" ] ;
              ( fhir:source [
fhir:context [ fhir:v "entryact" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "actref" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "actref" ] ;
                ( fhir:source [
fhir:context [ fhir:v "actref" ] ;
fhir:element [ fhir:v "externalAct" ] ;
fhir:variable [ fhir:v "extact" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "extact" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "extact" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "servicerequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identif3" ] ;
fhir:transform [ fhir:v "create" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                     ] )                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "idnetn" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "extact" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                     ] ) ;
                    ( 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 "identif3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "r" ]                         ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                         ] [
fhir:value [ fhir:v "uri" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "ext" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "identif3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "ext" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "assigningAuthorityName" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "assigningAuthorityName" ] ;
fhir:variable [ fhir:v "s" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "identif3" ] ;
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 "code" ] ;
              ( fhir:source [
fhir:context [ fhir:v "entryact" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "servicerequest" ] ;
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 "entryact" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "vvv" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "servicerequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]               ] )             ] [
fhir:name [ fhir:v "servReq" ] ;
              ( fhir:source [
fhir:context [ fhir:v "entryact" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "actauthor" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "time" ] ;
                ( fhir:source [
fhir:context [ fhir:v "actauthor" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "t" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "servicerequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "authoredOn" ] ;
fhir:variable [ fhir:v "date" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                   ] )                 ] ) ;
                ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                  ( fhir:variable [ fhir:v "t" ] [ fhir:v "date" ] )                 ] )               ] [
fhir:name [ fhir:v "author" ] ;
                ( fhir:source [
fhir:context [ fhir:v "actauthor" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assauthor" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]                   ] )                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                   ] )                 ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assauthor" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "assauthor" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assauthor" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "code" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assauthor" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/PianoCuraDimissione/author" ]                         ] )                       ] )                     ] )                   ] ) ;
fhir:documentation [ fhir:v "inizio modifica identifier" ]                 ] [
fhir:name [ fhir:v "identifier" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assauthor" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                         ] )                       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                         ] [
fhir:value [ fhir:v "uuid2" ]                         ] )                       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                         ] [
fhir:value [ fhir:v "uuid2" ]                         ] )                       ] [
fhir:context [ fhir:v "servicerequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "requester" ] ;
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/Practitioner/' + %practitioner.id" ]                         ] )                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assauthor" ] ;
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')" ]                   ] ) ;
                  ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                       ] [
fhir:value [ fhir:v "ext" ]                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "namepers" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assauthor" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "pers" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "pers" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                     ] )                   ] ) ;
fhir:documentation [ fhir:v "fine modifica" ]                 ] )               ] )             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ClinicalDocumentSectionDimissione" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "-------Dimissione------------------------------------------------------------------------------------------------------" ] ;
    ( fhir:input [
fhir:name [ fhir:v "cda" ] ;
fhir:type [ fhir:v "ClinicalDocument" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "Section" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "tgt" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "enc" ] ;
fhir:type [ fhir:v "Encounter" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "title" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:variable [ fhir:v "t" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "t.dataString" ]         ] )       ] )     ] [
fhir:name [ fhir:v "code" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] )     ] [
fhir:name [ fhir:v "cdaText" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "fhirText" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "narrativeStatus" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "generated" ]           ] )         ] )       ] [
fhir:name [ fhir:v "narrativeText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cdaText" ] ;
fhir:variable [ fhir:v "t" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "div" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "t" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "entry1" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry1" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "act" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "act" ] ;
fhir:variable [ fhir:v "act" ]         ] ) ;
        ( 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 "encountert" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Encounter" ]           ] )         ] [
fhir:context [ fhir:v "encountert" ] ;
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/Encounter/" ]           ] [
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 "Encounter" ]           ] )         ] [
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/Encounter/' + %encountert.id" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "status" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "encountert" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "finished" ]             ] )           ] )         ] [
fhir:name [ fhir:v "class" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "encountert" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "class" ] ;
fhir:variable [ fhir:v "cl" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "act" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "cl" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "AMB" ]               ] )             ] )           ] [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "act" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "cl" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "ambulatory" ]               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "refenc" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "encountert" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "partOf" ] ;
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 "refpatient" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "encountert" ] ;
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 "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "encountert" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]           ] )         ] [
fhir:name [ fhir:v "where" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists() or effectiveTime.high.exists()" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "effectiveTime" ] ;
            ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "encountert" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
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 "where" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists().not() or effectiveTime.high.exists().not()" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "efft" ] ;
            ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectivetime1" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "encountert" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Period" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
              ( fhir:source [
fhir:context [ fhir:v "effectivetime1" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:variable [ fhir:v "start" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                 ] )               ] ) ;
              ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                ( fhir:variable [ fhir:v "effectivetime1" ] [ fhir:v "start" ] )               ] )             ] )           ] ) ;
fhir:documentation [ fhir:v "effectiveTime = time-stamp" ]         ] [
fhir:name [ fhir:v "erformer" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "performer" ] ;
fhir:variable [ fhir:v "performer" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]             ] )           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]             ] )           ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "ass" ] ;
            ( fhir:source [
fhir:context [ fhir:v "performer" ] ;
fhir:element [ fhir:v "assignedEntity" ] ;
fhir:variable [ fhir:v "assEnty" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assEnty" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assEnty" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assEnty" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assEnty" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/Dimissione/performer" ]                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "identifier" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assEnty" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "perf" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                     ] )                   ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "encountert" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "perf" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "period" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "performer" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "perf" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Period" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "time" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "performer" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "time" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:variable [ fhir:v "start" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                         ] )                       ] ) ;
                      ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                        ( fhir:variable [ fhir:v "time" ] [ fhir:v "start" ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "aut" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "performer" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "perf" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "individual" ] ;
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/Practitioner/' + %practitioner.id" ]                       ] )                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assEnty" ] ;
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')" ]               ] ) ;
              ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                   ] [
fhir:value [ fhir:v "ext" ]                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "assPer" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assEnty" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "assPers" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assPers" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                 ] )               ] )             ] ) ;
fhir:documentation [ fhir:v "performer.time as ti -> note.time = (ti.value);" ]           ] )         ] [
fhir:name [ fhir:v "entriRel" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entriRel" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "enc" ] ;
            ( fhir:source [
fhir:context [ fhir:v "entriRel" ] ;
fhir:element [ fhir:v "encounter" ] ;
fhir:variable [ fhir:v "enc1" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "enc1" ] ;
              ( fhir:source [
fhir:context [ fhir:v "enc1" ]               ] ) ;
              ( 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 "encountert1" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Encounter" ]                 ] )               ] [
fhir:context [ fhir:v "encountert1" ] ;
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/Encounter/" ]                 ] [
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 "Encounter" ]                 ] )               ] [
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/Encounter/' + %encountert1.id" ]                 ] )               ] [
fhir:context [ fhir:v "encountert1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "partOf" ] ;
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/' + encountert.id" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "status" ] ;
                ( fhir:source [
fhir:context [ fhir:v "enc1" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "encountert1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "finished" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "class" ] ;
                ( fhir:source [
fhir:context [ fhir:v "enc1" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "encountert1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "class" ] ;
fhir:variable [ fhir:v "cl" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "enc1" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "cl" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "AMB" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "enc1" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "cl" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "ambulatory" ]                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "refpatient" ] ;
                ( fhir:source [
fhir:context [ fhir:v "enc1" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "encountert1" ] ;
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 "id" ] ;
                ( fhir:source [
fhir:context [ fhir:v "enc1" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "encountert1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                 ] )               ] [
fhir:name [ fhir:v "code" ] ;
                ( fhir:source [
fhir:context [ fhir:v "enc1" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "encountert1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "ti" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "enc1" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "ti" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "cod" ] ;
fhir:transform [ fhir:v "create" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                     ] )                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "enc1" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "c" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "cod" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "c.code" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "syst" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "enc1" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "c" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "c" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "s" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "cod" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "s" ]                         ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                         ] [
fhir:value [ fhir:v "uri" ]                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "dispaly" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "enc1" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "c" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "cod" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "c.displayName" ]                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "text" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "enc1" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "tx" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "tx" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "ref" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "ti" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "ref.value" ]                       ] )                     ] )                   ] )                 ] ) ;
fhir:documentation [ fhir:v "enc1.code -> encountert1.type;" ]               ] [
fhir:name [ fhir:v "where" ] ;
                ( fhir:source [
fhir:context [ fhir:v "enc1" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists() or effectiveTime.high.exists()" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "effectiveTime" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "enc1" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "encountert1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
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 "where" ] ;
                ( fhir:source [
fhir:context [ fhir:v "enc1" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists().not() or effectiveTime.high.exists().not()" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "efft" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "enc1" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectivetime1" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "encountert1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Period" ]                     ] )                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "effectivetime1" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:variable [ fhir:v "start" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                       ] )                     ] ) ;
                    ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                      ( fhir:variable [ fhir:v "effectivetime1" ] [ fhir:v "start" ] )                     ] )                   ] )                 ] ) ;
fhir:documentation [ fhir:v "effectiveTime = time-stamp" ]               ] [
fhir:name [ fhir:v "Location" ] ;
                ( fhir:source [
fhir:context [ fhir:v "enc1" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "part" ] ;
fhir:condition [ fhir:v "(typeCode = 'LOC')" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]                   ] )                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "location" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Location" ]                   ] )                 ] [
fhir:context [ fhir:v "location" ] ;
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/Location/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Location/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "part" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "part" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "part" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "code" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "part" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/Dimissione/participant" ]                         ] )                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "location1" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "tim" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "encountert1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "location" ] ;
fhir:variable [ fhir:v "locat" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "time" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "tim" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "locat" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
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 "tim" ] [ fhir:v "period" ] )                     ] )                   ] [
fhir:name [ fhir:v "time" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "tim" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "locat" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Period" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "tim" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:variable [ fhir:v "start" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                         ] )                       ] ) ;
                      ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                        ( fhir:variable [ fhir:v "tim" ] [ fhir:v "start" ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "partRole" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "participantRole" ] ;
fhir:variable [ fhir:v "partRole" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "identifier" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "root1" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "r" ]                           ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                           ] [
fhir:value [ fhir:v "uri" ]                           ] )                         ] )                       ] [
fhir:name [ fhir:v "ext" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "ext" ]                           ] )                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "UUID" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "partRole" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Location?identifier=" ]                             ] [
fhir:value [ fhir:v "ext" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "assigningAuthorityName" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "assigningAuthorityName" ] ;
fhir:variable [ fhir:v "s" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "assigner" ] ;
fhir:variable [ fhir:v "a" ]                         ] [
fhir:context [ fhir:v "a" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "s" ]                           ] )                         ] )                       ] [
fhir:name [ fhir:v "r" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "idasi" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                             ] )                           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "https://example/Location/" ]                             ] [
fhir:value [ fhir:v "uuid" ]                             ] )                           ] [
fhir:context [ fhir:v "locat" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "location" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]                             ] )                           ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Location/' + %location.id" ]                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "code" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                       ] ) ;
fhir:documentation [ fhir:v "partRole.id -> location.identifier;" ]                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "entryrel2" ] ;
                ( fhir:source [
fhir:context [ fhir:v "enc1" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entryrel2" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "POST" ]                   ] )                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                   ] )                 ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                   ] )                 ] [
fhir:context [ fhir:v "encountert1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reasonReference" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
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 "obs" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "entryrel2" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ]                     ] ) ;
                    ( 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 "obs" ]                     ] ) ;
                    ( 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/' + %encountert1.id" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "code" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "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 "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]                     ] ) ;
                    ( 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 "statusCode" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'active')" ]                     ] ) ;
                    ( 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 "registered" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "statusCode" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'aborted')" ]                     ] ) ;
                    ( 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 "cancelled" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "statusCode" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'suspended')" ]                     ] ) ;
                    ( 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 "partial" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "notpresent" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ]                     ] ) ;
                    ( 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 "value2" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectiveTime" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                       ] )                     ] ) ;
                    ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                      ( fhir:variable [ fhir:v "effectiveTime" ] [ fhir:v "value" ] )                     ] )                   ] [
fhir:name [ fhir:v "where" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists() or effectiveTime.high.exists()" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "effectiveTime" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Period" ]                         ] )                       ] ) ;
                      ( fhir:dependent [
fhir:name [ fhir:v "IVLTSPeriod" ] ;
                        ( fhir:variable [ fhir:v "eff" ] [ fhir:v "period" ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "value" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "INT" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "int" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "int.value" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "boolean" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "BL" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "boolean" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "boolean.value" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "val" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "CE" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "val" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "originltext" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "originalText" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "originalText" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reference" ]                           ] ) ;
                          ( 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 "reference" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "code" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "code" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystem" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "system" ]                             ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                             ] [
fhir:value [ fhir:v "uri" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "displayName" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "display" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "version" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "translation" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "translation" ] ;
fhir:variable [ fhir:v "translation" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "code" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystem" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "system" ]                             ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                             ] [
fhir:value [ fhir:v "uri" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "displayName" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "display" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "version" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "qualifier" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "qualifier" ] ;
fhir:variable [ fhir:v "qualifier" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "qualifier" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "code" ]                                 ] [
fhir:value [ fhir:v "string" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "codeSystem" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "system" ]                                 ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                                 ] [
fhir:value [ fhir:v "uri" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "displayName" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "display" ]                                 ] [
fhir:value [ fhir:v "string" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "version" ]                                 ] [
fhir:value [ fhir:v "string" ]                                 ] )                               ] )                             ] )                           ] )                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "val" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "CD" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "val" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "originltext" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "originalText" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "originalText" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reference" ]                           ] ) ;
                          ( 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 "reference" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "code" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "code" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystem" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "system" ]                             ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                             ] [
fhir:value [ fhir:v "uri" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "displayName" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "display" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "version" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "translation" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "translation" ] ;
fhir:variable [ fhir:v "translation" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "code" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystem" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "system" ]                             ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                             ] [
fhir:value [ fhir:v "uri" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "displayName" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "display" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "version" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "qualifier" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "qualifier" ] ;
fhir:variable [ fhir:v "qualifier" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "qualifier" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "code" ]                                 ] [
fhir:value [ fhir:v "string" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "codeSystem" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "system" ]                                 ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                                 ] [
fhir:value [ fhir:v "uri" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "displayName" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "display" ]                                 ] [
fhir:value [ fhir:v "string" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "version" ]                                 ] [
fhir:value [ fhir:v "string" ]                                 ] )                               ] )                             ] )                           ] )                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "valueQuantity" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "PQ" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "quantity" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "val" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "quantity" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Quantity" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
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 "val" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:variable [ fhir:v "unit" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "copy" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "unit" ]                           ] )                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "value" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "ST" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "string" ]                       ] )                     ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "value.dataString" ]                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] ) ;
fhir:documentation [ fhir:v "Encounter Post dimissione---------------------------------------------------------------------------------------------------------------------------------------" ]         ] [
fhir:name [ fhir:v "entri-act" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entriRel2" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "a" ] ;
            ( fhir:source [
fhir:context [ fhir:v "entriRel2" ] ;
fhir:element [ fhir:v "act" ] ;
fhir:variable [ fhir:v "a" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "act" ] ;
              ( fhir:source [
fhir:context [ fhir:v "a" ]               ] ) ;
              ( 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 "encountert2" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Encounter" ]                 ] )               ] [
fhir:context [ fhir:v "encountert2" ] ;
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/Encounter/" ]                 ] [
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 "Encounter" ]                 ] )               ] [
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/Encounter/' + encountert2.id" ]                 ] )               ] [
fhir:context [ fhir:v "encountert2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "partOf" ] ;
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/' + encountert.id" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "status" ] ;
                ( fhir:source [
fhir:context [ fhir:v "a" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "encountert2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "finished" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "class" ] ;
                ( fhir:source [
fhir:context [ fhir:v "a" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "encountert2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "class" ] ;
fhir:variable [ fhir:v "cl" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "a" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "cl" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "AMB" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "a" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "cl" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "ambulatory" ]                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "refpatient" ] ;
                ( fhir:source [
fhir:context [ fhir:v "a" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "encountert2" ] ;
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 "where" ] ;
                ( fhir:source [
fhir:context [ fhir:v "a" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists() or effectiveTime.high.exists()" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "effectiveTime" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "a" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "encountert2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
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 "where" ] ;
                ( fhir:source [
fhir:context [ fhir:v "a" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists().not() or effectiveTime.high.exists().not()" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "efft" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "a" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectivetime1" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "encountert2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Period" ]                     ] )                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "effectivetime1" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:variable [ fhir:v "start" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                       ] )                     ] ) ;
                    ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                      ( fhir:variable [ fhir:v "effectivetime1" ] [ fhir:v "start" ] )                     ] )                   ] )                 ] ) ;
fhir:documentation [ fhir:v "effectiveTime = time-stamp" ]               ] [
fhir:name [ fhir:v "loc" ] ;
                ( fhir:source [
fhir:context [ fhir:v "a" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]                   ] )                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "location" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Location" ]                   ] )                 ] [
fhir:context [ fhir:v "location" ] ;
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/Location/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Location/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "text" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "a" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "tx" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "dfs" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "tx" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "ref" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "description" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "ref.value" ]                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "Location" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "a" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "part" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "part" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "part" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "part" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                           ] )                         ] )                       ] [
fhir:name [ fhir:v "code" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "part" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/Dimissione/act" ]                           ] )                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "loc2" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "tim" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "encountert2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "location" ] ;
fhir:variable [ fhir:v "locat" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "time" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "tim" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "locat" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
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 "tim" ] [ fhir:v "period" ] )                       ] )                     ] [
fhir:name [ fhir:v "time" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "tim" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "locat" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Period" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "tim" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:variable [ fhir:v "start" ] ;
fhir:transform [ fhir:v "create" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                           ] )                         ] ) ;
                        ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                          ( fhir:variable [ fhir:v "tim" ] [ fhir:v "start" ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "partRole" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "participantRole" ] ;
fhir:variable [ fhir:v "partRole" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "identifier" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "root1" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "r" ]                             ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                             ] [
fhir:value [ fhir:v "uri" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "ext" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "ext" ]                             ] )                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "UUID" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "partRole" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "Location?identifier=" ]                               ] [
fhir:value [ fhir:v "ext" ]                               ] )                             ] )                           ] )                         ] [
fhir:name [ fhir:v "assigningAuthorityName" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "assigningAuthorityName" ] ;
fhir:variable [ fhir:v "s" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "assigner" ] ;
fhir:variable [ fhir:v "a" ]                           ] [
fhir:context [ fhir:v "a" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "s" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "r" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "idasi" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                               ] )                             ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "https://example/Location/" ]                               ] [
fhir:value [ fhir:v "uuid" ]                               ] )                             ] [
fhir:context [ fhir:v "locat" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "location" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]                               ] )                             ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Location/' + %location.id" ]                               ] )                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "code" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "location" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                         ] ) ;
fhir:documentation [ fhir:v "partRole.id -> location.identifier;" ]                       ] )                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "entryrel2" ] ;
                ( fhir:source [
fhir:context [ fhir:v "a" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entryrel2" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "POST" ]                   ] )                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                   ] )                 ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                   ] )                 ] [
fhir:context [ fhir:v "encountert2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reasonReference" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
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 "obs" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "entryrel2" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ]                     ] ) ;
                    ( 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 "obs" ]                     ] ) ;
                    ( 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/' + %encountert2.id" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "code" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "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 "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]                     ] ) ;
                    ( 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 "statusCode" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'active')" ]                     ] ) ;
                    ( 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 "registered" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "statusCode" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'aborted')" ]                     ] ) ;
                    ( 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 "cancelled" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "statusCode" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'suspended')" ]                     ] ) ;
                    ( 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 "partial" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "notpresent" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ]                     ] ) ;
                    ( 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 "value2" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectiveTime" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                       ] )                     ] ) ;
                    ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                      ( fhir:variable [ fhir:v "effectiveTime" ] [ fhir:v "value" ] )                     ] )                   ] [
fhir:name [ fhir:v "where" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists() or effectiveTime.high.exists()" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "effectiveTime" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Period" ]                         ] )                       ] ) ;
                      ( fhir:dependent [
fhir:name [ fhir:v "IVLTSPeriod" ] ;
                        ( fhir:variable [ fhir:v "eff" ] [ fhir:v "period" ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "value" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "INT" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "int" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "int.value" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "boolean" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "BL" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "boolean" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "boolean.value" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "val" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "CE" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "val" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "originltext" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "originalText" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "originalText" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reference" ]                           ] ) ;
                          ( 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 "reference" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "code" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "code" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystem" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "system" ]                             ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                             ] [
fhir:value [ fhir:v "uri" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "displayName" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "display" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "version" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "translation" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "translation" ] ;
fhir:variable [ fhir:v "translation" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "code" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystem" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "system" ]                             ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                             ] [
fhir:value [ fhir:v "uri" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "displayName" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "display" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "version" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "qualifier" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "qualifier" ] ;
fhir:variable [ fhir:v "qualifier" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "qualifier" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "code" ]                                 ] [
fhir:value [ fhir:v "string" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "codeSystem" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "system" ]                                 ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                                 ] [
fhir:value [ fhir:v "uri" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "displayName" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "display" ]                                 ] [
fhir:value [ fhir:v "string" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "version" ]                                 ] [
fhir:value [ fhir:v "string" ]                                 ] )                               ] )                             ] )                           ] )                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "val" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "CD" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "val" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "originltext" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "originalText" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "originalText" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reference" ]                           ] ) ;
                          ( 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 "reference" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "code" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "code" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystem" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "system" ]                             ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                             ] [
fhir:value [ fhir:v "uri" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "displayName" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "display" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "version" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "translation" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "translation" ] ;
fhir:variable [ fhir:v "translation" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "code" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystem" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "system" ]                             ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                             ] [
fhir:value [ fhir:v "uri" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "displayName" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "display" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "version" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "qualifier" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "qualifier" ] ;
fhir:variable [ fhir:v "qualifier" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "qualifier" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "code" ]                                 ] [
fhir:value [ fhir:v "string" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "codeSystem" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "system" ]                                 ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                                 ] [
fhir:value [ fhir:v "uri" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "displayName" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "display" ]                                 ] [
fhir:value [ fhir:v "string" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "version" ]                                 ] [
fhir:value [ fhir:v "string" ]                                 ] )                               ] )                             ] )                           ] )                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "valueQuantity" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "PQ" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "quantity" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "val" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "quantity" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Quantity" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
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 "val" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:variable [ fhir:v "unit" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "copy" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "unit" ]                           ] )                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "value" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "ST" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "string" ]                       ] )                     ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "value.dataString" ]                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] ) ;
fhir:documentation [ fhir:v "Trasferimento post dimissione-------------------------------------------------------------------------------------------------------------------------------------" ]         ] [
fhir:name [ fhir:v "entryrel2" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entryrel2" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "obs" ] ;
            ( fhir:source [
fhir:context [ fhir:v "entryrel2" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "222" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '29308-4')" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]               ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                 ] )               ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "POST" ]                 ] )               ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                 ] )               ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]               ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]                 ] [
fhir:value [ fhir:v "uuid1" ]                 ] )               ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                 ] )               ] [
fhir:context [ fhir:v "encountert" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reasonReference" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]                 ] )               ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "'https://example/Observation/' + %observation.id" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ]                 ] ) ;
                ( 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 "obs" ]                 ] ) ;
                ( 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/' + %encountert.id" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "code" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "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 "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]                 ] ) ;
                ( 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 "statusCode" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'active')" ]                 ] ) ;
                ( 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 "registered" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "statusCode" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'aborted')" ]                 ] ) ;
                ( 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 "cancelled" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "statusCode" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'suspended')" ]                 ] ) ;
                ( 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 "partial" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "status" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ]                 ] ) ;
                ( 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:documentation [ fhir:v "obs where obs.statusCode.exists().not() then {" ]               ] [
fhir:name [ fhir:v "value2" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectiveTime" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                   ] )                 ] ) ;
                ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                  ( fhir:variable [ fhir:v "effectiveTime" ] [ fhir:v "value" ] )                 ] ) ;
fhir:documentation [ fhir:v "}\"statuscode\";" ]               ] [
fhir:name [ fhir:v "where" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists() or effectiveTime.high.exists()" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "effectiveTime" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Period" ]                     ] )                   ] ) ;
                  ( fhir:dependent [
fhir:name [ fhir:v "IVLTSPeriod" ] ;
                    ( fhir:variable [ fhir:v "eff" ] [ fhir:v "period" ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "val" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "val" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]                     ] )                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "originltext" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "originalText" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "originalText" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reference" ]                       ] ) ;
                      ( 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 "reference" ]                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "code" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "val" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "code" ]                         ] [
fhir:value [ fhir:v "string" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "codeSystem" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "system" ]                         ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                         ] [
fhir:value [ fhir:v "uri" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "displayName" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "display" ]                         ] [
fhir:value [ fhir:v "string" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "version" ]                         ] [
fhir:value [ fhir:v "string" ]                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "translation" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "translation" ] ;
fhir:variable [ fhir:v "translation" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "code" ]                         ] [
fhir:value [ fhir:v "string" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "codeSystem" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "system" ]                         ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                         ] [
fhir:value [ fhir:v "uri" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "displayName" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "display" ]                         ] [
fhir:value [ fhir:v "string" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "version" ]                         ] [
fhir:value [ fhir:v "string" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "qualifier" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "qualifier" ] ;
fhir:variable [ fhir:v "qualifier" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "qualifier" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "code" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystem" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "system" ]                             ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                             ] [
fhir:value [ fhir:v "uri" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "displayName" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "display" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "version" ]                             ] [
fhir:value [ fhir:v "string" ]                             ] )                           ] )                         ] )                       ] )                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "value" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "INT" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "int" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "int.value" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "boolean" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "BL" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "boolean" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "boolean.value" ]                   ] )                 ] )               ] [
fhir:name [ fhir:v "valueQuantity" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "PQ" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "quantity" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "val" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "quantity" ] ;
fhir:transform [ fhir:v "create" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Quantity" ]                     ] )                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
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 "val" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:variable [ fhir:v "unit" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "copy" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "unit" ]                       ] )                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "value" ] ;
                ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "ST" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "string" ]                   ] )                 ] [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "value.dataString" ]                   ] )                 ] )               ] )             ] )           ] ) ;
fhir:documentation [ fhir:v "--------------Diagnosi alla dimissione-------------------------------------------------------------" ]         ] [
fhir:name [ fhir:v "3" ] ;
          ( fhir:source [
fhir:context [ fhir:v "act" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entriRel3" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "x" ] ;
            ( fhir:source [
fhir:context [ fhir:v "entriRel3" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs2" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "act" ] ;
              ( fhir:source [
fhir:context [ fhir:v "obs2" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "entry-obs1" ] ;
                ( fhir:source [
fhir:context [ fhir:v "code" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code.code = '11302-7')" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "hospital" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "obs2" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "encountert" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "hospitalization" ] ;
fhir:variable [ fhir:v "hospital" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs2" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "vvv" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "hospital" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "dischargeDisposition" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                     ] )                   ] )                 ] )               ] )             ] )           ] ) ;
fhir:documentation [ fhir:v "--------Esito----------------------------" ]         ] )       ] )     ] [
fhir:name [ fhir:v "entry" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry1" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "obs" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "obstarg" ] ;
          ( fhir:source [
fhir:context [ fhir:v "obs" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "POST" ]             ] )           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]             ] )           ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]             ] )           ] [
fhir:context [ fhir:v "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 "value" ] ;
            ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ] ;
fhir:condition [ fhir:v "('xsi:type' = 'BL')" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "val.value" ]               ] )             ] )           ] [
fhir:name [ fhir:v "act" ] ;
            ( fhir:source [
fhir:context [ fhir:v "obs" ]             ] ) ;
            ( fhir:dependent [
fhir:name [ fhir:v "Observation" ] ;
              ( fhir:variable [ fhir:v "obs" ] [ fhir:v "patient" ] [ fhir:v "enc" ] [ fhir:v "observation" ] [ fhir:v "bundle" ] )             ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "ClinicalDocumentSectionTerapiaFarmacologicaDimissione" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "-----------------------------------------------------------------------------------------------------------------------\r\n------------------------------TerapiaFarmacologicaDimissione-----------------------------------------------------------------------------------------" ] ;
    ( 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 "text" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "src.entry.exists().not()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "note" ] ;
        ( 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 "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 "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 "e1" ] ;
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: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 "medRq" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "note" ] ;
fhir:variable [ fhir:v "note" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Annotation" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
          ( fhir:source [
fhir:context [ fhir:v "cdaText" ]           ] ) ;
          ( 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 "cdaText" ]             ] )           ] )         ] [
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 "auth" ] ;
          ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "auth" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]             ] )           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]             ] )           ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "time" ] ;
            ( fhir:source [
fhir:context [ fhir:v "auth" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "t" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]               ] )             ] ) ;
            ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
              ( fhir:variable [ fhir:v "t" ] [ fhir:v "value" ] )             ] )           ] [
fhir:name [ fhir:v "assAuth" ] ;
            ( fhir:source [
fhir:context [ fhir:v "auth" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assAuth" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assAuth" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assAuth" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assAuth" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assAuth" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/TerapiaFarmacologicaDimissione/author" ]                     ] )                   ] )                 ] )               ] ) ;
fhir:documentation [ fhir:v "assAuth.time -> note.time;" ]             ] [
fhir:name [ fhir:v "identifier" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assAuth" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                     ] )                   ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assAuth" ] ;
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')" ]               ] ) ;
              ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                   ] [
fhir:value [ fhir:v "ext" ]                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "assPers" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assAuth" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "asspers" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                ( fhir:source [
fhir:context [ fhir:v "asspers" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                 ] )               ] )             ] )           ] )         ] [
fhir:name [ fhir:v "medicationesiste" ] ;
          ( fhir:source [
fhir:context [ fhir:v "src" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "medRq" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "medication" ] ;
fhir:variable [ fhir:v "medication" ] ;
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:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "txt" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "medication" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "txt" ]               ] )             ] )           ] )         ] )       ] ) ;
fhir:documentation [ fhir:v "Sezione Narrativa------------------------------------------------------------------------------------------------------------------------------------------------" ]     ] [
fhir:name [ fhir:v "sezioneesiste" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "src.entry.exists()" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "medication" ] ;
        ( 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 "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 "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 "e1" ] ;
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: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 "medRq" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "note" ] ;
fhir:variable [ fhir:v "note" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Annotation" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
          ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ 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 "reference" ] ;
          ( fhir:source [
fhir:context [ fhir:v "src" ]           ] ) ;
          ( 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 "src" ]           ] ) ;
          ( 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 "src" ]           ] ) ;
          ( 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 "src" ]           ] ) ;
          ( 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 "auth" ] ;
          ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "auth" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]             ] )           ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]             ] )           ] [
fhir:context [ fhir:v "practitioner" ] ;
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/Practitioner/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]             ] [
fhir:value [ fhir:v "uuid1" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "time" ] ;
            ( fhir:source [
fhir:context [ fhir:v "auth" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "t" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]               ] )             ] ) ;
            ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
              ( fhir:variable [ fhir:v "t" ] [ fhir:v "value" ] )             ] )           ] [
fhir:name [ fhir:v "assAuth" ] ;
            ( fhir:source [
fhir:context [ fhir:v "auth" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assAuth" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assAuth" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assAuth" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assAuth" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                     ] )                   ] )                 ] [
fhir:name [ fhir:v "code" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assAuth" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/TerapiaFarmacologicaDimissione/author" ]                     ] )                   ] )                 ] )               ] ) ;
fhir:documentation [ fhir:v "assAuth.time -> note.time;" ]             ] [
fhir:name [ fhir:v "identifier" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assAuth" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                     ] )                   ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                     ] [
fhir:value [ fhir:v "uuid2" ]                     ] )                   ] [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assAuth" ] ;
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')" ]               ] ) ;
              ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                   ] [
fhir:value [ fhir:v "ext" ]                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "assPers" ] ;
              ( fhir:source [
fhir:context [ fhir:v "assAuth" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "asspers" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                ( fhir:source [
fhir:context [ fhir:v "asspers" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
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 "entry" ] ;
fhir:variable [ fhir:v "entry1" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "sub" ] ;
            ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "substanceAdministration" ] ;
fhir:variable [ fhir:v "sub" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "statusCode" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "vvv" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "medRq" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]               ] )             ] [
fhir:name [ fhir:v "dosage" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sub" ]               ] ) ;
              ( 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 "sub" ]                 ] ) ;
                ( 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 "sub" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]                   ] ) ;
                  ( 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 "eff" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:type [ fhir:v "PIVL_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 "cod" ] ;
                ( fhir:source [
fhir:context [ fhir:v "eff" ]                 ] ) ;
                ( 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:dependent [
fhir:name [ fhir:v "periodTiming" ] ;
                  ( fhir:variable [ fhir:v "eff" ] [ fhir:v "timing" ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "dosage" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sub" ]               ] ) ;
              ( 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 "routeCode" ] ;
                ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "routeCode" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "dosage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "route" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "dosage" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sub" ]               ] ) ;
              ( 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 "approachSiteCode" ] ;
                ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "approachSiteCode" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "dosage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "site" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "doseQuant" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "doseQuantity" ] ;
fhir:variable [ fhir:v "doseQuant" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "Dosage" ] ;
                ( fhir:source [
fhir:context [ fhir:v "doseQuant" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "medRq" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "dosageInstruction" ] ;
fhir:variable [ fhir:v "dosageInstruction" ] ;
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 "dosageInstruction" ] ;
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 "dosageInstruction" ] ;
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 "dosageRate" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "rateQuantity" ] ;
fhir:variable [ fhir:v "rateQuantity" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "medRq" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "dosageInstruction" ] ;
fhir:variable [ fhir:v "dosageInstruction1" ] ;
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 "rateQuantity" ] ;
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 "dosageInstruction1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "qualcosa" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "rateQuantity" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "dosageInstruction1" ] ;
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 "rateQuantity" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "dosageRate" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "rate" ] ;
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 "rateQuantity" ]                         ] ) ;
                        ( 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 "rateQuantity" ] ;
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 "rateQuantity" ] ;
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 "rateQuantity" ]                         ] ) ;
                        ( 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 "rateQuantity" ] ;
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 "rateQuantity" ] ;
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 "admnistrationUnicode" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sub" ]               ] ) ;
              ( 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 "administrationUnitCode" ] ;
                ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "administrationUnitCode" ] ;
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 "cons" ] ;
                ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
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 "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 "entryR" ] ;
                ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entryR" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "obs" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "entryR" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "observation" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "ingredient" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "displayName = 'Grammatura'" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "medication" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "ingredient" ] ;
fhir:variable [ fhir:v "ingredient" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "consumable" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "consumable" ] ;
fhir:variable [ fhir:v "consumable" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "product" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "consumable" ] ;
fhir:element [ fhir:v "manufacturedProduct" ] ;
fhir:variable [ fhir:v "manufacturedProduct" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "material" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "manufacturedProduct" ] ;
fhir:element [ fhir:v "manufacturedMaterial" ] ;
fhir:variable [ fhir:v "manufacturedMaterial" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "CE" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "manufacturedMaterial" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "ingredient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "value" ] ;
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 "value" ] )                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "strenght" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "ingredient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "strength" ] ;
fhir:variable [ fhir:v "strength" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "numerator" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "value" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "strength" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "numerator" ] ;
fhir:variable [ fhir:v "numerator" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "valueN" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "value" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "numerator" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "value.value" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "denominator" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "value" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "strength" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "denominator" ] ;
fhir:variable [ fhir:v "denominator" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "valueD" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "value" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "denominator" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "1"^^xsd:integer ]                             ] )                           ] )                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "quantita" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "displayName = 'Quantità nella Confezione'" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "amount" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "medication" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "amount" ] ;
fhir:variable [ fhir:v "amount" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "numerator" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "value" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "amount" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "numerator" ] ;
fhir:variable [ fhir:v "numerator" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "valueN" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "value" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "numerator" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "value.value" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "denominator" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "value" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "amount" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "denominator" ] ;
fhir:variable [ fhir:v "denominator" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "valueD" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "value" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "denominator" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "1"^^xsd:integer ]                             ] )                           ] )                         ] )                       ] )                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "participant" ] ;
                ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "part" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]                   ] )                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "participant" ] ;
fhir:transform [ fhir:v "create" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                   ] )                 ] [
fhir:context [ fhir:v "participant" ] ;
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/Participant/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                  ( fhir:parameter [
fhir:value [ fhir:v "Participant/" ]                   ] [
fhir:value [ fhir:v "uuid1" ]                   ] )                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "authoredOn" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "t" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "medRq" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "authoredOn" ] ;
fhir:variable [ fhir:v "date" ] ;
fhir:transform [ fhir:v "create" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                     ] )                   ] ) ;
                  ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                    ( fhir:variable [ fhir:v "t" ] [ fhir:v "date" ] )                   ] )                 ] [
fhir:name [ fhir:v "partRole" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "part" ] ;
fhir:element [ fhir:v "participantRole" ] ;
fhir:variable [ fhir:v "partRole" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "partRole" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "participant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "partRole" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "partRole" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                           ] )                         ] )                       ] [
fhir:name [ fhir:v "code" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "partRole" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/TerapiaFarmacologicaDimissione/participant" ]                           ] )                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "identifier" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "participant" ] ;
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 "r" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "participant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                           ] )                         ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                           ] [
fhir:value [ fhir:v "uuid2" ]                           ] )                         ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                           ] [
fhir:value [ fhir:v "uuid2" ]                           ] )                         ] [
fhir:context [ fhir:v "medRq" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "requester" ] ;
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/Practitioner/' + %participant.id" ]                           ] )                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
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')" ]                     ] ) ;
                    ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                         ] [
fhir:value [ fhir:v "ext" ]                         ] )                       ] )                     ] )                   ] [
fhir:name [ fhir:v "playent" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "partRole" ] ;
fhir:element [ fhir:v "playingEntity" ] ;
fhir:variable [ fhir:v "playent" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "playent" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "participant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                       ] )                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "ref" ] ;
                ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "ref" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "external" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "ref" ] ;
fhir:element [ fhir:v "externalAct" ] ;
fhir:variable [ fhir:v "external" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "id" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "external" ] ;
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 "med" ] ;
                ( fhir:source [
fhir:context [ fhir:v "sub" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entryRelationship" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "sub" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "entryRelationship" ] ;
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:documentation [ fhir:v "Sezione Strutturata------------------------------------------------------------------------------------------------------------------------------------------" ]     ] )
  ] [
fhir:name [ fhir:v "ModalitadiTrasposto" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "-----------------------------------------------------------------------------------------------------------------------\r\n______1._____________Sections________________________" ] ;
    ( fhir:input [
fhir:name [ fhir:v "cda" ] ;
fhir:type [ fhir:v "ClinicalDocument" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "Section" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "tgt" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "enc" ] ;
fhir:type [ fhir:v "Encounter" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "title" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:variable [ fhir:v "t" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "t.dataString" ]         ] )       ] )     ] [
fhir:name [ fhir:v "code" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] )     ] [
fhir:name [ fhir:v "cdaText" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "fhirText" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "narrativeStatus" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "generated" ]           ] )         ] )       ] [
fhir:name [ fhir:v "narrativeText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cdaText" ] ;
fhir:variable [ fhir:v "t" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "div" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "t" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "entry" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry1" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "entry1" ] ;
        ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry1" ]         ] ) ;
        ( 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/Encounter/' + %enc.id" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "act" ] ;
          ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "act" ] ;
fhir:variable [ fhir:v "act1" ]           ] ) ;
          ( fhir:dependent [
fhir:name [ fhir:v "Act" ] ;
            ( fhir:variable [ fhir:v "act1" ] [ fhir:v "patient" ] [ fhir:v "enc" ] [ fhir:v "bundle" ] )           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "MotivoDellaVisita" ] ;
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:rule [
fhir:name [ fhir:v "title" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:variable [ fhir:v "t" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "t.dataString" ]         ] )       ] )     ] [
fhir:name [ fhir:v "code" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] )     ] [
fhir:name [ fhir:v "cdaText" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "fhirText" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "narrativeStatus" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "generated" ]           ] )         ] )       ] [
fhir:name [ fhir:v "narrativeText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cdaText" ] ;
fhir:variable [ fhir:v "t" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "div" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "t" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "entry" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry" ]       ] ) ;
      ( 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 "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 "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/Observation/" ]         ] [
fhir:value [ fhir:v "uuid2" ]         ] )       ] [
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 "observation" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]         ] ) ;
        ( fhir:dependent [
fhir:name [ fhir:v "Observation" ] ;
          ( fhir:variable [ fhir:v "obs" ] [ fhir:v "patient" ] [ fhir:v "enc" ] [ fhir:v "observation" ] [ fhir:v "bundle" ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "Triage" ] ;
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:rule [
fhir:name [ fhir:v "title" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:variable [ fhir:v "t" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "t.dataString" ]         ] )       ] )     ] [
fhir:name [ fhir:v "code" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] )     ] [
fhir:name [ fhir:v "cdaText" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "fhirText" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "narrativeStatus" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cdaText" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "generated" ]           ] )         ] )       ] [
fhir:name [ fhir:v "narrativeText" ] ;
        ( fhir:source [
fhir:context [ fhir:v "cdaText" ] ;
fhir:variable [ fhir:v "t" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "fhirText" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "div" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "t" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "entry" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry" ]       ] ) ;
      ( 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 "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 "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/Observation/" ]         ] [
fhir:value [ fhir:v "uuid2" ]         ] )       ] [
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 "observation" ] ;
        ( fhir:source [
fhir:context [ fhir:v "entry" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]         ] ) ;
        ( fhir:dependent [
fhir:name [ fhir:v "Observation" ] ;
          ( fhir:variable [ fhir:v "obs" ] [ fhir:v "patient" ] [ fhir:v "enc" ] [ fhir:v "observation" ] [ fhir:v "bundle" ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "InquadramentoClinicoIniziale" ] ;
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:rule [
fhir:name [ fhir:v "title" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:variable [ fhir:v "t" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "t.dataString" ]         ] )       ] )     ] [
fhir:name [ fhir:v "code" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] )     ] [
fhir:name [ fhir:v "cdaText" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "POST" ]         ] )       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]         ] )       ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]       ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]         ] [
fhir:value [ fhir:v "uuid1" ]         ] )       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]         ] )       ] [
fhir:context [ fhir:v "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: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 "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 "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 "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 "Author" ] ;
          ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "author" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "practitioner" ] ;
            ( fhir:source [
fhir:context [ fhir:v "author" ]             ] ) ;
            ( 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 "PUT" ]               ] )             ] [
fhir:context [ fhir:v "e2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]               ] )             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "assignedAuthor" ] ;
              ( fhir:source [
fhir:context [ fhir:v "author" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assignedAuthor" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                     ] )                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                       ] )                     ] )                   ] [
fhir:name [ fhir:v "code" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/InquadramentoClinicoIniziale/author" ]                       ] )                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "identifier" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                       ] )                     ] [
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/Practitioner/" ]                       ] [
fhir:value [ fhir:v "uuid2" ]                       ] )                     ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                       ] [
fhir:value [ fhir:v "uuid2" ]                       ] )                     ] [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                       ] )                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
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')" ]                 ] ) ;
                ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                     ] [
fhir:value [ fhir:v "ext" ]                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "name" ] ;
                ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "person" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "person" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "time" ] ;
            ( fhir:source [
fhir:context [ fhir:v "author" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "t" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]               ] )             ] ) ;
            ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
              ( fhir:variable [ fhir:v "t" ] [ fhir:v "value" ] )             ] )           ] )         ] [
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 "component" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "component" ] ;
fhir:variable [ fhir:v "component" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "Sottosection" ] ;
        ( fhir:source [
fhir:context [ fhir:v "component" ] ;
fhir:element [ fhir:v "section" ] ;
fhir:variable [ fhir:v "sottosection" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "Sectionfhir" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sottosection" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "section" ] ;
fhir:variable [ fhir:v "section" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:condition [ fhir:v "(code = '11329-0')" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "section" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]             ] ) ;
fhir:documentation [ fhir:v "1. Anamnesi Narrativa-------------------------------------------------------------------------------------------------------------------------------------------" ]           ] [
fhir:name [ fhir:v "11329-0" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code1" ] ;
fhir:condition [ fhir:v "(code = '11329-0')" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "where" ] ;
              ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "sottosection.entry.exists().not()" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "title" ] ;
                ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:variable [ fhir:v "t" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "section" ] ;
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 "cdaText" ] ;
                ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
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 "section" ] ;
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 "cdaText" ]                   ] ) ;
                  ( 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 "cdaText" ]                   ] ) ;
                  ( 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 "sottosection" ] ;
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 "author" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "authors" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "timeAuthor" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "time" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                         ] )                       ] ) ;
                      ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                        ( fhir:variable [ fhir:v "time" ] [ fhir:v "value" ] )                       ] )                     ] [
fhir:name [ fhir:v "assighedAuthor" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assignedAuthor" ]                       ] ) ;
                      ( 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 "PUT" ]                         ] )                       ] [
fhir:context [ fhir:v "e9" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                             ] )                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                               ] )                             ] )                           ] [
fhir:name [ fhir:v "code" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/EsameObiettivo/author" ]                               ] )                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "identifier" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "autore" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid9" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                               ] )                             ] [
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/Practitioner/" ]                               ] [
fhir:value [ fhir:v "uuid9" ]                               ] )                             ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                               ] [
fhir:value [ fhir:v "uuid9" ]                               ] )                             ] [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                               ] )                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
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')" ]                         ] ) ;
                        ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                             ] [
fhir:value [ fhir:v "ext" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "assignedPerson" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "person" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "person" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                           ] )                         ] )                       ] )                     ] )                   ] )                 ] )               ] )             ] [
fhir:name [ fhir:v "subsection1" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry1" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "entryobservation1" ] ;
                ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obs" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "89261-2" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '75326-9')" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "condition" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "obs" ]                     ] ) ;
                    ( 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 "condition" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Condition" ]                       ] )                     ] [
fhir:context [ fhir:v "condition" ] ;
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/Condition/" ]                       ] [
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 "Condition" ]                       ] )                     ] [
fhir:context [ fhir:v "section" ] ;
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/Condition/' + %condition.id" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "category" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                       ] )                     ] [
fhir:name [ fhir:v "reference" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "obs" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
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 "obs" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
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 "obs" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "status" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "verificationStatus" ] ;
fhir:variable [ fhir:v "status2" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "st3" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "status" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "status2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "status3" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "finald" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "status" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "status3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "confirmed" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "system" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "status" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "status3" ] ;
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/condition-ver-status" ]                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "cdaText1" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText1" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
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 "cdaText1" ] ;
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 "author" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "authors" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "timeAuthor" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "time" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                             ] )                           ] ) ;
                          ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                            ( fhir:variable [ fhir:v "time" ] [ fhir:v "value" ] )                           ] )                         ] [
fhir:name [ fhir:v "assighedAuthor" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assignedAuthor" ]                           ] ) ;
                          ( fhir:target [
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 "PUT" ]                             ] )                           ] [
fhir:context [ fhir:v "e5" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                             ] )                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                                 ] )                               ] ) ;
                              ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                                 ] ) ;
                                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                                   ] )                                 ] )                               ] [
fhir:name [ fhir:v "code" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                                 ] ) ;
                                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/Anamnesi/author" ]                                   ] )                                 ] )                               ] )                             ] )                           ] [
fhir:name [ fhir:v "identifier" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                               ] ) ;
                              ( fhir:rule [
fhir:name [ fhir:v "extension" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                                 ] ) ;
                                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid5" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                                   ] )                                 ] [
fhir:context [ fhir:v "e5" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                                   ] [
fhir:value [ fhir:v "uuid5" ]                                   ] )                                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                                   ] [
fhir:value [ fhir:v "uuid5" ]                                   ] )                                 ] [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                                   ] )                                 ] )                               ] )                             ] )                           ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
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')" ]                             ] ) ;
                            ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                                 ] [
fhir:value [ fhir:v "ext" ]                                 ] )                               ] )                             ] )                           ] [
fhir:name [ fhir:v "assignedPerson" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "person" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "person" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                               ] )                             ] )                           ] )                         ] )                       ] ) ;
fhir:documentation [ fhir:v "blocco Narrativo" ]                     ] [
fhir:name [ fhir:v "effectivetime1" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effective1" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "ef" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "effective1" ] ;
fhir:condition [ fhir:v "effective1.low.exists() or effective1.high.exists()" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "onsetperiod" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "effective1" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "onset" ] ;
fhir:variable [ fhir:v "periodonset" ] ;
fhir:transform [ fhir:v "create" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Period" ]                             ] )                           ] ) ;
                          ( fhir:dependent [
fhir:name [ fhir:v "IVLTSPeriod" ] ;
                            ( fhir:variable [ fhir:v "effective1" ] [ fhir:v "periodonset" ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "onsetDateTime" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectiveTime" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "onset" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                         ] )                       ] ) ;
                      ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                        ( fhir:variable [ fhir:v "effectiveTime" ] [ fhir:v "value" ] )                       ] )                     ] [
fhir:name [ fhir:v "value" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "INT" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "int" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "int.value" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "boolean" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "BL" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "boolean" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "boolean.value" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "value" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "ST" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "string" ]                         ] )                       ] [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "value.dataString" ]                         ] )                       ] )                     ] [
fhir:name [ fhir:v "val" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "CE" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]                           ] )                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "originltext" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "originalText" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "originalText" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reference" ]                             ] ) ;
                            ( 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 "reference" ]                               ] )                             ] )                           ] )                         ] [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "code" ]                               ] [
fhir:value [ fhir:v "string" ]                               ] )                             ] )                           ] [
fhir:name [ fhir:v "codeSystem" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "system" ]                               ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                               ] [
fhir:value [ fhir:v "uri" ]                               ] )                             ] )                           ] [
fhir:name [ fhir:v "displayName" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "display" ]                               ] [
fhir:value [ fhir:v "string" ]                               ] )                             ] )                           ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "version" ]                               ] [
fhir:value [ fhir:v "string" ]                               ] )                             ] )                           ] )                         ] [
fhir:name [ fhir:v "translation" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "translation" ] ;
fhir:variable [ fhir:v "translation" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "code" ]                               ] [
fhir:value [ fhir:v "string" ]                               ] )                             ] )                           ] [
fhir:name [ fhir:v "codeSystem" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "system" ]                               ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                               ] [
fhir:value [ fhir:v "uri" ]                               ] )                             ] )                           ] [
fhir:name [ fhir:v "displayName" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "display" ]                               ] [
fhir:value [ fhir:v "string" ]                               ] )                             ] )                           ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "version" ]                               ] [
fhir:value [ fhir:v "string" ]                               ] )                             ] )                           ] [
fhir:name [ fhir:v "qualifier" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "translation" ] ;
fhir:element [ fhir:v "qualifier" ] ;
fhir:variable [ fhir:v "qualifier" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "qualifier" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                               ] ) ;
                              ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                                 ] ) ;
                                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "code" ]                                   ] [
fhir:value [ fhir:v "string" ]                                   ] )                                 ] )                               ] [
fhir:name [ fhir:v "codeSystem" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                                 ] ) ;
                                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "system" ]                                   ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                                   ] [
fhir:value [ fhir:v "uri" ]                                   ] )                                 ] )                               ] [
fhir:name [ fhir:v "displayName" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                                 ] ) ;
                                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "display" ]                                   ] [
fhir:value [ fhir:v "string" ]                                   ] )                                 ] )                               ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]                                 ] ) ;
                                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "version" ]                                   ] [
fhir:value [ fhir:v "string" ]                                   ] )                                 ] )                               ] )                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "Value" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:type [ fhir:v "CD" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "Ce" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "val" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]                           ] )                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "originalText" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "vvv" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                           ] )                         ] [
fhir:name [ fhir:v "coding" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "val" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "code" ]                               ] [
fhir:value [ fhir:v "string" ]                               ] )                             ] )                           ] [
fhir:name [ fhir:v "codeSystem" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "system" ]                               ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                               ] [
fhir:value [ fhir:v "uri" ]                               ] )                             ] )                           ] [
fhir:name [ fhir:v "displayName" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "display" ]                               ] [
fhir:value [ fhir:v "string" ]                               ] )                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "EntryRelationship1" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entriRel" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "evidence" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "entriRel" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "evidence" ] ;
fhir:variable [ fhir:v "evidence" ] ;
fhir:transform [ fhir:v "create" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                           ] )                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "Observation2" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "entriRel" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "observation2" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "whereDecorsoClinico" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "code" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code.code = '89261-2')" ]                               ] ) ;
                              ( fhir:rule [
fhir:name [ fhir:v "obser" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "obs" ]                                 ] ) ;
                                ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e1" ]                                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                                   ] )                                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "POST" ]                                   ] )                                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "observation" ] ;
fhir:transform [ fhir:v "create" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                                   ] )                                 ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid1" ] ;
fhir:transform [ fhir:v "uuid" ]                                 ] [
fhir:context [ fhir:v "e1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "https://example/Observation/" ]                                   ] [
fhir:value [ fhir:v "uuid1" ]                                   ] )                                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "Observation" ]                                   ] )                                 ] ) ;
                                ( fhir:rule [
fhir:name [ fhir:v "ref" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "entriRel" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "evidence" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "detail" ] ;
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:name [ fhir:v "code" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
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 "observation2" ] ;
fhir:condition [ fhir:v "observation.statusCode.exists().not()" ]                                   ] ) ;
                                  ( fhir:rule [
fhir:name [ fhir:v "status" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "observation2" ]                                     ] ) ;
                                    ( 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 "Annontation" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "text" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "note" ] ;
fhir:variable [ fhir:v "note" ] ;
fhir:transform [ fhir:v "create" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "Annotation" ]                                     ] )                                   ] ) ;
                                  ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "text" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "ref" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                                      ( fhir:parameter [
fhir:value [ fhir:v "ref.value" ]                                       ] )                                     ] )                                   ] )                                 ] [
fhir:name [ fhir:v "reference" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "obs" ]                                   ] ) ;
                                  ( 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 "obs" ]                                   ] ) ;
                                  ( 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 "statusCode" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'completed')" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "final" ]                                     ] )                                   ] )                                 ] [
fhir:name [ fhir:v "statusCode" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'active')" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "registered" ]                                     ] )                                   ] )                                 ] [
fhir:name [ fhir:v "statusCode" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'aborted')" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "cancelled" ]                                     ] )                                   ] )                                 ] [
fhir:name [ fhir:v "statusCode" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "statusc" ] ;
fhir:condition [ fhir:v "(code = 'suspended')" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "ob" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "partial" ]                                     ] )                                   ] )                                 ] [
fhir:name [ fhir:v "value" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:type [ fhir:v "INT" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "int" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "int.value" ]                                     ] )                                   ] )                                 ] [
fhir:name [ fhir:v "boolean" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:type [ fhir:v "BL" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "boolean" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "boolean.value" ]                                     ] )                                   ] )                                 ] [
fhir:name [ fhir:v "value" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:type [ fhir:v "ST" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "string" ]                                     ] )                                   ] [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "value.dataString" ]                                     ] )                                   ] )                                 ] [
fhir:name [ fhir:v "value2" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectiveTime" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                                     ] )                                   ] ) ;
                                  ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                                    ( fhir:variable [ fhir:v "effectiveTime" ] [ fhir:v "value" ] )                                   ] )                                 ] [
fhir:name [ fhir:v "where" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists() or effectiveTime.high.exists()" ]                                   ] ) ;
                                  ( fhir:rule [
fhir:name [ fhir:v "effectiveTime" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
                                      ( fhir:parameter [
fhir:value [ fhir:v "Period" ]                                       ] )                                     ] ) ;
                                    ( fhir:dependent [
fhir:name [ fhir:v "IVLTSPeriod" ] ;
                                      ( fhir:variable [ fhir:v "eff" ] [ fhir:v "period" ] )                                     ] )                                   ] )                                 ] [
fhir:name [ fhir:v "valueQuantity" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:type [ fhir:v "PQ" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]                                   ] ) ;
                                  ( fhir:rule [
fhir:name [ fhir:v "quantity" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "val" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "quantity" ] ;
fhir:transform [ fhir:v "create" ] ;
                                      ( fhir:parameter [
fhir:value [ fhir:v "Quantity" ]                                       ] )                                     ] ) ;
                                    ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                                      ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                                       ] ) ;
                                      ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
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 "val" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:variable [ fhir:v "unit" ]                                       ] ) ;
                                      ( fhir:target [
fhir:context [ fhir:v "quantity" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                        ( fhir:parameter [
fhir:value [ fhir:v "unit" ]                                         ] )                                       ] )                                     ] )                                   ] )                                 ] [
fhir:name [ fhir:v "Value" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:type [ fhir:v "CE" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "val" ]                                   ] ) ;
                                  ( fhir:rule [
fhir:name [ fhir:v "Ce" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "val" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "observation" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ce" ] ;
fhir:transform [ fhir:v "create" ] ;
                                      ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]                                       ] )                                     ] ) ;
                                    ( fhir:rule [
fhir:name [ fhir:v "originalText" ] ;
                                      ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "originalText" ] ;
fhir:variable [ fhir:v "vvv" ]                                       ] ) ;
                                      ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                                       ] )                                     ] [
fhir:name [ fhir:v "coding" ] ;
                                      ( fhir:source [
fhir:context [ fhir:v "val" ]                                       ] ) ;
                                      ( fhir:target [
fhir:context [ fhir:v "ce" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                                       ] ) ;
                                      ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                                        ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                                         ] ) ;
                                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                          ( fhir:parameter [
fhir:value [ fhir:v "code" ]                                           ] [
fhir:value [ fhir:v "string" ]                                           ] )                                         ] )                                       ] [
fhir:name [ fhir:v "codeSystem" ] ;
                                        ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                                         ] ) ;
                                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
                                          ( fhir:parameter [
fhir:value [ fhir:v "system" ]                                           ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]                                           ] [
fhir:value [ fhir:v "uri" ]                                           ] )                                         ] )                                       ] [
fhir:name [ fhir:v "displayName" ] ;
                                        ( fhir:source [
fhir:context [ fhir:v "val" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                                         ] ) ;
                                        ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                          ( fhir:parameter [
fhir:value [ fhir:v "display" ]                                           ] [
fhir:value [ fhir:v "string" ]                                           ] )                                         ] )                                       ] )                                     ] )                                   ] )                                 ] )                               ] )                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "entryrelationshipstatus" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "obs" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entriRel" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "observationstatus" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "entriRel" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "observation2" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "codestatus" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "whereDecorsoClinico" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "code" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code.code = '33999-4')" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "observation2" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
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 "textstat" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "text" ]                                 ] ) ;
                                ( fhir:rule [
fhir:name [ fhir:v "statref" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "text" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "refstat" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "status" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "refstat.value" ]                                     ] )                                   ] )                                 ] )                               ] [
fhir:name [ fhir:v "coding" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "observation2" ]                                 ] ) ;
                                ( 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 "value1" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "observation2" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                                   ] ) ;
                                  ( fhir:rule [
fhir:name [ fhir:v "active" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(value.code = 'LA16666-2')" ]                                     ] ) ;
                                    ( 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 "inactive" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(value.code = 'LA18632-2')" ]                                     ] ) ;
                                    ( 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 "inactive" ]                                       ] )                                     ] )                                   ] [
fhir:name [ fhir:v "system" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                      ( fhir:parameter [
fhir:value [ fhir:v "http://terminology.hl7.org/CodeSystem/condition-clinical" ]                                       ] )                                     ] )                                   ] [
fhir:name [ fhir:v "displayName" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                      ( fhir:parameter [
fhir:value [ fhir:v "display" ]                                       ] [
fhir:value [ fhir:v "string" ]                                       ] )                                     ] )                                   ] )                                 ] )                               ] )                             ] )                           ] )                         ] )                       ] )                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "observation1" ] ;
                ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "organizer" ] ;
fhir:variable [ fhir:v "organizer" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "10157-6" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "organizer" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '10157-6')" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "organizer" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "organizer" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e4" ]                     ] [
fhir:context [ fhir:v "e4" ] ;
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 "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "FamilyMemberHistory" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "FamilyMemberHistory" ]                       ] )                     ] [
fhir:context [ fhir:v "FamilyMemberHistory" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid5" ] ;
fhir:transform [ fhir:v "uuid" ]                     ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "https://example/FamilyMemberHistory/" ]                       ] [
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 "FamilyMemberHistory" ]                       ] )                     ] [
fhir:context [ fhir:v "section" ] ;
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/FamilyMemberHistory/' + %FamilyMemberHistory.id" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "effective" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "organizer" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effective" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "date" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "effective" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "eff" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "FamilyMemberHistory" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "date" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                           ] )                         ] ) ;
                        ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                          ( fhir:variable [ fhir:v "eff" ] [ fhir:v "value" ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "reference" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "organizer" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "FamilyMemberHistory" ] ;
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 "subject" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "organizer" ] ;
fhir:element [ fhir:v "subject" ] ;
fhir:variable [ fhir:v "subject" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "relatedSubject" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "subject" ] ;
fhir:element [ fhir:v "relatedSubject" ] ;
fhir:variable [ fhir:v "relatedSubject" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "relationship" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "relatedSubject" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "FamilyMemberHistory" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "relationship" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                           ] )                         ] [
fhir:name [ fhir:v "subject1" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "relatedSubject" ] ;
fhir:element [ fhir:v "subject" ] ;
fhir:variable [ fhir:v "subject" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "FamilyMemberHistory" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "sex" ] ;
fhir:variable [ fhir:v "sex" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "subject" ] ;
fhir:element [ fhir:v "administrativeGenderCode" ] ;
fhir:variable [ fhir:v "administrativeGenderCode" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "sex" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "gender" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "administrativeGenderCode" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "translate" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "code" ]                                 ] [
fhir:value [ fhir:v "#AdministrativeGender" ]                                 ] [
fhir:value [ fhir:v "code" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "system" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "administrativeGenderCode" ]                               ] ) ;
                              ( 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://hl7.org/fhir/administrative-gender" ]                                 ] )                               ] )                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "cdaText1" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText1" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "FamilyMemberHistory" ] ;
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 "cdaText1" ] ;
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 "author" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "authors" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "timeAuthor" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "time" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                             ] )                           ] ) ;
                          ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                            ( fhir:variable [ fhir:v "time" ] [ fhir:v "value" ] )                           ] )                         ] [
fhir:name [ fhir:v "assighedAuthor" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assignedAuthor" ]                           ] ) ;
                          ( 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 "PUT" ]                             ] )                           ] [
fhir:context [ fhir:v "e7" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                             ] )                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                                 ] )                               ] ) ;
                              ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                                 ] ) ;
                                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                                   ] )                                 ] )                               ] [
fhir:name [ fhir:v "code" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                                 ] ) ;
                                ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/Anamnesi/author" ]                                   ] )                                 ] )                               ] )                             ] )                           ] [
fhir:name [ fhir:v "identifier" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                               ] ) ;
                              ( fhir:rule [
fhir:name [ fhir:v "extension" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                                 ] ) ;
                                ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid7" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                                   ] )                                 ] [
fhir:context [ fhir:v "e7" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                                   ] [
fhir:value [ fhir:v "uuid7" ]                                   ] )                                 ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                                   ] [
fhir:value [ fhir:v "uuid7" ]                                   ] )                                 ] [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                                   ] )                                 ] )                               ] )                             ] )                           ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
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')" ]                             ] ) ;
                            ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                                 ] [
fhir:value [ fhir:v "ext" ]                                 ] )                               ] )                             ] )                           ] [
fhir:name [ fhir:v "assignedPerson" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "person" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "person" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                               ] )                             ] )                           ] )                         ] )                       ] ) ;
fhir:documentation [ fhir:v "blocco Narrativo" ]                     ] [
fhir:name [ fhir:v "component" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "organizer" ] ;
fhir:element [ fhir:v "component" ] ;
fhir:variable [ fhir:v "component" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "FamilyMemberHistory" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "condition" ] ;
fhir:variable [ fhir:v "condition" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "observationCondition" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "component" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "observation" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                           ] )                         ] [
fhir:name [ fhir:v "reference" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "text" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "FamilyMemberHistory" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "note" ] ;
fhir:variable [ fhir:v "note" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "text" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reference" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "reference.value" ]                               ] )                             ] )                           ] )                         ] [
fhir:name [ fhir:v "statusCode" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "statusCode" ] ;
fhir:variable [ fhir:v "vvv" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "FamilyMemberHistory" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                           ] )                         ] [
fhir:name [ fhir:v "codeable" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "vvv" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "outcome" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                           ] )                         ] [
fhir:name [ fhir:v "EntryRel" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entryRelationship" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "obser" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "entryRelationship" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "obsservation1" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "obsservation1" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                               ] ) ;
                              ( fhir:rule [
fhir:name [ fhir:v "insorgenza" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "code" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code.code = '35267-4')" ]                                 ] ) ;
                                ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "obsservation1" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "onset" ] ;
fhir:variable [ fhir:v "Age" ] ;
fhir:transform [ fhir:v "create" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "Age" ]                                     ] )                                   ] ) ;
                                  ( fhir:rule [
fhir:name [ fhir:v "age" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "valueAge" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "Age" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                      ( fhir:parameter [
fhir:value [ fhir:v "valueAge" ]                                       ] )                                     ] )                                   ] [
fhir:name [ fhir:v "unit" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:variable [ fhir:v "unit" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "Age" ] ;
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 "value" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:variable [ fhir:v "unit" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "Age" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                      ( fhir:parameter [
fhir:value [ fhir:v "unit" ]                                       ] )                                     ] )                                   ] [
fhir:name [ fhir:v "system" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "value" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "Age" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                      ( fhir:parameter [
fhir:value [ fhir:v "http://unitsofmeasure.org" ]                                       ] )                                     ] )                                   ] )                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "code" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "obsservation1" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]                               ] ) ;
                              ( fhir:rule [
fhir:name [ fhir:v "deceased" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "code" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code.code = '39016-1')" ]                                 ] ) ;
                                ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "obsservation1" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "FamilyMemberHistory" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "deceased" ] ;
fhir:variable [ fhir:v "Age" ] ;
fhir:transform [ fhir:v "create" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "Age" ]                                     ] )                                   ] ) ;
                                  ( fhir:rule [
fhir:name [ fhir:v "age" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "valueAge" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "Age" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                      ( fhir:parameter [
fhir:value [ fhir:v "valueAge" ]                                       ] )                                     ] )                                   ] [
fhir:name [ fhir:v "unit" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:variable [ fhir:v "unit" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "Age" ] ;
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 "value" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:variable [ fhir:v "unit" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "Age" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "unit" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                      ( fhir:parameter [
fhir:value [ fhir:v "unit" ]                                       ] )                                     ] )                                   ] [
fhir:name [ fhir:v "system" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "value" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "Age" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                      ( fhir:parameter [
fhir:value [ fhir:v "http://unitsofmeasure.org" ]                                       ] )                                     ] )                                   ] )                                 ] )                               ] )                             ] )                           ] )                         ] [
fhir:name [ fhir:v "cont" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:condition [ fhir:v "observation.effectiveTime.exists()" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "effttemp" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectiveTime" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "FamilyMemberHistory" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "condition" ] ;
fhir:variable [ fhir:v "condition" ] ;
fhir:transform [ fhir:v "create" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                               ] )                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "efft" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "effectiveTime" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "onset" ] ;
fhir:variable [ fhir:v "period" ] ;
fhir:transform [ fhir:v "create" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "Period" ]                                 ] )                               ] ) ;
                              ( fhir:rule [
fhir:name [ fhir:v "val" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "effectiveTime" ]                                 ] ) ;
                                ( fhir:target [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:variable [ fhir:v "start" ] ;
fhir:transform [ fhir:v "create" ] ;
                                  ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                                   ] )                                 ] ) ;
                                ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                                  ( fhir:variable [ fhir:v "effectiveTime" ] [ fhir:v "start" ] )                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "code" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                               ] )                             ] [
fhir:name [ fhir:v "codeable" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "observation" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "vvv" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "outcome" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                               ] )                             ] )                           ] )                         ] )                       ] )                     ] )                   ] )                 ] ) ;
fhir:documentation [ fhir:v "Anamnesi Familiare---------------------------------------------------------------------------------------------------------------------------------------------" ]               ] ) ;
fhir:documentation [ fhir:v "Anamnesi Strutturata-----------------------------------------------------------------------------------------------------------------------------------------" ]             ] )           ] [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:condition [ fhir:v "(code = '29545-1')" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "section" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]             ] ) ;
fhir:documentation [ fhir:v "2. Esame Obiettivo Narrativa-----------------------------------------------------------------------------------------------------------------------------------" ]           ] [
fhir:name [ fhir:v "condizioneesameObiettivo" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code1" ] ;
fhir:condition [ fhir:v "(code = '29545-1')" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "title" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:variable [ fhir:v "t" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "section" ] ;
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 "cdaText" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
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 "section" ] ;
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 "cdaText" ]                 ] ) ;
                ( 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 "cdaText" ]                 ] ) ;
                ( 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 "sottosection" ] ;
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 "sottosection" ] ;
fhir:condition [ fhir:v "observation.statusCode.exists().not()" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "status" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "sottosection" ]                   ] ) ;
                  ( 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 "author" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "authors" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "timeAuthor" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "time" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                       ] )                     ] ) ;
                    ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                      ( fhir:variable [ fhir:v "time" ] [ fhir:v "value" ] )                     ] )                   ] [
fhir:name [ fhir:v "assighedAuthor" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assignedAuthor" ]                     ] ) ;
                    ( 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 "PUT" ]                       ] )                     ] [
fhir:context [ fhir:v "e9" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                           ] )                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/EsameObiettivo/author" ]                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "identifier" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "autore" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid9" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                             ] )                           ] [
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/Practitioner/" ]                             ] [
fhir:value [ fhir:v "uuid9" ]                             ] )                           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                             ] [
fhir:value [ fhir:v "uuid9" ]                             ] )                           ] [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
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')" ]                       ] ) ;
                      ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                           ] [
fhir:value [ fhir:v "ext" ]                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "assignedPerson" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "person" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "person" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                         ] )                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:condition [ fhir:v "(code = '42346-7')" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "section" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]             ] ) ;
fhir:documentation [ fhir:v "3. Terapia Farmacologica all'ingresso Narrativa --------------------------------------------------------------------------------------------------------------" ]           ] [
fhir:name [ fhir:v "condizioneterapiaingresso" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code1" ] ;
fhir:condition [ fhir:v "(code = '42346-7')" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "title" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:variable [ fhir:v "t" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "section" ] ;
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 "cdaText" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
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 "e10" ]               ] [
fhir:context [ fhir:v "e10" ] ;
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 "e10" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "medicStatement" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "MedicationStatement" ]                 ] )               ] [
fhir:context [ fhir:v "medicStatement" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid10" ] ;
fhir:transform [ fhir:v "uuid" ]               ] [
fhir:context [ fhir:v "e10" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "https://example/MedicationStatement/" ]                 ] [
fhir:value [ fhir:v "uuid10" ]                 ] )               ] [
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 "MedicationStatement" ]                 ] )               ] [
fhir:context [ fhir:v "section" ] ;
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/MedicationStatement/' + %medicStatement.id" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                ( fhir:source [
fhir:context [ fhir:v "cdaText" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "medicStatement" ] ;
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 "statuscode" ] ;
                ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:condition [ fhir:v "medicStatement.statusCode.exists().not()" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "status" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "sottosection" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "medicStatement" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "completed" ]                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "medication" ] ;
                ( fhir:source [
fhir:context [ fhir:v "cdaText" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "medicStatement" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "medication" ] ;
fhir:variable [ fhir:v "medication" ] ;
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 "cdaText" ] ;
fhir:variable [ fhir:v "txt" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "medication" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "copy" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "txt" ]                     ] )                   ] )                 ] )               ] [
fhir:name [ fhir:v "reference" ] ;
                ( fhir:source [
fhir:context [ fhir:v "cdaText" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "medicStatement" ] ;
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 "author" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "authors" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "timeAuthor" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "time" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                       ] )                     ] ) ;
                    ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                      ( fhir:variable [ fhir:v "time" ] [ fhir:v "value" ] )                     ] )                   ] [
fhir:name [ fhir:v "assighedAuthor" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assignedAuthor" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e11" ]                     ] [
fhir:context [ fhir:v "e11" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                       ] )                     ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]                       ] )                     ] [
fhir:context [ fhir:v "e11" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                           ] )                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/TerapiaFarmacologicaIngresso/author" ]                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "identifier" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "extension" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid11" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                             ] )                           ] [
fhir:context [ fhir:v "e11" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                             ] [
fhir:value [ fhir:v "uuid11" ]                             ] )                           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                             ] [
fhir:value [ fhir:v "uuid11" ]                             ] )                           ] [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
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')" ]                       ] ) ;
                      ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                           ] [
fhir:value [ fhir:v "ext" ]                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "assignedPerson" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "person" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "person" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                         ] )                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:condition [ fhir:v "(code = '48765-2')" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "section" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]             ] ) ;
fhir:documentation [ fhir:v "4. Allergie" ]           ] [
fhir:name [ fhir:v "condizioneallergie" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code1" ] ;
fhir:condition [ fhir:v "(code = '48765-2')" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "title" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:variable [ fhir:v "t" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "section" ] ;
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 "where" ] ;
              ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:condition [ fhir:v "sottosection.entry.exists().not()" ]               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "title" ] ;
                ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:variable [ fhir:v "t" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "section" ] ;
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 "cdaText" ] ;
                ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
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 "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 "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/AllergyIntolerance/" ]                   ] [
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 "AllergyIntolerance" ]                   ] )                 ] [
fhir:context [ fhir:v "section" ] ;
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 "cdaText" ]                   ] ) ;
                  ( 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 "reference" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "cdaText" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "AllergyIntolerance" ] ;
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 "clinicalStatus" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "cdaText" ]                   ] ) ;
                  ( 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 "coding" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "cdaText" ]                     ] ) ;
                    ( 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 "cdaText" ]                       ] ) ;
                      ( 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 "cdaText" ]                       ] ) ;
                      ( 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 "active" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "cdaText" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "copy" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "active" ]                         ] )                       ] )                     ] )                   ] )                 ] [
fhir:name [ fhir:v "reference" ] ;
                  ( fhir:source [
fhir:context [ 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 "author" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "authors" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "timeAuthor" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "time" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                         ] )                       ] ) ;
                      ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                        ( fhir:variable [ fhir:v "time" ] [ fhir:v "value" ] )                       ] )                     ] [
fhir:name [ fhir:v "assighedAuthor" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assignedAuthor" ]                       ] ) ;
                      ( 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 "PUT" ]                         ] )                       ] [
fhir:context [ fhir:v "e9" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                             ] )                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                               ] )                             ] )                           ] [
fhir:name [ fhir:v "code" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/EsameObiettivo/author" ]                               ] )                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "identifier" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "autore" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid9" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                               ] )                             ] [
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/Practitioner/" ]                               ] [
fhir:value [ fhir:v "uuid9" ]                               ] )                             ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                               ] [
fhir:value [ fhir:v "uuid9" ]                               ] )                             ] [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                               ] )                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
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')" ]                         ] ) ;
                        ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                             ] [
fhir:value [ fhir:v "ext" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "assignedPerson" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "person" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "person" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                           ] )                         ] )                       ] )                     ] )                   ] )                 ] )               ] ) ;
fhir:documentation [ fhir:v "Allergia Narrativa-------------------------------------------------------------------------------------------------------------------------------------------" ]             ] [
fhir:name [ fhir:v "allergy" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "entry1" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e12" ]               ] [
fhir:context [ fhir:v "e12" ] ;
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 "e12" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "allergy" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "AllergyIntolerance" ]                 ] )               ] [
fhir:context [ fhir:v "allergy" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid12" ] ;
fhir:transform [ fhir:v "uuid" ]               ] [
fhir:context [ fhir:v "e12" ] ;
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 "uuid12" ]                 ] )               ] [
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 "section" ] ;
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/' + %allergy.id" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                ( fhir:source [
fhir:context [ fhir:v "src" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "allergy" ] ;
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 "reference" ] ;
                ( fhir:source [
fhir:context [ fhir:v "src" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "allergy" ] ;
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 "entryact2" ] ;
                ( fhir:source [
fhir:context [ fhir:v "entry1" ] ;
fhir:element [ fhir:v "act" ] ;
fhir:variable [ fhir:v "actallint" ]                 ] ) ;
                ( fhir:rule [
fhir:name [ fhir:v "onsetDateTime" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "actallint" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "effectiveTime" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "allergy" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "onset" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                    ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                     ] )                   ] ) ;
                  ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                    ( fhir:variable [ fhir:v "effectiveTime" ] [ fhir:v "value" ] )                   ] )                 ] [
fhir:name [ fhir:v "where" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "actallint" ] ;
fhir:condition [ fhir:v "effectiveTime.low.exists() or effectiveTime.high.exists()" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "onsetPeriod" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "actallint" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "allergy" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "onset" ] ;
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 "cdaText1" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "cdaText1" ]                   ] ) ;
                  ( fhir:target [
fhir:context [ fhir:v "allergy" ] ;
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 "cdaText1" ] ;
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 "author" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "authors" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "timeAuthor" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "time" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                         ] )                       ] ) ;
                      ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                        ( fhir:variable [ fhir:v "time" ] [ fhir:v "value" ] )                       ] )                     ] [
fhir:name [ fhir:v "assighedAuthor" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assignedAuthor" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e13" ]                       ] [
fhir:context [ fhir:v "e13" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                         ] )                       ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]                         ] )                       ] [
fhir:context [ fhir:v "e13" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
                        ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                         ] )                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                             ] )                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                               ] )                             ] )                           ] [
fhir:name [ fhir:v "code" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/Allergie/author" ]                               ] )                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "identifier" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "extension" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid13" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                               ] )                             ] [
fhir:context [ fhir:v "e13" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                               ] [
fhir:value [ fhir:v "uuid13" ]                               ] )                             ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                               ] [
fhir:value [ fhir:v "uuid13" ]                               ] )                             ] [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                               ] )                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
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')" ]                         ] ) ;
                        ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                             ] [
fhir:value [ fhir:v "ext" ]                             ] )                           ] )                         ] )                       ] [
fhir:name [ fhir:v "assignedPerson" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "person" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "person" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                           ] )                         ] )                       ] )                     ] )                   ] ) ;
fhir:documentation [ fhir:v "mapping note" ]                 ] [
fhir:name [ fhir:v "entryrelationshipact" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "actallint" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entryact" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "entryobservation" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "entryact" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "entryobs" ]                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "entryobs" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "code" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "type" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "code" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code1" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "allergy" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:transform [ fhir:v "translate" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "code1" ]                           ] [
fhir:value [ fhir:v "#AllergyTypeMap" ]                           ] [
fhir:value [ fhir:v "code" ]                           ] )                         ] )                       ] [
fhir:name [ fhir:v "category" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "code" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code2" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "allergy" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "category" ] ;
fhir:transform [ fhir:v "translate" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "code2" ]                           ] [
fhir:value [ fhir:v "#AllergyCategoryMap" ]                           ] [
fhir:value [ fhir:v "code" ]                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "participant" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "entryobs" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "partic" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "participantRole" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "partic" ] ;
fhir:element [ fhir:v "participantRole" ] ;
fhir:variable [ fhir:v "pratRole" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "playingEntity" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "pratRole" ] ;
fhir:element [ fhir:v "playingEntity" ] ;
fhir:variable [ fhir:v "pratent" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "reaction" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "pratent" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "allergy" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reaction" ] ;
fhir:variable [ fhir:v "reaction" ] ;
fhir:transform [ fhir:v "create" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                               ] )                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "subs" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "pratent" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "reaction" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "substance" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                               ] )                             ] [
fhir:name [ fhir:v "entryRelationship" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "entryobs" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entryobs1" ] ;
fhir:condition [ fhir:v "(typeCode = 'MFST')" ]                               ] ) ;
                              ( fhir:rule [
fhir:name [ fhir:v "entryobservation" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "entryobs1" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "entobs" ]                                 ] ) ;
                                ( fhir:rule [
fhir:name [ fhir:v "eff" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "entobs" ] ;
fhir:element [ fhir:v "effectiveTime" ] ;
fhir:variable [ fhir:v "eff" ]                                   ] ) ;
                                  ( fhir:rule [
fhir:name [ fhir:v "low" ] ;
                                    ( fhir:source [
fhir:context [ fhir:v "eff" ] ;
fhir:element [ fhir:v "low" ] ;
fhir:variable [ fhir:v "l" ]                                     ] ) ;
                                    ( fhir:target [
fhir:context [ fhir:v "reaction" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "onset" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                                      ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                                       ] )                                     ] ) ;
                                    ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                                      ( fhir:variable [ fhir:v "l" ] [ fhir:v "value" ] )                                     ] )                                   ] )                                 ] [
fhir:name [ fhir:v "manifest" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "entobs" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "vvv" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "reaction" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "manifestation" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                                   ] )                                 ] )                               ] )                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "entryrelationship2" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "entryobs" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entryobs2" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "entryobservation2" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "entryobs2" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "entobs" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "severity" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "entobs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = 'SEV')" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "value" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "entobs" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "active" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(value.code = 'M')" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "allergy" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "criticality" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "unable-to-assess" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "active" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(value.code = 'L')" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "allergy" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "criticality" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "low" ]                                 ] )                               ] )                             ] [
fhir:name [ fhir:v "active" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(value.code = 'H')" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "allergy" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "criticality" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "high" ]                                 ] )                               ] )                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "entryrelationship3" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "entryobs" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entryobs3" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "entryobservation3" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "entryobs3" ] ;
fhir:element [ fhir:v "observation" ] ;
fhir:variable [ fhir:v "entobs" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "33999-4" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "entobs" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(code = '33999-4')" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "clinicalStatus" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "entobs" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "allergy" ] ;
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 "coding" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "entobs" ]                               ] ) ;
                              ( 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 "value1" ] ;
                                ( fhir:source [
fhir:context [ fhir:v "entobs" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ]                                 ] ) ;
                                ( fhir:rule [
fhir:name [ fhir:v "active" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(value.code = 'LA16666-2')" ]                                   ] ) ;
                                  ( 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 "active" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:condition [ fhir:v "(value.code = 'LA18632-2')" ]                                   ] ) ;
                                  ( 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 "inactive" ]                                     ] )                                   ] )                                 ] [
fhir:name [ fhir:v "system" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical" ]                                     ] )                                   ] )                                 ] [
fhir:name [ fhir:v "displayName" ] ;
                                  ( fhir:source [
fhir:context [ fhir:v "value" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]                                   ] ) ;
                                  ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
                                    ( fhir:parameter [
fhir:value [ fhir:v "display" ]                                     ] [
fhir:value [ fhir:v "string" ]                                     ] )                                   ] ) ;
fhir:documentation [ fhir:v "value->coding.version='ConditionClinicalStatusCodes 4.0.1'\"version\";" ]                                 ] )                               ] )                             ] ) ;
fhir:documentation [ fhir:v "entobs.value->allergy.clinicalStatus \"cstatus\";" ]                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "entryrelationshi4" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "entryobs" ] ;
fhir:element [ fhir:v "entryRelationship" ] ;
fhir:variable [ fhir:v "entryobs4" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "entryact1" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "entryobs4" ] ;
fhir:element [ fhir:v "act" ] ;
fhir:variable [ fhir:v "entact" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "txtact" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "entact" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "actext" ]                           ] ) ;
                          ( fhir:rule [
fhir:name [ fhir:v "notetxt" ] ;
                            ( fhir:source [
fhir:context [ fhir:v "actext" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "reftxt" ]                             ] ) ;
                            ( fhir:target [
fhir:context [ fhir:v "allergy" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "note" ] ;
fhir:variable [ fhir:v "note" ] ;
fhir:transform [ fhir:v "create" ] ;
                              ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                               ] )                             ] ) ;
                            ( fhir:rule [
fhir:name [ fhir:v "notxt" ] ;
                              ( fhir:source [
fhir:context [ fhir:v "reftxt" ] ;
fhir:variable [ fhir:v "ref" ]                               ] ) ;
                              ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                                ( fhir:parameter [
fhir:value [ fhir:v "ref.value" ]                                 ] )                               ] )                             ] )                           ] )                         ] )                       ] )                     ] )                   ] )                 ] )               ] ) ;
fhir:documentation [ fhir:v "Allergia Strutturata----------------------------------------------------------------------------------------------------------------------------------------" ]             ] )           ] [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:condition [ fhir:v "(code = '11450-4')" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "section" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]             ] ) ;
fhir:documentation [ fhir:v "5. Problemi aperti" ]           ] [
fhir:name [ fhir:v "condizioneproblemiaperti" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code1" ] ;
fhir:condition [ fhir:v "(code = '11450-4')" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "title" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:variable [ fhir:v "t" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "section" ] ;
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 "cdaText" ] ;
              ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
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 "e14" ]               ] [
fhir:context [ fhir:v "e14" ] ;
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 "e14" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "condition" ] ;
fhir:transform [ fhir:v "create" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "Condition" ]                 ] )               ] [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid14" ] ;
fhir:transform [ fhir:v "uuid" ]               ] [
fhir:context [ fhir:v "e14" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "https://example/Condition/" ]                 ] [
fhir:value [ fhir:v "uuid14" ]                 ] )               ] [
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 "Condition" ]                 ] )               ] [
fhir:context [ fhir:v "section" ] ;
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/Condition/' + %condition.id" ]                 ] )               ] ) ;
              ( fhir:rule [
fhir:name [ fhir:v "reference" ] ;
                ( fhir:source [
fhir:context [ fhir:v "cdaText" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
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 "condition" ] ;
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 "sottosection" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                 ] )               ] [
fhir:name [ fhir:v "reference" ] ;
                ( fhir:source [
fhir:context [ fhir:v "cdaText" ]                 ] ) ;
                ( fhir:target [
fhir:context [ fhir:v "condition" ] ;
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 "author" ] ;
                  ( fhir:source [
fhir:context [ fhir:v "sottosection" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "authors" ]                   ] ) ;
                  ( fhir:rule [
fhir:name [ fhir:v "timeAuthor" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "time" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "time" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]                       ] )                     ] ) ;
                    ( fhir:dependent [
fhir:name [ fhir:v "TSDateTime" ] ;
                      ( fhir:variable [ fhir:v "time" ] [ fhir:v "value" ] )                     ] )                   ] [
fhir:name [ fhir:v "assighedAuthor" ] ;
                    ( fhir:source [
fhir:context [ fhir:v "authors" ] ;
fhir:element [ fhir:v "assignedAuthor" ] ;
fhir:variable [ fhir:v "assignedAuthor" ]                     ] ) ;
                    ( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e15" ]                     ] [
fhir:context [ fhir:v "e15" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "request" ] ;
fhir:variable [ fhir:v "request" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]                       ] )                     ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "method" ] ;
fhir:transform [ fhir:v "copy" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "PUT" ]                       ] )                     ] [
fhir:context [ fhir:v "e15" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
                      ( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ]                       ] )                     ] ) ;
                    ( fhir:rule [
fhir:name [ fhir:v "meta" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "meta" ] ;
fhir:variable [ fhir:v "meta" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "meta" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "tag" ] ;
fhir:variable [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "create" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]                           ] )                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "system" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "http://algoritmodiscoring" ]                             ] )                           ] )                         ] [
fhir:name [ fhir:v "code" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "ClinicalDocument/body/ProblemiAperti/author" ]                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "identifier" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "id" ]                       ] ) ;
                      ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
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 "r" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "root" ] ;
fhir:variable [ fhir:v "r" ]                         ] ) ;
                        ( fhir:rule [
fhir:name [ fhir:v "aut" ] ;
                          ( fhir:source [
fhir:context [ fhir:v "id" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ]                           ] ) ;
                          ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid15" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "r + '-' + ext" ]                             ] )                           ] [
fhir:context [ fhir:v "e15" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "https://example/Practitioner/" ]                             ] [
fhir:value [ fhir:v "uuid15" ]                             ] )                           ] [
fhir:context [ fhir:v "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                            ( fhir:parameter [
fhir:value [ fhir:v "Practitioner/" ]                             ] [
fhir:value [ fhir:v "uuid15" ]                             ] )                           ] [
fhir:context [ fhir:v "note" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "author" ] ;
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/Practitioner/' + %practitioner.id" ]                             ] )                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "2.16.840.1.113883.2.9.4.3.2" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
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')" ]                       ] ) ;
                      ( 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 "request" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "append" ] ;
                          ( fhir:parameter [
fhir:value [ fhir:v "Practitioner?identifier=" ]                           ] [
fhir:value [ fhir:v "ext" ]                           ] )                         ] )                       ] )                     ] [
fhir:name [ fhir:v "assignedPerson" ] ;
                      ( fhir:source [
fhir:context [ fhir:v "assignedAuthor" ] ;
fhir:element [ fhir:v "assignedPerson" ] ;
fhir:variable [ fhir:v "person" ]                       ] ) ;
                      ( fhir:rule [
fhir:name [ fhir:v "name" ] ;
                        ( fhir:source [
fhir:context [ fhir:v "person" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ]                         ] ) ;
                        ( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]                         ] )                       ] )                     ] )                   ] )                 ] )               ] )             ] )           ] )         ] )       ] ) ;
fhir:documentation [ fhir:v "START sottosections" ]     ] )
  ] [
fhir:name [ fhir:v "Act" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "______2._____________ClinicalStatements________________________" ] ;
    ( fhir:input [
fhir:name [ fhir:v "cda" ] ;
fhir:type [ fhir:v "Act" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "pat" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ]     ] [
fhir:name [ fhir:v "enc" ] ;
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:rule [
fhir:name [ fhir:v "code" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "enc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "extension2" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "modeOfArrival" ] ;
        ( fhir:variable [ fhir:v "code" ] [ fhir:v "extension2" ] )       ] )     ] [
fhir:name [ fhir:v "participant" ] ;
      ( fhir:source [
fhir:context [ fhir:v "cda" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "participant" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "fhirParticipant" ] ;
        ( fhir:source [
fhir:context [ fhir:v "participant" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "enc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "FhirParticipant" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "type" ] ;
          ( fhir:source [
fhir:context [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "p" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "FhirParticipant" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "type" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "codeType" ] ;
            ( fhir:source [
fhir:context [ fhir:v "p" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "type" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "codice" ] ;
              ( fhir:source [
fhir:context [ fhir:v "p" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "p.typeCode" ]                 ] )               ] )             ] [
fhir:name [ fhir:v "system" ] ;
              ( fhir:source [
fhir:context [ fhir:v "p" ]               ] ) ;
              ( 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/v3-ParticipationType" ]                 ] )               ] )             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "participantrole" ] ;
        ( fhir:source [
fhir:context [ fhir:v "participant" ] ;
fhir:element [ fhir:v "participantRole" ] ;
fhir:variable [ fhir:v "participantRole" ]         ] ) ;
        ( 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 "practitionerRole" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "PractitionerRole" ]           ] )         ] [
fhir:context [ fhir:v "practitionerRole" ] ;
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/PractitionerRole/" ]           ] [
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 "PractitionerRole" ]           ] )         ] [
fhir:context [ fhir:v "enc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "participant" ] ;
fhir:variable [ fhir:v "participant1" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "BackboneElement" ]           ] )         ] [
fhir:context [ fhir:v "participant1" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "individual" ] ;
fhir:variable [ fhir:v "referencepart" ] ;
fhir:transform [ fhir:v "create" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]           ] )         ] [
fhir:context [ fhir:v "referencepart" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "'https://example/PractitionerRole/' + %practitionerRole.id" ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "participantRole" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "practitionerRole" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]           ] )         ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "modeOfArrival" ] ;
fhir:typeMode [ fhir:v "none" ] ;
fhir:documentation [ fhir:v "______3._____________Extensions_DtType________________________" ] ;
    ( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "CE" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "ext" ] ;
fhir:type [ fhir:v "Extension" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "url" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "http://hl7.org/fhir/StructureDefinition/encounter-modeOfArrival" ]         ] )       ] )     ] [
fhir:name [ fhir:v "coding" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "code1" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Coding" ]         ] )       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "coding" ] ;
        ( fhir:variable [ fhir:v "src" ] [ fhir:v "code1" ] )       ] )     ] )
  ] [
fhir:name [ fhir:v "coding" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "CE" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "tgt" ] ;
fhir:type [ fhir:v "Coding" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "code" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cast" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "code" ]         ] [
fhir:value [ fhir:v "string" ]         ] )       ] )     ] [
fhir:name [ fhir:v "codeSystem" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "codeSystem" ] ;
fhir:variable [ fhir:v "system" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "translate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "system" ]         ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/special-oid2uri" ]         ] [
fhir:value [ fhir:v "uri" ]         ] )       ] )     ] [
fhir:name [ fhir:v "displayName" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "displayName" ] ;
fhir:variable [ fhir:v "display" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "display" ] ;
fhir:transform [ fhir:v "cast" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "display" ]         ] [
fhir:value [ fhir:v "string" ]         ] )       ] )     ] [
fhir:name [ fhir:v "codeSystemVersion" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "codeSystemVersion" ] ;
fhir:variable [ fhir:v "version" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "version" ] ;
fhir:transform [ fhir:v "cast" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "version" ]         ] [
fhir:value [ fhir:v "string" ]         ] )       ] )     ] )
  ] [
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" ]           ] )         ] )       ] )     ] )
  ] ) . #