CDA to FHIR Maps, published by HL7 Italy. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/hl7-it/cda2fhir/ and changes regularly. See the Directory of published versions
Draft as of 2024-09-15 |
{
"resourceType" : "StructureMap",
"id" : "cda2fhirSpecPrescription",
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <pre>map "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirSpecPrescription" = "cda2fhirSpecPrescription"\n\nuses "http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument" alias ClinicalDocument as source\nuses "http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor" alias AssignedAuthor as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity" alias AssignedEntity as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity" alias AssociatedEntity as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization" alias CustodianOrganization as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf" alias OrganizationPartOf as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/Organization" alias rapresentedOrganization as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/Section" alias Section as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/PatientRole" alias PatientRole as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/AD" alias AD as source\nuses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target\nuses "http://hl7.org/fhir/StructureDefinition/Composition" alias Composition as produced\nuses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as produced\nuses "http://hl7.org/fhir/StructureDefinition/Encounter" alias Encounter as produced\nuses "http://hl7.org/fhir/StructureDefinition/Person" alias Patient as produced\nuses "http://hl7.org/fhir/StructureDefinition/List" alias List as produced\nuses "http://hl7.org/fhir/StructureDefinition/Practitioner" alias Practitioner as produced\nuses "http://hl7.org/fhir/StructureDefinition/Organization" alias Organization as produced\nuses "http://hl7.org/fhir/cda/StructureDefinition/Act" alias Act as produced\nuses "http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ" alias IVL_PQ as source\nuses "http://hl7.org/fhir/cda/StructureDefinition/PQ" alias PQ as source\nuses "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" alias SimpleQuantity as target\n\nimports "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes"\nimports "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader"\n\ngroup CdaToBundle(source cda : ClinicalDocument, target bundle : Bundle) {\n cda -> bundle.entry as e, e.request = create('BackboneElement') as request, request.method = 'POST', e.resource = create('Composition') as composition, composition.id = uuid() as uuid1, e.fullUrl = append('https://example/Composition/', uuid1), request.url = 'Composition', bundle.entry as e2, e2.request = create('BackboneElement') as requestPAT, requestPAT.method = 'PUT', e2.resource = create('Patient') as patient, patient.id = uuid() as uuid2, e2.fullUrl = append('https://example/Patient/', uuid2), bundle.entry as e3, e3.request = create('BackboneElement') as request, request.method = 'POST', e3.resource = create('Encounter') as encounter, encounter.id = uuid() as uuid3, e3.fullUrl = append('https://example/Encounter/', uuid3), request.url = 'Encounter', bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'POST', e4.resource = create('DocumentReference') as DocumentReference, DocumentReference.id = uuid() as uuid4, e4.fullUrl = append('https://example/DocumentReference/', uuid4), request.url = 'DocumentReference' then {\n cda then ClinicalDocumentToBundle(cda, patient, composition, encounter, bundle, DocumentReference) "cdatobundle";\n cda.recordTarget as recordTarget then {\n recordTarget.patientRole as patient then {\n patient.id as id -> patient.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext1 -> identifier.value = ext1 "value";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n } "idfr";\n patient.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') or (root = '2.16.840.1.113883.2.9.4.3.7') or (root = '2.16.840.1.113883.2.9.4.3.3') or (root = '2.16.840.1.113883.2.9.4.3.17') or (root = '2.16.840.1.113883.2.9.4.3.18') or (root = '2.16.840.1.113883.2.9.2.10.4.1.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1.1') or (root = '2.16.840.1.113883.2.9.2.10.4.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1') or (root = '2.16.840.1.113883.2.9.4.3.15') then {\n id.extension as ext -> requestPAT.url = append('Patient?identifier=', ext) "UUID";\n } "ext";\n } "recPat";\n } "patient";\n } "ClinicalDocumentToBody";\n}\n\ngroup ClinicalDocumentToBundle(source cda : ClinicalDocument, target patient : Patient, target composition : Composition, target encounter : Encounter, target bundle : Bundle, target DocumentReference : DocumentReference) {\n cda -> bundle.id = uuid() "id";\n cda.id -> bundle.identifier "identifier";\n cda -> bundle.type = 'transaction' "type";\n cda -> bundle.timestamp = (timestamp.now()) "date";\n cda then ClinicalDocumentComposition(cda, composition, patient, encounter, bundle, DocumentReference) "composition";\n cda -> bundle.entry as e, e.request = create('BackboneElement') as request, request.method = 'POST', e.resource = create('ServiceRequest') as ServiceRequest, ServiceRequest.id = uuid() as uuid1, e.fullUrl = append('https://example/ServiceRequest/', uuid1), request.url = 'ServiceRequest' then {\n cda -> ServiceRequest.intent = 'order' "intent";\n cda -> ServiceRequest.status = 'unknown' "stats";\n cda -> ServiceRequest.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\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 -> composition.section as tgtSection then ClinicalDocumentSection(cda, srcSection, patient, tgtSection, bundle, encounter, ServiceRequest);\n };\n };\n } "body";\n };\n } "ServiceRequest";\n}\n\ngroup ClinicalDocumentSection(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter, target ServiceRequest : ServiceRequest) {\n src.title as t -> tgt.title = (t.dataString);\n src.code -> tgt.code;\n src.code as code where (code = '48767-8') or (code = '51851-4') or (code = '57827-8') or (code = '57828-6') then {\n src -> tgt.entry = create('Reference') as reference, reference.reference = ('https://example/ServiceRequest/' + %ServiceRequest.id) "reference";\n } "Note";\n // src.entry as entry then{\n src.text as cdaText -> tgt.text as fhirText then {\n cdaText -> fhirText.status = 'generated' "narrativeStatus";\n cdaText as t -> fhirText.div = t "narrativeText";\n } "cdaText";\n // --------------Sezione Esenzioni------------------------------------------------------------------------------------------------------------------------------------\n src.code as code where (code = '57827-8') then {\n src.id -> ServiceRequest.identifier;\n src.entry as entry -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'POST', e11.resource = create('Coverage') as Coverage, Coverage.id = uuid() as uuid11, e11.fullUrl = append('https://example/Coverage/', uuid11), request.url = 'Coverage', ServiceRequest.insurance = create('Reference') as reference, reference.reference = ('https://example/Coverage/' + %Coverage.id) then {\n src -> Coverage.beneficiary = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n src -> Coverage.payor = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n src where statusCode.exists().not() -> Coverage.status = 'active' "statusAbsent";\n entry.act as act then {\n act.code -> Coverage.type;\n };\n };\n } "Esenzioni";\n // -------------Sezione Prescrizioni-------------------------------------------------------------------------------------------------------------------------------------\n src.code as code where (code = '57828-6') then {\n src.entry as entry then {\n entry.observation as observation then {\n observation.code -> ServiceRequest.code;\n // observation.priorityCode->ServiceRequest.priority"priority";\n observation.priorityCode as priorityCode then {\n priorityCode.code as v -> ServiceRequest.priority = translate(v, '#priority', 'code') "priority";\n };\n observation.repeatNumber as repeatNumber -> ServiceRequest.quantity = create('Quantity') as Ratio then {\n repeatNumber.value as value -> Ratio.value = value;\n } "value";\n observation.participant as participant then {\n participant.participantRole as partRol then {\n partRol.scopingEntity as scopingEntity then {\n scopingEntity.code -> ServiceRequest.locationCode;\n } "ScopingEntity";\n } "PartROle";\n } "Location";\n // ----------------codice Patologia------------------------------------------------------------------------------------------------------------------------------------\n observation.entryRelationship as entryRelationship then {\n entryRelationship.act as act then {\n act.templateId as temid where (root = '2.16.840.1.113883.3.1937.777.63.10.275') -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'POST', e11.resource = create('Condition') as Condition, Condition.id = uuid() as uuid11, e11.fullUrl = append('https://example/Condition/', uuid11), request.url = 'Condition', ServiceRequest.reasonReference = create('Reference') as reference, reference.reference = ('https://example/Condition/' + %Condition.id) then {\n act -> Condition.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n act -> Condition.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";\n act -> Condition.clinicalStatus as status2 then {\n act -> status2.coding as status3 then {\n act -> status3.code = 'unknown' "finald";\n act -> status3.system = 'http://terminology.hl7.org/CodeSystem/condition-clinical' "system";\n } "st3";\n } "status";\n act.code -> Condition.code;\n } "Condition";\n };\n } "entryrelationshipCondition";\n // ---------Tipo di Visita---------------------------------------------------------------------------------------------------------------------------------\n observation.entryRelationship as entryRelationship then {\n entryRelationship.encounter as encounter then {\n encounter.templateId as temid where (root = '2.16.840.1.113883.3.1937.777.63.10.276') then {\n encounter -> ServiceRequest.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) then {\n observation.entryRelationship as entryRelationship then {\n entryRelationship.encounter as encounter1 then {\n encounter1.templateId as temid where (root = '2.16.840.1.113883.3.1937.777.63.10.281') then {\n // encounter1.code -> enc.class;\n encounter1.code as code1 -> enc.class = create('Coding') as coding then {\n code1.code as code -> coding.code = cast(code, 'string');\n code1.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n code1.displayName as display -> coding.display = cast(display, 'string');\n } "class";\n } "reference";\n } "templateId";\n } "Act";\n } "encounter";\n };\n } "Act";\n };\n // ------------Nota esplicita--------------------------------------------------------------------------------------------------------------------------------------------\n observation.entryRelationship as entryRelationship then {\n entryRelationship.act as act then {\n act.templateId as temid where (root = '2.16.840.1.113883.3.1937.777.63.10.274') then {\n act.text as text -> ServiceRequest.note as note then {\n text.reference as t then {\n t.value as l -> note.text = l "reference";\n } "tcx";\n } "reference";\n };\n } "Act";\n };\n observation.entryRelationship as entryRelationship then {\n entryRelationship.act as act then {\n act.templateId as temid where (root = '2.16.840.1.113883.3.1937.777.63.10.278') then {\n act.code -> ServiceRequest.reasonCode;\n } "reference";\n } "templateId";\n } "Act";\n // -----Sedute-----------------------------------------------------------------------------------------------------------------------------------------------\n observation.entryRelationship as entryRelationship then {\n entryRelationship.observation as observation then {\n observation.templateId as temid where (root = '2.16.840.1.113883.3.1937.777.63.10.277') then {\n observation.repeatNumber as repeatNumber -> ServiceRequest.occurrence = create('Timing') as Timing then {\n repeatNumber -> Timing.repeat as repeat then {\n repeatNumber.value as value -> repeat.count = value "count";\n } "event";\n } "Count";\n } "Timing";\n } "templateId";\n } "Act";\n } "Observation";\n };\n } "Esenzioni";\n // ------------Sezione Annotazioni-----------------------------------------------------------------------------------------------------------------------------------------\n src.code as code where (code = '48767-8') then {\n src.entry as entry then {\n entry.act as act then {\n act.text as text -> ServiceRequest.note as note then {\n text.reference as t then {\n t.value as l -> note.text = l "reference";\n } "tcx";\n } "reference";\n };\n };\n } "Annotazioni";\n // ----------Sezione Messaggio Regionale-----------------------------------------------------------------------------------------------------------------------------------\n src.code as code where (code = '51851-4') then {\n src.text as cdaText -> ServiceRequest.note as note then {\n cdaText as text then {\n text as l -> note.text = l "reference";\n } "tcx";\n } "reference";\n } "MessaggioRegionale";\n // -------Sezione Parametri Vitali---------------------------------------------------------------------------------------------------------------------------------------\n src.code as code where (code = '8716-3') -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'POST', e11.resource = create('Observation') as Observation, Observation.id = uuid() as uuid11, e11.fullUrl = append('https://example/Observation/', uuid11), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %Observation.id) then {\n src -> Observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n src -> Observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";\n src.code -> Observation.code;\n src where Observation.statusCode.exists().not() then {\n src -> Observation.status = 'final' "status";\n } "statuscode";\n src.text as cdaText -> Observation.note as note then {\n cdaText as t -> note.text = t "reference";\n } "reference";\n } "ParametriVitali";\n // -------Sezione Allergie------------------------------------------------------------------------------------------------------------------------------------------------\n src.code as code where (code = '48765-2') -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'POST', e11.resource = create('AllergyIntolerance') as AllergyIntolerance, AllergyIntolerance.id = uuid() as uuid11, e11.fullUrl = append('https://example/AllergyIntolerance/', uuid11), request.url = 'AllergyIntolerance', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/AllergyIntolerance/' + %AllergyIntolerance.id) then {\n src -> AllergyIntolerance.patient = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n src -> AllergyIntolerance.clinicalStatus = create('CodeableConcept') as status then {\n src -> status.text = 'string' "text";\n src -> status.coding = create('Coding') as coding then {\n src -> coding.code = 'active' "active";\n src -> coding.system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical' "system";\n } "coding";\n } "allergy";\n src.text as cdaText -> AllergyIntolerance.note as note then {\n cdaText as t -> note.text = t "reference";\n } "reference";\n } "Allergie";\n // ------Sezione Stato Funzionale------------------------------------------------------------------------------------------------------------------------------------------\n src.code as code where (code = '47420-5') -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'POST', e11.resource = create('Observation') as Observation, Observation.id = uuid() as uuid11, e11.fullUrl = append('https://example/Observation/', uuid11), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %Observation.id) then {\n src -> Observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n src -> Observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";\n src.code -> Observation.code;\n src where Observation.statusCode.exists().not() then {\n src -> Observation.status = 'final' "status";\n } "statuscode";\n src.text as cdaText -> Observation.note as note then {\n cdaText as t -> note.text = t "reference";\n } "reference";\n } "StatoFunzionale";\n}\n\n</pre>\n </div>"
},
"url" : "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirSpecPrescription",
"version" : "0.1.0",
"name" : "cda2fhirSpecPrescription",
"status" : "draft",
"date" : "2024-09-15T08:16:12+00:00",
"publisher" : "HL7 Italy",
"contact" : [
{
"name" : "HL7 Italy",
"telecom" : [
{
"system" : "url",
"value" : "http://hl7.it"
}
]
}
],
"jurisdiction" : [
{
"coding" : [
{
"system" : "urn:iso:std:iso:3166",
"code" : "IT",
"display" : "Italy"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument",
"mode" : "source",
"alias" : "ClinicalDocument"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor",
"mode" : "queried",
"alias" : "AssignedAuthor"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity",
"mode" : "queried",
"alias" : "AssignedEntity"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity",
"mode" : "queried",
"alias" : "AssociatedEntity"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization",
"mode" : "queried",
"alias" : "CustodianOrganization"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf",
"mode" : "queried",
"alias" : "OrganizationPartOf"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/Organization",
"mode" : "queried",
"alias" : "rapresentedOrganization"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/Section",
"mode" : "queried",
"alias" : "Section"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/PatientRole",
"mode" : "queried",
"alias" : "PatientRole"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/AD",
"mode" : "source",
"alias" : "AD"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Bundle",
"mode" : "target",
"alias" : "Bundle"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Composition",
"mode" : "produced",
"alias" : "Composition"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Patient",
"mode" : "produced",
"alias" : "Patient"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Encounter",
"mode" : "produced",
"alias" : "Encounter"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Person",
"mode" : "produced",
"alias" : "Patient"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/List",
"mode" : "produced",
"alias" : "List"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Practitioner",
"mode" : "produced",
"alias" : "Practitioner"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Organization",
"mode" : "produced",
"alias" : "Organization"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/Act",
"mode" : "produced",
"alias" : "Act"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ",
"mode" : "source",
"alias" : "IVL_PQ"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/PQ",
"mode" : "source",
"alias" : "PQ"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/SimpleQuantity",
"mode" : "target",
"alias" : "SimpleQuantity"
}
],
"import" : [
🔗 "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes"🔗 ,
"http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader"
],
"group" : [
{
"name" : "CdaToBundle",
"typeMode" : "none",
"input" : [
{
"name" : "cda",
"type" : "ClinicalDocument",
"mode" : "source"
},
{
"name" : "bundle",
"type" : "Bundle",
"mode" : "target"
}
],
"rule" : [
{
"name" : "ClinicalDocumentToBody",
"source" : [
{
"context" : "cda"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e"
},
{
"context" : "e",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e",
"contextType" : "variable",
"element" : "resource",
"variable" : "composition",
"transform" : "create",
"parameter" : [
{
"valueString" : "Composition"
}
]
},
{
"context" : "composition",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid1",
"transform" : "uuid"
},
{
"context" : "e",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Composition/"
},
{
"valueId" : "uuid1"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Composition"
}
]
},
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e2"
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "request",
"variable" : "requestPAT",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "requestPAT",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "resource",
"variable" : "patient",
"transform" : "create",
"parameter" : [
{
"valueString" : "Patient"
}
]
},
{
"context" : "patient",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid2",
"transform" : "uuid"
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Patient/"
},
{
"valueId" : "uuid2"
}
]
},
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e3"
},
{
"context" : "e3",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e3",
"contextType" : "variable",
"element" : "resource",
"variable" : "encounter",
"transform" : "create",
"parameter" : [
{
"valueString" : "Encounter"
}
]
},
{
"context" : "encounter",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid3",
"transform" : "uuid"
},
{
"context" : "e3",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Encounter/"
},
{
"valueId" : "uuid3"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Encounter"
}
]
},
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e4"
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "resource",
"variable" : "DocumentReference",
"transform" : "create",
"parameter" : [
{
"valueString" : "DocumentReference"
}
]
},
{
"context" : "DocumentReference",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "uuid"
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/DocumentReference/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "DocumentReference"
}
]
}
],
"rule" : [
{
"name" : "cdatobundle",
"source" : [
{
"context" : "cda"
}
],
"dependent" : [
{
"name" : "ClinicalDocumentToBundle",
"variable" : [
"cda",
"patient",
"composition",
"encounter",
"bundle",
"DocumentReference"
]
}
]
},
{
"name" : "patient",
"source" : [
{
"context" : "cda",
"element" : "recordTarget",
"variable" : "recordTarget"
}
],
"rule" : [
{
"name" : "recPat",
"source" : [
{
"context" : "recordTarget",
"element" : "patientRole",
"variable" : "patient"
}
],
"rule" : [
{
"name" : "idfr",
"source" : [
{
"context" : "patient",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier"
}
],
"rule" : [
{
"name" : "root1",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "system",
"transform" : "translate",
"parameter" : [
{
"valueId" : "r"
},
{
"valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
},
{
"valueString" : "uri"
}
]
}
]
},
{
"name" : "value",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext1"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext1"
}
]
}
]
},
{
"name" : "assigningAuthorityName",
"source" : [
{
"context" : "id",
"element" : "assigningAuthorityName",
"variable" : "s"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "assigner",
"variable" : "a"
},
{
"context" : "a",
"contextType" : "variable",
"element" : "display",
"transform" : "copy",
"parameter" : [
{
"valueId" : "s"
}
]
}
]
}
]
},
{
"name" : "ext",
"source" : [
{
"context" : "patient",
"element" : "id",
"variable" : "id",
"condition" : "(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')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "requestPAT",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Patient?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "ClinicalDocumentToBundle",
"typeMode" : "none",
"input" : [
{
"name" : "cda",
"type" : "ClinicalDocument",
"mode" : "source"
},
{
"name" : "patient",
"type" : "Patient",
"mode" : "target"
},
{
"name" : "composition",
"type" : "Composition",
"mode" : "target"
},
{
"name" : "encounter",
"type" : "Encounter",
"mode" : "target"
},
{
"name" : "bundle",
"type" : "Bundle",
"mode" : "target"
},
{
"name" : "DocumentReference",
"type" : "DocumentReference",
"mode" : "target"
}
],
"rule" : [
{
"name" : "id",
"source" : [
{
"context" : "cda"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "id",
"transform" : "uuid"
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "cda",
"element" : "id",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "identifier",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "type",
"source" : [
{
"context" : "cda"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "transaction"
}
]
}
]
},
{
"name" : "date",
"source" : [
{
"context" : "cda"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "timestamp",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "timestamp.now()"
}
]
}
]
},
{
"name" : "composition",
"source" : [
{
"context" : "cda"
}
],
"dependent" : [
{
"name" : "ClinicalDocumentComposition",
"variable" : [
"cda",
"composition",
"patient",
"encounter",
"bundle",
"DocumentReference"
]
}
]
},
{
"name" : "ServiceRequest",
"source" : [
{
"context" : "cda"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e"
},
{
"context" : "e",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e",
"contextType" : "variable",
"element" : "resource",
"variable" : "ServiceRequest",
"transform" : "create",
"parameter" : [
{
"valueString" : "ServiceRequest"
}
]
},
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid1",
"transform" : "uuid"
},
{
"context" : "e",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/ServiceRequest/"
},
{
"valueId" : "uuid1"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ServiceRequest"
}
]
}
],
"rule" : [
{
"name" : "intent",
"source" : [
{
"context" : "cda"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "intent",
"transform" : "copy",
"parameter" : [
{
"valueString" : "order"
}
]
}
]
},
{
"name" : "stats",
"source" : [
{
"context" : "cda"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
},
{
"name" : "reference",
"source" : [
{
"context" : "cda"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "subject",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Patient/' + %patient.id"
}
]
}
]
},
{
"name" : "component",
"source" : [
{
"context" : "cda",
"element" : "component",
"variable" : "component"
}
],
"rule" : [
{
"name" : "body",
"source" : [
{
"context" : "component",
"element" : "structuredBody",
"variable" : "body"
}
],
"rule" : [
{
"name" : "component",
"source" : [
{
"context" : "body",
"element" : "component",
"variable" : "component"
}
],
"rule" : [
{
"name" : "section",
"source" : [
{
"context" : "component",
"element" : "section",
"variable" : "srcSection"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "srcSection",
"element" : "code"
}
],
"target" : [
{
"context" : "composition",
"contextType" : "variable",
"element" : "section",
"variable" : "tgtSection"
}
],
"dependent" : [
{
"name" : "ClinicalDocumentSection",
"variable" : [
"cda",
"srcSection",
"patient",
"tgtSection",
"bundle",
"encounter",
"ServiceRequest"
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "ClinicalDocumentSection",
"typeMode" : "none",
"input" : [
{
"name" : "cda",
"type" : "ClinicalDocument",
"mode" : "source"
},
{
"name" : "src",
"type" : "Section",
"mode" : "source"
},
{
"name" : "patient",
"type" : "Patient",
"mode" : "target"
},
{
"name" : "tgt",
"mode" : "target"
},
{
"name" : "bundle",
"type" : "Bundle",
"mode" : "target"
},
{
"name" : "enc",
"type" : "Encounter",
"mode" : "target"
},
{
"name" : "ServiceRequest",
"type" : "ServiceRequest",
"mode" : "target"
}
],
"rule" : [
{
"name" : "title",
"source" : [
{
"context" : "src",
"element" : "title",
"variable" : "t"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "title",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "t.dataString"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "Note",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "code",
"condition" : "(code = '48767-8') or (code = '51851-4') or (code = '57827-8') or (code = '57828-6')"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "entry",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/ServiceRequest/' + %ServiceRequest.id"
}
]
}
]
}
]
},
{
"name" : "cdaText",
"source" : [
{
"context" : "src",
"element" : "text",
"variable" : "cdaText"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "text",
"variable" : "fhirText"
}
],
"rule" : [
{
"name" : "narrativeStatus",
"source" : [
{
"context" : "cdaText"
}
],
"target" : [
{
"context" : "fhirText",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "generated"
}
]
}
]
},
{
"name" : "narrativeText",
"source" : [
{
"context" : "cdaText",
"variable" : "t"
}
],
"target" : [
{
"context" : "fhirText",
"contextType" : "variable",
"element" : "div",
"transform" : "copy",
"parameter" : [
{
"valueId" : "t"
}
]
}
]
}
],
"documentation" : "src.entry as entry then{"
},
{
"name" : "Esenzioni",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "code",
"condition" : "(code = '57827-8')"
}
],
"rule" : [
{
"name" : "id",
"source" : [
{
"context" : "src",
"element" : "id",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "identifier",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "entry",
"source" : [
{
"context" : "src",
"element" : "entry",
"variable" : "entry"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e11"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "resource",
"variable" : "Coverage",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coverage"
}
]
},
{
"context" : "Coverage",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid11",
"transform" : "uuid"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Coverage/"
},
{
"valueId" : "uuid11"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Coverage"
}
]
},
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "insurance",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Coverage/' + %Coverage.id"
}
]
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "Coverage",
"contextType" : "variable",
"element" : "beneficiary",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Patient/' + %patient.id"
}
]
}
]
},
{
"name" : "reference",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "Coverage",
"contextType" : "variable",
"element" : "payor",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Patient/' + %patient.id"
}
]
}
]
},
{
"name" : "statusAbsent",
"source" : [
{
"context" : "src",
"condition" : "statusCode.exists().not()"
}
],
"target" : [
{
"context" : "Coverage",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "active"
}
]
}
]
},
{
"name" : "act",
"source" : [
{
"context" : "entry",
"element" : "act",
"variable" : "act"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "act",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "Coverage",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
],
"documentation" : "--------------Sezione Esenzioni------------------------------------------------------------------------------------------------------------------------------------"
},
{
"name" : "Esenzioni",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "code",
"condition" : "(code = '57828-6')"
}
],
"rule" : [
{
"name" : "entry",
"source" : [
{
"context" : "src",
"element" : "entry",
"variable" : "entry"
}
],
"rule" : [
{
"name" : "Observation",
"source" : [
{
"context" : "entry",
"element" : "observation",
"variable" : "observation"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "observation",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "priorityCode",
"source" : [
{
"context" : "observation",
"element" : "priorityCode",
"variable" : "priorityCode"
}
],
"rule" : [
{
"name" : "priority",
"source" : [
{
"context" : "priorityCode",
"element" : "code",
"variable" : "v"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "priority",
"transform" : "translate",
"parameter" : [
{
"valueId" : "v"
},
{
"valueString" : "#priority"
},
{
"valueString" : "code"
}
]
}
]
}
],
"documentation" : "observation.priorityCode->ServiceRequest.priority\"priority\";"
},
{
"name" : "value",
"source" : [
{
"context" : "observation",
"element" : "repeatNumber",
"variable" : "repeatNumber"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "quantity",
"variable" : "Ratio",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "repeatNumber",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "Ratio",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "value"
}
]
}
]
}
]
},
{
"name" : "Location",
"source" : [
{
"context" : "observation",
"element" : "participant",
"variable" : "participant"
}
],
"rule" : [
{
"name" : "PartROle",
"source" : [
{
"context" : "participant",
"element" : "participantRole",
"variable" : "partRol"
}
],
"rule" : [
{
"name" : "ScopingEntity",
"source" : [
{
"context" : "partRol",
"element" : "scopingEntity",
"variable" : "scopingEntity"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "scopingEntity",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "locationCode",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
]
},
{
"name" : "entryrelationshipCondition",
"source" : [
{
"context" : "observation",
"element" : "entryRelationship",
"variable" : "entryRelationship"
}
],
"rule" : [
{
"name" : "act",
"source" : [
{
"context" : "entryRelationship",
"element" : "act",
"variable" : "act"
}
],
"rule" : [
{
"name" : "Condition",
"source" : [
{
"context" : "act",
"element" : "templateId",
"variable" : "temid",
"condition" : "(root = '2.16.840.1.113883.3.1937.777.63.10.275')"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e11"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "resource",
"variable" : "Condition",
"transform" : "create",
"parameter" : [
{
"valueString" : "Condition"
}
]
},
{
"context" : "Condition",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid11",
"transform" : "uuid"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Condition/"
},
{
"valueId" : "uuid11"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Condition"
}
]
},
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "reasonReference",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Condition/' + %Condition.id"
}
]
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "act"
}
],
"target" : [
{
"context" : "Condition",
"contextType" : "variable",
"element" : "subject",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Patient/' + %patient.id"
}
]
}
]
},
{
"name" : "reference",
"source" : [
{
"context" : "act"
}
],
"target" : [
{
"context" : "Condition",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %enc.id"
}
]
}
]
},
{
"name" : "status",
"source" : [
{
"context" : "act"
}
],
"target" : [
{
"context" : "Condition",
"contextType" : "variable",
"element" : "clinicalStatus",
"variable" : "status2"
}
],
"rule" : [
{
"name" : "st3",
"source" : [
{
"context" : "act"
}
],
"target" : [
{
"context" : "status2",
"contextType" : "variable",
"element" : "coding",
"variable" : "status3"
}
],
"rule" : [
{
"name" : "finald",
"source" : [
{
"context" : "act"
}
],
"target" : [
{
"context" : "status3",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
},
{
"name" : "system",
"source" : [
{
"context" : "act"
}
],
"target" : [
{
"context" : "status3",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://terminology.hl7.org/CodeSystem/condition-clinical"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "act",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "Condition",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
],
"documentation" : "----------------codice Patologia------------------------------------------------------------------------------------------------------------------------------------"
},
{
"name" : "entryRelationship",
"source" : [
{
"context" : "observation",
"element" : "entryRelationship",
"variable" : "entryRelationship"
}
],
"rule" : [
{
"name" : "Act",
"source" : [
{
"context" : "entryRelationship",
"element" : "encounter",
"variable" : "encounter"
}
],
"rule" : [
{
"name" : "templateId",
"source" : [
{
"context" : "encounter",
"element" : "templateId",
"variable" : "temid",
"condition" : "(root = '2.16.840.1.113883.3.1937.777.63.10.276')"
}
],
"rule" : [
{
"name" : "encounter",
"source" : [
{
"context" : "encounter"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %enc.id"
}
]
}
],
"rule" : [
{
"name" : "Act",
"source" : [
{
"context" : "observation",
"element" : "entryRelationship",
"variable" : "entryRelationship"
}
],
"rule" : [
{
"name" : "templateId",
"source" : [
{
"context" : "entryRelationship",
"element" : "encounter",
"variable" : "encounter1"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "encounter1",
"element" : "templateId",
"variable" : "temid",
"condition" : "(root = '2.16.840.1.113883.3.1937.777.63.10.281')"
}
],
"rule" : [
{
"name" : "class",
"source" : [
{
"context" : "encounter1",
"element" : "code",
"variable" : "code1"
}
],
"target" : [
{
"context" : "enc",
"contextType" : "variable",
"element" : "class",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "code1",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "code1",
"element" : "codeSystem",
"variable" : "system"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "translate",
"parameter" : [
{
"valueId" : "system"
},
{
"valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
},
{
"valueString" : "uri"
}
]
}
]
},
{
"name" : "displayName",
"source" : [
{
"context" : "code1",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
}
],
"documentation" : "encounter1.code -> enc.class;"
}
]
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "---------Tipo di Visita---------------------------------------------------------------------------------------------------------------------------------"
},
{
"name" : "entryRelationship",
"source" : [
{
"context" : "observation",
"element" : "entryRelationship",
"variable" : "entryRelationship"
}
],
"rule" : [
{
"name" : "Act",
"source" : [
{
"context" : "entryRelationship",
"element" : "act",
"variable" : "act"
}
],
"rule" : [
{
"name" : "templateId",
"source" : [
{
"context" : "act",
"element" : "templateId",
"variable" : "temid",
"condition" : "(root = '2.16.840.1.113883.3.1937.777.63.10.274')"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "act",
"element" : "text",
"variable" : "text"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "note",
"variable" : "note"
}
],
"rule" : [
{
"name" : "tcx",
"source" : [
{
"context" : "text",
"element" : "reference",
"variable" : "t"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "t",
"element" : "value",
"variable" : "l"
}
],
"target" : [
{
"context" : "note",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueId" : "l"
}
]
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "------------Nota esplicita--------------------------------------------------------------------------------------------------------------------------------------------"
},
{
"name" : "Act",
"source" : [
{
"context" : "observation",
"element" : "entryRelationship",
"variable" : "entryRelationship"
}
],
"rule" : [
{
"name" : "templateId",
"source" : [
{
"context" : "entryRelationship",
"element" : "act",
"variable" : "act"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "act",
"element" : "templateId",
"variable" : "temid",
"condition" : "(root = '2.16.840.1.113883.3.1937.777.63.10.278')"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "act",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "reasonCode",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
]
},
{
"name" : "Act",
"source" : [
{
"context" : "observation",
"element" : "entryRelationship",
"variable" : "entryRelationship"
}
],
"rule" : [
{
"name" : "templateId",
"source" : [
{
"context" : "entryRelationship",
"element" : "observation",
"variable" : "observation"
}
],
"rule" : [
{
"name" : "Timing",
"source" : [
{
"context" : "observation",
"element" : "templateId",
"variable" : "temid",
"condition" : "(root = '2.16.840.1.113883.3.1937.777.63.10.277')"
}
],
"rule" : [
{
"name" : "Count",
"source" : [
{
"context" : "observation",
"element" : "repeatNumber",
"variable" : "repeatNumber"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "occurrence",
"variable" : "Timing",
"transform" : "create",
"parameter" : [
{
"valueString" : "Timing"
}
]
}
],
"rule" : [
{
"name" : "event",
"source" : [
{
"context" : "repeatNumber"
}
],
"target" : [
{
"context" : "Timing",
"contextType" : "variable",
"element" : "repeat",
"variable" : "repeat"
}
],
"rule" : [
{
"name" : "count",
"source" : [
{
"context" : "repeatNumber",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "repeat",
"contextType" : "variable",
"element" : "count",
"transform" : "copy",
"parameter" : [
{
"valueId" : "value"
}
]
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "-----Sedute-----------------------------------------------------------------------------------------------------------------------------------------------"
}
]
}
]
}
],
"documentation" : "-------------Sezione Prescrizioni-------------------------------------------------------------------------------------------------------------------------------------"
},
{
"name" : "Annotazioni",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "code",
"condition" : "(code = '48767-8')"
}
],
"rule" : [
{
"name" : "entry",
"source" : [
{
"context" : "src",
"element" : "entry",
"variable" : "entry"
}
],
"rule" : [
{
"name" : "act",
"source" : [
{
"context" : "entry",
"element" : "act",
"variable" : "act"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "act",
"element" : "text",
"variable" : "text"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "note",
"variable" : "note"
}
],
"rule" : [
{
"name" : "tcx",
"source" : [
{
"context" : "text",
"element" : "reference",
"variable" : "t"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "t",
"element" : "value",
"variable" : "l"
}
],
"target" : [
{
"context" : "note",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueId" : "l"
}
]
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "------------Sezione Annotazioni-----------------------------------------------------------------------------------------------------------------------------------------"
},
{
"name" : "MessaggioRegionale",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "code",
"condition" : "(code = '51851-4')"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "src",
"element" : "text",
"variable" : "cdaText"
}
],
"target" : [
{
"context" : "ServiceRequest",
"contextType" : "variable",
"element" : "note",
"variable" : "note"
}
],
"rule" : [
{
"name" : "tcx",
"source" : [
{
"context" : "cdaText",
"variable" : "text"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "text",
"variable" : "l"
}
],
"target" : [
{
"context" : "note",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueId" : "l"
}
]
}
]
}
]
}
]
}
],
"documentation" : "----------Sezione Messaggio Regionale-----------------------------------------------------------------------------------------------------------------------------------"
},
{
"name" : "ParametriVitali",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "code",
"condition" : "(code = '8716-3')"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e11"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "resource",
"variable" : "Observation",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "Observation",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid11",
"transform" : "uuid"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Observation/"
},
{
"valueId" : "uuid11"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "tgt",
"contextType" : "variable",
"element" : "entry",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Observation/' + %Observation.id"
}
]
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "Observation",
"contextType" : "variable",
"element" : "subject",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Patient/' + %patient.id"
}
]
}
]
},
{
"name" : "reference",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "Observation",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %enc.id"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "Observation",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statuscode",
"source" : [
{
"context" : "src",
"condition" : "Observation.statusCode.exists().not()"
}
],
"rule" : [
{
"name" : "status",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "Observation",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "final"
}
]
}
]
}
]
},
{
"name" : "reference",
"source" : [
{
"context" : "src",
"element" : "text",
"variable" : "cdaText"
}
],
"target" : [
{
"context" : "Observation",
"contextType" : "variable",
"element" : "note",
"variable" : "note"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "cdaText",
"variable" : "t"
}
],
"target" : [
{
"context" : "note",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueId" : "t"
}
]
}
]
}
]
}
],
"documentation" : "-------Sezione Parametri Vitali---------------------------------------------------------------------------------------------------------------------------------------"
},
{
"name" : "Allergie",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "code",
"condition" : "(code = '48765-2')"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e11"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "resource",
"variable" : "AllergyIntolerance",
"transform" : "create",
"parameter" : [
{
"valueString" : "AllergyIntolerance"
}
]
},
{
"context" : "AllergyIntolerance",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid11",
"transform" : "uuid"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/AllergyIntolerance/"
},
{
"valueId" : "uuid11"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "AllergyIntolerance"
}
]
},
{
"context" : "tgt",
"contextType" : "variable",
"element" : "entry",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/AllergyIntolerance/' + %AllergyIntolerance.id"
}
]
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "AllergyIntolerance",
"contextType" : "variable",
"element" : "patient",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Patient/' + %patient.id"
}
]
}
]
},
{
"name" : "allergy",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "AllergyIntolerance",
"contextType" : "variable",
"element" : "clinicalStatus",
"variable" : "status",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"rule" : [
{
"name" : "text",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "status",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "coding",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "status",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "active",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "active"
}
]
}
]
},
{
"name" : "system",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
}
]
}
]
}
]
}
]
},
{
"name" : "reference",
"source" : [
{
"context" : "src",
"element" : "text",
"variable" : "cdaText"
}
],
"target" : [
{
"context" : "AllergyIntolerance",
"contextType" : "variable",
"element" : "note",
"variable" : "note"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "cdaText",
"variable" : "t"
}
],
"target" : [
{
"context" : "note",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueId" : "t"
}
]
}
]
}
]
}
],
"documentation" : "-------Sezione Allergie------------------------------------------------------------------------------------------------------------------------------------------------"
},
{
"name" : "StatoFunzionale",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "code",
"condition" : "(code = '47420-5')"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e11"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "resource",
"variable" : "Observation",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "Observation",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid11",
"transform" : "uuid"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Observation/"
},
{
"valueId" : "uuid11"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "tgt",
"contextType" : "variable",
"element" : "entry",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Observation/' + %Observation.id"
}
]
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "Observation",
"contextType" : "variable",
"element" : "subject",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Patient/' + %patient.id"
}
]
}
]
},
{
"name" : "reference",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "Observation",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %enc.id"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "Observation",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statuscode",
"source" : [
{
"context" : "src",
"condition" : "Observation.statusCode.exists().not()"
}
],
"rule" : [
{
"name" : "status",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "Observation",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "final"
}
]
}
]
}
]
},
{
"name" : "reference",
"source" : [
{
"context" : "src",
"element" : "text",
"variable" : "cdaText"
}
],
"target" : [
{
"context" : "Observation",
"contextType" : "variable",
"element" : "note",
"variable" : "note"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "cdaText",
"variable" : "t"
}
],
"target" : [
{
"context" : "note",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueId" : "t"
}
]
}
]
}
]
}
],
"documentation" : "------Sezione Stato Funzionale------------------------------------------------------------------------------------------------------------------------------------------"
}
]
}
]
}