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" : "cda2fhirLabReport",
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <pre>map "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirLabReport" = "cda2fhirLabReport"\n\nuses "http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument" alias ClinicalDocument as source\nuses "http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor" alias AssignedAuthor as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity" alias AssignedEntity as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity" alias AssociatedEntity as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization" alias CustodianOrganization as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf" alias OrganizationPartOf as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/Organization" alias rapresentedOrganization as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/Section" alias Section as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/PatientRole" alias PatientRole as queried\nuses "http://hl7.org/fhir/cda/StructureDefinition/AD" alias AD as source\nuses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target\nuses "http://hl7.org/fhir/StructureDefinition/Composition" alias Composition as produced\nuses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as produced\nuses "http://hl7.org/fhir/StructureDefinition/Encounter" alias Encounter as produced\nuses "http://hl7.org/fhir/StructureDefinition/Person" alias Patient as produced\nuses "http://hl7.org/fhir/StructureDefinition/Practitioner" alias Practitioner as produced\nuses "http://hl7.org/fhir/StructureDefinition/Specimen" alias Specimen as produced\nuses "http://hl7.org/fhir/StructureDefinition/Procedure" alias Procedure 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\nuses "http://hl7.org/fhir/cda/StructureDefinition/Organizer" alias Organizer as source\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 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) "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 } "record";\n } "patient";\n } "ClinicalDocumentToBody";\n}\n\ngroup ClinicalDocumentToBundle(source cda : ClinicalDocument, target patient : Patient, target composition : Composition, target encounter : Encounter, target bundle : Bundle, target documentreference : DocumentReference) {\n cda -> bundle.id = uuid() "id";\n cda.id -> bundle.identifier "identifier";\n cda -> bundle.type = 'transaction' "type";\n cda -> bundle.timestamp = (timestamp.now()) "date";\n cda then ClinicalDocumentComposition(cda, composition, patient, encounter, bundle, documentreference) "composition";\n cda.component as component then {\n component.structuredBody as body then {\n body.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, documentreference);\n };\n };\n } "body";\n };\n}\n\ngroup ClinicalDocumentSection(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter, target documentreference : DocumentReference) {\n src.title as t -> tgt.title = (t.dataString);\n src.code -> tgt.code;\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 src.entry as entry1 -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('DiagnosticReport') as DiagnosticReport, DiagnosticReport.id = uuid() as uuid1, e1.fullUrl = append('https://example/DiagnosticReport/', uuid1), request.url = 'DiagnosticReport', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/DiagnosticReport/' + %DiagnosticReport.id) then {\n entry1.act as act1 then Act(act1, patient, DiagnosticReport, enc, bundle);\n };\n src.component as component then {\n component.section as sec -> tgt.section as tgtSection then ClinicalDocumentSection(cda, sec, patient, tgtSection, bundle, enc, documentreference);\n };\n}\n\ngroup Observation(source obs : Observation, target patient : Patient, target encounter : Encounter, target ob : Observation, target bundle : Bundle) {\n obs -> ob.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n obs -> ob.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";\n obs.code -> ob.code;\n obs.statusCode as statusc where (code = 'completed') -> ob.status = 'final';\n obs.statusCode as statusc where (code = 'active') -> ob.status = 'registered';\n obs.statusCode as statusc where (code = 'aborted') -> ob.status = 'cancelled';\n obs.statusCode as statusc where (code = 'suspended') -> ob.status = 'partial';\n obs.effectiveTime as effectiveTime -> ob.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value2";\n obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n obs.effectiveTime as eff -> ob.effective = create('Period') as period then IVLTSPeriod(eff, period);\n } "where";\n obs.interpretationCode -> ob.interpretation;\n obs.methodCode -> ob.method;\n obs.value : INT as int -> ob.value = (int.value);\n obs.value : BL as boolean -> ob.value = (boolean.value) "boolean";\n obs.value : CE as val then {\n val -> ob.value = create('CodeableConcept') as ce then {\n val.originalText as originalText then {\n originalText.reference as reference -> ce.text = reference;\n } "originltext";\n val -> ce.coding as coding then {\n val.code as code -> coding.code = cast(code, 'string');\n val.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n val.displayName as display -> coding.display = cast(display, 'string');\n val.codeSystemVersion as version -> coding.version = cast(version, 'string');\n } "code";\n val.translation as translation -> ce.coding as coding then {\n translation.code as code -> coding.code = cast(code, 'string');\n translation.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n translation.displayName as display -> coding.display = cast(display, 'string');\n translation.codeSystemVersion as version -> coding.version = cast(version, 'string');\n translation.qualifier as qualifier then {\n qualifier.value as value -> ce.coding as coding then {\n value.code as code -> coding.code = cast(code, 'string');\n value.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n value.displayName as display -> coding.display = cast(display, 'string');\n value.codeSystemVersion as version -> coding.version = cast(version, 'string');\n };\n };\n };\n } "coding";\n } "val";\n obs.value : CD as val then {\n val -> ob.value = create('CodeableConcept') as ce then {\n val.originalText as originalText then {\n originalText.reference as reference -> ce.text = reference;\n } "originltext";\n val -> ce.coding as coding then {\n val.code as code -> coding.code = cast(code, 'string');\n val.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n val.displayName as display -> coding.display = cast(display, 'string');\n val.codeSystemVersion as version -> coding.version = cast(version, 'string');\n } "code";\n val.translation as translation -> ce.coding as coding then {\n translation.code as code -> coding.code = cast(code, 'string');\n translation.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n translation.displayName as display -> coding.display = cast(display, 'string');\n translation.codeSystemVersion as version -> coding.version = cast(version, 'string');\n translation.qualifier as qualifier then {\n qualifier.value as value -> ce.coding as coding then {\n value.code as code -> coding.code = cast(code, 'string');\n value.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n value.displayName as display -> coding.display = cast(display, 'string');\n value.codeSystemVersion as version -> coding.version = cast(version, 'string');\n };\n };\n };\n } "coding";\n } "val";\n obs.value : PQ as val then {\n val -> ob.value = create('Quantity') as quantity then {\n val.value as value -> quantity.value = value;\n val.unit as unit -> quantity.unit = unit;\n } "quantity";\n } "valueQuantity";\n obs.value : ST as value -> ob.value = create('string'), ob.value = (value.dataString);\n // Note e commenti\n obs.entryRelationship as entryRelationship then {\n entryRelationship.act as act then {\n act.text as text then {\n text.reference as reference -> ob.note as note then {\n reference -> note.text = (reference.value) "reference";\n };\n };\n } "Act";\n };\n // subject\n obs.subject as sbj then {\n sbj.relatedSubject as relatedSubj -> patient.extension as extension2 then ExtSubjectAnimal(relatedSubj, extension2);\n };\n // performer\n obs.performer as performer -> 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' then {\n performer -> ob.performer = create('Reference') as reference, reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n performer.assignedEntity as entity then {\n entity.code -> practitionerRole.code;\n entity -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'PUT', e2.resource = create('Practitioner') as practitioner then {\n entity -> practitioner.meta as meta then {\n entity -> meta.tag = create('Coding') as coding then {\n entity -> coding.system = 'http://algoritmodiscoring' "system";\n entity -> coding.code = 'ClinicalDocument/body/observation/performer' "code";\n } "coding";\n } "meta";\n entity.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n entity -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid2, e2.fullUrl = append('https://example/Practitioner/', uuid2), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "performer";\n } "r";\n } "identifier";\n entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "2";\n entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "diverso";\n entity.addr -> practitioner.address;\n entity.telecom -> practitioner.telecom;\n entity.assignedPerson as person then {\n person.name -> practitioner.name;\n person.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n // organization\n entity.representedOrganization as representedOrganization -> bundle.entry as e3, e3.request = create('BackboneElement') as request, request.method = 'PUT', e3.resource = create('Organization') as organization then {\n representedOrganization -> organization.meta as meta then {\n representedOrganization -> meta.tag = create('Coding') as coding then {\n representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";\n representedOrganization -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization' "code";\n } "coding";\n } "meta";\n representedOrganization.id as id -> organization.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization.id = (r + '-' + ext) as uuid3, e3.fullUrl = append('https://example/Organization/', uuid3), practitionerRole.organization = create('Reference') as referenceOrg, referenceOrg.reference = append('https://example/Organization/', uuid3) "aut";\n } "r";\n } "identifier";\n representedOrganization.name as v -> organization.name = (v.other);\n representedOrganization.telecom -> organization.telecom;\n representedOrganization.addr -> organization.address;\n representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e4, e4.request = create('BackboneElement') as request, e4.resource = create('Organization') as organization1, request.method = 'PUT' then {\n OrgPartOf -> organization1.meta as meta then {\n OrgPartOf -> meta.tag = create('Coding') as coding then {\n OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";\n OrgPartOf -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf' "code";\n } "coding";\n } "meta";\n OrgPartOf.id as id -> organization1.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization1.id = (r + '-' + ext) as uuid4, e4.fullUrl = append('https://example/Organization/', uuid4), organization.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization1.id) "org";\n } "r";\n } "identifier";\n OrgPartOf.code -> organization1.type;\n OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';\n OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'PUT', e5.resource = create('Organization') as organization2 then {\n wholeOrgan -> organization2.meta as meta then {\n wholeOrgan -> meta.tag = create('Coding') as coding then {\n wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";\n wholeOrgan -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization' "code";\n } "coding";\n } "meta";\n wholeOrgan.id as id -> organization2.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization2.id = (r + '-' + ext) as uuid5, e5.fullUrl = append('https://example/Organization/', uuid5), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";\n } "r";\n } "identifier";\n wholeOrgan.name as v -> organization2.name = (v.other);\n wholeOrgan.telecom -> organization2.telecom;\n wholeOrgan.addr -> organization2.address;\n };\n } "OrgPartOf";\n };\n } "practitioner";\n } "entity";\n } "practitionerRole";\n };\n // author\n obs.author as srcAuthor -> bundle.entry as e6, e6.request = create('BackboneElement') as request, request.method = 'POST', e6.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid6, e6.fullUrl = append('https://example/PractitionerRole/', uuid6), request.url = 'PractitionerRole', ob.performer = create('Reference') as referenceaut, referenceaut.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n srcAuthor.assignedAuthor as assignedAuthor then {\n assignedAuthor.code as codice -> practitionerRole.code as code2 then CECodeableConcept(codice, code2);\n assignedAuthor -> bundle.entry as e7, e7.request = create('BackboneElement') as request, request.method = 'PUT', e7.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid7 then {\n srcAuthor.functionCode -> practitionerRole.code;\n assignedAuthor -> practitioner.meta as meta then {\n assignedAuthor -> meta.tag = create('Coding') as coding then {\n assignedAuthor -> coding.system = 'http://algoritmodiscoring' "system";\n assignedAuthor -> coding.code = 'ClinicalDocument/body/observation/author' "code";\n } "coding";\n } "meta";\n assignedAuthor.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n assignedAuthor -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid2, e7.fullUrl = append('https://example/Practitioner/', uuid2), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";\n } "r";\n assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "2";\n assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "diverso";\n } "identifier";\n assignedAuthor.addr -> practitioner.address;\n assignedAuthor.telecom -> practitioner.telecom;\n // person\n assignedAuthor.assignedPerson as person then {\n person.name -> practitioner.name;\n person.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n } "ASSAUth";\n // organization\n assignedAuthor.representedOrganization as representedOrganization -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'PUT', e8.resource = create('Organization') as organization then {\n representedOrganization -> organization.meta as meta then {\n representedOrganization -> meta.tag = create('Coding') as coding then {\n representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";\n representedOrganization -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization' "code";\n } "coding";\n } "meta";\n representedOrganization.id as id -> organization.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization.id = (r + '-' + ext) as uuid3, e8.fullUrl = append('https://example/Organization/', uuid3), practitionerRole.organization = create('Reference') as referenceOrg, referenceOrg.reference = append('https://example/Organization/', uuid3) "org";\n } "r";\n } "identifier";\n representedOrganization.name as v -> organization.name = (v.other);\n representedOrganization.telecom -> organization.telecom;\n representedOrganization.addr -> organization.address;\n representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'PUT', e9.resource = create('Organization') as organization1 then {\n OrgPartOf -> organization1.meta as meta then {\n OrgPartOf -> meta.tag = create('Coding') as coding then {\n OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";\n OrgPartOf -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf' "code";\n } "coding";\n } "meta";\n OrgPartOf.id as id -> organization1.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization1.id = (r + '-' + ext) as uuid4, e9.fullUrl = append('https://example/Organization/', uuid4), organization.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization1.id) "org";\n } "r";\n } "identifier";\n OrgPartOf.code -> organization1.type;\n OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';\n OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e10, e10.request = create('BackboneElement') as request, request.method = 'PUT', e10.resource = create('Organization') as organization2 then {\n wholeOrgan -> organization2.meta as meta then {\n wholeOrgan -> meta.tag = create('Coding') as coding then {\n wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";\n wholeOrgan -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";\n } "coding";\n } "meta";\n wholeOrgan.id as id -> organization2.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization2.id = (r + '-' + ext) as uuid4, e10.fullUrl = append('https://example/Organization/', uuid4), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";\n } "r";\n } "identifier";\n wholeOrgan.name as v -> organization2.name = (v.other);\n wholeOrgan.telecom -> organization2.telecom;\n wholeOrgan.addr -> organization2.address;\n };\n } "OrgPartOf";\n };\n // device\n assignedAuthor.assignedAuthoringDevice as assignedAuthoringDevice -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'POST', e11.resource = create('Device') as device, device.id = uuid() as uuid11, e11.fullUrl = append('https://example/Device/', uuid11), request.url = 'Device', tgt.author = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {\n assignedAuthoringDevice.templateId -> device.identifier;\n assignedAuthoringDevice.code -> device.type;\n assignedAuthoringDevice.manufacturerModelName as manufacturerModelName then {\n manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";\n } "manufacturer";\n assignedAuthoringDevice.softwareName as softwareName -> device.deviceName as deviceName then {\n softwareName -> deviceName.type = 'other' "typeName";\n softwareName as s -> deviceName.name = (s.displayName) "name";\n } "deviceName";\n } "Device";\n };\n };\n // participant person\n obs.participant as participant where (typeCode != 'DEV') -> ob.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) then {\n participant -> encounter.participant as FhirParticipant then {\n participant as p -> FhirParticipant.type as type then {\n p -> type.coding as coding then {\n p -> coding.code = (p.typeCode) "codice";\n p -> coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' "system";\n } "codeType";\n } "type";\n } "fhirParticipant";\n participant.participantRole as participantRole -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid12, e12.fullUrl = append('https://example/PractitionerRole/', uuid12), request.url = 'PractitionerRole', encounter.participant = create('BackboneElement') as participant1, participant1.individual = create('Reference') as referencepart, referencepart.reference = ('https://example/Practitioner/' + %practitionerRole.id) then {\n // participant.time -> participant1.period;\n participant.time as time1 -> participant1.period = create('Period') as period then {\n time1 -> period.start = create('dateTime') as start then TSDateTime(time1, start) "val";\n };\n participant.time as time1 -> participant1.period = create('Period') as period then IVLTSPeriod(time1, period);\n participant.functionCode -> practitionerRole.code;\n // non mappa i 2 precedenti\n participantRole -> bundle.entry as e13, e13.request = create('BackboneElement') as request, request.method = 'PUT', e13.resource = create('Practitioner') as practitioner then {\n participantRole -> practitioner.meta as meta then {\n participantRole -> meta.tag = create('Coding') as coding then {\n participantRole -> coding.system = 'http://algoritmodiscoring' "system";\n participantRole -> coding.code = 'ClinicalDocument/body/observation/participant' "code";\n } "coding";\n } "meta";\n participantRole.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n participantRole -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid4, e13.fullUrl = append('https://example/Practitioner/', uuid4), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "org";\n } "r";\n } "identifier";\n participantRole.code -> practitionerRole.code;\n participantRole.addr -> practitioner.address;\n participantRole.telecom -> practitioner.telecom;\n participantRole.playingEntity as playingEntity then {\n playingEntity.name -> practitioner.name;\n playingEntity.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n } "practitioner";\n } "partRole";\n } "participantEncounter";\n // participant device\n obs.participant as devParticipant where (typeCode = 'DEV') -> bundle.entry as e14, e14.request = create('BackboneElement') as request, request.method = 'POST', e14.resource = create('Device') as device, device.id = uuid() as uuid14, e14.fullUrl = append('https://example/Device/', uuid14), request.url = 'Device', ob.device = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {\n devParticipant.participantRole as participantRoleDev then {\n participantRoleDev.playingDevice as playingDevice then {\n playingDevice.code -> device.type;\n playingDevice.manufacturerModelName as manufacturerModelName then {\n manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";\n } "manufacturer";\n playingDevice.softwareName as softwareName -> device.deviceName as deviceName then {\n softwareName -> deviceName.type = 'other' "typeName";\n softwareName as s -> deviceName.name = (s.displayName) "name";\n } "deviceName";\n };\n } "participantRoleDev";\n } "devParticipant";\n // observationMedia\n obs.entryRelationship as er then {\n er.observationMedia as obsMedia -> bundle.entry as e15, e15.request = create('BackboneElement') as request, request.method = 'POST', e15.resource = create('Media') as media1, media1.id = uuid() as uuid15, e15.fullUrl = append('https://example/Media/', uuid15), request.url = 'Media', ob.derivedFrom = create('Reference') as reference, reference.reference = ('https://example/Media/' + %media1.id) then {\n obsMedia -> media1.content = create('Attachment') as Attachment then {\n obsMedia -> media1.status = 'unknown' "status";\n obsMedia.value as valueMedia then {\n valueMedia.mediaType as type -> Attachment.contentType = type "type";\n valueMedia -> Attachment.data = (valueMedia.dataBase64Binary) "data";\n } "valuemedia";\n } "Attachment";\n } "media";\n } "observationMedia";\n // referenceRange\n obs.referenceRange as refRange -> ob.referenceRange = create('BackboneElement') as ref then {\n refRange.observationRange as obsRange then {\n obsRange.value : ST as value -> ref.text = create('string'), ref.text = (value.dataString);\n obsRange -> ref.low = create('Quantity') as Low then {\n obsRange.value : IVL_PQ as v then {\n v.low as l1 then {\n l1.value as decValue -> Low.value = decValue;\n l1.unit as Unit -> Low.unit = Unit;\n } "decValue";\n v -> ref.high = create('Quantity') as high then {\n v.high as h1 then {\n h1.value as decValue1 -> high.value = decValue1;\n h1.unit as Unit1 -> high.unit = Unit1;\n } "decValue";\n } "high";\n } "IVL-PQ";\n obsRange.interpretationCode -> ref.type;\n obsRange.precondition as precondition then {\n precondition.criterion as criterion then {\n criterion.code -> ref.appliesTo "appliesTo";\n criterion.value : IVL_PQ as v then {\n v.high as l1 then {\n l1 -> ref.age = create('Quantity') as age then {\n l1 -> age.high as high then {\n l1.value as decValue -> high.value = decValue;\n l1.unit as Unit1 -> high.unit = Unit1;\n } "high";\n } "age";\n } "low";\n } "v";\n };\n };\n } "obsRange";\n } "refRange";\n } "ref";\n}\n\ngroup Observation2(source obs : Observation, target patient : Patient, target encounter : Encounter, target ob : Observation, target bundle : Bundle, source cda : Act, target specimenp : Specimen) {\n obs -> ob.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n obs -> ob.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";\n obs.code -> ob.code;\n obs.statusCode as statusc where (code = 'completed') -> ob.status = 'final';\n obs.statusCode as statusc where (code = 'active') -> ob.status = 'registered';\n obs.statusCode as statusc where (code = 'aborted') -> ob.status = 'cancelled';\n obs.statusCode as statusc where (code = 'suspended') -> ob.status = 'partial';\n obs.effectiveTime as effectiveTime -> ob.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value2";\n obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n obs.effectiveTime as eff -> ob.effective = create('Period') as period then IVLTSPeriod(eff, period);\n } "where";\n obs.interpretationCode -> ob.interpretation;\n obs.methodCode -> ob.method;\n obs.value : INT as int -> ob.value = (int.value);\n obs.value : BL as boolean -> ob.value = (boolean.value) "boolean";\n obs.value : CE as val then {\n val -> ob.value = create('CodeableConcept') as ce then {\n val.originalText as originalText then {\n originalText.reference as reference -> ce.text = reference;\n } "originltext";\n val -> ce.coding as coding then {\n val.code as code -> coding.code = cast(code, 'string');\n val.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n val.displayName as display -> coding.display = cast(display, 'string');\n val.codeSystemVersion as version -> coding.version = cast(version, 'string');\n } "code";\n val.translation as translation -> ce.coding as coding then {\n translation.code as code -> coding.code = cast(code, 'string');\n translation.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n translation.displayName as display -> coding.display = cast(display, 'string');\n translation.codeSystemVersion as version -> coding.version = cast(version, 'string');\n translation.qualifier as qualifier then {\n qualifier.value as value -> ce.coding as coding then {\n value.code as code -> coding.code = cast(code, 'string');\n value.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n value.displayName as display -> coding.display = cast(display, 'string');\n value.codeSystemVersion as version -> coding.version = cast(version, 'string');\n };\n };\n };\n } "coding";\n } "val";\n obs.value : PQ as val then {\n val -> ob.value = create('Quantity') as quantity then {\n val.value as value -> quantity.value = value;\n val.unit as unit -> quantity.unit = unit;\n } "quantity";\n } "valueQuantity";\n obs.value : ST as value -> ob.value = create('string'), ob.value = (value.dataString);\n // Note e commenti\n obs.entryRelationship as entryRelationship then {\n entryRelationship.act as act then {\n act.text as text then {\n text.reference as reference -> ob.note as note then {\n reference -> note.text = (reference.value) "reference";\n };\n };\n } "Act";\n };\n // subject\n obs.subject as sbj then {\n sbj.relatedSubject as relatedSubj -> patient.extension as extension2 then ExtSubjectAnimal(relatedSubj, extension2);\n };\n cda where cda.entryRelationship.act.exists() then {\n // specimen\n obs.specimen as spmn then {\n spmn.specimenRole as specimenRole then {\n specimenRole.id as id then {\n id.extension as extobs then {\n cda.entryRelationship as entryRelationship then {\n entryRelationship.act as a then {\n a.specimen as sp then {\n sp.specimenRole as spr then {\n spr.id where (extension = extobs) -> bundle.entry as e4o, e4o.request = create('BackboneElement') as request, request.method = 'POST', e4o.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4o, e4o.fullUrl = append('https://example/Specimen/', uuid4o), request.url = 'Specimen', ob.specimen = create('Reference') as reference, reference.reference = ('https://example/Specimen/' + %specimen.id) then {\n spr -> specimen.parent = create('Reference') as reference, reference.reference = ('https://example/Specimen/' + %specimenp.id) "reference";\n spr.id -> specimen.identifier;\n specimenRole.specimenPlayingEntity as spent then {\n spent.code -> specimen.type;\n } "ent";\n spr.specimenPlayingEntity as specimenPlayingEntity then {\n specimenPlayingEntity.code -> specimen.type;\n };\n a -> specimen.collection = create('BackboneElement') as collection then {\n a.effectiveTime as effectivetime -> collection.collected = create('dateTime') as value then TSDateTime(effectivetime, value) "value";\n a where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n a.effectiveTime as eff -> collection.collected = create('Period') as period then IVLTSPeriod(eff, period);\n } "where";\n a.participant as participant -> bundle.entry as e10, e10.request = create('BackboneElement') as request, request.method = 'PUT', e10.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid11, e10.fullUrl = append('https://example/Practitioner/', uuid11), collection.collector = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) then {\n participant.participantRole as participantRole then {\n participantRole -> practitioner.meta as meta then {\n participantRole -> meta.tag = create('Coding') as coding then {\n participantRole -> coding.system = 'http://algoritmodiscoring' "system";\n participantRole -> coding.code = 'ClinicalDocument/body/act/participant' "code";\n } "coding";\n } "meta";\n participantRole.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n participantRole -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n } "identifier";\n participantRole.addr -> practitioner.address;\n participantRole.playingEntity as playingEntity then {\n playingEntity.name -> practitioner.name;\n };\n };\n };\n } "collection";\n } "cont";\n } "spr";\n } "sp";\n } "a";\n } "en";\n } "extobs";\n };\n };\n };\n } "conditionactexists";\n cda where cda.entryRelationship.act.exists().not() and (obs.specimen.specimenRole.specimenPlayingEntity.code.code != specimenp.type.coding.code) then {\n obs.specimen as spmn -> bundle.entry as e4o, e4o.request = create('BackboneElement') as request, request.method = 'POST', e4o.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4o, e4o.fullUrl = append('https://example/Specimen/', uuid4o), request.url = 'Specimen', ob.specimen = create('Reference') as reference, reference.reference = ('https://example/Specimen/' + %specimen.id) then {\n spmn.specimenRole as specimenRole then {\n specimenRole.id -> specimen.identifier;\n specimenRole.specimenPlayingEntity as specimenPlayingEntity then {\n specimenPlayingEntity.code -> specimen.type;\n };\n };\n };\n } "wherenotexists";\n // performer\n obs.performer as performer -> 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' then {\n performer -> ob.performer = create('Reference') as reference, reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n performer.assignedEntity as entity then {\n entity.code -> practitionerRole.code;\n entity -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'PUT', e2.resource = create('Practitioner') as practitioner then {\n entity -> practitioner.meta as meta then {\n entity -> meta.tag = create('Coding') as coding then {\n entity -> coding.system = 'http://algoritmodiscoring' "system";\n entity -> coding.code = 'ClinicalDocument/body/observation/performer' "code";\n } "coding";\n } "meta";\n entity.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n entity -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid2, e2.fullUrl = append('https://example/Practitioner/', uuid2), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "performer";\n } "r";\n } "identifier";\n entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "2";\n entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "diverso";\n entity.addr -> practitioner.address;\n entity.telecom -> practitioner.telecom;\n entity.assignedPerson as person then {\n person.name -> practitioner.name;\n person.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n // organization\n entity.representedOrganization as representedOrganization -> bundle.entry as e3, e3.request = create('BackboneElement') as request, request.method = 'PUT', e3.resource = create('Organization') as organization then {\n representedOrganization -> organization.meta as meta then {\n representedOrganization -> meta.tag = create('Coding') as coding then {\n representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";\n representedOrganization -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization' "code";\n } "coding";\n } "meta";\n representedOrganization.id as id -> organization.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization.id = (r + '-' + ext) as uuid3, e3.fullUrl = append('https://example/Organization/', uuid3), practitionerRole.organization = create('Reference') as referenceOrg, referenceOrg.reference = append('https://example/Organization/', uuid3) "aut";\n } "r";\n } "identifier";\n representedOrganization.name as v -> organization.name = (v.other);\n representedOrganization.telecom -> organization.telecom;\n representedOrganization.addr -> organization.address;\n representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e4, e4.request = create('BackboneElement') as request, e4.resource = create('Organization') as organization1, request.method = 'PUT' then {\n OrgPartOf -> organization1.meta as meta then {\n OrgPartOf -> meta.tag = create('Coding') as coding then {\n OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";\n OrgPartOf -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf' "code";\n } "coding";\n } "meta";\n OrgPartOf.id as id -> organization1.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization1.id = (r + '-' + ext) as uuid4, e4.fullUrl = append('https://example/Organization/', uuid4), organization.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization1.id) "org";\n } "r";\n } "identifier";\n OrgPartOf.code -> organization1.type;\n OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';\n OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'PUT', e5.resource = create('Organization') as organization2 then {\n wholeOrgan -> organization2.meta as meta then {\n wholeOrgan -> meta.tag = create('Coding') as coding then {\n wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";\n wholeOrgan -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization' "code";\n } "coding";\n } "meta";\n wholeOrgan.id as id -> organization2.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization2.id = (r + '-' + ext) as uuid5, e5.fullUrl = append('https://example/Organization/', uuid5), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";\n } "r";\n } "identifier";\n wholeOrgan.name as v -> organization2.name = (v.other);\n wholeOrgan.telecom -> organization2.telecom;\n wholeOrgan.addr -> organization2.address;\n };\n } "OrgPartOf";\n };\n } "practitioner";\n } "entity";\n } "practitionerRole";\n };\n // author\n obs.author as srcAuthor -> bundle.entry as e6, e6.request = create('BackboneElement') as request, request.method = 'POST', e6.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid6, e6.fullUrl = append('https://example/PractitionerRole/', uuid6), request.url = 'PractitionerRole', ob.performer = create('Reference') as referenceaut, referenceaut.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n srcAuthor.assignedAuthor as assignedAuthor then {\n assignedAuthor.code as codice -> practitionerRole.code as code2 then CECodeableConcept(codice, code2);\n assignedAuthor -> bundle.entry as e7, e7.request = create('BackboneElement') as request, request.method = 'PUT', e7.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid7 then {\n srcAuthor.functionCode -> practitionerRole.code;\n assignedAuthor -> practitioner.meta as meta then {\n assignedAuthor -> meta.tag = create('Coding') as coding then {\n assignedAuthor -> coding.system = 'http://algoritmodiscoring' "system";\n assignedAuthor -> coding.code = 'ClinicalDocument/body/observation/author' "code";\n } "coding";\n } "meta";\n assignedAuthor.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n assignedAuthor -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid2, e7.fullUrl = append('https://example/Practitioner/', uuid2), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";\n } "r";\n assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "2";\n assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "diverso";\n } "identifier";\n assignedAuthor.addr -> practitioner.address;\n assignedAuthor.telecom -> practitioner.telecom;\n // person\n assignedAuthor.assignedPerson as person then {\n person.name -> practitioner.name;\n person.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n } "ASSAUth";\n // organization\n assignedAuthor.representedOrganization as representedOrganization -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'PUT', e8.resource = create('Organization') as organization then {\n representedOrganization -> organization.meta as meta then {\n representedOrganization -> meta.tag = create('Coding') as coding then {\n representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";\n representedOrganization -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization' "code";\n } "coding";\n } "meta";\n representedOrganization.id as id -> organization.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization.id = (r + '-' + ext) as uuid3, e8.fullUrl = append('https://example/Organization/', uuid3), practitionerRole.organization = create('Reference') as referenceOrg, referenceOrg.reference = append('https://example/Organization/', uuid3) "org";\n } "r";\n } "identifier";\n representedOrganization.name as v -> organization.name = (v.other);\n representedOrganization.telecom -> organization.telecom;\n representedOrganization.addr -> organization.address;\n representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'PUT', e9.resource = create('Organization') as organization1 then {\n OrgPartOf -> organization1.meta as meta then {\n OrgPartOf -> meta.tag = create('Coding') as coding then {\n OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";\n OrgPartOf -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf' "code";\n } "coding";\n } "meta";\n OrgPartOf.id as id -> organization1.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization1.id = (r + '-' + ext) as uuid4, e9.fullUrl = append('https://example/Organization/', uuid4), organization.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization1.id) "org";\n } "r";\n } "identifier";\n OrgPartOf.code -> organization1.type;\n OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';\n OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e10, e10.request = create('BackboneElement') as request, request.method = 'PUT', e10.resource = create('Organization') as organization2 then {\n wholeOrgan -> organization2.meta as meta then {\n wholeOrgan -> meta.tag = create('Coding') as coding then {\n wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";\n wholeOrgan -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";\n } "coding";\n } "meta";\n wholeOrgan.id as id -> organization2.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization2.id = (r + '-' + ext) as uuid4, e10.fullUrl = append('https://example/Organization/', uuid4), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";\n } "r";\n } "identifier";\n wholeOrgan.name as v -> organization2.name = (v.other);\n wholeOrgan.telecom -> organization2.telecom;\n wholeOrgan.addr -> organization2.address;\n };\n } "OrgPartOf";\n };\n // device\n assignedAuthor.assignedAuthoringDevice as assignedAuthoringDevice -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'POST', e11.resource = create('Device') as device, device.id = uuid() as uuid11, e11.fullUrl = append('https://example/Device/', uuid11), request.url = 'Device', tgt.author = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {\n assignedAuthoringDevice.templateId -> device.identifier;\n assignedAuthoringDevice.code -> device.type;\n assignedAuthoringDevice.manufacturerModelName as manufacturerModelName then {\n manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";\n } "manufacturer";\n assignedAuthoringDevice.softwareName as softwareName -> device.deviceName as deviceName then {\n softwareName -> deviceName.type = 'other' "typeName";\n softwareName as s -> deviceName.name = (s.displayName) "name";\n } "deviceName";\n } "Device";\n };\n };\n // participant person\n obs.participant as participant where (typeCode != 'DEV') -> ob.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) then {\n participant -> encounter.participant as FhirParticipant then {\n participant as p -> FhirParticipant.type as type then {\n p -> type.coding as coding then {\n p -> coding.code = (p.typeCode) "codice";\n p -> coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' "system";\n } "codeType";\n } "type";\n } "fhirParticipant";\n participant.participantRole as participantRole -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid12, e12.fullUrl = append('https://example/PractitionerRole/', uuid12), request.url = 'PractitionerRole', encounter.participant = create('BackboneElement') as participant1, participant1.individual = create('Reference') as referencepart, referencepart.reference = ('https://example/Practitioner/' + %practitionerRole.id) then {\n // participant.time -> participant1.period;\n participant.time as time1 -> participant1.period = create('Period') as period then {\n time1 -> period.start = create('dateTime') as start then TSDateTime(time1, start) "val";\n };\n participant.time as time1 -> participant1.period = create('Period') as period then IVLTSPeriod(time1, period);\n participant.functionCode -> practitionerRole.code;\n // non mappa i 2 precedenti\n participantRole -> bundle.entry as e13, e13.request = create('BackboneElement') as request, request.method = 'PUT', e13.resource = create('Practitioner') as practitioner then {\n participantRole -> practitioner.meta as meta then {\n participantRole -> meta.tag = create('Coding') as coding then {\n participantRole -> coding.system = 'http://algoritmodiscoring' "system";\n participantRole -> coding.code = 'ClinicalDocument/body/observation/participant' "code";\n } "coding";\n } "meta";\n participantRole.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n participantRole -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid4, e13.fullUrl = append('https://example/Practitioner/', uuid4), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "org";\n } "r";\n } "identifier";\n participantRole.code -> practitionerRole.code;\n participantRole.addr -> practitioner.address;\n participantRole.telecom -> practitioner.telecom;\n participantRole.playingEntity as playingEntity then {\n playingEntity.name -> practitioner.name;\n playingEntity.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n } "practitioner";\n } "partRole";\n } "participantEncounter";\n // participant device\n obs.participant as devParticipant where (typeCode = 'DEV') -> bundle.entry as e14, e14.request = create('BackboneElement') as request, request.method = 'POST', e14.resource = create('Device') as device, device.id = uuid() as uuid14, e14.fullUrl = append('https://example/Device/', uuid14), request.url = 'Device', ob.device = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {\n devParticipant.participantRole as participantRoleDev then {\n participantRoleDev.playingDevice as playingDevice then {\n playingDevice.code -> device.type;\n playingDevice.manufacturerModelName as manufacturerModelName then {\n manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";\n } "manufacturer";\n playingDevice.softwareName as softwareName -> device.deviceName as deviceName then {\n softwareName -> deviceName.type = 'other' "typeName";\n softwareName as s -> deviceName.name = (s.displayName) "name";\n } "deviceName";\n };\n } "participantRoleDev";\n } "devParticipant";\n // observationMedia\n obs.entryRelationship as er then {\n er.observationMedia as obsMedia -> bundle.entry as e15, e15.request = create('BackboneElement') as request, request.method = 'POST', e15.resource = create('Media') as media1, media1.id = uuid() as uuid15, e15.fullUrl = append('https://example/Media/', uuid15), request.url = 'Media', ob.derivedFrom = create('Reference') as reference, reference.reference = ('https://example/Media/' + %media1.id) then {\n obsMedia -> media1.content = create('Attachment') as Attachment then {\n obsMedia -> media1.status = 'unknown' "status";\n obsMedia.value as valueMedia then {\n valueMedia.mediaType as type -> Attachment.contentType = type "type";\n valueMedia -> Attachment.data = (valueMedia.dataBase64Binary) "data";\n } "valuemedia";\n } "Attachment";\n } "media";\n } "observationMedia";\n // referenceRange\n obs.referenceRange as refRange -> ob.referenceRange = create('BackboneElement') as ref then {\n refRange.observationRange as obsRange then {\n obsRange.value : ST as value -> ref.text = create('string'), ref.text = (value.dataString);\n obsRange -> ref.low = create('Quantity') as Low then {\n obsRange.value : IVL_PQ as v then {\n v.low as l1 then {\n l1.value as decValue -> Low.value = decValue;\n l1.unit as Unit -> Low.unit = Unit;\n } "decValue";\n v -> ref.high = create('Quantity') as high then {\n v.high as h1 then {\n h1.value as decValue1 -> high.value = decValue1;\n h1.unit as Unit1 -> high.unit = Unit1;\n } "decValue";\n } "high";\n } "IVL-PQ";\n obsRange.interpretationCode -> ref.type;\n obsRange.precondition as precondition then {\n precondition.criterion as criterion then {\n criterion.code -> ref.appliesTo "appliesTo";\n criterion.value : IVL_PQ as v then {\n v.high as l1 then {\n l1 -> ref.age = create('Quantity') as age then {\n l1 -> age.high as high then {\n l1.value as decValue -> high.value = decValue;\n l1.unit as Unit1 -> high.unit = Unit1;\n } "high";\n } "age";\n } "low";\n } "v";\n };\n };\n } "obsRange";\n } "refRange";\n } "ref";\n}\n\ngroup Observation3(source obs : Observation, target patient : Patient, target encounter : Encounter, target ob : Observation, target bundle : Bundle, source cda : Act) {\n obs -> ob.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n obs -> ob.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";\n obs.code -> ob.code;\n obs.statusCode as statusc where (code = 'completed') -> ob.status = 'final';\n obs.statusCode as statusc where (code = 'active') -> ob.status = 'registered';\n obs.statusCode as statusc where (code = 'aborted') -> ob.status = 'cancelled';\n obs.statusCode as statusc where (code = 'suspended') -> ob.status = 'partial';\n obs.effectiveTime as effectiveTime -> ob.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value2";\n obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n obs.effectiveTime as eff -> ob.effective = create('Period') as period then IVLTSPeriod(eff, period);\n } "where";\n obs.interpretationCode -> ob.interpretation;\n obs.methodCode -> ob.method;\n obs.value : INT as int -> ob.value = (int.value);\n obs.value : BL as boolean -> ob.value = (boolean.value) "boolean";\n obs.value : CE as val then {\n val -> ob.value = create('CodeableConcept') as ce then {\n val.originalText as originalText then {\n originalText.reference as reference -> ce.text = reference;\n } "originltext";\n val -> ce.coding as coding then {\n val.code as code -> coding.code = cast(code, 'string');\n val.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n val.displayName as display -> coding.display = cast(display, 'string');\n val.codeSystemVersion as version -> coding.version = cast(version, 'string');\n } "code";\n val.translation as translation -> ce.coding as coding then {\n translation.code as code -> coding.code = cast(code, 'string');\n translation.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n translation.displayName as display -> coding.display = cast(display, 'string');\n translation.codeSystemVersion as version -> coding.version = cast(version, 'string');\n translation.qualifier as qualifier then {\n qualifier.value as value -> ce.coding as coding then {\n value.code as code -> coding.code = cast(code, 'string');\n value.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n value.displayName as display -> coding.display = cast(display, 'string');\n value.codeSystemVersion as version -> coding.version = cast(version, 'string');\n };\n };\n };\n } "coding";\n } "val";\n obs.value : PQ as val then {\n val -> ob.value = create('Quantity') as quantity then {\n val.value as value -> quantity.value = value;\n val.unit as unit -> quantity.unit = unit;\n } "quantity";\n } "valueQuantity";\n obs.value : ST as value -> ob.value = create('string'), ob.value = (value.dataString);\n // Note e commenti\n obs.entryRelationship as entryRelationship then {\n entryRelationship.act as act then {\n act.text as text then {\n text.reference as reference -> ob.note as note then {\n reference -> note.text = (reference.value) "reference";\n };\n };\n } "Act";\n };\n // subject\n obs.subject as sbj then {\n sbj.relatedSubject as relatedSubj -> patient.extension as extension2 then ExtSubjectAnimal(relatedSubj, extension2);\n };\n // specimen\n obs.specimen as spmn -> bundle.entry as e4o, e4o.request = create('BackboneElement') as request, request.method = 'POST', e4o.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4o, e4o.fullUrl = append('https://example/Specimen/', uuid4o), request.url = 'Specimen', ob.specimen = create('Reference') as reference, reference.reference = ('https://example/Specimen/' + %specimen.id) then {\n spmn.specimenRole as specimenRole then {\n specimenRole.id as id -> specimen.identifier;\n specimenRole.specimenPlayingEntity as specimenPlayingEntity then {\n specimenPlayingEntity.code -> specimen.type;\n };\n };\n };\n // performer\n obs.performer as performer -> 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' then {\n performer -> ob.performer = create('Reference') as reference, reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n performer.assignedEntity as entity then {\n entity.code -> practitionerRole.code;\n entity -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'PUT', e2.resource = create('Practitioner') as practitioner then {\n entity -> practitioner.meta as meta then {\n entity -> meta.tag = create('Coding') as coding then {\n entity -> coding.system = 'http://algoritmodiscoring' "system";\n entity -> coding.code = 'ClinicalDocument/body/observation/performer' "code";\n } "coding";\n } "meta";\n entity.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n entity -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid2, e2.fullUrl = append('https://example/Practitioner/', uuid2), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "performer";\n } "r";\n } "identifier";\n entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "2";\n entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "diverso";\n entity.addr -> practitioner.address;\n entity.telecom -> practitioner.telecom;\n entity.assignedPerson as person then {\n person.name -> practitioner.name;\n person.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n // organization\n entity.representedOrganization as representedOrganization -> bundle.entry as e3, e3.request = create('BackboneElement') as request, request.method = 'PUT', e3.resource = create('Organization') as organization then {\n representedOrganization -> organization.meta as meta then {\n representedOrganization -> meta.tag = create('Coding') as coding then {\n representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";\n representedOrganization -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization' "code";\n } "coding";\n } "meta";\n representedOrganization.id as id -> organization.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization.id = (r + '-' + ext) as uuid3, e3.fullUrl = append('https://example/Organization/', uuid3), practitionerRole.organization = create('Reference') as referenceOrg, referenceOrg.reference = append('https://example/Organization/', uuid3) "aut";\n } "r";\n } "identifier";\n representedOrganization.name as v -> organization.name = (v.other);\n representedOrganization.telecom -> organization.telecom;\n representedOrganization.addr -> organization.address;\n representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e4, e4.request = create('BackboneElement') as request, e4.resource = create('Organization') as organization1, request.method = 'PUT' then {\n OrgPartOf -> organization1.meta as meta then {\n OrgPartOf -> meta.tag = create('Coding') as coding then {\n OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";\n OrgPartOf -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf' "code";\n } "coding";\n } "meta";\n OrgPartOf.id as id -> organization1.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization1.id = (r + '-' + ext) as uuid4, e4.fullUrl = append('https://example/Organization/', uuid4), organization.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization1.id) "org";\n } "r";\n } "identifier";\n OrgPartOf.code -> organization1.type;\n OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';\n OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'PUT', e5.resource = create('Organization') as organization2 then {\n wholeOrgan -> organization2.meta as meta then {\n wholeOrgan -> meta.tag = create('Coding') as coding then {\n wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";\n wholeOrgan -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization' "code";\n } "coding";\n } "meta";\n wholeOrgan.id as id -> organization2.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization2.id = (r + '-' + ext) as uuid5, e5.fullUrl = append('https://example/Organization/', uuid5), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";\n } "r";\n } "identifier";\n wholeOrgan.name as v -> organization2.name = (v.other);\n wholeOrgan.telecom -> organization2.telecom;\n wholeOrgan.addr -> organization2.address;\n };\n } "OrgPartOf";\n };\n } "practitioner";\n } "entity";\n } "practitionerRole";\n };\n // author\n obs.author as srcAuthor -> bundle.entry as e6, e6.request = create('BackboneElement') as request, request.method = 'POST', e6.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid6, e6.fullUrl = append('https://example/PractitionerRole/', uuid6), request.url = 'PractitionerRole', ob.performer = create('Reference') as referenceaut, referenceaut.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n srcAuthor.assignedAuthor as assignedAuthor then {\n assignedAuthor.code as codice -> practitionerRole.code as code2 then CECodeableConcept(codice, code2);\n assignedAuthor -> bundle.entry as e7, e7.request = create('BackboneElement') as request, request.method = 'PUT', e7.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid7 then {\n srcAuthor.functionCode -> practitionerRole.code;\n assignedAuthor -> practitioner.meta as meta then {\n assignedAuthor -> meta.tag = create('Coding') as coding then {\n assignedAuthor -> coding.system = 'http://algoritmodiscoring' "system";\n assignedAuthor -> coding.code = 'ClinicalDocument/body/observation/author' "code";\n } "coding";\n } "meta";\n assignedAuthor.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n assignedAuthor -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid2, e7.fullUrl = append('https://example/Practitioner/', uuid2), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";\n } "r";\n assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "2";\n assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "diverso";\n } "identifier";\n assignedAuthor.addr -> practitioner.address;\n assignedAuthor.telecom -> practitioner.telecom;\n // person\n assignedAuthor.assignedPerson as person then {\n person.name -> practitioner.name;\n person.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n } "ASSAUth";\n // organization\n assignedAuthor.representedOrganization as representedOrganization -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'PUT', e8.resource = create('Organization') as organization then {\n representedOrganization -> organization.meta as meta then {\n representedOrganization -> meta.tag = create('Coding') as coding then {\n representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";\n representedOrganization -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization' "code";\n } "coding";\n } "meta";\n representedOrganization.id as id -> organization.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization.id = (r + '-' + ext) as uuid3, e8.fullUrl = append('https://example/Organization/', uuid3), practitionerRole.organization = create('Reference') as referenceOrg, referenceOrg.reference = append('https://example/Organization/', uuid3) "org";\n } "r";\n } "identifier";\n representedOrganization.name as v -> organization.name = (v.other);\n representedOrganization.telecom -> organization.telecom;\n representedOrganization.addr -> organization.address;\n representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'PUT', e9.resource = create('Organization') as organization1 then {\n OrgPartOf -> organization1.meta as meta then {\n OrgPartOf -> meta.tag = create('Coding') as coding then {\n OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";\n OrgPartOf -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf' "code";\n } "coding";\n } "meta";\n OrgPartOf.id as id -> organization1.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization1.id = (r + '-' + ext) as uuid4, e9.fullUrl = append('https://example/Organization/', uuid4), organization.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization1.id) "org";\n } "r";\n } "identifier";\n OrgPartOf.code -> organization1.type;\n OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';\n OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e10, e10.request = create('BackboneElement') as request, request.method = 'PUT', e10.resource = create('Organization') as organization2 then {\n wholeOrgan -> organization2.meta as meta then {\n wholeOrgan -> meta.tag = create('Coding') as coding then {\n wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";\n wholeOrgan -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";\n } "coding";\n } "meta";\n wholeOrgan.id as id -> organization2.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization2.id = (r + '-' + ext) as uuid4, e10.fullUrl = append('https://example/Organization/', uuid4), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";\n } "r";\n } "identifier";\n wholeOrgan.name as v -> organization2.name = (v.other);\n wholeOrgan.telecom -> organization2.telecom;\n wholeOrgan.addr -> organization2.address;\n };\n } "OrgPartOf";\n };\n // device\n assignedAuthor.assignedAuthoringDevice as assignedAuthoringDevice -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'POST', e11.resource = create('Device') as device, device.id = uuid() as uuid11, e11.fullUrl = append('https://example/Device/', uuid11), request.url = 'Device', tgt.author = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {\n assignedAuthoringDevice.templateId -> device.identifier;\n assignedAuthoringDevice.code -> device.type;\n assignedAuthoringDevice.manufacturerModelName as manufacturerModelName then {\n manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";\n } "manufacturer";\n assignedAuthoringDevice.softwareName as softwareName -> device.deviceName as deviceName then {\n softwareName -> deviceName.type = 'other' "typeName";\n softwareName as s -> deviceName.name = (s.displayName) "name";\n } "deviceName";\n } "Device";\n };\n };\n // participant person\n obs.participant as participant where (typeCode != 'DEV') -> ob.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) then {\n participant -> encounter.participant as FhirParticipant then {\n participant as p -> FhirParticipant.type as type then {\n p -> type.coding as coding then {\n p -> coding.code = (p.typeCode) "codice";\n p -> coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' "system";\n } "codeType";\n } "type";\n } "fhirParticipant";\n participant.participantRole as participantRole -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid12, e12.fullUrl = append('https://example/PractitionerRole/', uuid12), request.url = 'PractitionerRole', encounter.participant = create('BackboneElement') as participant1, participant1.individual = create('Reference') as referencepart, referencepart.reference = ('https://example/Practitioner/' + %practitionerRole.id) then {\n // participant.time -> participant1.period;\n participant.time as time1 -> participant1.period = create('Period') as period then {\n time1 -> period.start = create('dateTime') as start then TSDateTime(time1, start) "val";\n };\n participant.time as time1 -> participant1.period = create('Period') as period then IVLTSPeriod(time1, period);\n participant.functionCode -> practitionerRole.code;\n // non mappa i 2 precedenti\n participantRole -> bundle.entry as e13, e13.request = create('BackboneElement') as request, request.method = 'PUT', e13.resource = create('Practitioner') as practitioner then {\n participantRole -> practitioner.meta as meta then {\n participantRole -> meta.tag = create('Coding') as coding then {\n participantRole -> coding.system = 'http://algoritmodiscoring' "system";\n participantRole -> coding.code = 'ClinicalDocument/body/observation/participant' "code";\n } "coding";\n } "meta";\n participantRole.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n participantRole -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid4, e13.fullUrl = append('https://example/Practitioner/', uuid4), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "org";\n } "r";\n } "identifier";\n participantRole.code -> practitionerRole.code;\n participantRole.addr -> practitioner.address;\n participantRole.telecom -> practitioner.telecom;\n participantRole.playingEntity as playingEntity then {\n playingEntity.name -> practitioner.name;\n playingEntity.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n } "practitioner";\n } "partRole";\n } "participantEncounter";\n // participant device\n obs.participant as devParticipant where (typeCode = 'DEV') -> bundle.entry as e14, e14.request = create('BackboneElement') as request, request.method = 'POST', e14.resource = create('Device') as device, device.id = uuid() as uuid14, e14.fullUrl = append('https://example/Device/', uuid14), request.url = 'Device', ob.device = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {\n devParticipant.participantRole as participantRoleDev then {\n participantRoleDev.playingDevice as playingDevice then {\n playingDevice.code -> device.type;\n playingDevice.manufacturerModelName as manufacturerModelName then {\n manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";\n } "manufacturer";\n playingDevice.softwareName as softwareName -> device.deviceName as deviceName then {\n softwareName -> deviceName.type = 'other' "typeName";\n softwareName as s -> deviceName.name = (s.displayName) "name";\n } "deviceName";\n };\n } "participantRoleDev";\n } "devParticipant";\n // observationMedia\n obs.entryRelationship as er then {\n er.observationMedia as obsMedia -> bundle.entry as e15, e15.request = create('BackboneElement') as request, request.method = 'POST', e15.resource = create('Media') as media1, media1.id = uuid() as uuid15, e15.fullUrl = append('https://example/Media/', uuid15), request.url = 'Media', ob.derivedFrom = create('Reference') as reference, reference.reference = ('https://example/Media/' + %media1.id) then {\n obsMedia -> media1.content = create('Attachment') as Attachment then {\n obsMedia -> media1.status = 'unknown' "status";\n obsMedia.value as valueMedia then {\n valueMedia.mediaType as type -> Attachment.contentType = type "type";\n valueMedia -> Attachment.data = (valueMedia.dataBase64Binary) "data";\n } "valuemedia";\n } "Attachment";\n } "media";\n } "observationMedia";\n // referenceRange\n obs.referenceRange as refRange -> ob.referenceRange = create('BackboneElement') as ref then {\n refRange.observationRange as obsRange then {\n obsRange.value : ST as value -> ref.text = create('string'), ref.text = (value.dataString);\n obsRange -> ref.low = create('Quantity') as Low then {\n obsRange.value : IVL_PQ as v then {\n v.low as l1 then {\n l1.value as decValue -> Low.value = decValue;\n l1.unit as Unit -> Low.unit = Unit;\n } "decValue";\n v -> ref.high = create('Quantity') as high then {\n v.high as h1 then {\n h1.value as decValue1 -> high.value = decValue1;\n h1.unit as Unit1 -> high.unit = Unit1;\n } "decValue";\n } "high";\n } "IVLPQ";\n obsRange.interpretationCode -> ref.type;\n obsRange.precondition as precondition then {\n precondition.criterion as criterion then {\n criterion.code -> ref.appliesTo "appliesTo";\n criterion.value : IVL_PQ as v then {\n v.high as l1 then {\n l1 -> ref.age = create('Quantity') as age then {\n l1 -> age.high as high then {\n l1.value as decValue -> high.value = decValue;\n l1.unit as Unit1 -> high.unit = Unit1;\n } "high";\n } "age";\n } "low";\n } "v";\n };\n };\n } "obsRange";\n } "refRange";\n } "ref";\n}\n\ngroup Act(source cda : Act, target pat : Patient, target ac : DiagnosticReport, target enc : Encounter, target bundle : Bundle) {\n cda.code -> ac.code;\n cda where cda.statusCode.exists().not() then {\n cda -> ac.status = 'final' "statuscode";\n } "status";\n cda.statusCode as statusc where (code = 'completed') -> ac.status = 'final';\n cda.statusCode as statusc where (code = 'active') -> ac.status = 'registered';\n cda.statusCode as statusc where (code = 'aborted') -> ac.status = 'cancelled';\n cda.statusCode as statusc where (code = 'suspended') -> ac.status = 'partial';\n cda.effectiveTime as effectiveTime -> ac.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value3";\n cda where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n cda.effectiveTime as eff -> ac.effective = create('Period') as period then IVLTSPeriod(eff, period);\n } "where";\n cda -> ac.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %pat.id) "reference";\n cda -> ac.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";\n // specimen\n cda where cda.specimen.exists() then {\n cda.specimen as src -> bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'POST', e4.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4, e4.fullUrl = append('https://example/Specimen/', uuid4), request.url = 'Specimen', ac.specimen = create('Reference') as reference, reference.reference = ('https://example/Specimen/' + %specimen.id) then {\n src.specimenRole as specimenRole then {\n specimenRole.id -> specimen.identifier;\n specimenRole.specimenPlayingEntity as specimenPlayingEntity then {\n specimenPlayingEntity.code -> specimen.type;\n };\n } "SpecimenRole";\n src -> specimen.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n cda.entryRelationship as entryRelationship then {\n entryRelationship.observation as observation then {\n observation -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('Observation') as obs, obs.id = uuid() as uuid13, e12.fullUrl = append('https://example/Observation/', uuid13), request.url = 'Observation', ac.result = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %obs.id) then {\n observation then Observation2(observation, pat, enc, obs, bundle, cda, specimen) "ORG";\n // procedure\n cda.entryRelationship as entryRelationship1 then {\n entryRelationship1.procedure as proc -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'POST', e5.resource = create('Procedure') as procedure, procedure.id = uuid() as uuid5, e5.fullUrl = append('https://example/Procedure/', uuid5), request.url = 'Procedure', obs.partOf = create('Reference') as reference, reference.reference = ('https://example/Procedure/' + %procedure.id) then {\n proc -> procedure.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n proc -> procedure.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";\n proc where proc.statusCode.exists().not() then {\n proc -> procedure.status = 'unknown' "statuscode";\n } "status";\n proc.statusCode as statusc where (code = 'completed') -> procedure.status = 'completed';\n proc.statusCode as statusc where (code = 'active') -> procedure.status = 'in-progress';\n proc.statusCode as statusc where (code = 'aborted') -> procedure.status = 'stopped';\n proc.statusCode as statusc where (code = 'suspended') -> procedure.status = 'on-hold';\n proc.statusCode as statusc where (code = 'cancelled') -> procedure.status = 'not-done';\n proc.statusCode as statusc where (code = 'held') -> procedure.status = 'on-hold';\n proc.statusCode as statusc where (code = 'new') -> procedure.status = 'preparation';\n proc.statusCode as statusc where (code = 'obsolete') -> procedure.status = 'entered-in-error';\n proc.statusCode as statusc where (code = 'nullified') -> procedure.status = 'unknown';\n proc.effectiveTime as effectiveTime -> procedure.performed = create('dateTime') as value then TSDateTime(effectiveTime, value) "datetime";\n proc where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n proc.effectiveTime as eff -> procedure.performed = create('Period') as period then IVLTSPeriod(eff, period);\n } "where";\n proc.targetSiteCode -> procedure.bodySite;\n };\n } "entryRelationshipprocedure";\n } "obs";\n };\n entryRelationship.organizer as organizer then {\n organizer -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('Observation') as obs, obs.id = uuid() as uuid13, e12.fullUrl = append('https://example/Observation/', uuid13), request.url = 'Observation', ac.result = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %obs.id) then {\n organizer then Organizer(cda, organizer, pat, enc, obs, bundle) "ORG";\n // procedure\n cda.entryRelationship as entryRelationship1 then {\n entryRelationship1.procedure as proc -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'POST', e5.resource = create('Procedure') as procedure, procedure.id = uuid() as uuid5, e5.fullUrl = append('https://example/Procedure/', uuid5), request.url = 'Procedure', obs.partOf = create('Reference') as reference, reference.reference = ('https://example/Procedure/' + %procedure.id) then {\n proc -> procedure.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n proc -> procedure.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";\n proc where proc.statusCode.exists().not() then {\n proc -> procedure.status = 'unknown' "statuscode";\n } "status";\n proc.statusCode as statusc where (code = 'completed') -> procedure.status = 'completed';\n proc.statusCode as statusc where (code = 'active') -> procedure.status = 'in-progress';\n proc.statusCode as statusc where (code = 'aborted') -> procedure.status = 'stopped';\n proc.statusCode as statusc where (code = 'suspended') -> procedure.status = 'on-hold';\n proc.statusCode as statusc where (code = 'cancelled') -> procedure.status = 'not-done';\n proc.statusCode as statusc where (code = 'held') -> procedure.status = 'on-hold';\n proc.statusCode as statusc where (code = 'new') -> procedure.status = 'preparation';\n proc.statusCode as statusc where (code = 'obsolete') -> procedure.status = 'entered-in-error';\n proc.statusCode as statusc where (code = 'nullified') -> procedure.status = 'unknown';\n proc.effectiveTime as effectiveTime -> procedure.performed = create('dateTime') as value then TSDateTime(effectiveTime, value) "datetime";\n proc where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n proc.effectiveTime as eff -> procedure.performed = create('Period') as period then IVLTSPeriod(eff, period);\n } "where";\n proc.targetSiteCode -> procedure.bodySite;\n } "pbservation";\n } "entryRelationshiprocedure";\n } "Organizer";\n };\n } "entryRelationshipobservation";\n };\n } "exist";\n cda where cda.specimen.exists().not() then {\n // cda -> bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'POST', e4.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4, e4.fullUrl = append('https://example/Specimen/', uuid4), request.url = 'Specimen' then {\n cda.entryRelationship as entryRelationship then {\n entryRelationship.observation as observation then {\n observation -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('Observation') as obs, obs.id = uuid() as uuid13, e12.fullUrl = append('https://example/Observation/', uuid13), request.url = 'Observation', ac.result = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %obs.id) then {\n observation then Observation3(observation, pat, enc, obs, bundle, cda) "ORG";\n // procedure\n cda.entryRelationship as entryRelationship1 then {\n entryRelationship1.procedure as proc -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'POST', e5.resource = create('Procedure') as procedure, procedure.id = uuid() as uuid5, e5.fullUrl = append('https://example/Procedure/', uuid5), request.url = 'Procedure', obs.partOf = create('Reference') as reference, reference.reference = ('https://example/Procedure/' + %procedure.id) then {\n proc -> procedure.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n proc -> procedure.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";\n proc where proc.statusCode.exists().not() then {\n proc -> procedure.status = 'unknown' "statuscode";\n } "status";\n proc.statusCode as statusc where (code = 'completed') -> procedure.status = 'completed';\n proc.statusCode as statusc where (code = 'active') -> procedure.status = 'in-progress';\n proc.statusCode as statusc where (code = 'aborted') -> procedure.status = 'stopped';\n proc.statusCode as statusc where (code = 'suspended') -> procedure.status = 'on-hold';\n proc.statusCode as statusc where (code = 'cancelled') -> procedure.status = 'not-done';\n proc.statusCode as statusc where (code = 'held') -> procedure.status = 'on-hold';\n proc.statusCode as statusc where (code = 'new') -> procedure.status = 'preparation';\n proc.statusCode as statusc where (code = 'obsolete') -> procedure.status = 'entered-in-error';\n proc.statusCode as statusc where (code = 'nullified') -> procedure.status = 'unknown';\n proc.effectiveTime as effectiveTime -> procedure.performed = create('dateTime') as value then TSDateTime(effectiveTime, value) "datetime";\n proc where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n proc.effectiveTime as eff -> procedure.performed = create('Period') as period then IVLTSPeriod(eff, period);\n } "where";\n proc.targetSiteCode -> procedure.bodySite;\n };\n } "entryRelationshipprocedure";\n } "obs";\n };\n entryRelationship.organizer as organizer then {\n organizer -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('Observation') as obs, obs.id = uuid() as uuid13, e12.fullUrl = append('https://example/Observation/', uuid13), request.url = 'Observation', ac.result = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %obs.id) then {\n organizer then Organizer(cda, organizer, pat, enc, obs, bundle) "ORG";\n // procedure\n cda.entryRelationship as entryRelationship1 then {\n entryRelationship1.procedure as proc -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'POST', e5.resource = create('Procedure') as procedure, procedure.id = uuid() as uuid5, e5.fullUrl = append('https://example/Procedure/', uuid5), request.url = 'Procedure', obs.partOf = create('Reference') as reference, reference.reference = ('https://example/Procedure/' + %procedure.id) then {\n proc -> procedure.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n proc -> procedure.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";\n proc where proc.statusCode.exists().not() then {\n proc -> procedure.status = 'unknown' "statuscode";\n } "status";\n proc.statusCode as statusc where (code = 'completed') -> procedure.status = 'completed';\n proc.statusCode as statusc where (code = 'active') -> procedure.status = 'in-progress';\n proc.statusCode as statusc where (code = 'aborted') -> procedure.status = 'stopped';\n proc.statusCode as statusc where (code = 'suspended') -> procedure.status = 'on-hold';\n proc.statusCode as statusc where (code = 'cancelled') -> procedure.status = 'not-done';\n proc.statusCode as statusc where (code = 'held') -> procedure.status = 'on-hold';\n proc.statusCode as statusc where (code = 'new') -> procedure.status = 'preparation';\n proc.statusCode as statusc where (code = 'obsolete') -> procedure.status = 'entered-in-error';\n proc.statusCode as statusc where (code = 'nullified') -> procedure.status = 'unknown';\n proc.effectiveTime as effectiveTime -> procedure.performed = create('dateTime') as value then TSDateTime(effectiveTime, value) "datetime";\n proc where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n proc.effectiveTime as eff -> procedure.performed = create('Period') as period then IVLTSPeriod(eff, period);\n } "where";\n proc.targetSiteCode -> procedure.bodySite;\n } "pbservation";\n } "entryRelationshiprocedure";\n } "Organizer";\n };\n } "entryRelationshipobservation";\n } "existnot";\n // PARTICIPANT\n cda.participant as part where (typeCode != 'DEV') -> enc.participant as participant then {\n part -> participant.type as type then {\n part -> type.coding as coding then {\n part -> coding.code = (part.typeCode) "codice";\n part -> coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' "system";\n } "codeType";\n } "type";\n part.participantRole as participantRole -> participant.individual = create('Reference') as reference then {\n participantRole -> bundle.entry as e, e.request = create('BackboneElement') as request, request.method = 'PUT', e.resource = create('Practitioner') as practitioner then {\n part.time as time1 -> participant.period = create('Period') as period then {\n time1 -> period.start = create('dateTime') as start then TSDateTime(time1, start) "val";\n };\n part.time as time1 -> participant.period = create('Period') as period then IVLTSPeriod(time1, period);\n participantRole -> practitioner.meta as meta then {\n participantRole -> meta.tag = create('Coding') as coding then {\n participantRole -> coding.system = 'http://algoritmodiscoring' "system";\n participantRole -> coding.code = 'ClinicalDocument/body/act/participant' "code";\n } "coding";\n } "meta";\n participantRole.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n participantRole -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid4, e.fullUrl = append('https://example/Practitioner/', uuid4), reference.reference = ('https://example/Practitioner/' + %practitioner.id) "org";\n } "r";\n } "identifier";\n participantRole.addr -> practitioner.address;\n participantRole.playingEntity as playingEntity then {\n playingEntity.name -> practitioner.name;\n };\n } "participanRoleBund";\n };\n };\n // PERFORMER\n cda.performer as performer -> 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', ac.performer = create('Reference') as reference, reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n performer.assignedEntity as assignedEntity then {\n assignedEntity.code as codice -> practitionerRole.code;\n assignedEntity -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'PUT', e2.resource = create('Practitioner') as practitioner then {\n assignedEntity.code -> practitionerRole.code;\n assignedEntity -> practitioner.meta as meta then {\n assignedEntity -> meta.tag = create('Coding') as coding then {\n assignedEntity -> coding.system = 'http://algoritmodiscoring' "system";\n assignedEntity -> coding.code = 'ClinicalDocument/body/act/performer' "code";\n } "coding";\n } "meta";\n assignedEntity.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n assignedEntity -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid4, e2.fullUrl = append('https://example/Practitioner/', uuid4), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "pra";\n } "r";\n } "identifier";\n assignedEntity.addr -> practitioner.address;\n assignedEntity.telecom -> practitioner.telecom;\n assignedEntity.assignedPerson as person then {\n person.name -> practitioner.name;\n person.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n } "ASSAUth";\n assignedEntity.representedOrganization as representedOrganization -> bundle.entry as e3, e3.request = create('BackboneElement') as request, request.method = 'PUT', e3.resource = create('Organization') as organization then {\n representedOrganization -> organization.meta as meta then {\n representedOrganization -> meta.tag = create('Coding') as coding then {\n representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";\n representedOrganization -> coding.code = 'ClinicalDocument/body/act/representedOrganization' "code";\n } "coding";\n } "meta";\n representedOrganization.id as id -> organization.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization.id = (r + '-' + ext) as uuid2, e3.fullUrl = append('https://example/Organization/', uuid2), practitionerRole.organization = create('Reference') as referenceOrg, referenceOrg.reference = append('https://example/Organization/', uuid2) "org";\n } "r";\n } "identifier";\n representedOrganization.name as v -> organization.name = (v.other);\n representedOrganization.telecom -> organization.telecom;\n representedOrganization.addr -> organization.address;\n representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'PUT', e4.resource = create('Organization') as organization1 then {\n OrgPartOf -> organization1.meta as meta then {\n OrgPartOf -> meta.tag = create('Coding') as coding then {\n OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";\n OrgPartOf -> coding.code = 'ClinicalDocument/body/act/representedOrganization/asOrganizationPartOf' "code";\n } "coding";\n } "meta";\n OrgPartOf.id as id -> organization1.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization1.id = (r + '-' + ext) as uuid3, organization1.id = uuid() as uuid3, e4.fullUrl = append('https://example/Organization/', uuid3), organization.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization1.id) "org";\n } "r";\n } "identifier";\n OrgPartOf.code -> organization1.type;\n OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';\n OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e10bis, e10bis.request = create('BackboneElement') as request, request.method = 'PUT', e10bis.resource = create('Organization') as organization2 then {\n OrgPartOf -> organization2.meta as meta then {\n OrgPartOf -> meta.tag = create('Coding') as coding then {\n OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";\n OrgPartOf -> coding.code = 'ClinicalDocument/body/act/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";\n } "coding";\n } "meta";\n wholeOrgan.id as id -> organization2.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization2.id = (r + '-' + ext) as uuid5, e10bis.fullUrl = append('https://example/Organization/', uuid5), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";\n } "r";\n } "identifier";\n wholeOrgan.name as v -> organization2.name = (v.other);\n wholeOrgan.telecom -> organization2.telecom;\n wholeOrgan.addr -> organization2.address;\n };\n } "OrgPartOf";\n };\n } "performer";\n };\n // AUTHOR\n cda.author as srcAuthor -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'POST', e5.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid6, e5.fullUrl = append('https://example/PractitionerRole/', uuid6), request.url = 'PractitionerRole', ac.performer = create('Reference') as reference, reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n srcAuthor.assignedAuthor as assignedAuthor then {\n assignedAuthor.code as codice -> practitionerRole.code;\n assignedAuthor -> bundle.entry as e7, e7.request = create('BackboneElement') as request, request.method = 'PUT', e7.resource = create('Practitioner') as practitioner then {\n srcAuthor.functionCode -> practitionerRole.code;\n assignedAuthor.code -> practitionerRole.code;\n assignedAuthor -> practitioner.meta as meta then {\n assignedAuthor -> meta.tag = create('Coding') as coding then {\n assignedAuthor -> coding.system = 'http://algoritmodiscoring' "system";\n assignedAuthor -> coding.code = 'ClinicalDocument/body/act/author' "code";\n } "coding";\n } "meta";\n assignedAuthor.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n assignedAuthor -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid2, e7.fullUrl = append('https://example/Practitioner/', uuid2), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";\n } "r";\n } "identifier";\n assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "2";\n assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "diverso";\n assignedAuthor.addr -> practitioner.address;\n assignedAuthor.telecom -> practitioner.telecom;\n // person\n assignedAuthor.assignedPerson as person then {\n person.name -> practitioner.name;\n person.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n } "ASSAUth";\n // organization\n assignedAuthor.representedOrganization as representedOrganization -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'PUT', e8.resource = create('Organization') as organization then {\n representedOrganization -> organization.meta as meta then {\n representedOrganization -> meta.tag = create('Coding') as coding then {\n representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";\n representedOrganization -> coding.code = 'ClinicalDocument/body/act/author/representedOrganization' "code";\n } "coding";\n } "meta";\n representedOrganization.id as id -> organization.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization.id = (r + '-' + ext) as uuid8, e8.fullUrl = append('https://example/Organization/', uuid8), practitionerRole.organization = create('Reference') as referenceOrg, referenceOrg.reference = append('https://example/Organization/', uuid8) "org";\n } "r";\n } "identifier";\n representedOrganization.name as v -> organization.name = (v.other);\n representedOrganization.telecom -> organization.telecom;\n representedOrganization.addr -> organization.address;\n representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'PUT', e9.resource = create('Organization') as organization1 then {\n OrgPartOf -> organization1.meta as meta then {\n OrgPartOf -> meta.tag = create('Coding') as coding then {\n OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";\n OrgPartOf -> coding.code = 'ClinicalDocument/body/act/author/representedOrganization/asOrganizationPartOf' "code";\n } "coding";\n } "meta";\n OrgPartOf.id as id -> organization1.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization1.id = (r + '-' + ext) as uuid9, e9.fullUrl = append('https://example/Organization/', uuid9), organization.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization1.id) "org";\n } "r";\n } "identifier";\n OrgPartOf.code -> organization1.type;\n OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';\n OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e10, e10.request = create('BackboneElement') as request, request.method = 'PUT', e10.resource = create('Organization') as organization2 then {\n wholeOrgan -> organization2.meta as meta then {\n wholeOrgan -> meta.tag = create('Coding') as coding then {\n wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";\n wholeOrgan -> coding.code = 'ClinicalDocument/body/act/author/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";\n } "coding";\n } "meta";\n wholeOrgan.id as id -> organization2.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization2.id = (r + '-' + ext) as uuid10, e10.fullUrl = append('https://example/Organization/', uuid10), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";\n } "r";\n } "identifier";\n wholeOrgan.name as v -> organization2.name = (v.other);\n wholeOrgan.telecom -> organization2.telecom;\n wholeOrgan.addr -> organization2.address;\n };\n } "OrgPartOf";\n };\n } "author";\n };\n // <!--entryRelationship per la gestione delle note e commenti-->\n cda.entryRelationship as entryRelationship then {\n entryRelationship.act as act then {\n act.text as text then {\n text.reference as reference -> ac.conclusion = (reference.value);\n };\n } "Act";\n };\n}\n\ngroup Organizer(source cda : Act, source org : Organizer, target patient : Patient, target encounter : Encounter, target observation : Observation, target bundle : Bundle) {\n org -> observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";\n org -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";\n org.code -> observation.code;\n org where org.code.exists().not() then {\n cda.code -> observation.code;\n } "act";\n org.statusCode as statusc where (code = 'completed') -> observation.status = 'final';\n org.statusCode as statusc where (code = 'active') -> observation.status = 'registered';\n org.statusCode as statusc where (code = 'aborted') -> observation.status = 'cancelled';\n org.statusCode as statusc where (code = 'suspended') -> observation.status = 'partial';\n org.effectiveTime as effectiveTime -> observation.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value2";\n org where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n org.effectiveTime as eff -> observation.effective = create('Period') as period then IVLTSPeriod(eff, period);\n } "where";\n // specimen\n org.specimen as spmn -> bundle.entry as e4o, e4o.request = create('BackboneElement') as request, request.method = 'POST', e4o.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4o, e4o.fullUrl = append('https://example/Specimen/', uuid4o), request.url = 'Specimen', observation.specimen = create('Reference') as reference, reference.reference = ('https://example/Specimen/' + %specimen.id) then {\n spmn.specimenRole as specimenRole then {\n specimenRole.id as id -> specimen.identifier;\n specimenRole.specimenPlayingEntity as specimenPlayingEntity then {\n specimenPlayingEntity.code -> specimen.type;\n };\n };\n };\n // subject\n org.subject as sbj then {\n sbj.relatedSubject as relatedSubj -> patient.extension as extension2 then ExtSubjectAnimal(relatedSubj, extension2);\n };\n // performer\n org.performer as performer -> 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' then {\n performer -> observation.performer = create('Reference') as reference, reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n performer.assignedEntity as entity then {\n entity.code -> practitionerRole.code;\n entity -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'PUT', e2.resource = create('Practitioner') as practitioner then {\n entity -> practitioner.meta as meta then {\n entity -> meta.tag = create('Coding') as coding then {\n entity -> coding.system = 'http://algoritmodiscoring' "system";\n entity -> coding.code = 'ClinicalDocument/body/organizer/performer' "code";\n } "coding";\n } "meta";\n entity.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n entity -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid2, e2.fullUrl = append('https://example/Practitioner/', uuid2), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";\n } "r";\n } "identifier";\n entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "2";\n entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "diverso";\n entity.addr -> practitioner.address;\n entity.telecom -> practitioner.telecom;\n entity.assignedPerson as person then {\n person.name -> practitioner.name;\n person.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n entity.representedOrganization as representedOrganization -> bundle.entry as e3, e3.request = create('BackboneElement') as request, request.method = 'PUT', e3.resource = create('Organization') as organization then {\n representedOrganization -> organization.meta as meta then {\n representedOrganization -> meta.tag = create('Coding') as coding then {\n representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";\n representedOrganization -> coding.code = 'ClinicalDocument/body/organizer/performer/representedOrganization' "code";\n } "coding";\n } "meta";\n representedOrganization.id as id -> organization.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization.id = (r + '-' + ext) as uuid3, e3.fullUrl = append('https://example/Organization/', uuid3), practitionerRole.organization = create('Reference') as referenceOrg, referenceOrg.reference = append('https://example/Organization/', uuid3) "aut";\n } "r";\n } "identifier";\n representedOrganization.name as v -> organization.name = (v.other);\n representedOrganization.telecom -> organization.telecom;\n representedOrganization.addr -> organization.address;\n representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'PUT', e4.resource = create('Organization') as organization1 then {\n OrgPartOf -> organization1.meta as meta then {\n OrgPartOf -> meta.tag = create('Coding') as coding then {\n OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";\n OrgPartOf -> coding.code = 'ClinicalDocument/body/organizer/performer/representedOrganization/asOrganizationPartOf' "code";\n } "coding";\n } "meta";\n OrgPartOf.id as id -> organization1.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization1.id = (r + '-' + ext) as uuid4, e4.fullUrl = append('https://example/Organization/', uuid4), organization.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization1.id) "org";\n } "r";\n } "identifier";\n OrgPartOf.code -> organization1.type;\n OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';\n OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'PUT', e5.resource = create('Organization') as organization2 then {\n wholeOrgan -> organization2.meta as meta then {\n wholeOrgan -> meta.tag = create('Coding') as coding then {\n wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";\n wholeOrgan -> coding.code = 'ClinicalDocument/body/organizer/performer/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";\n } "coding";\n } "meta";\n wholeOrgan.id as id -> organization2.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization2.id = (r + '-' + ext) as uuid4, e5.fullUrl = append('https://example/Organization/', uuid4), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";\n } "r";\n } "identifier";\n wholeOrgan.name as v -> organization2.name = (v.other);\n wholeOrgan.telecom -> organization2.telecom;\n wholeOrgan.addr -> organization2.address;\n };\n } "OrgPartOf";\n };\n } "practitioner";\n } "entity";\n } "practitionerRole";\n };\n // author\n org.author as srcAuthor -> bundle.entry as e6, e6.request = create('BackboneElement') as request, request.method = 'POST', e6.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid6, e6.fullUrl = append('https://example/PractitionerRole/', uuid6), request.url = 'PractitionerRole', observation.performer = create('Reference') as referenceaut, referenceaut.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n // srcAuthor.time as time -> tgt.date;\n srcAuthor.assignedAuthor as assignedAuthor then {\n assignedAuthor.code as codice -> practitionerRole.code as code2 then CECodeableConcept(codice, code2);\n assignedAuthor -> bundle.entry as e7, e7.request = create('BackboneElement') as request, request.method = 'PUT', e7.resource = create('Practitioner') as practitioner then {\n srcAuthor.functionCode -> practitionerRole.code;\n // assignedAuthor.code -> practitionerRole.code;\n assignedAuthor -> practitioner.meta as meta then {\n assignedAuthor -> meta.tag = create('Coding') as coding then {\n assignedAuthor -> coding.system = 'http://algoritmodiscoring' "system";\n assignedAuthor -> coding.code = 'ClinicalDocument/body/organizer/author' "code";\n } "coding";\n } "meta";\n assignedAuthor.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n assignedAuthor -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid7, e7.fullUrl = append('https://example/Practitioner/', uuid7), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";\n } "r";\n } "identifier";\n assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "2";\n assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "diverso";\n assignedAuthor.addr -> practitioner.address;\n assignedAuthor.telecom -> practitioner.telecom;\n // person\n assignedAuthor.assignedPerson as person then {\n person.name -> practitioner.name;\n person.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n } "ASSAUth";\n // organization\n assignedAuthor.representedOrganization as representedOrganization -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'PUT', e8.resource = create('Organization') as organization then {\n representedOrganization -> organization.meta as meta then {\n representedOrganization -> meta.tag = create('Coding') as coding then {\n representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";\n representedOrganization -> coding.code = 'ClinicalDocument/body/organizer/author/representedOrganization' "code";\n } "coding";\n } "meta";\n representedOrganization.id as id -> organization.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization.id = (r + '-' + ext) as uuid8, e8.fullUrl = append('https://example/Organization/', uuid8), practitionerRole.organization = create('Reference') as referenceOrg, referenceOrg.reference = append('https://example/Organization/', uuid8) "aut";\n } "r";\n } "identifier";\n representedOrganization.name as v -> organization.name = (v.other);\n representedOrganization.telecom -> organization.telecom;\n representedOrganization.addr -> organization.address;\n representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'PUT', e9.resource = create('Organization') as organization1 then {\n OrgPartOf -> organization1.meta as meta then {\n OrgPartOf -> meta.tag = create('Coding') as coding then {\n OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";\n OrgPartOf -> coding.code = 'ClinicalDocument/body/organizer/author/representedOrganization/asOrganizationPartOf' "code";\n } "coding";\n } "meta";\n OrgPartOf.id as id -> organization1.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization1.id = (r + '-' + ext) as uuid9, e9.fullUrl = append('https://example/Organization/', uuid9), organization.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization1.id) "aut";\n } "r";\n } "identifier";\n OrgPartOf.code -> organization1.type;\n OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';\n OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e10, e10.request = create('BackboneElement') as request, request.method = 'PUT', e10.resource = create('Organization') as organization2 then {\n OrgPartOf -> organization2.meta as meta then {\n OrgPartOf -> meta.tag = create('Coding') as coding then {\n OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";\n OrgPartOf -> coding.code = 'ClinicalDocument/body/organizer/author/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";\n } "coding";\n } "meta";\n wholeOrgan.id as id -> organization2.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> organization2.id = (r + '-' + ext) as uuid10, e10.fullUrl = append('https://example/Organization/', uuid10), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "aut";\n } "r";\n } "identifier";\n wholeOrgan.name as v -> organization2.name = (v.other);\n wholeOrgan.telecom -> organization2.telecom;\n wholeOrgan.addr -> organization2.address;\n };\n } "OrgPartOf";\n };\n // device\n assignedAuthor.assignedAuthoringDevice as assignedAuthoringDevice -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'POST', e11.resource = create('Device') as device, device.id = uuid() as uuid11, e11.fullUrl = append('https://example/Device/', uuid11), request.url = 'Device', tgt.author = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {\n assignedAuthoringDevice.templateId -> device.identifier;\n assignedAuthoringDevice.code -> device.type;\n assignedAuthoringDevice.manufacturerModelName as manufacturerModelName then {\n manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";\n } "manufacturer";\n assignedAuthoringDevice.softwareName as softwareName -> device.deviceName as deviceName then {\n softwareName -> deviceName.type = 'other' "typeName";\n softwareName as s -> deviceName.name = (s.displayName) "name";\n } "deviceName";\n } "Device";\n };\n };\n // participant person\n org.participant as participant where (typeCode != 'DEV') -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) then {\n participant -> encounter.participant as FhirParticipant then {\n participant as p -> FhirParticipant.type as type then {\n p -> type.coding as coding then {\n p -> coding.code = (p.typeCode) "codice";\n p -> coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' "system";\n } "codeType";\n } "type";\n } "fhirParticipant";\n participant.participantRole as participantRole -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid12, e12.fullUrl = append('https://example/PractitionerRole/', uuid12), request.url = 'PractitionerRole', encounter.participant = create('BackboneElement') as participant1 then {\n // participant.time -> participant1.period;\n participant.time as time1 -> participant1.period = create('Period') as period then {\n time1 -> period.start = create('dateTime') as start then TSDateTime(time1, start) "val";\n };\n participant.time as time1 -> participant1.period = create('Period') as period then IVLTSPeriod(time1, period);\n participant.functionCode -> practitionerRole.code;\n // non mappa i 2 precedenti\n participantRole -> bundle.entry as e13, e13.request = create('BackboneElement') as request, request.method = 'PUT', e13.resource = create('Practitioner') as practitioner then {\n participantRole -> participant1.individual = create('Reference') as referencepart, referencepart.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) "par";\n participantRole -> practitioner.meta as meta then {\n participantRole -> meta.tag = create('Coding') as coding then {\n participantRole -> coding.system = 'http://algoritmodiscoring' "system";\n participantRole -> coding.code = 'ClinicalDocument/body/organizer/participant' "code";\n } "coding";\n } "meta";\n participantRole.id as id -> practitioner.identifier as identifier then {\n id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n id.extension as ext -> identifier.value = ext then {\n participantRole -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "ext";\n id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;\n id.root as r then {\n id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid2, e13.fullUrl = append('https://example/Practitioner/', uuid2), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "part";\n } "r";\n } "identifier";\n participantRole.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "2";\n participantRole.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";\n } "diverso";\n participantRole.code -> practitionerRole.code;\n participantRole.addr -> practitioner.address;\n participantRole.telecom -> practitioner.telecom;\n participantRole.playingEntity as playingEntity then {\n playingEntity.name -> practitioner.name;\n playingEntity.birthTime as birthTime then {\n birthTime.value as date -> practitioner.birthDate = truncate(date, 10);\n } "birth";\n } "name";\n } "practitioner";\n } "partRole";\n } "participantEncounter";\n // participant device\n org.participant as devParticipant where (typeCode = 'DEV') -> bundle.entry as e14, e14.request = create('BackboneElement') as request, request.method = 'POST', e14.resource = create('Device') as device, device.id = uuid() as uuid14, e14.fullUrl = append('https://example/Device/', uuid14), request.url = 'Device', observation.device = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {\n devParticipant.participantRole as participantRoleDev then {\n participantRoleDev.playingDevice as playingDevice then {\n playingDevice.code -> device.type;\n playingDevice.manufacturerModelName as manufacturerModelName then {\n manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";\n } "manufacturer";\n playingDevice.softwareName as softwareName -> device.deviceName as deviceName then {\n softwareName -> deviceName.type = 'other' "typeName";\n softwareName as s -> deviceName.name = (s.displayName) "name";\n } "deviceName";\n };\n } "participantRoleDev";\n } "devParticipant";\n org.component as component then {\n component.observation as observation -> bundle.entry as e, e.request = create('BackboneElement') as request, request.method = 'POST', e.resource = create('Observation') as observationhasmember, observationhasmember.id = uuid() as uuid2, e.fullUrl = append('https://example/Observation/', uuid2), request.url = 'Observation', observation.hasMember = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observationhasmember.id) then Observation(observation, patient, encounter, observationhasmember, bundle) "OBS";\n } "componentobservation";\n org.component as component then {\n component.organizer as organizer -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observationorganizer, observationorganizer.id = uuid() as uuid3, e1.fullUrl = append('https://example/Observation/', uuid3), request.url = 'Observation', observation.hasMember = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observationorganizer.id) then {\n organizer then Organizer(cda, organizer, patient, encounter, observationorganizer, bundle) "ORG";\n };\n } "componentorganizer";\n // observationMedia\n org.component as component then {\n component.observationMedia as obsMedia -> bundle.entry as e15, e15.request = create('BackboneElement') as request, request.method = 'POST', e15.resource = create('Media') as media1, media1.id = uuid() as uuid15, e15.fullUrl = append('https://example/Media/', uuid15), request.url = 'Media', observation.derivedFrom = create('Reference') as reference, reference.reference = ('https://example/Media/' + %media1.id) then {\n obsMedia -> media1.content = create('Attachment') as Attachment then {\n obsMedia -> media1.status = 'unknown' "status";\n obsMedia.value as valueMedia then {\n valueMedia.mediaType as type -> Attachment.contentType = type "type";\n valueMedia -> Attachment.data = (valueMedia.dataBase64Binary) "data";\n } "valuemedia";\n } "Attachment";\n } "obsmedia";\n };\n // note\n org.component as component then {\n component.act as act then {\n act.text as text then {\n text.reference as reference -> observation.note as note then {\n reference -> note.text = (reference.value) "reference";\n } "note";\n };\n } "componentact";\n };\n}\n\ngroup ExtSubjectAnimal(source src : relatedSubject, target ext : Extension) {\n src -> ext.url = 'http://hl7.org/fhir/StructureDefinition/patient-animal' "url";\n src.code as code -> ext.extension as ext, ext.url = 'species', ext.value = create('CodeableConcept') as code1 then CECodeableConcept(code, code1);\n}\n\n</pre>\n </div>"
},
"url" : "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirLabReport",
"version" : "0.1.0",
"name" : "cda2fhirLabReport",
"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/Practitioner",
"mode" : "produced",
"alias" : "Practitioner"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Specimen",
"mode" : "produced",
"alias" : "Specimen"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Procedure",
"mode" : "produced",
"alias" : "Procedure"
},
{
"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"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/Organizer",
"mode" : "source",
"alias" : "Organizer"
}
],
"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" : "e6"
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "resource",
"variable" : "DocumentReference",
"transform" : "create",
"parameter" : [
{
"valueString" : "DocumentReference"
}
]
},
{
"context" : "DocumentReference",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid6",
"transform" : "uuid"
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/DocumentReference/"
},
{
"valueId" : "uuid6"
}
]
},
{
"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" : "record",
"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" : "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",
"documentreference"
]
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"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" : "documentreference",
"type" : "DocumentReference",
"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" : "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"
}
]
}
]
}
]
},
{
"name" : "entry",
"source" : [
{
"context" : "src",
"element" : "entry",
"variable" : "entry1"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e1"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "resource",
"variable" : "DiagnosticReport",
"transform" : "create",
"parameter" : [
{
"valueString" : "DiagnosticReport"
}
]
},
{
"context" : "DiagnosticReport",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid1",
"transform" : "uuid"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/DiagnosticReport/"
},
{
"valueId" : "uuid1"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "DiagnosticReport"
}
]
},
{
"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/DiagnosticReport/' + %DiagnosticReport.id"
}
]
}
],
"rule" : [
{
"name" : "act",
"source" : [
{
"context" : "entry1",
"element" : "act",
"variable" : "act1"
}
],
"dependent" : [
{
"name" : "Act",
"variable" : [
"act1",
"patient",
"DiagnosticReport",
"enc",
"bundle"
]
}
]
}
]
},
{
"name" : "component",
"source" : [
{
"context" : "src",
"element" : "component",
"variable" : "component"
}
],
"rule" : [
{
"name" : "section",
"source" : [
{
"context" : "component",
"element" : "section",
"variable" : "sec"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "section",
"variable" : "tgtSection"
}
],
"dependent" : [
{
"name" : "ClinicalDocumentSection",
"variable" : [
"cda",
"sec",
"patient",
"tgtSection",
"bundle",
"enc",
"documentreference"
]
}
]
}
]
}
]
},
{
"name" : "Observation",
"typeMode" : "none",
"input" : [
{
"name" : "obs",
"type" : "Observation",
"mode" : "source"
},
{
"name" : "patient",
"type" : "Patient",
"mode" : "target"
},
{
"name" : "encounter",
"type" : "Encounter",
"mode" : "target"
},
{
"name" : "ob",
"type" : "Observation",
"mode" : "target"
},
{
"name" : "bundle",
"type" : "Bundle",
"mode" : "target"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "obs"
}
],
"target" : [
{
"context" : "ob",
"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" : "obs"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %encounter.id"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "obs",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "obs",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'completed')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "final"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "obs",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'active')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "registered"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "obs",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'aborted')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "cancelled"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "obs",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'suspended')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "partial"
}
]
}
]
},
{
"name" : "value2",
"source" : [
{
"context" : "obs",
"element" : "effectiveTime",
"variable" : "effectiveTime"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "effective",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"effectiveTime",
"value"
]
}
]
},
{
"name" : "where",
"source" : [
{
"context" : "obs",
"condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
}
],
"rule" : [
{
"name" : "effectiveTime",
"source" : [
{
"context" : "obs",
"element" : "effectiveTime",
"variable" : "eff"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "effective",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"eff",
"period"
]
}
]
}
]
},
{
"name" : "interpretationCode",
"source" : [
{
"context" : "obs",
"element" : "interpretationCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "interpretation",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "methodCode",
"source" : [
{
"context" : "obs",
"element" : "methodCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "method",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "value",
"source" : [
{
"context" : "obs",
"type" : "INT",
"element" : "value",
"variable" : "int"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "int.value"
}
]
}
]
},
{
"name" : "boolean",
"source" : [
{
"context" : "obs",
"type" : "BL",
"element" : "value",
"variable" : "boolean"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "boolean.value"
}
]
}
]
},
{
"name" : "val",
"source" : [
{
"context" : "obs",
"type" : "CE",
"element" : "value",
"variable" : "val"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "val"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"variable" : "ce",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"rule" : [
{
"name" : "originltext",
"source" : [
{
"context" : "val",
"element" : "originalText",
"variable" : "originalText"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "originalText",
"element" : "reference",
"variable" : "reference"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueId" : "reference"
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "val"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "val",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "val",
"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" : "val",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystemVersion",
"source" : [
{
"context" : "val",
"element" : "codeSystemVersion",
"variable" : "version"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "version",
"transform" : "cast",
"parameter" : [
{
"valueId" : "version"
},
{
"valueString" : "string"
}
]
}
]
}
]
},
{
"name" : "translation",
"source" : [
{
"context" : "val",
"element" : "translation",
"variable" : "translation"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "translation",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "translation",
"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" : "translation",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystemVersion",
"source" : [
{
"context" : "translation",
"element" : "codeSystemVersion",
"variable" : "version"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "version",
"transform" : "cast",
"parameter" : [
{
"valueId" : "version"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "qualifier",
"source" : [
{
"context" : "translation",
"element" : "qualifier",
"variable" : "qualifier"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "qualifier",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "value",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "value",
"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" : "value",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystemVersion",
"source" : [
{
"context" : "value",
"element" : "codeSystemVersion",
"variable" : "version"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "version",
"transform" : "cast",
"parameter" : [
{
"valueId" : "version"
},
{
"valueString" : "string"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "val",
"source" : [
{
"context" : "obs",
"type" : "CD",
"element" : "value",
"variable" : "val"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "val"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"variable" : "ce",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"rule" : [
{
"name" : "originltext",
"source" : [
{
"context" : "val",
"element" : "originalText",
"variable" : "originalText"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "originalText",
"element" : "reference",
"variable" : "reference"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueId" : "reference"
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "val"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "val",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "val",
"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" : "val",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystemVersion",
"source" : [
{
"context" : "val",
"element" : "codeSystemVersion",
"variable" : "version"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "version",
"transform" : "cast",
"parameter" : [
{
"valueId" : "version"
},
{
"valueString" : "string"
}
]
}
]
}
]
},
{
"name" : "translation",
"source" : [
{
"context" : "val",
"element" : "translation",
"variable" : "translation"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "translation",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "translation",
"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" : "translation",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystemVersion",
"source" : [
{
"context" : "translation",
"element" : "codeSystemVersion",
"variable" : "version"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "version",
"transform" : "cast",
"parameter" : [
{
"valueId" : "version"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "qualifier",
"source" : [
{
"context" : "translation",
"element" : "qualifier",
"variable" : "qualifier"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "qualifier",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "value",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "value",
"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" : "value",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystemVersion",
"source" : [
{
"context" : "value",
"element" : "codeSystemVersion",
"variable" : "version"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "version",
"transform" : "cast",
"parameter" : [
{
"valueId" : "version"
},
{
"valueString" : "string"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "valueQuantity",
"source" : [
{
"context" : "obs",
"type" : "PQ",
"element" : "value",
"variable" : "val"
}
],
"rule" : [
{
"name" : "quantity",
"source" : [
{
"context" : "val"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"variable" : "quantity",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "val",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "quantity",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "value"
}
]
}
]
},
{
"name" : "unit",
"source" : [
{
"context" : "val",
"element" : "unit",
"variable" : "unit"
}
],
"target" : [
{
"context" : "quantity",
"contextType" : "variable",
"element" : "unit",
"transform" : "copy",
"parameter" : [
{
"valueId" : "unit"
}
]
}
]
}
]
}
]
},
{
"name" : "value",
"source" : [
{
"context" : "obs",
"type" : "ST",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "string"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "value.dataString"
}
]
}
]
},
{
"name" : "entryRelationship",
"source" : [
{
"context" : "obs",
"element" : "entryRelationship",
"variable" : "entryRelationship"
}
],
"rule" : [
{
"name" : "Act",
"source" : [
{
"context" : "entryRelationship",
"element" : "act",
"variable" : "act"
}
],
"rule" : [
{
"name" : "text",
"source" : [
{
"context" : "act",
"element" : "text",
"variable" : "text"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "text",
"element" : "reference",
"variable" : "reference"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "note",
"variable" : "note"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "reference"
}
],
"target" : [
{
"context" : "note",
"contextType" : "variable",
"element" : "text",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "reference.value"
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "Note e commenti"
},
{
"name" : "subject",
"source" : [
{
"context" : "obs",
"element" : "subject",
"variable" : "sbj"
}
],
"rule" : [
{
"name" : "relatedSubject",
"source" : [
{
"context" : "sbj",
"element" : "relatedSubject",
"variable" : "relatedSubj"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "extension",
"variable" : "extension2"
}
],
"dependent" : [
{
"name" : "ExtSubjectAnimal",
"variable" : [
"relatedSubj",
"extension2"
]
}
]
}
],
"documentation" : "subject"
},
{
"name" : "performer",
"source" : [
{
"context" : "obs",
"element" : "performer",
"variable" : "performer"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e1"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid1",
"transform" : "uuid"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid1"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
}
],
"rule" : [
{
"name" : "practitionerRole",
"source" : [
{
"context" : "performer"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "performer",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
}
]
}
],
"rule" : [
{
"name" : "entity",
"source" : [
{
"context" : "performer",
"element" : "assignedEntity",
"variable" : "entity"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "entity",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "practitioner",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e2"
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/performer"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "entity",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "performer",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid2",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid2"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
}
]
},
{
"name" : "2.16.840.1.113883.2.9.4.3.2",
"source" : [
{
"context" : "entity",
"element" : "id",
"variable" : "id",
"condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "diverso",
"source" : [
{
"context" : "entity",
"element" : "id",
"variable" : "id",
"condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "entity",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "entity",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "entity",
"element" : "assignedPerson",
"variable" : "person"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "person",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "person",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
]
},
{
"name" : "representedOrganization",
"source" : [
{
"context" : "entity",
"element" : "representedOrganization",
"variable" : "representedOrganization"
}
],
"target" : [
{
"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" : "PUT"
}
]
},
{
"context" : "e3",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/performer/representedOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "representedOrganization",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "aut",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid3",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e3",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "organization",
"variable" : "referenceOrg",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceOrg",
"contextType" : "variable",
"element" : "reference",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "representedOrganization",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "representedOrganization",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "representedOrganization",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "OrgPartOf",
"source" : [
{
"context" : "representedOrganization",
"element" : "asOrganizationPartOf",
"variable" : "OrgPartOf"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e4"
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "OrgPartOf",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization1",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "organization",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization1.id"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "OrgPartOf",
"element" : "statusCode",
"variable" : "status",
"condition" : "(value = 'active')"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "create",
"parameter" : [
{
"valueString" : "boolean"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "copy",
"parameter" : [
{
"valueString" : "true"
}
]
}
]
},
{
"name" : "wholeOrganization",
"source" : [
{
"context" : "OrgPartOf",
"element" : "wholeOrganization",
"variable" : "wholeOrgan"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e5"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization2",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "wholeOrgan",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization2",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid5",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid5"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization2.id"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "wholeOrgan",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "wholeOrgan",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "wholeOrgan",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
],
"documentation" : "organization"
}
]
}
]
}
]
}
],
"documentation" : "performer"
},
{
"name" : "author",
"source" : [
{
"context" : "obs",
"element" : "author",
"variable" : "srcAuthor"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e6"
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid6",
"transform" : "uuid"
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid6"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "performer",
"variable" : "referenceaut",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceaut",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
}
]
}
],
"rule" : [
{
"name" : "assignedAuthor",
"source" : [
{
"context" : "srcAuthor",
"element" : "assignedAuthor",
"variable" : "assignedAuthor"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthor",
"element" : "code",
"variable" : "codice"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "code2"
}
],
"dependent" : [
{
"name" : "CECodeableConcept",
"variable" : [
"codice",
"code2"
]
}
]
},
{
"name" : "ASSAUth",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e7"
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
},
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid7",
"transform" : "uuid"
}
],
"rule" : [
{
"name" : "functionCode",
"source" : [
{
"context" : "srcAuthor",
"element" : "functionCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "meta",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/author"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "aut",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid2",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid2"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
},
{
"name" : "2.16.840.1.113883.2.9.4.3.2",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id",
"condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "diverso",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id",
"condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "assignedAuthor",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "assignedAuthor",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "assignedAuthor",
"element" : "assignedPerson",
"variable" : "person"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "person",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "person",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
],
"documentation" : "person"
}
]
},
{
"name" : "representedOrganization",
"source" : [
{
"context" : "assignedAuthor",
"element" : "representedOrganization",
"variable" : "representedOrganization"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e8"
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/author/representedOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "representedOrganization",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid3",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "organization",
"variable" : "referenceOrg",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceOrg",
"contextType" : "variable",
"element" : "reference",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "representedOrganization",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "representedOrganization",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "representedOrganization",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "OrgPartOf",
"source" : [
{
"context" : "representedOrganization",
"element" : "asOrganizationPartOf",
"variable" : "OrgPartOf"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e9"
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "OrgPartOf",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization1",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "organization",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization1.id"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "OrgPartOf",
"element" : "statusCode",
"variable" : "status",
"condition" : "(value = 'active')"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "create",
"parameter" : [
{
"valueString" : "boolean"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "copy",
"parameter" : [
{
"valueString" : "true"
}
]
}
]
},
{
"name" : "wholeOrganization",
"source" : [
{
"context" : "OrgPartOf",
"element" : "wholeOrganization",
"variable" : "wholeOrgan"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e10"
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization2",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "wholeOrgan",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization2",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization2.id"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "wholeOrgan",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "wholeOrgan",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "wholeOrgan",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
],
"documentation" : "organization"
},
{
"name" : "Device",
"source" : [
{
"context" : "assignedAuthor",
"element" : "assignedAuthoringDevice",
"variable" : "assignedAuthoringDevice"
}
],
"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" : "device",
"transform" : "create",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "device",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid11",
"transform" : "uuid"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Device/"
},
{
"valueId" : "uuid11"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "tgt",
"contextType" : "variable",
"element" : "author",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Device/' + %device.id"
}
]
}
],
"rule" : [
{
"name" : "templateId",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "templateId",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "identifier",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "manufacturer",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "manufacturerModelName",
"variable" : "manufacturerModelName"
}
],
"rule" : [
{
"name" : "displayRule",
"source" : [
{
"context" : "manufacturerModelName",
"variable" : "m"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "manufacturer",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "m.displayName"
}
]
}
]
}
]
},
{
"name" : "deviceName",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "softwareName",
"variable" : "softwareName"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "deviceName",
"variable" : "deviceName"
}
],
"rule" : [
{
"name" : "typeName",
"source" : [
{
"context" : "softwareName"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "other"
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "softwareName",
"variable" : "s"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "s.displayName"
}
]
}
]
}
]
}
],
"documentation" : "device"
}
]
}
],
"documentation" : "author"
},
{
"name" : "participantEncounter",
"source" : [
{
"context" : "obs",
"element" : "participant",
"variable" : "participant",
"condition" : "(typeCode != 'DEV')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %encounter.id"
}
]
}
],
"rule" : [
{
"name" : "fhirParticipant",
"source" : [
{
"context" : "participant"
}
],
"target" : [
{
"context" : "encounter",
"contextType" : "variable",
"element" : "participant",
"variable" : "FhirParticipant"
}
],
"rule" : [
{
"name" : "type",
"source" : [
{
"context" : "participant",
"variable" : "p"
}
],
"target" : [
{
"context" : "FhirParticipant",
"contextType" : "variable",
"element" : "type",
"variable" : "type"
}
],
"rule" : [
{
"name" : "codeType",
"source" : [
{
"context" : "p"
}
],
"target" : [
{
"context" : "type",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "codice",
"source" : [
{
"context" : "p"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "p.typeCode"
}
]
}
]
},
{
"name" : "system",
"source" : [
{
"context" : "p"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "partRole",
"source" : [
{
"context" : "participant",
"element" : "participantRole",
"variable" : "participantRole"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e12"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid12",
"transform" : "uuid"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid12"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "encounter",
"contextType" : "variable",
"element" : "participant",
"variable" : "participant1",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "participant1",
"contextType" : "variable",
"element" : "individual",
"variable" : "referencepart",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referencepart",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitionerRole.id"
}
]
}
],
"rule" : [
{
"name" : "time",
"source" : [
{
"context" : "participant",
"element" : "time",
"variable" : "time1"
}
],
"target" : [
{
"context" : "participant1",
"contextType" : "variable",
"element" : "period",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"rule" : [
{
"name" : "val",
"source" : [
{
"context" : "time1"
}
],
"target" : [
{
"context" : "period",
"contextType" : "variable",
"element" : "start",
"variable" : "start",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"time1",
"start"
]
}
]
}
],
"documentation" : "participant.time -> participant1.period;"
},
{
"name" : "time",
"source" : [
{
"context" : "participant",
"element" : "time",
"variable" : "time1"
}
],
"target" : [
{
"context" : "participant1",
"contextType" : "variable",
"element" : "period",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"time1",
"period"
]
}
]
},
{
"name" : "functionCode",
"source" : [
{
"context" : "participant",
"element" : "functionCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "practitioner",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e13"
},
{
"context" : "e13",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e13",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/participant"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "participantRole",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e13",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "participantRole",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "participantRole",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "participantRole",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "participantRole",
"element" : "playingEntity",
"variable" : "playingEntity"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "playingEntity",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "playingEntity",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
]
}
],
"documentation" : "non mappa i 2 precedenti"
}
]
}
],
"documentation" : "participant person"
},
{
"name" : "devParticipant",
"source" : [
{
"context" : "obs",
"element" : "participant",
"variable" : "devParticipant",
"condition" : "(typeCode = 'DEV')"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e14"
},
{
"context" : "e14",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e14",
"contextType" : "variable",
"element" : "resource",
"variable" : "device",
"transform" : "create",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "device",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid14",
"transform" : "uuid"
},
{
"context" : "e14",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Device/"
},
{
"valueId" : "uuid14"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "device",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Device/' + %device.id"
}
]
}
],
"rule" : [
{
"name" : "participantRoleDev",
"source" : [
{
"context" : "devParticipant",
"element" : "participantRole",
"variable" : "participantRoleDev"
}
],
"rule" : [
{
"name" : "playingDevice",
"source" : [
{
"context" : "participantRoleDev",
"element" : "playingDevice",
"variable" : "playingDevice"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "playingDevice",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "manufacturer",
"source" : [
{
"context" : "playingDevice",
"element" : "manufacturerModelName",
"variable" : "manufacturerModelName"
}
],
"rule" : [
{
"name" : "displayRule",
"source" : [
{
"context" : "manufacturerModelName",
"variable" : "m"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "manufacturer",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "m.displayName"
}
]
}
]
}
]
},
{
"name" : "deviceName",
"source" : [
{
"context" : "playingDevice",
"element" : "softwareName",
"variable" : "softwareName"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "deviceName",
"variable" : "deviceName"
}
],
"rule" : [
{
"name" : "typeName",
"source" : [
{
"context" : "softwareName"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "other"
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "softwareName",
"variable" : "s"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "s.displayName"
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "participant device"
},
{
"name" : "observationMedia",
"source" : [
{
"context" : "obs",
"element" : "entryRelationship",
"variable" : "er"
}
],
"rule" : [
{
"name" : "media",
"source" : [
{
"context" : "er",
"element" : "observationMedia",
"variable" : "obsMedia"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e15"
},
{
"context" : "e15",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e15",
"contextType" : "variable",
"element" : "resource",
"variable" : "media1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Media"
}
]
},
{
"context" : "media1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid15",
"transform" : "uuid"
},
{
"context" : "e15",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Media/"
},
{
"valueId" : "uuid15"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Media"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "derivedFrom",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Media/' + %media1.id"
}
]
}
],
"rule" : [
{
"name" : "Attachment",
"source" : [
{
"context" : "obsMedia"
}
],
"target" : [
{
"context" : "media1",
"contextType" : "variable",
"element" : "content",
"variable" : "Attachment",
"transform" : "create",
"parameter" : [
{
"valueString" : "Attachment"
}
]
}
],
"rule" : [
{
"name" : "status",
"source" : [
{
"context" : "obsMedia"
}
],
"target" : [
{
"context" : "media1",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
},
{
"name" : "valuemedia",
"source" : [
{
"context" : "obsMedia",
"element" : "value",
"variable" : "valueMedia"
}
],
"rule" : [
{
"name" : "type",
"source" : [
{
"context" : "valueMedia",
"element" : "mediaType",
"variable" : "type"
}
],
"target" : [
{
"context" : "Attachment",
"contextType" : "variable",
"element" : "contentType",
"transform" : "copy",
"parameter" : [
{
"valueId" : "type"
}
]
}
]
},
{
"name" : "data",
"source" : [
{
"context" : "valueMedia"
}
],
"target" : [
{
"context" : "Attachment",
"contextType" : "variable",
"element" : "data",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "valueMedia.dataBase64Binary"
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "observationMedia"
},
{
"name" : "ref",
"source" : [
{
"context" : "obs",
"element" : "referenceRange",
"variable" : "refRange"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "referenceRange",
"variable" : "ref",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
}
],
"rule" : [
{
"name" : "refRange",
"source" : [
{
"context" : "refRange",
"element" : "observationRange",
"variable" : "obsRange"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "obsRange",
"type" : "ST",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "text",
"transform" : "create",
"parameter" : [
{
"valueString" : "string"
}
]
},
{
"context" : "ref",
"contextType" : "variable",
"element" : "text",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "value.dataString"
}
]
}
]
},
{
"name" : "obsRange",
"source" : [
{
"context" : "obsRange"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "low",
"variable" : "Low",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"rule" : [
{
"name" : "IVL-PQ",
"source" : [
{
"context" : "obsRange",
"type" : "IVL_PQ",
"element" : "value",
"variable" : "v"
}
],
"rule" : [
{
"name" : "decValue",
"source" : [
{
"context" : "v",
"element" : "low",
"variable" : "l1"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "l1",
"element" : "value",
"variable" : "decValue"
}
],
"target" : [
{
"context" : "Low",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "decValue"
}
]
}
]
},
{
"name" : "unit",
"source" : [
{
"context" : "l1",
"element" : "unit",
"variable" : "Unit"
}
],
"target" : [
{
"context" : "Low",
"contextType" : "variable",
"element" : "unit",
"transform" : "copy",
"parameter" : [
{
"valueId" : "Unit"
}
]
}
]
}
]
},
{
"name" : "high",
"source" : [
{
"context" : "v"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "high",
"variable" : "high",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"rule" : [
{
"name" : "decValue",
"source" : [
{
"context" : "v",
"element" : "high",
"variable" : "h1"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "h1",
"element" : "value",
"variable" : "decValue1"
}
],
"target" : [
{
"context" : "high",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "decValue1"
}
]
}
]
},
{
"name" : "unit",
"source" : [
{
"context" : "h1",
"element" : "unit",
"variable" : "Unit1"
}
],
"target" : [
{
"context" : "high",
"contextType" : "variable",
"element" : "unit",
"transform" : "copy",
"parameter" : [
{
"valueId" : "Unit1"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "interpretationCode",
"source" : [
{
"context" : "obsRange",
"element" : "interpretationCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "precondition",
"source" : [
{
"context" : "obsRange",
"element" : "precondition",
"variable" : "precondition"
}
],
"rule" : [
{
"name" : "criterion",
"source" : [
{
"context" : "precondition",
"element" : "criterion",
"variable" : "criterion"
}
],
"rule" : [
{
"name" : "appliesTo",
"source" : [
{
"context" : "criterion",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "appliesTo",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "v",
"source" : [
{
"context" : "criterion",
"type" : "IVL_PQ",
"element" : "value",
"variable" : "v"
}
],
"rule" : [
{
"name" : "low",
"source" : [
{
"context" : "v",
"element" : "high",
"variable" : "l1"
}
],
"rule" : [
{
"name" : "age",
"source" : [
{
"context" : "l1"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "age",
"variable" : "age",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"rule" : [
{
"name" : "high",
"source" : [
{
"context" : "l1"
}
],
"target" : [
{
"context" : "age",
"contextType" : "variable",
"element" : "high",
"variable" : "high"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "l1",
"element" : "value",
"variable" : "decValue"
}
],
"target" : [
{
"context" : "high",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "decValue"
}
]
}
]
},
{
"name" : "unit",
"source" : [
{
"context" : "l1",
"element" : "unit",
"variable" : "Unit1"
}
],
"target" : [
{
"context" : "high",
"contextType" : "variable",
"element" : "unit",
"transform" : "copy",
"parameter" : [
{
"valueId" : "Unit1"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "referenceRange"
}
]
},
{
"name" : "Observation2",
"typeMode" : "none",
"input" : [
{
"name" : "obs",
"type" : "Observation",
"mode" : "source"
},
{
"name" : "patient",
"type" : "Patient",
"mode" : "target"
},
{
"name" : "encounter",
"type" : "Encounter",
"mode" : "target"
},
{
"name" : "ob",
"type" : "Observation",
"mode" : "target"
},
{
"name" : "bundle",
"type" : "Bundle",
"mode" : "target"
},
{
"name" : "cda",
"type" : "Act",
"mode" : "source"
},
{
"name" : "specimenp",
"type" : "Specimen",
"mode" : "target"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "obs"
}
],
"target" : [
{
"context" : "ob",
"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" : "obs"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %encounter.id"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "obs",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "obs",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'completed')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "final"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "obs",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'active')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "registered"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "obs",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'aborted')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "cancelled"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "obs",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'suspended')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "partial"
}
]
}
]
},
{
"name" : "value2",
"source" : [
{
"context" : "obs",
"element" : "effectiveTime",
"variable" : "effectiveTime"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "effective",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"effectiveTime",
"value"
]
}
]
},
{
"name" : "where",
"source" : [
{
"context" : "obs",
"condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
}
],
"rule" : [
{
"name" : "effectiveTime",
"source" : [
{
"context" : "obs",
"element" : "effectiveTime",
"variable" : "eff"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "effective",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"eff",
"period"
]
}
]
}
]
},
{
"name" : "interpretationCode",
"source" : [
{
"context" : "obs",
"element" : "interpretationCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "interpretation",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "methodCode",
"source" : [
{
"context" : "obs",
"element" : "methodCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "method",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "value",
"source" : [
{
"context" : "obs",
"type" : "INT",
"element" : "value",
"variable" : "int"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "int.value"
}
]
}
]
},
{
"name" : "boolean",
"source" : [
{
"context" : "obs",
"type" : "BL",
"element" : "value",
"variable" : "boolean"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "boolean.value"
}
]
}
]
},
{
"name" : "val",
"source" : [
{
"context" : "obs",
"type" : "CE",
"element" : "value",
"variable" : "val"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "val"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"variable" : "ce",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"rule" : [
{
"name" : "originltext",
"source" : [
{
"context" : "val",
"element" : "originalText",
"variable" : "originalText"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "originalText",
"element" : "reference",
"variable" : "reference"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueId" : "reference"
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "val"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "val",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "val",
"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" : "val",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystemVersion",
"source" : [
{
"context" : "val",
"element" : "codeSystemVersion",
"variable" : "version"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "version",
"transform" : "cast",
"parameter" : [
{
"valueId" : "version"
},
{
"valueString" : "string"
}
]
}
]
}
]
},
{
"name" : "translation",
"source" : [
{
"context" : "val",
"element" : "translation",
"variable" : "translation"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "translation",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "translation",
"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" : "translation",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystemVersion",
"source" : [
{
"context" : "translation",
"element" : "codeSystemVersion",
"variable" : "version"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "version",
"transform" : "cast",
"parameter" : [
{
"valueId" : "version"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "qualifier",
"source" : [
{
"context" : "translation",
"element" : "qualifier",
"variable" : "qualifier"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "qualifier",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "value",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "value",
"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" : "value",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystemVersion",
"source" : [
{
"context" : "value",
"element" : "codeSystemVersion",
"variable" : "version"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "version",
"transform" : "cast",
"parameter" : [
{
"valueId" : "version"
},
{
"valueString" : "string"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "valueQuantity",
"source" : [
{
"context" : "obs",
"type" : "PQ",
"element" : "value",
"variable" : "val"
}
],
"rule" : [
{
"name" : "quantity",
"source" : [
{
"context" : "val"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"variable" : "quantity",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "val",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "quantity",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "value"
}
]
}
]
},
{
"name" : "unit",
"source" : [
{
"context" : "val",
"element" : "unit",
"variable" : "unit"
}
],
"target" : [
{
"context" : "quantity",
"contextType" : "variable",
"element" : "unit",
"transform" : "copy",
"parameter" : [
{
"valueId" : "unit"
}
]
}
]
}
]
}
]
},
{
"name" : "value",
"source" : [
{
"context" : "obs",
"type" : "ST",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "string"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "value.dataString"
}
]
}
]
},
{
"name" : "entryRelationship",
"source" : [
{
"context" : "obs",
"element" : "entryRelationship",
"variable" : "entryRelationship"
}
],
"rule" : [
{
"name" : "Act",
"source" : [
{
"context" : "entryRelationship",
"element" : "act",
"variable" : "act"
}
],
"rule" : [
{
"name" : "text",
"source" : [
{
"context" : "act",
"element" : "text",
"variable" : "text"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "text",
"element" : "reference",
"variable" : "reference"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "note",
"variable" : "note"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "reference"
}
],
"target" : [
{
"context" : "note",
"contextType" : "variable",
"element" : "text",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "reference.value"
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "Note e commenti"
},
{
"name" : "subject",
"source" : [
{
"context" : "obs",
"element" : "subject",
"variable" : "sbj"
}
],
"rule" : [
{
"name" : "relatedSubject",
"source" : [
{
"context" : "sbj",
"element" : "relatedSubject",
"variable" : "relatedSubj"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "extension",
"variable" : "extension2"
}
],
"dependent" : [
{
"name" : "ExtSubjectAnimal",
"variable" : [
"relatedSubj",
"extension2"
]
}
]
}
],
"documentation" : "subject"
},
{
"name" : "conditionactexists",
"source" : [
{
"context" : "cda",
"condition" : "cda.entryRelationship.act.exists()"
}
],
"rule" : [
{
"name" : "specimen",
"source" : [
{
"context" : "obs",
"element" : "specimen",
"variable" : "spmn"
}
],
"rule" : [
{
"name" : "specimenRole",
"source" : [
{
"context" : "spmn",
"element" : "specimenRole",
"variable" : "specimenRole"
}
],
"rule" : [
{
"name" : "id",
"source" : [
{
"context" : "specimenRole",
"element" : "id",
"variable" : "id"
}
],
"rule" : [
{
"name" : "extobs",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "extobs"
}
],
"rule" : [
{
"name" : "en",
"source" : [
{
"context" : "cda",
"element" : "entryRelationship",
"variable" : "entryRelationship"
}
],
"rule" : [
{
"name" : "a",
"source" : [
{
"context" : "entryRelationship",
"element" : "act",
"variable" : "a"
}
],
"rule" : [
{
"name" : "sp",
"source" : [
{
"context" : "a",
"element" : "specimen",
"variable" : "sp"
}
],
"rule" : [
{
"name" : "spr",
"source" : [
{
"context" : "sp",
"element" : "specimenRole",
"variable" : "spr"
}
],
"rule" : [
{
"name" : "cont",
"source" : [
{
"context" : "spr",
"element" : "id",
"condition" : "(extension = extobs)"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e4o"
},
{
"context" : "e4o",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e4o",
"contextType" : "variable",
"element" : "resource",
"variable" : "specimen",
"transform" : "create",
"parameter" : [
{
"valueString" : "Specimen"
}
]
},
{
"context" : "specimen",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4o",
"transform" : "uuid"
},
{
"context" : "e4o",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Specimen/"
},
{
"valueId" : "uuid4o"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Specimen"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "specimen",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Specimen/' + %specimen.id"
}
]
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "spr"
}
],
"target" : [
{
"context" : "specimen",
"contextType" : "variable",
"element" : "parent",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Specimen/' + %specimenp.id"
}
]
}
]
},
{
"name" : "id",
"source" : [
{
"context" : "spr",
"element" : "id",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "specimen",
"contextType" : "variable",
"element" : "identifier",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "ent",
"source" : [
{
"context" : "specimenRole",
"element" : "specimenPlayingEntity",
"variable" : "spent"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "spent",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "specimen",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
},
{
"name" : "specimenPlayingEntity",
"source" : [
{
"context" : "spr",
"element" : "specimenPlayingEntity",
"variable" : "specimenPlayingEntity"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "specimenPlayingEntity",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "specimen",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
},
{
"name" : "collection",
"source" : [
{
"context" : "a"
}
],
"target" : [
{
"context" : "specimen",
"contextType" : "variable",
"element" : "collection",
"variable" : "collection",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "a",
"element" : "effectiveTime",
"variable" : "effectivetime"
}
],
"target" : [
{
"context" : "collection",
"contextType" : "variable",
"element" : "collected",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"effectivetime",
"value"
]
}
]
},
{
"name" : "where",
"source" : [
{
"context" : "a",
"condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
}
],
"rule" : [
{
"name" : "effectiveTime",
"source" : [
{
"context" : "a",
"element" : "effectiveTime",
"variable" : "eff"
}
],
"target" : [
{
"context" : "collection",
"contextType" : "variable",
"element" : "collected",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"eff",
"period"
]
}
]
}
]
},
{
"name" : "participant",
"source" : [
{
"context" : "a",
"element" : "participant",
"variable" : "participant"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e10"
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
},
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid11",
"transform" : "uuid"
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid11"
}
]
},
{
"context" : "collection",
"contextType" : "variable",
"element" : "collector",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
],
"rule" : [
{
"name" : "participantRole",
"source" : [
{
"context" : "participant",
"element" : "participantRole",
"variable" : "participantRole"
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/act/participant"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "participantRole",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "addr",
"source" : [
{
"context" : "participantRole",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "playingEntity",
"source" : [
{
"context" : "participantRole",
"element" : "playingEntity",
"variable" : "playingEntity"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "playingEntity",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "specimen"
}
]
},
{
"name" : "wherenotexists",
"source" : [
{
"context" : "cda",
"condition" : "cda.entryRelationship.act.exists().not() and (obs.specimen.specimenRole.specimenPlayingEntity.code.code != specimenp.type.coding.code)"
}
],
"rule" : [
{
"name" : "specimen",
"source" : [
{
"context" : "obs",
"element" : "specimen",
"variable" : "spmn"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e4o"
},
{
"context" : "e4o",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e4o",
"contextType" : "variable",
"element" : "resource",
"variable" : "specimen",
"transform" : "create",
"parameter" : [
{
"valueString" : "Specimen"
}
]
},
{
"context" : "specimen",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4o",
"transform" : "uuid"
},
{
"context" : "e4o",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Specimen/"
},
{
"valueId" : "uuid4o"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Specimen"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "specimen",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Specimen/' + %specimen.id"
}
]
}
],
"rule" : [
{
"name" : "specimenRole",
"source" : [
{
"context" : "spmn",
"element" : "specimenRole",
"variable" : "specimenRole"
}
],
"rule" : [
{
"name" : "id",
"source" : [
{
"context" : "specimenRole",
"element" : "id",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "specimen",
"contextType" : "variable",
"element" : "identifier",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "specimenPlayingEntity",
"source" : [
{
"context" : "specimenRole",
"element" : "specimenPlayingEntity",
"variable" : "specimenPlayingEntity"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "specimenPlayingEntity",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "specimen",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "performer",
"source" : [
{
"context" : "obs",
"element" : "performer",
"variable" : "performer"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e1"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid1",
"transform" : "uuid"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid1"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
}
],
"rule" : [
{
"name" : "practitionerRole",
"source" : [
{
"context" : "performer"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "performer",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
}
]
}
],
"rule" : [
{
"name" : "entity",
"source" : [
{
"context" : "performer",
"element" : "assignedEntity",
"variable" : "entity"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "entity",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "practitioner",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e2"
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/performer"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "entity",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "performer",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid2",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid2"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
}
]
},
{
"name" : "2.16.840.1.113883.2.9.4.3.2",
"source" : [
{
"context" : "entity",
"element" : "id",
"variable" : "id",
"condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "diverso",
"source" : [
{
"context" : "entity",
"element" : "id",
"variable" : "id",
"condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "entity",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "entity",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "entity",
"element" : "assignedPerson",
"variable" : "person"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "person",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "person",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
]
},
{
"name" : "representedOrganization",
"source" : [
{
"context" : "entity",
"element" : "representedOrganization",
"variable" : "representedOrganization"
}
],
"target" : [
{
"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" : "PUT"
}
]
},
{
"context" : "e3",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/performer/representedOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "representedOrganization",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "aut",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid3",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e3",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "organization",
"variable" : "referenceOrg",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceOrg",
"contextType" : "variable",
"element" : "reference",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "representedOrganization",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "representedOrganization",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "representedOrganization",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "OrgPartOf",
"source" : [
{
"context" : "representedOrganization",
"element" : "asOrganizationPartOf",
"variable" : "OrgPartOf"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e4"
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "OrgPartOf",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization1",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "organization",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization1.id"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "OrgPartOf",
"element" : "statusCode",
"variable" : "status",
"condition" : "(value = 'active')"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "create",
"parameter" : [
{
"valueString" : "boolean"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "copy",
"parameter" : [
{
"valueString" : "true"
}
]
}
]
},
{
"name" : "wholeOrganization",
"source" : [
{
"context" : "OrgPartOf",
"element" : "wholeOrganization",
"variable" : "wholeOrgan"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e5"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization2",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "wholeOrgan",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization2",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid5",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid5"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization2.id"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "wholeOrgan",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "wholeOrgan",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "wholeOrgan",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
],
"documentation" : "organization"
}
]
}
]
}
]
}
],
"documentation" : "performer"
},
{
"name" : "author",
"source" : [
{
"context" : "obs",
"element" : "author",
"variable" : "srcAuthor"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e6"
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid6",
"transform" : "uuid"
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid6"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "performer",
"variable" : "referenceaut",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceaut",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
}
]
}
],
"rule" : [
{
"name" : "assignedAuthor",
"source" : [
{
"context" : "srcAuthor",
"element" : "assignedAuthor",
"variable" : "assignedAuthor"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthor",
"element" : "code",
"variable" : "codice"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "code2"
}
],
"dependent" : [
{
"name" : "CECodeableConcept",
"variable" : [
"codice",
"code2"
]
}
]
},
{
"name" : "ASSAUth",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e7"
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
},
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid7",
"transform" : "uuid"
}
],
"rule" : [
{
"name" : "functionCode",
"source" : [
{
"context" : "srcAuthor",
"element" : "functionCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "meta",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/author"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "aut",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid2",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid2"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
},
{
"name" : "2.16.840.1.113883.2.9.4.3.2",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id",
"condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "diverso",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id",
"condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "assignedAuthor",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "assignedAuthor",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "assignedAuthor",
"element" : "assignedPerson",
"variable" : "person"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "person",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "person",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
],
"documentation" : "person"
}
]
},
{
"name" : "representedOrganization",
"source" : [
{
"context" : "assignedAuthor",
"element" : "representedOrganization",
"variable" : "representedOrganization"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e8"
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/author/representedOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "representedOrganization",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid3",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "organization",
"variable" : "referenceOrg",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceOrg",
"contextType" : "variable",
"element" : "reference",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "representedOrganization",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "representedOrganization",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "representedOrganization",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "OrgPartOf",
"source" : [
{
"context" : "representedOrganization",
"element" : "asOrganizationPartOf",
"variable" : "OrgPartOf"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e9"
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "OrgPartOf",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization1",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "organization",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization1.id"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "OrgPartOf",
"element" : "statusCode",
"variable" : "status",
"condition" : "(value = 'active')"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "create",
"parameter" : [
{
"valueString" : "boolean"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "copy",
"parameter" : [
{
"valueString" : "true"
}
]
}
]
},
{
"name" : "wholeOrganization",
"source" : [
{
"context" : "OrgPartOf",
"element" : "wholeOrganization",
"variable" : "wholeOrgan"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e10"
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization2",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "wholeOrgan",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization2",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization2.id"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "wholeOrgan",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "wholeOrgan",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "wholeOrgan",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
],
"documentation" : "organization"
},
{
"name" : "Device",
"source" : [
{
"context" : "assignedAuthor",
"element" : "assignedAuthoringDevice",
"variable" : "assignedAuthoringDevice"
}
],
"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" : "device",
"transform" : "create",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "device",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid11",
"transform" : "uuid"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Device/"
},
{
"valueId" : "uuid11"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "tgt",
"contextType" : "variable",
"element" : "author",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Device/' + %device.id"
}
]
}
],
"rule" : [
{
"name" : "templateId",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "templateId",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "identifier",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "manufacturer",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "manufacturerModelName",
"variable" : "manufacturerModelName"
}
],
"rule" : [
{
"name" : "displayRule",
"source" : [
{
"context" : "manufacturerModelName",
"variable" : "m"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "manufacturer",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "m.displayName"
}
]
}
]
}
]
},
{
"name" : "deviceName",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "softwareName",
"variable" : "softwareName"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "deviceName",
"variable" : "deviceName"
}
],
"rule" : [
{
"name" : "typeName",
"source" : [
{
"context" : "softwareName"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "other"
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "softwareName",
"variable" : "s"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "s.displayName"
}
]
}
]
}
]
}
],
"documentation" : "device"
}
]
}
],
"documentation" : "author"
},
{
"name" : "participantEncounter",
"source" : [
{
"context" : "obs",
"element" : "participant",
"variable" : "participant",
"condition" : "(typeCode != 'DEV')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %encounter.id"
}
]
}
],
"rule" : [
{
"name" : "fhirParticipant",
"source" : [
{
"context" : "participant"
}
],
"target" : [
{
"context" : "encounter",
"contextType" : "variable",
"element" : "participant",
"variable" : "FhirParticipant"
}
],
"rule" : [
{
"name" : "type",
"source" : [
{
"context" : "participant",
"variable" : "p"
}
],
"target" : [
{
"context" : "FhirParticipant",
"contextType" : "variable",
"element" : "type",
"variable" : "type"
}
],
"rule" : [
{
"name" : "codeType",
"source" : [
{
"context" : "p"
}
],
"target" : [
{
"context" : "type",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "codice",
"source" : [
{
"context" : "p"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "p.typeCode"
}
]
}
]
},
{
"name" : "system",
"source" : [
{
"context" : "p"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "partRole",
"source" : [
{
"context" : "participant",
"element" : "participantRole",
"variable" : "participantRole"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e12"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid12",
"transform" : "uuid"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid12"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "encounter",
"contextType" : "variable",
"element" : "participant",
"variable" : "participant1",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "participant1",
"contextType" : "variable",
"element" : "individual",
"variable" : "referencepart",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referencepart",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitionerRole.id"
}
]
}
],
"rule" : [
{
"name" : "time",
"source" : [
{
"context" : "participant",
"element" : "time",
"variable" : "time1"
}
],
"target" : [
{
"context" : "participant1",
"contextType" : "variable",
"element" : "period",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"rule" : [
{
"name" : "val",
"source" : [
{
"context" : "time1"
}
],
"target" : [
{
"context" : "period",
"contextType" : "variable",
"element" : "start",
"variable" : "start",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"time1",
"start"
]
}
]
}
],
"documentation" : "participant.time -> participant1.period;"
},
{
"name" : "time",
"source" : [
{
"context" : "participant",
"element" : "time",
"variable" : "time1"
}
],
"target" : [
{
"context" : "participant1",
"contextType" : "variable",
"element" : "period",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"time1",
"period"
]
}
]
},
{
"name" : "functionCode",
"source" : [
{
"context" : "participant",
"element" : "functionCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "practitioner",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e13"
},
{
"context" : "e13",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e13",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/participant"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "participantRole",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e13",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "participantRole",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "participantRole",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "participantRole",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "participantRole",
"element" : "playingEntity",
"variable" : "playingEntity"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "playingEntity",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "playingEntity",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
]
}
],
"documentation" : "non mappa i 2 precedenti"
}
]
}
],
"documentation" : "participant person"
},
{
"name" : "devParticipant",
"source" : [
{
"context" : "obs",
"element" : "participant",
"variable" : "devParticipant",
"condition" : "(typeCode = 'DEV')"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e14"
},
{
"context" : "e14",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e14",
"contextType" : "variable",
"element" : "resource",
"variable" : "device",
"transform" : "create",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "device",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid14",
"transform" : "uuid"
},
{
"context" : "e14",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Device/"
},
{
"valueId" : "uuid14"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "device",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Device/' + %device.id"
}
]
}
],
"rule" : [
{
"name" : "participantRoleDev",
"source" : [
{
"context" : "devParticipant",
"element" : "participantRole",
"variable" : "participantRoleDev"
}
],
"rule" : [
{
"name" : "playingDevice",
"source" : [
{
"context" : "participantRoleDev",
"element" : "playingDevice",
"variable" : "playingDevice"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "playingDevice",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "manufacturer",
"source" : [
{
"context" : "playingDevice",
"element" : "manufacturerModelName",
"variable" : "manufacturerModelName"
}
],
"rule" : [
{
"name" : "displayRule",
"source" : [
{
"context" : "manufacturerModelName",
"variable" : "m"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "manufacturer",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "m.displayName"
}
]
}
]
}
]
},
{
"name" : "deviceName",
"source" : [
{
"context" : "playingDevice",
"element" : "softwareName",
"variable" : "softwareName"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "deviceName",
"variable" : "deviceName"
}
],
"rule" : [
{
"name" : "typeName",
"source" : [
{
"context" : "softwareName"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "other"
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "softwareName",
"variable" : "s"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "s.displayName"
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "participant device"
},
{
"name" : "observationMedia",
"source" : [
{
"context" : "obs",
"element" : "entryRelationship",
"variable" : "er"
}
],
"rule" : [
{
"name" : "media",
"source" : [
{
"context" : "er",
"element" : "observationMedia",
"variable" : "obsMedia"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e15"
},
{
"context" : "e15",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e15",
"contextType" : "variable",
"element" : "resource",
"variable" : "media1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Media"
}
]
},
{
"context" : "media1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid15",
"transform" : "uuid"
},
{
"context" : "e15",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Media/"
},
{
"valueId" : "uuid15"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Media"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "derivedFrom",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Media/' + %media1.id"
}
]
}
],
"rule" : [
{
"name" : "Attachment",
"source" : [
{
"context" : "obsMedia"
}
],
"target" : [
{
"context" : "media1",
"contextType" : "variable",
"element" : "content",
"variable" : "Attachment",
"transform" : "create",
"parameter" : [
{
"valueString" : "Attachment"
}
]
}
],
"rule" : [
{
"name" : "status",
"source" : [
{
"context" : "obsMedia"
}
],
"target" : [
{
"context" : "media1",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
},
{
"name" : "valuemedia",
"source" : [
{
"context" : "obsMedia",
"element" : "value",
"variable" : "valueMedia"
}
],
"rule" : [
{
"name" : "type",
"source" : [
{
"context" : "valueMedia",
"element" : "mediaType",
"variable" : "type"
}
],
"target" : [
{
"context" : "Attachment",
"contextType" : "variable",
"element" : "contentType",
"transform" : "copy",
"parameter" : [
{
"valueId" : "type"
}
]
}
]
},
{
"name" : "data",
"source" : [
{
"context" : "valueMedia"
}
],
"target" : [
{
"context" : "Attachment",
"contextType" : "variable",
"element" : "data",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "valueMedia.dataBase64Binary"
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "observationMedia"
},
{
"name" : "ref",
"source" : [
{
"context" : "obs",
"element" : "referenceRange",
"variable" : "refRange"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "referenceRange",
"variable" : "ref",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
}
],
"rule" : [
{
"name" : "refRange",
"source" : [
{
"context" : "refRange",
"element" : "observationRange",
"variable" : "obsRange"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "obsRange",
"type" : "ST",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "text",
"transform" : "create",
"parameter" : [
{
"valueString" : "string"
}
]
},
{
"context" : "ref",
"contextType" : "variable",
"element" : "text",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "value.dataString"
}
]
}
]
},
{
"name" : "obsRange",
"source" : [
{
"context" : "obsRange"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "low",
"variable" : "Low",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"rule" : [
{
"name" : "IVL-PQ",
"source" : [
{
"context" : "obsRange",
"type" : "IVL_PQ",
"element" : "value",
"variable" : "v"
}
],
"rule" : [
{
"name" : "decValue",
"source" : [
{
"context" : "v",
"element" : "low",
"variable" : "l1"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "l1",
"element" : "value",
"variable" : "decValue"
}
],
"target" : [
{
"context" : "Low",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "decValue"
}
]
}
]
},
{
"name" : "unit",
"source" : [
{
"context" : "l1",
"element" : "unit",
"variable" : "Unit"
}
],
"target" : [
{
"context" : "Low",
"contextType" : "variable",
"element" : "unit",
"transform" : "copy",
"parameter" : [
{
"valueId" : "Unit"
}
]
}
]
}
]
},
{
"name" : "high",
"source" : [
{
"context" : "v"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "high",
"variable" : "high",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"rule" : [
{
"name" : "decValue",
"source" : [
{
"context" : "v",
"element" : "high",
"variable" : "h1"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "h1",
"element" : "value",
"variable" : "decValue1"
}
],
"target" : [
{
"context" : "high",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "decValue1"
}
]
}
]
},
{
"name" : "unit",
"source" : [
{
"context" : "h1",
"element" : "unit",
"variable" : "Unit1"
}
],
"target" : [
{
"context" : "high",
"contextType" : "variable",
"element" : "unit",
"transform" : "copy",
"parameter" : [
{
"valueId" : "Unit1"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "interpretationCode",
"source" : [
{
"context" : "obsRange",
"element" : "interpretationCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "precondition",
"source" : [
{
"context" : "obsRange",
"element" : "precondition",
"variable" : "precondition"
}
],
"rule" : [
{
"name" : "criterion",
"source" : [
{
"context" : "precondition",
"element" : "criterion",
"variable" : "criterion"
}
],
"rule" : [
{
"name" : "appliesTo",
"source" : [
{
"context" : "criterion",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "appliesTo",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "v",
"source" : [
{
"context" : "criterion",
"type" : "IVL_PQ",
"element" : "value",
"variable" : "v"
}
],
"rule" : [
{
"name" : "low",
"source" : [
{
"context" : "v",
"element" : "high",
"variable" : "l1"
}
],
"rule" : [
{
"name" : "age",
"source" : [
{
"context" : "l1"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "age",
"variable" : "age",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"rule" : [
{
"name" : "high",
"source" : [
{
"context" : "l1"
}
],
"target" : [
{
"context" : "age",
"contextType" : "variable",
"element" : "high",
"variable" : "high"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "l1",
"element" : "value",
"variable" : "decValue"
}
],
"target" : [
{
"context" : "high",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "decValue"
}
]
}
]
},
{
"name" : "unit",
"source" : [
{
"context" : "l1",
"element" : "unit",
"variable" : "Unit1"
}
],
"target" : [
{
"context" : "high",
"contextType" : "variable",
"element" : "unit",
"transform" : "copy",
"parameter" : [
{
"valueId" : "Unit1"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "referenceRange"
}
]
},
{
"name" : "Observation3",
"typeMode" : "none",
"input" : [
{
"name" : "obs",
"type" : "Observation",
"mode" : "source"
},
{
"name" : "patient",
"type" : "Patient",
"mode" : "target"
},
{
"name" : "encounter",
"type" : "Encounter",
"mode" : "target"
},
{
"name" : "ob",
"type" : "Observation",
"mode" : "target"
},
{
"name" : "bundle",
"type" : "Bundle",
"mode" : "target"
},
{
"name" : "cda",
"type" : "Act",
"mode" : "source"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "obs"
}
],
"target" : [
{
"context" : "ob",
"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" : "obs"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %encounter.id"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "obs",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "obs",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'completed')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "final"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "obs",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'active')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "registered"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "obs",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'aborted')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "cancelled"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "obs",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'suspended')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "partial"
}
]
}
]
},
{
"name" : "value2",
"source" : [
{
"context" : "obs",
"element" : "effectiveTime",
"variable" : "effectiveTime"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "effective",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"effectiveTime",
"value"
]
}
]
},
{
"name" : "where",
"source" : [
{
"context" : "obs",
"condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
}
],
"rule" : [
{
"name" : "effectiveTime",
"source" : [
{
"context" : "obs",
"element" : "effectiveTime",
"variable" : "eff"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "effective",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"eff",
"period"
]
}
]
}
]
},
{
"name" : "interpretationCode",
"source" : [
{
"context" : "obs",
"element" : "interpretationCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "interpretation",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "methodCode",
"source" : [
{
"context" : "obs",
"element" : "methodCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "method",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "value",
"source" : [
{
"context" : "obs",
"type" : "INT",
"element" : "value",
"variable" : "int"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "int.value"
}
]
}
]
},
{
"name" : "boolean",
"source" : [
{
"context" : "obs",
"type" : "BL",
"element" : "value",
"variable" : "boolean"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "boolean.value"
}
]
}
]
},
{
"name" : "val",
"source" : [
{
"context" : "obs",
"type" : "CE",
"element" : "value",
"variable" : "val"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "val"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"variable" : "ce",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"rule" : [
{
"name" : "originltext",
"source" : [
{
"context" : "val",
"element" : "originalText",
"variable" : "originalText"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "originalText",
"element" : "reference",
"variable" : "reference"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueId" : "reference"
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "val"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "val",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "val",
"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" : "val",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystemVersion",
"source" : [
{
"context" : "val",
"element" : "codeSystemVersion",
"variable" : "version"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "version",
"transform" : "cast",
"parameter" : [
{
"valueId" : "version"
},
{
"valueString" : "string"
}
]
}
]
}
]
},
{
"name" : "translation",
"source" : [
{
"context" : "val",
"element" : "translation",
"variable" : "translation"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "translation",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "translation",
"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" : "translation",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystemVersion",
"source" : [
{
"context" : "translation",
"element" : "codeSystemVersion",
"variable" : "version"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "version",
"transform" : "cast",
"parameter" : [
{
"valueId" : "version"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "qualifier",
"source" : [
{
"context" : "translation",
"element" : "qualifier",
"variable" : "qualifier"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "qualifier",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "ce",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "value",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "value",
"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" : "value",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystemVersion",
"source" : [
{
"context" : "value",
"element" : "codeSystemVersion",
"variable" : "version"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "version",
"transform" : "cast",
"parameter" : [
{
"valueId" : "version"
},
{
"valueString" : "string"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "valueQuantity",
"source" : [
{
"context" : "obs",
"type" : "PQ",
"element" : "value",
"variable" : "val"
}
],
"rule" : [
{
"name" : "quantity",
"source" : [
{
"context" : "val"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"variable" : "quantity",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "val",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "quantity",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "value"
}
]
}
]
},
{
"name" : "unit",
"source" : [
{
"context" : "val",
"element" : "unit",
"variable" : "unit"
}
],
"target" : [
{
"context" : "quantity",
"contextType" : "variable",
"element" : "unit",
"transform" : "copy",
"parameter" : [
{
"valueId" : "unit"
}
]
}
]
}
]
}
]
},
{
"name" : "value",
"source" : [
{
"context" : "obs",
"type" : "ST",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "string"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "value.dataString"
}
]
}
]
},
{
"name" : "entryRelationship",
"source" : [
{
"context" : "obs",
"element" : "entryRelationship",
"variable" : "entryRelationship"
}
],
"rule" : [
{
"name" : "Act",
"source" : [
{
"context" : "entryRelationship",
"element" : "act",
"variable" : "act"
}
],
"rule" : [
{
"name" : "text",
"source" : [
{
"context" : "act",
"element" : "text",
"variable" : "text"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "text",
"element" : "reference",
"variable" : "reference"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "note",
"variable" : "note"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "reference"
}
],
"target" : [
{
"context" : "note",
"contextType" : "variable",
"element" : "text",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "reference.value"
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "Note e commenti"
},
{
"name" : "subject",
"source" : [
{
"context" : "obs",
"element" : "subject",
"variable" : "sbj"
}
],
"rule" : [
{
"name" : "relatedSubject",
"source" : [
{
"context" : "sbj",
"element" : "relatedSubject",
"variable" : "relatedSubj"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "extension",
"variable" : "extension2"
}
],
"dependent" : [
{
"name" : "ExtSubjectAnimal",
"variable" : [
"relatedSubj",
"extension2"
]
}
]
}
],
"documentation" : "subject"
},
{
"name" : "specimen",
"source" : [
{
"context" : "obs",
"element" : "specimen",
"variable" : "spmn"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e4o"
},
{
"context" : "e4o",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e4o",
"contextType" : "variable",
"element" : "resource",
"variable" : "specimen",
"transform" : "create",
"parameter" : [
{
"valueString" : "Specimen"
}
]
},
{
"context" : "specimen",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4o",
"transform" : "uuid"
},
{
"context" : "e4o",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Specimen/"
},
{
"valueId" : "uuid4o"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Specimen"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "specimen",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Specimen/' + %specimen.id"
}
]
}
],
"rule" : [
{
"name" : "specimenRole",
"source" : [
{
"context" : "spmn",
"element" : "specimenRole",
"variable" : "specimenRole"
}
],
"rule" : [
{
"name" : "id",
"source" : [
{
"context" : "specimenRole",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "specimen",
"contextType" : "variable",
"element" : "identifier"
}
]
},
{
"name" : "specimenPlayingEntity",
"source" : [
{
"context" : "specimenRole",
"element" : "specimenPlayingEntity",
"variable" : "specimenPlayingEntity"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "specimenPlayingEntity",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "specimen",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
],
"documentation" : "specimen"
},
{
"name" : "performer",
"source" : [
{
"context" : "obs",
"element" : "performer",
"variable" : "performer"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e1"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid1",
"transform" : "uuid"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid1"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
}
],
"rule" : [
{
"name" : "practitionerRole",
"source" : [
{
"context" : "performer"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "performer",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
}
]
}
],
"rule" : [
{
"name" : "entity",
"source" : [
{
"context" : "performer",
"element" : "assignedEntity",
"variable" : "entity"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "entity",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "practitioner",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e2"
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/performer"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "entity",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "performer",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid2",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid2"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
}
]
},
{
"name" : "2.16.840.1.113883.2.9.4.3.2",
"source" : [
{
"context" : "entity",
"element" : "id",
"variable" : "id",
"condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "diverso",
"source" : [
{
"context" : "entity",
"element" : "id",
"variable" : "id",
"condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "entity",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "entity",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "entity",
"element" : "assignedPerson",
"variable" : "person"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "person",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "person",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
]
},
{
"name" : "representedOrganization",
"source" : [
{
"context" : "entity",
"element" : "representedOrganization",
"variable" : "representedOrganization"
}
],
"target" : [
{
"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" : "PUT"
}
]
},
{
"context" : "e3",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/performer/representedOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "representedOrganization",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "aut",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid3",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e3",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "organization",
"variable" : "referenceOrg",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceOrg",
"contextType" : "variable",
"element" : "reference",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "representedOrganization",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "representedOrganization",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "representedOrganization",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "OrgPartOf",
"source" : [
{
"context" : "representedOrganization",
"element" : "asOrganizationPartOf",
"variable" : "OrgPartOf"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e4"
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "OrgPartOf",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization1",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "organization",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization1.id"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "OrgPartOf",
"element" : "statusCode",
"variable" : "status",
"condition" : "(value = 'active')"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "create",
"parameter" : [
{
"valueString" : "boolean"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "copy",
"parameter" : [
{
"valueString" : "true"
}
]
}
]
},
{
"name" : "wholeOrganization",
"source" : [
{
"context" : "OrgPartOf",
"element" : "wholeOrganization",
"variable" : "wholeOrgan"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e5"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization2",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "wholeOrgan",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization2",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid5",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid5"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization2.id"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "wholeOrgan",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "wholeOrgan",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "wholeOrgan",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
],
"documentation" : "organization"
}
]
}
]
}
]
}
],
"documentation" : "performer"
},
{
"name" : "author",
"source" : [
{
"context" : "obs",
"element" : "author",
"variable" : "srcAuthor"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e6"
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid6",
"transform" : "uuid"
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid6"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "performer",
"variable" : "referenceaut",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceaut",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
}
]
}
],
"rule" : [
{
"name" : "assignedAuthor",
"source" : [
{
"context" : "srcAuthor",
"element" : "assignedAuthor",
"variable" : "assignedAuthor"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthor",
"element" : "code",
"variable" : "codice"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "code2"
}
],
"dependent" : [
{
"name" : "CECodeableConcept",
"variable" : [
"codice",
"code2"
]
}
]
},
{
"name" : "ASSAUth",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e7"
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
},
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid7",
"transform" : "uuid"
}
],
"rule" : [
{
"name" : "functionCode",
"source" : [
{
"context" : "srcAuthor",
"element" : "functionCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "meta",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/author"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "aut",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid2",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid2"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
},
{
"name" : "2.16.840.1.113883.2.9.4.3.2",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id",
"condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "diverso",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id",
"condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "assignedAuthor",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "assignedAuthor",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "assignedAuthor",
"element" : "assignedPerson",
"variable" : "person"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "person",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "person",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
],
"documentation" : "person"
}
]
},
{
"name" : "representedOrganization",
"source" : [
{
"context" : "assignedAuthor",
"element" : "representedOrganization",
"variable" : "representedOrganization"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e8"
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/author/representedOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "representedOrganization",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid3",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "organization",
"variable" : "referenceOrg",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceOrg",
"contextType" : "variable",
"element" : "reference",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "representedOrganization",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "representedOrganization",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "representedOrganization",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "OrgPartOf",
"source" : [
{
"context" : "representedOrganization",
"element" : "asOrganizationPartOf",
"variable" : "OrgPartOf"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e9"
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "OrgPartOf",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization1",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "organization",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization1.id"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "OrgPartOf",
"element" : "statusCode",
"variable" : "status",
"condition" : "(value = 'active')"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "create",
"parameter" : [
{
"valueString" : "boolean"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "copy",
"parameter" : [
{
"valueString" : "true"
}
]
}
]
},
{
"name" : "wholeOrganization",
"source" : [
{
"context" : "OrgPartOf",
"element" : "wholeOrganization",
"variable" : "wholeOrgan"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e10"
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization2",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "wholeOrgan",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization2",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization2.id"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "wholeOrgan",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "wholeOrgan",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "wholeOrgan",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
],
"documentation" : "organization"
},
{
"name" : "Device",
"source" : [
{
"context" : "assignedAuthor",
"element" : "assignedAuthoringDevice",
"variable" : "assignedAuthoringDevice"
}
],
"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" : "device",
"transform" : "create",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "device",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid11",
"transform" : "uuid"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Device/"
},
{
"valueId" : "uuid11"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "tgt",
"contextType" : "variable",
"element" : "author",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Device/' + %device.id"
}
]
}
],
"rule" : [
{
"name" : "templateId",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "templateId",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "identifier",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "manufacturer",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "manufacturerModelName",
"variable" : "manufacturerModelName"
}
],
"rule" : [
{
"name" : "displayRule",
"source" : [
{
"context" : "manufacturerModelName",
"variable" : "m"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "manufacturer",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "m.displayName"
}
]
}
]
}
]
},
{
"name" : "deviceName",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "softwareName",
"variable" : "softwareName"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "deviceName",
"variable" : "deviceName"
}
],
"rule" : [
{
"name" : "typeName",
"source" : [
{
"context" : "softwareName"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "other"
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "softwareName",
"variable" : "s"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "s.displayName"
}
]
}
]
}
]
}
],
"documentation" : "device"
}
]
}
],
"documentation" : "author"
},
{
"name" : "participantEncounter",
"source" : [
{
"context" : "obs",
"element" : "participant",
"variable" : "participant",
"condition" : "(typeCode != 'DEV')"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %encounter.id"
}
]
}
],
"rule" : [
{
"name" : "fhirParticipant",
"source" : [
{
"context" : "participant"
}
],
"target" : [
{
"context" : "encounter",
"contextType" : "variable",
"element" : "participant",
"variable" : "FhirParticipant"
}
],
"rule" : [
{
"name" : "type",
"source" : [
{
"context" : "participant",
"variable" : "p"
}
],
"target" : [
{
"context" : "FhirParticipant",
"contextType" : "variable",
"element" : "type",
"variable" : "type"
}
],
"rule" : [
{
"name" : "codeType",
"source" : [
{
"context" : "p"
}
],
"target" : [
{
"context" : "type",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "codice",
"source" : [
{
"context" : "p"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "p.typeCode"
}
]
}
]
},
{
"name" : "system",
"source" : [
{
"context" : "p"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "partRole",
"source" : [
{
"context" : "participant",
"element" : "participantRole",
"variable" : "participantRole"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e12"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid12",
"transform" : "uuid"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid12"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "encounter",
"contextType" : "variable",
"element" : "participant",
"variable" : "participant1",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "participant1",
"contextType" : "variable",
"element" : "individual",
"variable" : "referencepart",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referencepart",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitionerRole.id"
}
]
}
],
"rule" : [
{
"name" : "time",
"source" : [
{
"context" : "participant",
"element" : "time",
"variable" : "time1"
}
],
"target" : [
{
"context" : "participant1",
"contextType" : "variable",
"element" : "period",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"rule" : [
{
"name" : "val",
"source" : [
{
"context" : "time1"
}
],
"target" : [
{
"context" : "period",
"contextType" : "variable",
"element" : "start",
"variable" : "start",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"time1",
"start"
]
}
]
}
],
"documentation" : "participant.time -> participant1.period;"
},
{
"name" : "time",
"source" : [
{
"context" : "participant",
"element" : "time",
"variable" : "time1"
}
],
"target" : [
{
"context" : "participant1",
"contextType" : "variable",
"element" : "period",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"time1",
"period"
]
}
]
},
{
"name" : "functionCode",
"source" : [
{
"context" : "participant",
"element" : "functionCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "practitioner",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e13"
},
{
"context" : "e13",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e13",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/observation/participant"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "participantRole",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e13",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "participantRole",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "participantRole",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "participantRole",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "participantRole",
"element" : "playingEntity",
"variable" : "playingEntity"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "playingEntity",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "playingEntity",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
]
}
],
"documentation" : "non mappa i 2 precedenti"
}
]
}
],
"documentation" : "participant person"
},
{
"name" : "devParticipant",
"source" : [
{
"context" : "obs",
"element" : "participant",
"variable" : "devParticipant",
"condition" : "(typeCode = 'DEV')"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e14"
},
{
"context" : "e14",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e14",
"contextType" : "variable",
"element" : "resource",
"variable" : "device",
"transform" : "create",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "device",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid14",
"transform" : "uuid"
},
{
"context" : "e14",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Device/"
},
{
"valueId" : "uuid14"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "device",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Device/' + %device.id"
}
]
}
],
"rule" : [
{
"name" : "participantRoleDev",
"source" : [
{
"context" : "devParticipant",
"element" : "participantRole",
"variable" : "participantRoleDev"
}
],
"rule" : [
{
"name" : "playingDevice",
"source" : [
{
"context" : "participantRoleDev",
"element" : "playingDevice",
"variable" : "playingDevice"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "playingDevice",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "manufacturer",
"source" : [
{
"context" : "playingDevice",
"element" : "manufacturerModelName",
"variable" : "manufacturerModelName"
}
],
"rule" : [
{
"name" : "displayRule",
"source" : [
{
"context" : "manufacturerModelName",
"variable" : "m"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "manufacturer",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "m.displayName"
}
]
}
]
}
]
},
{
"name" : "deviceName",
"source" : [
{
"context" : "playingDevice",
"element" : "softwareName",
"variable" : "softwareName"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "deviceName",
"variable" : "deviceName"
}
],
"rule" : [
{
"name" : "typeName",
"source" : [
{
"context" : "softwareName"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "other"
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "softwareName",
"variable" : "s"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "s.displayName"
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "participant device"
},
{
"name" : "observationMedia",
"source" : [
{
"context" : "obs",
"element" : "entryRelationship",
"variable" : "er"
}
],
"rule" : [
{
"name" : "media",
"source" : [
{
"context" : "er",
"element" : "observationMedia",
"variable" : "obsMedia"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e15"
},
{
"context" : "e15",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e15",
"contextType" : "variable",
"element" : "resource",
"variable" : "media1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Media"
}
]
},
{
"context" : "media1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid15",
"transform" : "uuid"
},
{
"context" : "e15",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Media/"
},
{
"valueId" : "uuid15"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Media"
}
]
},
{
"context" : "ob",
"contextType" : "variable",
"element" : "derivedFrom",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Media/' + %media1.id"
}
]
}
],
"rule" : [
{
"name" : "Attachment",
"source" : [
{
"context" : "obsMedia"
}
],
"target" : [
{
"context" : "media1",
"contextType" : "variable",
"element" : "content",
"variable" : "Attachment",
"transform" : "create",
"parameter" : [
{
"valueString" : "Attachment"
}
]
}
],
"rule" : [
{
"name" : "status",
"source" : [
{
"context" : "obsMedia"
}
],
"target" : [
{
"context" : "media1",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
},
{
"name" : "valuemedia",
"source" : [
{
"context" : "obsMedia",
"element" : "value",
"variable" : "valueMedia"
}
],
"rule" : [
{
"name" : "type",
"source" : [
{
"context" : "valueMedia",
"element" : "mediaType",
"variable" : "type"
}
],
"target" : [
{
"context" : "Attachment",
"contextType" : "variable",
"element" : "contentType",
"transform" : "copy",
"parameter" : [
{
"valueId" : "type"
}
]
}
]
},
{
"name" : "data",
"source" : [
{
"context" : "valueMedia"
}
],
"target" : [
{
"context" : "Attachment",
"contextType" : "variable",
"element" : "data",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "valueMedia.dataBase64Binary"
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "observationMedia"
},
{
"name" : "ref",
"source" : [
{
"context" : "obs",
"element" : "referenceRange",
"variable" : "refRange"
}
],
"target" : [
{
"context" : "ob",
"contextType" : "variable",
"element" : "referenceRange",
"variable" : "ref",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
}
],
"rule" : [
{
"name" : "refRange",
"source" : [
{
"context" : "refRange",
"element" : "observationRange",
"variable" : "obsRange"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "obsRange",
"type" : "ST",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "text",
"transform" : "create",
"parameter" : [
{
"valueString" : "string"
}
]
},
{
"context" : "ref",
"contextType" : "variable",
"element" : "text",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "value.dataString"
}
]
}
]
},
{
"name" : "obsRange",
"source" : [
{
"context" : "obsRange"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "low",
"variable" : "Low",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"rule" : [
{
"name" : "IVLPQ",
"source" : [
{
"context" : "obsRange",
"type" : "IVL_PQ",
"element" : "value",
"variable" : "v"
}
],
"rule" : [
{
"name" : "decValue",
"source" : [
{
"context" : "v",
"element" : "low",
"variable" : "l1"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "l1",
"element" : "value",
"variable" : "decValue"
}
],
"target" : [
{
"context" : "Low",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "decValue"
}
]
}
]
},
{
"name" : "unit",
"source" : [
{
"context" : "l1",
"element" : "unit",
"variable" : "Unit"
}
],
"target" : [
{
"context" : "Low",
"contextType" : "variable",
"element" : "unit",
"transform" : "copy",
"parameter" : [
{
"valueId" : "Unit"
}
]
}
]
}
]
},
{
"name" : "high",
"source" : [
{
"context" : "v"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "high",
"variable" : "high",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"rule" : [
{
"name" : "decValue",
"source" : [
{
"context" : "v",
"element" : "high",
"variable" : "h1"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "h1",
"element" : "value",
"variable" : "decValue1"
}
],
"target" : [
{
"context" : "high",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "decValue1"
}
]
}
]
},
{
"name" : "unit",
"source" : [
{
"context" : "h1",
"element" : "unit",
"variable" : "Unit1"
}
],
"target" : [
{
"context" : "high",
"contextType" : "variable",
"element" : "unit",
"transform" : "copy",
"parameter" : [
{
"valueId" : "Unit1"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "interpretationCode",
"source" : [
{
"context" : "obsRange",
"element" : "interpretationCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "precondition",
"source" : [
{
"context" : "obsRange",
"element" : "precondition",
"variable" : "precondition"
}
],
"rule" : [
{
"name" : "criterion",
"source" : [
{
"context" : "precondition",
"element" : "criterion",
"variable" : "criterion"
}
],
"rule" : [
{
"name" : "appliesTo",
"source" : [
{
"context" : "criterion",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "appliesTo",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "v",
"source" : [
{
"context" : "criterion",
"type" : "IVL_PQ",
"element" : "value",
"variable" : "v"
}
],
"rule" : [
{
"name" : "low",
"source" : [
{
"context" : "v",
"element" : "high",
"variable" : "l1"
}
],
"rule" : [
{
"name" : "age",
"source" : [
{
"context" : "l1"
}
],
"target" : [
{
"context" : "ref",
"contextType" : "variable",
"element" : "age",
"variable" : "age",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"rule" : [
{
"name" : "high",
"source" : [
{
"context" : "l1"
}
],
"target" : [
{
"context" : "age",
"contextType" : "variable",
"element" : "high",
"variable" : "high"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "l1",
"element" : "value",
"variable" : "decValue"
}
],
"target" : [
{
"context" : "high",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "decValue"
}
]
}
]
},
{
"name" : "unit",
"source" : [
{
"context" : "l1",
"element" : "unit",
"variable" : "Unit1"
}
],
"target" : [
{
"context" : "high",
"contextType" : "variable",
"element" : "unit",
"transform" : "copy",
"parameter" : [
{
"valueId" : "Unit1"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "referenceRange"
}
]
},
{
"name" : "Act",
"typeMode" : "none",
"input" : [
{
"name" : "cda",
"type" : "Act",
"mode" : "source"
},
{
"name" : "pat",
"type" : "Patient",
"mode" : "target"
},
{
"name" : "ac",
"type" : "DiagnosticReport",
"mode" : "target"
},
{
"name" : "enc",
"type" : "Encounter",
"mode" : "target"
},
{
"name" : "bundle",
"type" : "Bundle",
"mode" : "target"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "cda",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "ac",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "status",
"source" : [
{
"context" : "cda",
"condition" : "cda.statusCode.exists().not()"
}
],
"rule" : [
{
"name" : "statuscode",
"source" : [
{
"context" : "cda"
}
],
"target" : [
{
"context" : "ac",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "final"
}
]
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "cda",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'completed')"
}
],
"target" : [
{
"context" : "ac",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "final"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "cda",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'active')"
}
],
"target" : [
{
"context" : "ac",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "registered"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "cda",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'aborted')"
}
],
"target" : [
{
"context" : "ac",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "cancelled"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "cda",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'suspended')"
}
],
"target" : [
{
"context" : "ac",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "partial"
}
]
}
]
},
{
"name" : "value3",
"source" : [
{
"context" : "cda",
"element" : "effectiveTime",
"variable" : "effectiveTime"
}
],
"target" : [
{
"context" : "ac",
"contextType" : "variable",
"element" : "effective",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"effectiveTime",
"value"
]
}
]
},
{
"name" : "where",
"source" : [
{
"context" : "cda",
"condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
}
],
"rule" : [
{
"name" : "effectiveTime",
"source" : [
{
"context" : "cda",
"element" : "effectiveTime",
"variable" : "eff"
}
],
"target" : [
{
"context" : "ac",
"contextType" : "variable",
"element" : "effective",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"eff",
"period"
]
}
]
}
]
},
{
"name" : "reference",
"source" : [
{
"context" : "cda"
}
],
"target" : [
{
"context" : "ac",
"contextType" : "variable",
"element" : "subject",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Patient/' + %pat.id"
}
]
}
]
},
{
"name" : "reference",
"source" : [
{
"context" : "cda"
}
],
"target" : [
{
"context" : "ac",
"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" : "exist",
"source" : [
{
"context" : "cda",
"condition" : "cda.specimen.exists()"
}
],
"rule" : [
{
"name" : "specimen",
"source" : [
{
"context" : "cda",
"element" : "specimen",
"variable" : "src"
}
],
"target" : [
{
"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" : "specimen",
"transform" : "create",
"parameter" : [
{
"valueString" : "Specimen"
}
]
},
{
"context" : "specimen",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "uuid"
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Specimen/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Specimen"
}
]
},
{
"context" : "ac",
"contextType" : "variable",
"element" : "specimen",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Specimen/' + %specimen.id"
}
]
}
],
"rule" : [
{
"name" : "SpecimenRole",
"source" : [
{
"context" : "src",
"element" : "specimenRole",
"variable" : "specimenRole"
}
],
"rule" : [
{
"name" : "id",
"source" : [
{
"context" : "specimenRole",
"element" : "id",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "specimen",
"contextType" : "variable",
"element" : "identifier",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "specimenPlayingEntity",
"source" : [
{
"context" : "specimenRole",
"element" : "specimenPlayingEntity",
"variable" : "specimenPlayingEntity"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "specimenPlayingEntity",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "specimen",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
},
{
"name" : "reference",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "specimen",
"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" : "entryRelationshipobservation",
"source" : [
{
"context" : "cda",
"element" : "entryRelationship",
"variable" : "entryRelationship"
}
],
"rule" : [
{
"name" : "observation",
"source" : [
{
"context" : "entryRelationship",
"element" : "observation",
"variable" : "observation"
}
],
"rule" : [
{
"name" : "obs",
"source" : [
{
"context" : "observation"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e12"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "resource",
"variable" : "obs",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "obs",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid13",
"transform" : "uuid"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Observation/"
},
{
"valueId" : "uuid13"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "ac",
"contextType" : "variable",
"element" : "result",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Observation/' + %obs.id"
}
]
}
],
"rule" : [
{
"name" : "ORG",
"source" : [
{
"context" : "observation"
}
],
"dependent" : [
{
"name" : "Observation2",
"variable" : [
"observation",
"pat",
"enc",
"obs",
"bundle",
"cda",
"specimen"
]
}
]
},
{
"name" : "entryRelationshipprocedure",
"source" : [
{
"context" : "cda",
"element" : "entryRelationship",
"variable" : "entryRelationship1"
}
],
"rule" : [
{
"name" : "procedure",
"source" : [
{
"context" : "entryRelationship1",
"element" : "procedure",
"variable" : "proc"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e5"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "resource",
"variable" : "procedure",
"transform" : "create",
"parameter" : [
{
"valueString" : "Procedure"
}
]
},
{
"context" : "procedure",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid5",
"transform" : "uuid"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Procedure/"
},
{
"valueId" : "uuid5"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Procedure"
}
]
},
{
"context" : "obs",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Procedure/' + %procedure.id"
}
]
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"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" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %encounter.id"
}
]
}
]
},
{
"name" : "status",
"source" : [
{
"context" : "proc",
"condition" : "proc.statusCode.exists().not()"
}
],
"rule" : [
{
"name" : "statuscode",
"source" : [
{
"context" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'completed')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "completed"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'active')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "in-progress"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'aborted')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "stopped"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'suspended')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "on-hold"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'cancelled')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "not-done"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'held')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "on-hold"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'new')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "preparation"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'obsolete')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "entered-in-error"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'nullified')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
},
{
"name" : "datetime",
"source" : [
{
"context" : "proc",
"element" : "effectiveTime",
"variable" : "effectiveTime"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "performed",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"effectiveTime",
"value"
]
}
]
},
{
"name" : "where",
"source" : [
{
"context" : "proc",
"condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
}
],
"rule" : [
{
"name" : "effectiveTime",
"source" : [
{
"context" : "proc",
"element" : "effectiveTime",
"variable" : "eff"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "performed",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"eff",
"period"
]
}
]
}
]
},
{
"name" : "targetSiteCode",
"source" : [
{
"context" : "proc",
"element" : "targetSiteCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "bodySite",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
],
"documentation" : "procedure"
}
]
}
]
},
{
"name" : "organizer",
"source" : [
{
"context" : "entryRelationship",
"element" : "organizer",
"variable" : "organizer"
}
],
"rule" : [
{
"name" : "Organizer",
"source" : [
{
"context" : "organizer"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e12"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "resource",
"variable" : "obs",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "obs",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid13",
"transform" : "uuid"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Observation/"
},
{
"valueId" : "uuid13"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "ac",
"contextType" : "variable",
"element" : "result",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Observation/' + %obs.id"
}
]
}
],
"rule" : [
{
"name" : "ORG",
"source" : [
{
"context" : "organizer"
}
],
"dependent" : [
{
"name" : "Organizer",
"variable" : [
"cda",
"organizer",
"pat",
"enc",
"obs",
"bundle"
]
}
]
},
{
"name" : "entryRelationshiprocedure",
"source" : [
{
"context" : "cda",
"element" : "entryRelationship",
"variable" : "entryRelationship1"
}
],
"rule" : [
{
"name" : "pbservation",
"source" : [
{
"context" : "entryRelationship1",
"element" : "procedure",
"variable" : "proc"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e5"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "resource",
"variable" : "procedure",
"transform" : "create",
"parameter" : [
{
"valueString" : "Procedure"
}
]
},
{
"context" : "procedure",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid5",
"transform" : "uuid"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Procedure/"
},
{
"valueId" : "uuid5"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Procedure"
}
]
},
{
"context" : "obs",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Procedure/' + %procedure.id"
}
]
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"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" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %encounter.id"
}
]
}
]
},
{
"name" : "status",
"source" : [
{
"context" : "proc",
"condition" : "proc.statusCode.exists().not()"
}
],
"rule" : [
{
"name" : "statuscode",
"source" : [
{
"context" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'completed')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "completed"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'active')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "in-progress"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'aborted')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "stopped"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'suspended')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "on-hold"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'cancelled')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "not-done"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'held')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "on-hold"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'new')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "preparation"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'obsolete')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "entered-in-error"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'nullified')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
},
{
"name" : "datetime",
"source" : [
{
"context" : "proc",
"element" : "effectiveTime",
"variable" : "effectiveTime"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "performed",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"effectiveTime",
"value"
]
}
]
},
{
"name" : "where",
"source" : [
{
"context" : "proc",
"condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
}
],
"rule" : [
{
"name" : "effectiveTime",
"source" : [
{
"context" : "proc",
"element" : "effectiveTime",
"variable" : "eff"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "performed",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"eff",
"period"
]
}
]
}
]
},
{
"name" : "targetSiteCode",
"source" : [
{
"context" : "proc",
"element" : "targetSiteCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "bodySite",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
],
"documentation" : "procedure"
}
]
}
]
}
]
}
]
}
],
"documentation" : "specimen"
},
{
"name" : "existnot",
"source" : [
{
"context" : "cda",
"condition" : "cda.specimen.exists().not()"
}
],
"rule" : [
{
"name" : "entryRelationshipobservation",
"source" : [
{
"context" : "cda",
"element" : "entryRelationship",
"variable" : "entryRelationship"
}
],
"rule" : [
{
"name" : "observation",
"source" : [
{
"context" : "entryRelationship",
"element" : "observation",
"variable" : "observation"
}
],
"rule" : [
{
"name" : "obs",
"source" : [
{
"context" : "observation"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e12"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "resource",
"variable" : "obs",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "obs",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid13",
"transform" : "uuid"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Observation/"
},
{
"valueId" : "uuid13"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "ac",
"contextType" : "variable",
"element" : "result",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Observation/' + %obs.id"
}
]
}
],
"rule" : [
{
"name" : "ORG",
"source" : [
{
"context" : "observation"
}
],
"dependent" : [
{
"name" : "Observation3",
"variable" : [
"observation",
"pat",
"enc",
"obs",
"bundle",
"cda"
]
}
]
},
{
"name" : "entryRelationshipprocedure",
"source" : [
{
"context" : "cda",
"element" : "entryRelationship",
"variable" : "entryRelationship1"
}
],
"rule" : [
{
"name" : "procedure",
"source" : [
{
"context" : "entryRelationship1",
"element" : "procedure",
"variable" : "proc"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e5"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "resource",
"variable" : "procedure",
"transform" : "create",
"parameter" : [
{
"valueString" : "Procedure"
}
]
},
{
"context" : "procedure",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid5",
"transform" : "uuid"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Procedure/"
},
{
"valueId" : "uuid5"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Procedure"
}
]
},
{
"context" : "obs",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Procedure/' + %procedure.id"
}
]
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"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" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %encounter.id"
}
]
}
]
},
{
"name" : "status",
"source" : [
{
"context" : "proc",
"condition" : "proc.statusCode.exists().not()"
}
],
"rule" : [
{
"name" : "statuscode",
"source" : [
{
"context" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'completed')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "completed"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'active')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "in-progress"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'aborted')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "stopped"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'suspended')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "on-hold"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'cancelled')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "not-done"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'held')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "on-hold"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'new')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "preparation"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'obsolete')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "entered-in-error"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'nullified')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
},
{
"name" : "datetime",
"source" : [
{
"context" : "proc",
"element" : "effectiveTime",
"variable" : "effectiveTime"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "performed",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"effectiveTime",
"value"
]
}
]
},
{
"name" : "where",
"source" : [
{
"context" : "proc",
"condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
}
],
"rule" : [
{
"name" : "effectiveTime",
"source" : [
{
"context" : "proc",
"element" : "effectiveTime",
"variable" : "eff"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "performed",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"eff",
"period"
]
}
]
}
]
},
{
"name" : "targetSiteCode",
"source" : [
{
"context" : "proc",
"element" : "targetSiteCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "bodySite",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
],
"documentation" : "procedure"
}
]
}
]
},
{
"name" : "organizer",
"source" : [
{
"context" : "entryRelationship",
"element" : "organizer",
"variable" : "organizer"
}
],
"rule" : [
{
"name" : "Organizer",
"source" : [
{
"context" : "organizer"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e12"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "resource",
"variable" : "obs",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "obs",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid13",
"transform" : "uuid"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Observation/"
},
{
"valueId" : "uuid13"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "ac",
"contextType" : "variable",
"element" : "result",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Observation/' + %obs.id"
}
]
}
],
"rule" : [
{
"name" : "ORG",
"source" : [
{
"context" : "organizer"
}
],
"dependent" : [
{
"name" : "Organizer",
"variable" : [
"cda",
"organizer",
"pat",
"enc",
"obs",
"bundle"
]
}
]
},
{
"name" : "entryRelationshiprocedure",
"source" : [
{
"context" : "cda",
"element" : "entryRelationship",
"variable" : "entryRelationship1"
}
],
"rule" : [
{
"name" : "pbservation",
"source" : [
{
"context" : "entryRelationship1",
"element" : "procedure",
"variable" : "proc"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e5"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "resource",
"variable" : "procedure",
"transform" : "create",
"parameter" : [
{
"valueString" : "Procedure"
}
]
},
{
"context" : "procedure",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid5",
"transform" : "uuid"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Procedure/"
},
{
"valueId" : "uuid5"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Procedure"
}
]
},
{
"context" : "obs",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Procedure/' + %procedure.id"
}
]
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"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" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "encounter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Encounter/' + %encounter.id"
}
]
}
]
},
{
"name" : "status",
"source" : [
{
"context" : "proc",
"condition" : "proc.statusCode.exists().not()"
}
],
"rule" : [
{
"name" : "statuscode",
"source" : [
{
"context" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'completed')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "completed"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'active')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "in-progress"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'aborted')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "stopped"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'suspended')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "on-hold"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'cancelled')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "not-done"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'held')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "on-hold"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'new')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "preparation"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'obsolete')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "entered-in-error"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "proc",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'nullified')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
},
{
"name" : "datetime",
"source" : [
{
"context" : "proc",
"element" : "effectiveTime",
"variable" : "effectiveTime"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "performed",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"effectiveTime",
"value"
]
}
]
},
{
"name" : "where",
"source" : [
{
"context" : "proc",
"condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
}
],
"rule" : [
{
"name" : "effectiveTime",
"source" : [
{
"context" : "proc",
"element" : "effectiveTime",
"variable" : "eff"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "performed",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"eff",
"period"
]
}
]
}
]
},
{
"name" : "targetSiteCode",
"source" : [
{
"context" : "proc",
"element" : "targetSiteCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "bodySite",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
],
"documentation" : "procedure"
}
]
}
]
}
],
"documentation" : "cda -> bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'POST', e4.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4, e4.fullUrl = append('https://example/Specimen/', uuid4), request.url = 'Specimen' then {"
}
]
},
{
"name" : "participant",
"source" : [
{
"context" : "cda",
"element" : "participant",
"variable" : "part",
"condition" : "(typeCode != 'DEV')"
}
],
"target" : [
{
"context" : "enc",
"contextType" : "variable",
"element" : "participant",
"variable" : "participant"
}
],
"rule" : [
{
"name" : "type",
"source" : [
{
"context" : "part"
}
],
"target" : [
{
"context" : "participant",
"contextType" : "variable",
"element" : "type",
"variable" : "type"
}
],
"rule" : [
{
"name" : "codeType",
"source" : [
{
"context" : "part"
}
],
"target" : [
{
"context" : "type",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "codice",
"source" : [
{
"context" : "part"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "part.typeCode"
}
]
}
]
},
{
"name" : "system",
"source" : [
{
"context" : "part"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
}
]
}
]
}
]
}
]
},
{
"name" : "participantRole",
"source" : [
{
"context" : "part",
"element" : "participantRole",
"variable" : "participantRole"
}
],
"target" : [
{
"context" : "participant",
"contextType" : "variable",
"element" : "individual",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
}
],
"rule" : [
{
"name" : "participanRoleBund",
"source" : [
{
"context" : "participantRole"
}
],
"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" : "PUT"
}
]
},
{
"context" : "e",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
}
],
"rule" : [
{
"name" : "time",
"source" : [
{
"context" : "part",
"element" : "time",
"variable" : "time1"
}
],
"target" : [
{
"context" : "participant",
"contextType" : "variable",
"element" : "period",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"rule" : [
{
"name" : "val",
"source" : [
{
"context" : "time1"
}
],
"target" : [
{
"context" : "period",
"contextType" : "variable",
"element" : "start",
"variable" : "start",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"time1",
"start"
]
}
]
}
]
},
{
"name" : "time",
"source" : [
{
"context" : "part",
"element" : "time",
"variable" : "time1"
}
],
"target" : [
{
"context" : "participant",
"contextType" : "variable",
"element" : "period",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"time1",
"period"
]
}
]
},
{
"name" : "meta",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/act/participant"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "participantRole",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "participantRole",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "playingEntity",
"source" : [
{
"context" : "participantRole",
"element" : "playingEntity",
"variable" : "playingEntity"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "playingEntity",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
]
}
],
"documentation" : "PARTICIPANT"
},
{
"name" : "performer",
"source" : [
{
"context" : "cda",
"element" : "performer",
"variable" : "performer"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e1"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid1",
"transform" : "uuid"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid1"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "ac",
"contextType" : "variable",
"element" : "performer",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
}
]
}
],
"rule" : [
{
"name" : "performer",
"source" : [
{
"context" : "performer",
"element" : "assignedEntity",
"variable" : "assignedEntity"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "assignedEntity",
"element" : "code",
"variable" : "codice"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code"
}
]
},
{
"name" : "ASSAUth",
"source" : [
{
"context" : "assignedEntity"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e2"
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "assignedEntity",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "meta",
"source" : [
{
"context" : "assignedEntity"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "assignedEntity"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "assignedEntity"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "assignedEntity"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/act/performer"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "assignedEntity",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "assignedEntity"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "pra",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "assignedEntity",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "assignedEntity",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "assignedEntity",
"element" : "assignedPerson",
"variable" : "person"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "person",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "person",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "representedOrganization",
"source" : [
{
"context" : "assignedEntity",
"element" : "representedOrganization",
"variable" : "representedOrganization"
}
],
"target" : [
{
"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" : "PUT"
}
]
},
{
"context" : "e3",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/act/representedOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "representedOrganization",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid2",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e3",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid2"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "organization",
"variable" : "referenceOrg",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceOrg",
"contextType" : "variable",
"element" : "reference",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid2"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "representedOrganization",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "representedOrganization",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "representedOrganization",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "OrgPartOf",
"source" : [
{
"context" : "representedOrganization",
"element" : "asOrganizationPartOf",
"variable" : "OrgPartOf"
}
],
"target" : [
{
"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" : "PUT"
}
]
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/act/representedOrganization/asOrganizationPartOf"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "OrgPartOf",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization1",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid3",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid3",
"transform" : "uuid"
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
},
{
"context" : "organization",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization1.id"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "OrgPartOf",
"element" : "statusCode",
"variable" : "status",
"condition" : "(value = 'active')"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "create",
"parameter" : [
{
"valueString" : "boolean"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "copy",
"parameter" : [
{
"valueString" : "true"
}
]
}
]
},
{
"name" : "wholeOrganization",
"source" : [
{
"context" : "OrgPartOf",
"element" : "wholeOrganization",
"variable" : "wholeOrgan"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e10bis"
},
{
"context" : "e10bis",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e10bis",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization2",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/act/representedOrganization/asOrganizationPartOf/wholeOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "wholeOrgan",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization2",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid5",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e10bis",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid5"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization2.id"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "wholeOrgan",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "wholeOrgan",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "wholeOrgan",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "PERFORMER"
},
{
"name" : "author",
"source" : [
{
"context" : "cda",
"element" : "author",
"variable" : "srcAuthor"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e5"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid6",
"transform" : "uuid"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid6"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "ac",
"contextType" : "variable",
"element" : "performer",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
}
]
}
],
"rule" : [
{
"name" : "author",
"source" : [
{
"context" : "srcAuthor",
"element" : "assignedAuthor",
"variable" : "assignedAuthor"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthor",
"element" : "code",
"variable" : "codice"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code"
}
]
},
{
"name" : "ASSAUth",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e7"
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
}
],
"rule" : [
{
"name" : "functionCode",
"source" : [
{
"context" : "srcAuthor",
"element" : "functionCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthor",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "meta",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/act/author"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "aut",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid2",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid2"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
}
]
},
{
"name" : "2.16.840.1.113883.2.9.4.3.2",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id",
"condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "diverso",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id",
"condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "assignedAuthor",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "assignedAuthor",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "assignedAuthor",
"element" : "assignedPerson",
"variable" : "person"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "person",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "person",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
],
"documentation" : "person"
}
]
},
{
"name" : "representedOrganization",
"source" : [
{
"context" : "assignedAuthor",
"element" : "representedOrganization",
"variable" : "representedOrganization"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e8"
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/act/author/representedOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "representedOrganization",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid8",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid8"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "organization",
"variable" : "referenceOrg",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceOrg",
"contextType" : "variable",
"element" : "reference",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid8"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "representedOrganization",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "representedOrganization",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "representedOrganization",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "OrgPartOf",
"source" : [
{
"context" : "representedOrganization",
"element" : "asOrganizationPartOf",
"variable" : "OrgPartOf"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e9"
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/act/author/representedOrganization/asOrganizationPartOf"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "OrgPartOf",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization1",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid9",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid9"
}
]
},
{
"context" : "organization",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization1.id"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "OrgPartOf",
"element" : "statusCode",
"variable" : "status",
"condition" : "(value = 'active')"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "create",
"parameter" : [
{
"valueString" : "boolean"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "copy",
"parameter" : [
{
"valueString" : "true"
}
]
}
]
},
{
"name" : "wholeOrganization",
"source" : [
{
"context" : "OrgPartOf",
"element" : "wholeOrganization",
"variable" : "wholeOrgan"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e10"
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization2",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/act/author/representedOrganization/asOrganizationPartOf/wholeOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "wholeOrgan",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization2",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid10",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid10"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization2.id"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "wholeOrgan",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "wholeOrgan",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "wholeOrgan",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
],
"documentation" : "organization"
}
]
}
],
"documentation" : "AUTHOR"
},
{
"name" : "entryRelationship",
"source" : [
{
"context" : "cda",
"element" : "entryRelationship",
"variable" : "entryRelationship"
}
],
"rule" : [
{
"name" : "Act",
"source" : [
{
"context" : "entryRelationship",
"element" : "act",
"variable" : "act"
}
],
"rule" : [
{
"name" : "text",
"source" : [
{
"context" : "act",
"element" : "text",
"variable" : "text"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "text",
"element" : "reference",
"variable" : "reference"
}
],
"target" : [
{
"context" : "ac",
"contextType" : "variable",
"element" : "conclusion",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "reference.value"
}
]
}
]
}
]
}
]
}
],
"documentation" : "<!--entryRelationship per la gestione delle note e commenti-->"
}
]
},
{
"name" : "Organizer",
"typeMode" : "none",
"input" : [
{
"name" : "cda",
"type" : "Act",
"mode" : "source"
},
{
"name" : "org",
"type" : "Organizer",
"mode" : "source"
},
{
"name" : "patient",
"type" : "Patient",
"mode" : "target"
},
{
"name" : "encounter",
"type" : "Encounter",
"mode" : "target"
},
{
"name" : "observation",
"type" : "Observation",
"mode" : "target"
},
{
"name" : "bundle",
"type" : "Bundle",
"mode" : "target"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "org"
}
],
"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" : "org"
}
],
"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/' + %encounter.id"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "org",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "observation",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "act",
"source" : [
{
"context" : "org",
"condition" : "org.code.exists().not()"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "cda",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "observation",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "org",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'completed')"
}
],
"target" : [
{
"context" : "observation",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "final"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "org",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'active')"
}
],
"target" : [
{
"context" : "observation",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "registered"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "org",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'aborted')"
}
],
"target" : [
{
"context" : "observation",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "cancelled"
}
]
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "org",
"element" : "statusCode",
"variable" : "statusc",
"condition" : "(code = 'suspended')"
}
],
"target" : [
{
"context" : "observation",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "partial"
}
]
}
]
},
{
"name" : "value2",
"source" : [
{
"context" : "org",
"element" : "effectiveTime",
"variable" : "effectiveTime"
}
],
"target" : [
{
"context" : "observation",
"contextType" : "variable",
"element" : "effective",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"effectiveTime",
"value"
]
}
]
},
{
"name" : "where",
"source" : [
{
"context" : "org",
"condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
}
],
"rule" : [
{
"name" : "effectiveTime",
"source" : [
{
"context" : "org",
"element" : "effectiveTime",
"variable" : "eff"
}
],
"target" : [
{
"context" : "observation",
"contextType" : "variable",
"element" : "effective",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"eff",
"period"
]
}
]
}
]
},
{
"name" : "specimen",
"source" : [
{
"context" : "org",
"element" : "specimen",
"variable" : "spmn"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e4o"
},
{
"context" : "e4o",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e4o",
"contextType" : "variable",
"element" : "resource",
"variable" : "specimen",
"transform" : "create",
"parameter" : [
{
"valueString" : "Specimen"
}
]
},
{
"context" : "specimen",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4o",
"transform" : "uuid"
},
{
"context" : "e4o",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Specimen/"
},
{
"valueId" : "uuid4o"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Specimen"
}
]
},
{
"context" : "observation",
"contextType" : "variable",
"element" : "specimen",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Specimen/' + %specimen.id"
}
]
}
],
"rule" : [
{
"name" : "specimenRole",
"source" : [
{
"context" : "spmn",
"element" : "specimenRole",
"variable" : "specimenRole"
}
],
"rule" : [
{
"name" : "id",
"source" : [
{
"context" : "specimenRole",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "specimen",
"contextType" : "variable",
"element" : "identifier"
}
]
},
{
"name" : "specimenPlayingEntity",
"source" : [
{
"context" : "specimenRole",
"element" : "specimenPlayingEntity",
"variable" : "specimenPlayingEntity"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "specimenPlayingEntity",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "specimen",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
],
"documentation" : "specimen"
},
{
"name" : "subject",
"source" : [
{
"context" : "org",
"element" : "subject",
"variable" : "sbj"
}
],
"rule" : [
{
"name" : "relatedSubject",
"source" : [
{
"context" : "sbj",
"element" : "relatedSubject",
"variable" : "relatedSubj"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "extension",
"variable" : "extension2"
}
],
"dependent" : [
{
"name" : "ExtSubjectAnimal",
"variable" : [
"relatedSubj",
"extension2"
]
}
]
}
],
"documentation" : "subject"
},
{
"name" : "performer",
"source" : [
{
"context" : "org",
"element" : "performer",
"variable" : "performer"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e1"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid1",
"transform" : "uuid"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid1"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
}
],
"rule" : [
{
"name" : "practitionerRole",
"source" : [
{
"context" : "performer"
}
],
"target" : [
{
"context" : "observation",
"contextType" : "variable",
"element" : "performer",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
}
]
}
],
"rule" : [
{
"name" : "entity",
"source" : [
{
"context" : "performer",
"element" : "assignedEntity",
"variable" : "entity"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "entity",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "practitioner",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e2"
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/organizer/performer"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "entity",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "entity"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "aut",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid2",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid2"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
}
]
},
{
"name" : "2.16.840.1.113883.2.9.4.3.2",
"source" : [
{
"context" : "entity",
"element" : "id",
"variable" : "id",
"condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "diverso",
"source" : [
{
"context" : "entity",
"element" : "id",
"variable" : "id",
"condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "entity",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "entity",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "entity",
"element" : "assignedPerson",
"variable" : "person"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "person",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "person",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
]
},
{
"name" : "representedOrganization",
"source" : [
{
"context" : "entity",
"element" : "representedOrganization",
"variable" : "representedOrganization"
}
],
"target" : [
{
"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" : "PUT"
}
]
},
{
"context" : "e3",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/organizer/performer/representedOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "representedOrganization",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "aut",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid3",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e3",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "organization",
"variable" : "referenceOrg",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceOrg",
"contextType" : "variable",
"element" : "reference",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid3"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "representedOrganization",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "representedOrganization",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "representedOrganization",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "OrgPartOf",
"source" : [
{
"context" : "representedOrganization",
"element" : "asOrganizationPartOf",
"variable" : "OrgPartOf"
}
],
"target" : [
{
"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" : "PUT"
}
]
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/organizer/performer/representedOrganization/asOrganizationPartOf"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "OrgPartOf",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization1",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e4",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "organization",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization1.id"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "OrgPartOf",
"element" : "statusCode",
"variable" : "status",
"condition" : "(value = 'active')"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "create",
"parameter" : [
{
"valueString" : "boolean"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "copy",
"parameter" : [
{
"valueString" : "true"
}
]
}
]
},
{
"name" : "wholeOrganization",
"source" : [
{
"context" : "OrgPartOf",
"element" : "wholeOrganization",
"variable" : "wholeOrgan"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e5"
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization2",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/organizer/performer/representedOrganization/asOrganizationPartOf/wholeOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "wholeOrgan",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization2",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "org",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid4",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e5",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid4"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization2.id"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "wholeOrgan",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "wholeOrgan",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "wholeOrgan",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "performer"
},
{
"name" : "author",
"source" : [
{
"context" : "org",
"element" : "author",
"variable" : "srcAuthor"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e6"
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid6",
"transform" : "uuid"
},
{
"context" : "e6",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid6"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "observation",
"contextType" : "variable",
"element" : "performer",
"variable" : "referenceaut",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceaut",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
}
]
}
],
"rule" : [
{
"name" : "assignedAuthor",
"source" : [
{
"context" : "srcAuthor",
"element" : "assignedAuthor",
"variable" : "assignedAuthor"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthor",
"element" : "code",
"variable" : "codice"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "code2"
}
],
"dependent" : [
{
"name" : "CECodeableConcept",
"variable" : [
"codice",
"code2"
]
}
]
},
{
"name" : "ASSAUth",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e7"
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
}
],
"rule" : [
{
"name" : "functionCode",
"source" : [
{
"context" : "srcAuthor",
"element" : "functionCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "meta",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/organizer/author"
}
]
}
]
}
]
}
],
"documentation" : "assignedAuthor.code -> practitionerRole.code;"
},
{
"name" : "identifier",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "assignedAuthor"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "aut",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid7",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e7",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid7"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
}
]
},
{
"name" : "2.16.840.1.113883.2.9.4.3.2",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id",
"condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "diverso",
"source" : [
{
"context" : "assignedAuthor",
"element" : "id",
"variable" : "id",
"condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "assignedAuthor",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "assignedAuthor",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "assignedAuthor",
"element" : "assignedPerson",
"variable" : "person"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "person",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "person",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
],
"documentation" : "person"
}
]
},
{
"name" : "representedOrganization",
"source" : [
{
"context" : "assignedAuthor",
"element" : "representedOrganization",
"variable" : "representedOrganization"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e8"
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/organizer/author/representedOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "representedOrganization",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "representedOrganization"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "aut",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid8",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e8",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid8"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "organization",
"variable" : "referenceOrg",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referenceOrg",
"contextType" : "variable",
"element" : "reference",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid8"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "representedOrganization",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "representedOrganization",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "representedOrganization",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "OrgPartOf",
"source" : [
{
"context" : "representedOrganization",
"element" : "asOrganizationPartOf",
"variable" : "OrgPartOf"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e9"
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/organizer/author/representedOrganization/asOrganizationPartOf"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "OrgPartOf",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization1",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "aut",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid9",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e9",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid9"
}
]
},
{
"context" : "organization",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization1.id"
}
]
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "statusCode",
"source" : [
{
"context" : "OrgPartOf",
"element" : "statusCode",
"variable" : "status",
"condition" : "(value = 'active')"
}
],
"target" : [
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "create",
"parameter" : [
{
"valueString" : "boolean"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "active",
"transform" : "copy",
"parameter" : [
{
"valueString" : "true"
}
]
}
]
},
{
"name" : "wholeOrganization",
"source" : [
{
"context" : "OrgPartOf",
"element" : "wholeOrganization",
"variable" : "wholeOrgan"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e10"
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "resource",
"variable" : "organization2",
"transform" : "create",
"parameter" : [
{
"valueString" : "Organization"
}
]
}
],
"rule" : [
{
"name" : "meta",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "OrgPartOf"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/organizer/author/representedOrganization/asOrganizationPartOf/wholeOrganization"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "wholeOrgan",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "organization2",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "wholeOrgan"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Organization?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "aut",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid10",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e10",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Organization/"
},
{
"valueId" : "uuid10"
}
]
},
{
"context" : "organization1",
"contextType" : "variable",
"element" : "partOf",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Organization/' + %organization2.id"
}
]
}
]
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "wholeOrgan",
"element" : "name",
"variable" : "v"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.other"
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "wholeOrgan",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "wholeOrgan",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "organization2",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
}
]
}
],
"documentation" : "organization"
},
{
"name" : "Device",
"source" : [
{
"context" : "assignedAuthor",
"element" : "assignedAuthoringDevice",
"variable" : "assignedAuthoringDevice"
}
],
"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" : "device",
"transform" : "create",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "device",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid11",
"transform" : "uuid"
},
{
"context" : "e11",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Device/"
},
{
"valueId" : "uuid11"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "tgt",
"contextType" : "variable",
"element" : "author",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Device/' + %device.id"
}
]
}
],
"rule" : [
{
"name" : "templateId",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "templateId",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "identifier",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "manufacturer",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "manufacturerModelName",
"variable" : "manufacturerModelName"
}
],
"rule" : [
{
"name" : "displayRule",
"source" : [
{
"context" : "manufacturerModelName",
"variable" : "m"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "manufacturer",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "m.displayName"
}
]
}
]
}
]
},
{
"name" : "deviceName",
"source" : [
{
"context" : "assignedAuthoringDevice",
"element" : "softwareName",
"variable" : "softwareName"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "deviceName",
"variable" : "deviceName"
}
],
"rule" : [
{
"name" : "typeName",
"source" : [
{
"context" : "softwareName"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "other"
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "softwareName",
"variable" : "s"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "s.displayName"
}
]
}
]
}
]
}
],
"documentation" : "device"
}
],
"documentation" : "srcAuthor.time as time -> tgt.date;"
}
],
"documentation" : "author"
},
{
"name" : "participantEncounter",
"source" : [
{
"context" : "org",
"element" : "participant",
"variable" : "participant",
"condition" : "(typeCode != 'DEV')"
}
],
"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/' + %encounter.id"
}
]
}
],
"rule" : [
{
"name" : "fhirParticipant",
"source" : [
{
"context" : "participant"
}
],
"target" : [
{
"context" : "encounter",
"contextType" : "variable",
"element" : "participant",
"variable" : "FhirParticipant"
}
],
"rule" : [
{
"name" : "type",
"source" : [
{
"context" : "participant",
"variable" : "p"
}
],
"target" : [
{
"context" : "FhirParticipant",
"contextType" : "variable",
"element" : "type",
"variable" : "type"
}
],
"rule" : [
{
"name" : "codeType",
"source" : [
{
"context" : "p"
}
],
"target" : [
{
"context" : "type",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "codice",
"source" : [
{
"context" : "p"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "p.typeCode"
}
]
}
]
},
{
"name" : "system",
"source" : [
{
"context" : "p"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "partRole",
"source" : [
{
"context" : "participant",
"element" : "participantRole",
"variable" : "participantRole"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e12"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitionerRole",
"transform" : "create",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid12",
"transform" : "uuid"
},
{
"context" : "e12",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/PractitionerRole/"
},
{
"valueId" : "uuid12"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PractitionerRole"
}
]
},
{
"context" : "encounter",
"contextType" : "variable",
"element" : "participant",
"variable" : "participant1",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
}
],
"rule" : [
{
"name" : "time",
"source" : [
{
"context" : "participant",
"element" : "time",
"variable" : "time1"
}
],
"target" : [
{
"context" : "participant1",
"contextType" : "variable",
"element" : "period",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"rule" : [
{
"name" : "val",
"source" : [
{
"context" : "time1"
}
],
"target" : [
{
"context" : "period",
"contextType" : "variable",
"element" : "start",
"variable" : "start",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"time1",
"start"
]
}
]
}
],
"documentation" : "participant.time -> participant1.period;"
},
{
"name" : "time",
"source" : [
{
"context" : "participant",
"element" : "time",
"variable" : "time1"
}
],
"target" : [
{
"context" : "participant1",
"contextType" : "variable",
"element" : "period",
"variable" : "period",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "IVLTSPeriod",
"variable" : [
"time1",
"period"
]
}
]
},
{
"name" : "functionCode",
"source" : [
{
"context" : "participant",
"element" : "functionCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "practitioner",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e13"
},
{
"context" : "e13",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "e13",
"contextType" : "variable",
"element" : "resource",
"variable" : "practitioner",
"transform" : "create",
"parameter" : [
{
"valueString" : "Practitioner"
}
]
}
],
"rule" : [
{
"name" : "par",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "participant1",
"contextType" : "variable",
"element" : "individual",
"variable" : "referencepart",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "referencepart",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
}
]
}
]
},
{
"name" : "meta",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "meta",
"contextType" : "variable",
"element" : "tag",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "system",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://algoritmodiscoring"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ClinicalDocument/body/organizer/participant"
}
]
}
]
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "participantRole",
"element" : "id",
"variable" : "id"
}
],
"target" : [
{
"context" : "practitioner",
"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" : "ext",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "ext"
}
]
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "participantRole"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"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" : "r",
"source" : [
{
"context" : "id",
"element" : "root",
"variable" : "r"
}
],
"rule" : [
{
"name" : "part",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid2",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "r + '-' + ext"
}
]
},
{
"context" : "e13",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Practitioner/"
},
{
"valueId" : "uuid2"
}
]
},
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Practitioner/' + %practitioner.id"
}
]
}
]
}
]
}
]
},
{
"name" : "2.16.840.1.113883.2.9.4.3.2",
"source" : [
{
"context" : "participantRole",
"element" : "id",
"variable" : "id",
"condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "diverso",
"source" : [
{
"context" : "participantRole",
"element" : "id",
"variable" : "id",
"condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
}
],
"rule" : [
{
"name" : "UUID",
"source" : [
{
"context" : "id",
"element" : "extension",
"variable" : "ext"
}
],
"target" : [
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "append",
"parameter" : [
{
"valueString" : "Practitioner?identifier="
},
{
"valueId" : "ext"
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "participantRole",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitionerRole",
"contextType" : "variable",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "addr",
"source" : [
{
"context" : "participantRole",
"element" : "addr",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "address",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "participantRole",
"element" : "telecom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "telecom",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "participantRole",
"element" : "playingEntity",
"variable" : "playingEntity"
}
],
"rule" : [
{
"name" : "name",
"source" : [
{
"context" : "playingEntity",
"element" : "name",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "name",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "birth",
"source" : [
{
"context" : "playingEntity",
"element" : "birthTime",
"variable" : "birthTime"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "birthTime",
"element" : "value",
"variable" : "date"
}
],
"target" : [
{
"context" : "practitioner",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "truncate",
"parameter" : [
{
"valueId" : "date"
},
{
"valueInteger" : 10
}
]
}
]
}
]
}
]
}
],
"documentation" : "non mappa i 2 precedenti"
}
]
}
],
"documentation" : "participant person"
},
{
"name" : "devParticipant",
"source" : [
{
"context" : "org",
"element" : "participant",
"variable" : "devParticipant",
"condition" : "(typeCode = 'DEV')"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e14"
},
{
"context" : "e14",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e14",
"contextType" : "variable",
"element" : "resource",
"variable" : "device",
"transform" : "create",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "device",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid14",
"transform" : "uuid"
},
{
"context" : "e14",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Device/"
},
{
"valueId" : "uuid14"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Device"
}
]
},
{
"context" : "observation",
"contextType" : "variable",
"element" : "device",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Device/' + %device.id"
}
]
}
],
"rule" : [
{
"name" : "participantRoleDev",
"source" : [
{
"context" : "devParticipant",
"element" : "participantRole",
"variable" : "participantRoleDev"
}
],
"rule" : [
{
"name" : "playingDevice",
"source" : [
{
"context" : "participantRoleDev",
"element" : "playingDevice",
"variable" : "playingDevice"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "playingDevice",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "manufacturer",
"source" : [
{
"context" : "playingDevice",
"element" : "manufacturerModelName",
"variable" : "manufacturerModelName"
}
],
"rule" : [
{
"name" : "displayRule",
"source" : [
{
"context" : "manufacturerModelName",
"variable" : "m"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "manufacturer",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "m.displayName"
}
]
}
]
}
]
},
{
"name" : "deviceName",
"source" : [
{
"context" : "playingDevice",
"element" : "softwareName",
"variable" : "softwareName"
}
],
"target" : [
{
"context" : "device",
"contextType" : "variable",
"element" : "deviceName",
"variable" : "deviceName"
}
],
"rule" : [
{
"name" : "typeName",
"source" : [
{
"context" : "softwareName"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "other"
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "softwareName",
"variable" : "s"
}
],
"target" : [
{
"context" : "deviceName",
"contextType" : "variable",
"element" : "name",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "s.displayName"
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "participant device"
},
{
"name" : "componentobservation",
"source" : [
{
"context" : "org",
"element" : "component",
"variable" : "component"
}
],
"rule" : [
{
"name" : "OBS",
"source" : [
{
"context" : "component",
"element" : "observation",
"variable" : "observation"
}
],
"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" : "observationhasmember",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "observationhasmember",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid2",
"transform" : "uuid"
},
{
"context" : "e",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Observation/"
},
{
"valueId" : "uuid2"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "observation",
"contextType" : "variable",
"element" : "hasMember",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Observation/' + %observationhasmember.id"
}
]
}
],
"dependent" : [
{
"name" : "Observation",
"variable" : [
"observation",
"patient",
"encounter",
"observationhasmember",
"bundle"
]
}
]
}
]
},
{
"name" : "componentorganizer",
"source" : [
{
"context" : "org",
"element" : "component",
"variable" : "component"
}
],
"rule" : [
{
"name" : "organizer",
"source" : [
{
"context" : "component",
"element" : "organizer",
"variable" : "organizer"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e1"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "resource",
"variable" : "observationorganizer",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "observationorganizer",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid3",
"transform" : "uuid"
},
{
"context" : "e1",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Observation/"
},
{
"valueId" : "uuid3"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Observation"
}
]
},
{
"context" : "observation",
"contextType" : "variable",
"element" : "hasMember",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Observation/' + %observationorganizer.id"
}
]
}
],
"rule" : [
{
"name" : "ORG",
"source" : [
{
"context" : "organizer"
}
],
"dependent" : [
{
"name" : "Organizer",
"variable" : [
"cda",
"organizer",
"patient",
"encounter",
"observationorganizer",
"bundle"
]
}
]
}
]
}
]
},
{
"name" : "component",
"source" : [
{
"context" : "org",
"element" : "component",
"variable" : "component"
}
],
"rule" : [
{
"name" : "obsmedia",
"source" : [
{
"context" : "component",
"element" : "observationMedia",
"variable" : "obsMedia"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e15"
},
{
"context" : "e15",
"contextType" : "variable",
"element" : "request",
"variable" : "request",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "e15",
"contextType" : "variable",
"element" : "resource",
"variable" : "media1",
"transform" : "create",
"parameter" : [
{
"valueString" : "Media"
}
]
},
{
"context" : "media1",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid15",
"transform" : "uuid"
},
{
"context" : "e15",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "https://example/Media/"
},
{
"valueId" : "uuid15"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Media"
}
]
},
{
"context" : "observation",
"contextType" : "variable",
"element" : "derivedFrom",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'https://example/Media/' + %media1.id"
}
]
}
],
"rule" : [
{
"name" : "Attachment",
"source" : [
{
"context" : "obsMedia"
}
],
"target" : [
{
"context" : "media1",
"contextType" : "variable",
"element" : "content",
"variable" : "Attachment",
"transform" : "create",
"parameter" : [
{
"valueString" : "Attachment"
}
]
}
],
"rule" : [
{
"name" : "status",
"source" : [
{
"context" : "obsMedia"
}
],
"target" : [
{
"context" : "media1",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unknown"
}
]
}
]
},
{
"name" : "valuemedia",
"source" : [
{
"context" : "obsMedia",
"element" : "value",
"variable" : "valueMedia"
}
],
"rule" : [
{
"name" : "type",
"source" : [
{
"context" : "valueMedia",
"element" : "mediaType",
"variable" : "type"
}
],
"target" : [
{
"context" : "Attachment",
"contextType" : "variable",
"element" : "contentType",
"transform" : "copy",
"parameter" : [
{
"valueId" : "type"
}
]
}
]
},
{
"name" : "data",
"source" : [
{
"context" : "valueMedia"
}
],
"target" : [
{
"context" : "Attachment",
"contextType" : "variable",
"element" : "data",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "valueMedia.dataBase64Binary"
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "observationMedia"
},
{
"name" : "component",
"source" : [
{
"context" : "org",
"element" : "component",
"variable" : "component"
}
],
"rule" : [
{
"name" : "componentact",
"source" : [
{
"context" : "component",
"element" : "act",
"variable" : "act"
}
],
"rule" : [
{
"name" : "text",
"source" : [
{
"context" : "act",
"element" : "text",
"variable" : "text"
}
],
"rule" : [
{
"name" : "note",
"source" : [
{
"context" : "text",
"element" : "reference",
"variable" : "reference"
}
],
"target" : [
{
"context" : "observation",
"contextType" : "variable",
"element" : "note",
"variable" : "note"
}
],
"rule" : [
{
"name" : "reference",
"source" : [
{
"context" : "reference"
}
],
"target" : [
{
"context" : "note",
"contextType" : "variable",
"element" : "text",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "reference.value"
}
]
}
]
}
]
}
]
}
]
}
],
"documentation" : "note"
}
]
},
{
"name" : "ExtSubjectAnimal",
"typeMode" : "none",
"input" : [
{
"name" : "src",
"type" : "relatedSubject",
"mode" : "source"
},
{
"name" : "ext",
"type" : "Extension",
"mode" : "target"
}
],
"rule" : [
{
"name" : "url",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "ext",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://hl7.org/fhir/StructureDefinition/patient-animal"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "ext",
"contextType" : "variable",
"element" : "extension",
"variable" : "ext"
},
{
"context" : "ext",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "species"
}
]
},
{
"context" : "ext",
"contextType" : "variable",
"element" : "value",
"variable" : "code1",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"dependent" : [
{
"name" : "CECodeableConcept",
"variable" : [
"code",
"code1"
]
}
]
}
]
}
]
}