CH ALIS (R4)
0.3.0 - CI build
CH ALIS (R4), published by ALIS-Connect. This guide is not an authorized publication; it is the continuous build for version 0.3.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/ahdis/ch-alis/ and changes regularly. See the Directory of published versions
Draft as of 2024-12-20 |
{
"resourceType" : "StructureMap",
"id" : "Alis43ToBundle",
"meta" : {
"lastUpdated" : "2024-05-01T13:40:44.080+00:00"
},
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <pre>/// url = "http://fhir.ch/ig/ch-alis/StructureMap/Alis43ToBundle"\n/// name = "Alis43ToBundle"\n/// title = "null"\n/// status = "draft"\n\n// Convert ALIS43 XML to a Bundle according to the CH ALIS implmementation guide,\n// 2020-12-03 by Oliver Egger, copyright ahdis ag, Apache License,\n// FHIR: http://hl7.org/fhir/r4/.\n// ISSUE7: what are the URL's oid's we have to define.\n\nconceptmap "serviceMap" {\n prefix s = "http://fhir.ch/ig/ch-alis"\n prefix t = "http://hl7.org/fhir"\n\n s:TARMED == t:"urn:oid:2.16.756.5.30.1.129.1.4"\n s:ICD10 == t:"urn:oid:2.16.756.5.30.1.126.3.2"\n}\n\nconceptmap "gender" {\n prefix s = "http://fhir.ch/ig/ch-alis"\n prefix t = "http://hl7.org/fhir/ValueSet/administrative-gender"\n\n s:M == t:male\n s:F == t:female\n}\n\nconceptmap "laterality" {\n prefix s = "http://fhir.ch/ig/ch-alis"\n prefix t = "http://snomed.info/sct"\n\n s:l == t:"7771000"\n s:r == t:"24028007"\n s:b == t:"51440002"\n}\n\nuses "http://fhir.ch/ig/ch-alis/StructureDefinition/Header" alias Header as source\nuses "http://fhir.ch/ig/ch-alis/StructureDefinition/Visit" alias Visit as source\nuses "http://fhir.ch/ig/ch-alis/StructureDefinition/Service" alias Service as source\nuses "http://fhir.ch/ig/ch-alis/StructureDefinition/PersonV40" alias PersonV40 as source\nuses "http://fhir.ch/ig/ch-alis/StructureDefinition/ParameterV40" alias ParameterV40 as source\nuses "http://fhir.ch/ig/ch-alis/StructureDefinition/DiagGroup" alias DiagGroup as source\nuses "http://fhir.ch/ig/ch-alis/StructureDefinition/LeistungsschnittstelleProcedure" alias Proc as source\nuses "http://fhir.ch/ig/ch-alis/StructureDefinition/Diagnosis" alias Diagnosis as source\nuses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target\nuses "http://hl7.org/fhir/StructureDefinition/ChargeItem" alias ChargeItem as target\nuses "http://hl7.org/fhir/StructureDefinition/Extension" alias Extension as target\nuses "http://hl7.org/fhir/StructureDefinition/MessageHeader" alias MessageHeader as target\nuses "http://hl7.org/fhir/StructureDefinition/BackboneElement" alias BackboneElement as target\nuses "http://hl7.org/fhir/StructureDefinition/HumanName" alias HumanName as target\nuses "http://hl7.org/fhir/StructureDefinition/Condition" alias Condition as target\nuses "http://hl7.org/fhir/StructureDefinition/Encounter" alias Encounter as target\nuses "http://hl7.org/fhir/StructureDefinition/Procedure" alias Procedure as target\n\ngroup Alis43ToBundle(source header : Header, target bundle : Bundle) {\n header -> bundle.meta as meta, meta.profile as profile, profile.value = 'http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-message', bundle.entry as e, e.resource = create('MessageHeader') as messageHeader, messageHeader.id = uuid() as uuid, e.fullUrl = append('urn:uuid:', uuid), bundle.entry as e2, e2.resource = create('Bundle') as transactionBundle, transactionBundle.id = uuid() as uuid2, e2.fullUrl = append('urn:uuid:', uuid2), messageHeader.focus = create('Reference') as reference, reference.type = 'Bundle', reference.reference = append('urn:uuid:', uuid2) then {\n header then Alis43ToMessageHeader(header, messageHeader) "messageHeader";\n header then Alis43ToBundleTransaction(header, transactionBundle) "bundleTransaction";\n } "bundle";\n header -> bundle.type = 'message' "type";\n header.FileCreationDate as fileCreationDate then {\n fileCreationDate.data as date -> bundle.timestamp = date "date";\n };\n}\n\ngroup Alis43ToMessageHeader(source header : Header, target messageHeader : MessageHeader) {\n // ISSUE1: should be link to a MessageDefinition or a code?\n header -> messageHeader.event = create('uri') as value, value.value = 'http://fhir.ch/ig/ch-alis-43' "eventUri";\n // ISSUE2: MessageControlID cannot be id of entry, needs to be either fullUrl oder uuid, need to map this to an identifier\n header -> messageHeader.source as source then {\n header.SoftwareReleaseNumber as version -> source.version = (%version.data) "version";\n // ISSUE3: " : "urn:SendingApplication:SendingFacility:SendingServiceCode" -> add urn: in example/docu\n header -> source.endpoint = ('urn:' + %header.SendingApplication.data + ':' + %header.SendingFacility.data + ':' + %header.SendingServiceCode.data) "endpoint";\n } "source";\n header -> messageHeader.destination as destination then {\n // ISSUE4: " : "urn:ReceivingApplication, ReceivingFacility, ReceivingServiceCode" -> add urn: in example/docu\n header -> destination.endpoint = ('urn:' + %header.ReceivingApplication.data + ':' + %header.ReceivingFacility.data + ':' + %header.ReceivingServiceCode.data) "endpoint";\n } "destination";\n}\n\ngroup Alis43ToBundleTransaction(source header : Header, target transactionBundle : Bundle) {\n header -> transactionBundle.type = 'transaction' "transaction";\n header.Visit as visit then {\n visit.Service as service -> transactionBundle.entry as e, e.resource = create('ChargeItem') as chargeItem then ServiceToChargeItem(service, visit, chargeItem, e) "ServiceToChargeItem";\n };\n}\n\ngroup ServiceToChargeItem(source service : Service, source visit : Visit, target chargeItem : ChargeItem, target entry) {\n service.ItemNumber as itemNumber -> chargeItem.id = (%itemNumber.data.lower()) as uuid, entry.fullUrl = append('urn:uuid:', uuid) "R311LaufnummerItemNumber";\n service -> chargeItem.contained = create('Patient') as patient, patient.id = 'pat' as containedid, chargeItem.subject = create('Reference') as ref, ref.reference = ('#' + %containedid) then ServiceToPatient(service, visit, patient) "patient";\n visit -> chargeItem.contained = create('Encounter') as encounter, encounter.id = 'enc' as containedid, chargeItem.context = create('Reference') as ref, ref.reference = ('#' + %containedid) then {\n visit then VisitToEncounter(visit, encounter) "VisitToEncounter";\n service.Diagnosis as diag -> chargeItem.contained = create('Condition') as condition, condition.id = uuid() as containedid, encounter.diagnosis as diag, diag.condition = create('Reference') as ref, ref.reference = ('#' + %containedid) then DiagnosisToCondition(diag, condition) "DiagnosisToCondition";\n } "encounter";\n visit.DiagGroup as diaggroup -> chargeItem.contained = create('Condition') as cond, cond.id = 'cond' as containedid then DiagGroupToCondition(diaggroup, cond) "DiagGroupToCondition";\n service where (service.Transaction.exists() = false) -> entry.request as request, request.method = 'POST', request.url = 'ChargeItem' "POSTDEFAULT";\n service.Transaction where (service.Transaction = 'insert') -> entry.request as request, request.method = 'POST', request.url = 'ChargeItem' "POST";\n service.Transaction where (service.Transaction = 'update') -> entry.request as request, request.method = 'PUT', request.url = 'ChargeItem' "UPDATE";\n service.Transaction where (service.Transaction = 'delete') -> entry.request as request, request.method = 'DELETE', request.url = 'ChargeItem' "DELETE";\n service.SessionID as sessionID -> chargeItem.extension as extension, extension.url = 'http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-sessionid', extension.value = create('string') as value, value.value = (%sessionID.data) "R32SitzungSessionID";\n service.OrderID as orderID -> chargeItem.extension as extension, extension.url = 'http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-orderid', extension.value = create('string') as value, value.value = (%orderID.data) "R33AuftragsnummerOrderID";\n service.OrderDate as orderDate -> chargeItem.extension as extension, extension.url = 'http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-orderdate', extension.value = create('dateTime') as value, value.value = (%orderDate.data) "R33AuftragsnummerOrderID";\n service.Form as form -> chargeItem.extension as extension, extension.url = 'http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-form', extension.value = create('string') as value, value.value = (%form.data) "R37FormularbezeichnungForm";\n service.ParameterV40 as parameterV40 -> chargeItem.extension as extension, extension.url = 'http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-parameterv40' then ParameterV40ToExtension(parameterV40, extension) "R4ParamterV40ParameterV40";\n service -> chargeItem.status = 'billable' "billable";\n service.RefItemNumber as refItemNumber then {\n refItemNumber.data as data -> chargeItem.partOf = create('Reference') as ref, ref.reference = ('urn:uuid:' + %data.lower()), ref.type = 'ChargeItem' "R312ReferenzzuHauptleistungRefItemNumber";\n };\n service.ServiceItem as serviceItem then {\n serviceItem.data as data -> chargeItem.code = create('CodeableConcept') as cc, cc.coding = create('Coding') as coding, coding.code = data then {\n service.ServiceType as serviceType then {\n serviceType.data as data -> coding.system = translate(data, '#serviceMap', 'code') "R35KatalogServiceType";\n } "servicType";\n } "R36TarifpositionServiceItem";\n } "R36Tarifposition";\n service.ServiceDate as serviceData -> chargeItem.occurrence = create('dateTime') as occurrence, occurrence.value = (%serviceData.data) "R31LeistungsdatumServiceDate";\n service.PersonV40 as personV40 -> chargeItem.performer = create('BackboneElement') as performer then PersonV40ToPerformer(personV40, performer) "R315PersonV40PersonV40";\n service.ProviderID as providerID -> chargeItem.performingOrganization = create('Reference') as reference, reference.display = (%providerID.data) "R39ErbringendeOrganizationProviderID";\n service.ReferrerID as referrerID -> chargeItem.costCenter = create('Reference') as reference, reference.display = (%referrerID.data) "R34AuftraggebendeKostenstelleReferrerID";\n service.Quantity as quantity -> chargeItem.quantity = create('Quantity') as q, q.value as value, value.value = (%quantity.data) "R313AnzahlQuantity";\n service.EnteredBy as enteredBy -> chargeItem.enterer = create('Reference') as reference, reference.display = (%enteredBy.data) "R310ErfasserEnteredBy";\n service.EnteredDateTime as enteredDateTime -> chargeItem.enteredDate = create('dateTime') as enteredDate, enteredDate.value = (%enteredDateTime.data) "R38ErfassungsdatumEnteredDateTime";\n service.PatientContactID as patientContactID then {\n patientContactID.data as data -> chargeItem.identifier = create('Identifier') as identifier, identifier.value = data "PatientContactID";\n } "patientContactID";\n service.Costweight as costweight then {\n costweight.data as data -> chargeItem.factorOverride = data "Costweight";\n } "costweight";\n service.Procedure as proc -> chargeItem.contained = create('Procedure') as procedure, procedure.id = uuid() as containedid, chargeItem.service = create('Reference') as service, service.reference = ('#' + %containedid) then ServiceProcedureToFhirProcedure(proc, procedure) "ServiceProcedureToFhirProcedure";\n}\n\ngroup ServiceProcedureToFhirProcedure(source proc : Proc, target procedure : Procedure) {\n proc.Identifier as identifier -> procedure.identifier = create('Identifier') as identifier, identifier.value = (%identifier.data) "R314ProzedurIDIdentifier";\n proc.Code as chopcode where (%proc.Category.data = 'CHOP_2023') -> procedure.code = create('CodeableConcept') as cc, cc.coding = create('Coding') as coding, coding.code = (%chopcode.data), coding.system = 'https://www.bfs.admin.ch/bfs/statistiche/catalog/chop2023', coding.display = (%proc.Display.data) "R316ProzedurcodeCode";\n proc.PerformedDateTime as performedDateTime -> procedure.performed = (%performedDateTime.data) "R317DatumZeitPerformedDateTime";\n proc.Laterality as laterality then {\n laterality.data as v -> procedure.bodySite = create('CodeableConcept') as cc, cc.coding = create('Coding') as coding, coding.code = translate(v, '#laterality', 'code'), coding.system = 'http://snomed.info/sct', coding.display = (%proc.LateralityDisplay.data) "R318SeiteLaterality";\n } "laterality";\n proc.Performer as performer then {\n // TODO Perfomer.function\n performer.Identifier as identifier then {\n identifier.data as data -> procedure.performer as performer, performer.actor as actor, actor.identifier as identifier, identifier.value = data "identifier";\n };\n } "performer";\n proc -> procedure.subject = create('Reference') as ref, ref.reference = '#pat' "containedpatient";\n proc -> procedure.status = 'completed' "status";\n}\n\ngroup PersonV40ToPerformer(source personV40 : PersonV40, target performer) {\n personV40.PersonTyp as personTyp -> performer.function as cc, cc.coding as coding, coding.system as system, system.value = 'http://fhir.ch/ig/ch-alis/CodeSystem/ch-alis-persontyp', coding.code as code, code.value = personTyp "R3152PersonIDPersonID";\n personV40.PersonID as personId -> performer.actor = create('Reference') as reference, reference.display = (%personId.data) "R3152PersonIDPersonID";\n}\n\ngroup ParameterV40ToExtension(source parameterV40 : ParameterV40, target extension : Extension) {\n parameterV40.ParamTyp as paramTyp -> extension.extension as extInner then InnerExtensionParamTyp(paramTyp, extInner);\n parameterV40.ParamValue as paramValue then {\n paramValue.data as data -> extension.extension as extInner then InnerExtensionParamValue(data, extInner);\n };\n}\n\ngroup InnerExtensionParamTyp(source src, target ext : Extension) {\n src -> ext.url = 'ParamTyp' "url";\n src -> ext.value = create('CodeableConcept') as cc, cc.text as text, text.value = src "string";\n}\n\ngroup InnerExtensionParamValue(source src, target ext : Extension) {\n src -> ext.url = 'ParamValue' "url";\n src -> ext.value = create('string') as string, string.value = src "string";\n}\n\ngroup ServiceToPatientName(source visit : Visit, target name : HumanName) {\n visit.PatientName as patientName then {\n patientName.data as data -> name.family = data "R23PatientNamePatientName";\n } "patientName";\n visit.PatientGivenName as patientGivenName then {\n patientGivenName.data as data -> name.given = data "R24PatientVornamePatientGivenName";\n } "patientGivenName";\n}\n\ngroup ServiceToPatient(source service : Service, source visit : Visit, target patient : Patient) {\n visit.PatientID as patientID then {\n patientID.data as patId -> patient.identifier as identifier, identifier.value as value, value.value = patId, identifier.system as idsystem, idsystem.value = 'http://www.example.ch/patienteniddomain', identifier.type as type, type.coding as coding, coding.system as system, system.value = 'http://terminology.hl7.org/CodeSystem/v2-0203', coding.code as code, code.value = 'MR' "R22PatientPIDPatientID";\n } "patientID";\n // <!-- 2.2 Patient.PID (PatientID) -->\n // <identifier>\n // <type>\n // <coding>\n // <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />\n // <code value="MR" />\n // <display value="Medical record number"/>\n // </coding>\n // </type>\n // ISSUE8: what do with system value\n // <system value="http://www.example.ch/patienteniddomain"/>\n // <value value="Patienten-ID"/>\n // </identifier>//\n visit where (visit.PatientName or visit.PatientGivenName) -> patient.name as name then ServiceToPatientName(visit, name) "ServiceToPatient";\n visit.PatientGender as gender then {\n gender.data as v -> patient.gender = translate(v, '#gender', 'code') "gender";\n } "R26PatientGeschlechtPatientGender";\n visit.PatientBirthDate as birthDate then {\n birthDate.data as v -> patient.birthDate = v "birthDate";\n } "R25PatientGebDatumPatientBirthDate";\n}\n\ngroup DiagnosisToCondition(source diagnosis : Diagnosis, target cond : Condition) {\n diagnosis -> cond.subject = create('Reference') as ref, ref.reference = '#pat' "containedpatient";\n // * Identifier 0..1 http://fhir.ch/ig/ch-alis/StructureDefinition/Text "TODO"\n diagnosis.Identifier as identifier then {\n identifier.data as data -> cond.identifier as identifier, identifier.value = data "identifier";\n };\n diagnosis.Code as code -> cond.code = create('CodeableConcept') as cc, cc.coding = create('Coding') as coding, coding.code = (%code.data), coding.display = (%diagnosis.Display.data) then {\n diagnosis.Category as category then {\n category.data as data where (startsWith('ICD')) -> coding.system = 'http://hl7.org/fhir/sid/icd-10';\n } "serviceType";\n } "R316ProzedurcodeCode";\n // TODO system is not yet correct\n diagnosis.OnsetDateTime as onsetDateTime -> cond.onset = (%onsetDateTime.data) "onsetDateTime";\n diagnosis.Laterality as laterality then {\n laterality.data as v -> cond.bodySite = create('CodeableConcept') as cc, cc.coding = create('Coding') as coding, coding.code = translate(v, '#laterality', 'code'), coding.system = 'http://snomed.info/sct', coding.display = (%diagnosis.LateralityDisplay.data) "R318SeiteLaterality";\n } "laterality";\n}\n\ngroup DiagGroupToCondition(source diagGroup : DiagGroup, target cond : Condition) {\n diagGroup -> cond.subject = create('Reference') as ref, ref.reference = '#pat' "containedpatient";\n diagGroup.DiagCode as data -> cond.code = create('CodeableConcept') as cc, cc.coding = create('Coding') as coding, coding.code = data then {\n diagGroup.DiagCatType as diagCatType then {\n diagCatType.data as data -> coding.system = translate(data, '#serviceMap', 'code') "R293KatalogtypDiagCatType";\n } "serviceType";\n } "R291DiagnosecodeDiagCode";\n}\n\ngroup TerminationToExtension(source visit : Visit, target ext : Extension) {\n visit.TerminationVisit as visit then {\n visit.data as data -> ext.extension as ext1, ext1.url = 'TerminationVisit', ext1.value = create('date') as date, date.value = data "R27FallAbschlussTerminationVisit";\n };\n visit.TerminationReason as visit then {\n visit.data as data -> ext.extension as ext1, ext1.url = 'TerminationReason', ext1.value = create('string') as string, string.value = data "R28FallAbschlussgrundTerminationReason";\n } "TerminationVisit";\n}\n\ngroup VisitToEncounter(source visit : Visit, target encounter : Encounter) {\n visit where (visit.TerminationVisit or visit.TerminationReason) -> encounter.extension as ext, ext.url = 'http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-termination' then TerminationToExtension(visit, ext) "TerminationToExtension";\n visit.VisitNumber as visitNumber then {\n // ISSUE8: what to do with falldomain? <system value="http://www.example.ch/fallnummerdomain"/>\n visitNumber.data as data -> encounter.identifier = create('Identifier') as identifier, identifier.value as value, value.value = data, identifier.system as idsystem, idsystem.value = 'http://www.example.ch/fallnummerdomain', identifier.type as type, type.coding as coding, coding.system as system, system.value = 'http://terminology.hl7.org/CodeSystem/v2-0203', coding.code as code, code.value = 'VN' "R21FallVisitNumber";\n } "encounterID";\n visit -> encounter.status = 'finished' "Finished";\n visit -> encounter.class as coding, coding.system as system, system.value = 'http://terminology.hl7.org/CodeSystem/v3-ActCode', coding.code as code, code.value = 'IMP', coding.display as display, display.value = 'inpatient encounter' "R21FallVisitNumber";\n visit -> encounter.subject = create('Reference') as ref, ref.reference = '#pat' "subject";\n visit.DiagGroup as diaggroup -> encounter.diagnosis as diag, diag.condition = create('Reference') as ref, ref.reference = '#cond' then {\n diaggroup.DiagType as diagType -> diag.use as use, use.text = (%diagType.data) "R292DiagnosetypDiagType";\n } "R29DiagnoseGruppeDiagGroup";\n}\n\n</pre>\n </div>"
},
"contained" : [
{
"resourceType" : "ConceptMap",
"id" : "serviceMap",
"status" : "draft",
"group" : [
{
"source" : "http://fhir.ch/ig/ch-alis",
"target" : "http://hl7.org/fhir",
"element" : [
{
"code" : "TARMED",
"target" : [
{
"code" : "urn:oid:2.16.756.5.30.1.129.1.4",
"equivalence" : "equivalent"
}
]
},
{
"code" : "ICD10",
"target" : [
{
"code" : "urn:oid:2.16.756.5.30.1.126.3.2",
"equivalence" : "equivalent"
}
]
}
]
}
]
},
{
"resourceType" : "ConceptMap",
"id" : "gender",
"status" : "draft",
"group" : [
{
"source" : "http://fhir.ch/ig/ch-alis",
"target" : "http://hl7.org/fhir/ValueSet/administrative-gender",
"element" : [
{
"code" : "M",
"target" : [
{
"code" : "male",
"equivalence" : "equivalent"
}
]
},
{
"code" : "F",
"target" : [
{
"code" : "female",
"equivalence" : "equivalent"
}
]
}
]
}
]
},
{
"resourceType" : "ConceptMap",
"id" : "laterality",
"status" : "draft",
"group" : [
{
"source" : "http://fhir.ch/ig/ch-alis",
"target" : "http://snomed.info/sct",
"element" : [
{
"code" : "l",
"target" : [
{
"code" : "7771000",
"equivalence" : "equivalent"
}
]
},
{
"code" : "r",
"target" : [
{
"code" : "24028007",
"equivalence" : "equivalent"
}
]
},
{
"code" : "b",
"target" : [
{
"code" : "51440002",
"equivalence" : "equivalent"
}
]
}
]
}
]
}
],
"url" : "http://fhir.ch/ig/ch-alis/StructureMap/Alis43ToBundle",
"version" : "0.3.0",
"name" : "Alis43ToBundle",
"status" : "draft",
"date" : "2024-12-20T12:42:46+00:00",
"publisher" : "ALIS-Connect",
"contact" : [
{
"name" : "ALIS-Connect",
"telecom" : [
{
"system" : "url",
"value" : "https://www.alis-connect.ch/"
}
]
}
],
"description" : "Convert ALIS43 XML to a Bundle according to the CH ALIS implmementation guide,\r\n2020-12-03 by Oliver Egger, copyright ahdis ag, Apache License,\r\nFHIR: http://hl7.org/fhir/r4/.\r\nISSUE7: what are the URL's oid's we have to define.",
"jurisdiction" : [
{
"coding" : [
{
"system" : "urn:iso:std:iso:3166",
"code" : "CH"
}
]
}
],
"copyright" : "not-open-source",
"structure" : [
{
"url" : "http://fhir.ch/ig/ch-alis/StructureDefinition/Header",
"mode" : "source",
"alias" : "Header"
},
{
"url" : "http://fhir.ch/ig/ch-alis/StructureDefinition/Visit",
"mode" : "source",
"alias" : "Visit"
},
{
"url" : "http://fhir.ch/ig/ch-alis/StructureDefinition/Service",
"mode" : "source",
"alias" : "Service"
},
{
"url" : "http://fhir.ch/ig/ch-alis/StructureDefinition/PersonV40",
"mode" : "source",
"alias" : "PersonV40"
},
{
"url" : "http://fhir.ch/ig/ch-alis/StructureDefinition/ParameterV40",
"mode" : "source",
"alias" : "ParameterV40"
},
{
"url" : "http://fhir.ch/ig/ch-alis/StructureDefinition/DiagGroup",
"mode" : "source",
"alias" : "DiagGroup"
},
{
"url" : "http://fhir.ch/ig/ch-alis/StructureDefinition/LeistungsschnittstelleProcedure",
"mode" : "source",
"alias" : "Proc"
},
{
"url" : "http://fhir.ch/ig/ch-alis/StructureDefinition/Diagnosis",
"mode" : "source",
"alias" : "Diagnosis"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Bundle",
"mode" : "target",
"alias" : "Bundle"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/ChargeItem",
"mode" : "target",
"alias" : "ChargeItem"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Extension",
"mode" : "target",
"alias" : "Extension"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/MessageHeader",
"mode" : "target",
"alias" : "MessageHeader"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/BackboneElement",
"mode" : "target",
"alias" : "BackboneElement"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/HumanName",
"mode" : "target",
"alias" : "HumanName"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Condition",
"mode" : "target",
"alias" : "Condition"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Encounter",
"mode" : "target",
"alias" : "Encounter"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Procedure",
"mode" : "target",
"alias" : "Procedure"
}
],
"group" : [
{
"name" : "Alis43ToBundle",
"typeMode" : "none",
"input" : [
{
"name" : "header",
"type" : "Header",
"mode" : "source"
},
{
"name" : "bundle",
"type" : "Bundle",
"mode" : "target"
}
],
"rule" : [
{
"name" : "bundle",
"source" : [
{
"context" : "header"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "meta",
"variable" : "meta"
},
{
"context" : "meta",
"contextType" : "variable",
"element" : "profile",
"variable" : "profile"
},
{
"context" : "profile",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-message"
}
]
},
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e"
},
{
"context" : "e",
"contextType" : "variable",
"element" : "resource",
"variable" : "messageHeader",
"transform" : "create",
"parameter" : [
{
"valueString" : "MessageHeader"
}
]
},
{
"context" : "messageHeader",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid",
"transform" : "uuid"
},
{
"context" : "e",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "urn:uuid:"
},
{
"valueId" : "uuid"
}
]
},
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e2"
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "resource",
"variable" : "transactionBundle",
"transform" : "create",
"parameter" : [
{
"valueString" : "Bundle"
}
]
},
{
"context" : "transactionBundle",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid2",
"transform" : "uuid"
},
{
"context" : "e2",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "urn:uuid:"
},
{
"valueId" : "uuid2"
}
]
},
{
"context" : "messageHeader",
"contextType" : "variable",
"element" : "focus",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "Bundle"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "reference",
"transform" : "append",
"parameter" : [
{
"valueString" : "urn:uuid:"
},
{
"valueId" : "uuid2"
}
]
}
],
"rule" : [
{
"name" : "messageHeader",
"source" : [
{
"context" : "header"
}
],
"dependent" : [
{
"name" : "Alis43ToMessageHeader",
"variable" : [
"header",
"messageHeader"
]
}
]
},
{
"name" : "bundleTransaction",
"source" : [
{
"context" : "header"
}
],
"dependent" : [
{
"name" : "Alis43ToBundleTransaction",
"variable" : [
"header",
"transactionBundle"
]
}
]
}
]
},
{
"name" : "type",
"source" : [
{
"context" : "header"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "message"
}
]
}
]
},
{
"name" : "FileCreationDate",
"source" : [
{
"context" : "header",
"element" : "FileCreationDate",
"variable" : "fileCreationDate"
}
],
"rule" : [
{
"name" : "date",
"source" : [
{
"context" : "fileCreationDate",
"element" : "data",
"variable" : "date"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "timestamp",
"transform" : "copy",
"parameter" : [
{
"valueId" : "date"
}
]
}
]
}
]
}
]
},
{
"name" : "Alis43ToMessageHeader",
"typeMode" : "none",
"input" : [
{
"name" : "header",
"type" : "Header",
"mode" : "source"
},
{
"name" : "messageHeader",
"type" : "MessageHeader",
"mode" : "target"
}
],
"rule" : [
{
"name" : "eventUri",
"source" : [
{
"context" : "header"
}
],
"target" : [
{
"context" : "messageHeader",
"contextType" : "variable",
"element" : "event",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "uri"
}
]
},
{
"context" : "value",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://fhir.ch/ig/ch-alis-43"
}
]
}
]
},
{
"name" : "source",
"source" : [
{
"context" : "header"
}
],
"target" : [
{
"context" : "messageHeader",
"contextType" : "variable",
"element" : "source",
"variable" : "source"
}
],
"rule" : [
{
"name" : "version",
"source" : [
{
"context" : "header",
"element" : "SoftwareReleaseNumber",
"variable" : "version"
}
],
"target" : [
{
"context" : "source",
"contextType" : "variable",
"element" : "version",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%version.data"
}
]
}
]
},
{
"name" : "endpoint",
"source" : [
{
"context" : "header"
}
],
"target" : [
{
"context" : "source",
"contextType" : "variable",
"element" : "endpoint",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'urn:' + %header.SendingApplication.data + ':' + %header.SendingFacility.data + ':' + %header.SendingServiceCode.data"
}
]
}
]
}
]
},
{
"name" : "destination",
"source" : [
{
"context" : "header"
}
],
"target" : [
{
"context" : "messageHeader",
"contextType" : "variable",
"element" : "destination",
"variable" : "destination"
}
],
"rule" : [
{
"name" : "endpoint",
"source" : [
{
"context" : "header"
}
],
"target" : [
{
"context" : "destination",
"contextType" : "variable",
"element" : "endpoint",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'urn:' + %header.ReceivingApplication.data + ':' + %header.ReceivingFacility.data + ':' + %header.ReceivingServiceCode.data"
}
]
}
]
}
]
}
]
},
{
"name" : "Alis43ToBundleTransaction",
"typeMode" : "none",
"input" : [
{
"name" : "header",
"type" : "Header",
"mode" : "source"
},
{
"name" : "transactionBundle",
"type" : "Bundle",
"mode" : "target"
}
],
"rule" : [
{
"name" : "transaction",
"source" : [
{
"context" : "header"
}
],
"target" : [
{
"context" : "transactionBundle",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "transaction"
}
]
}
]
},
{
"name" : "Visit",
"source" : [
{
"context" : "header",
"element" : "Visit",
"variable" : "visit"
}
],
"rule" : [
{
"name" : "ServiceToChargeItem",
"source" : [
{
"context" : "visit",
"element" : "Service",
"variable" : "service"
}
],
"target" : [
{
"context" : "transactionBundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "e"
},
{
"context" : "e",
"contextType" : "variable",
"element" : "resource",
"variable" : "chargeItem",
"transform" : "create",
"parameter" : [
{
"valueString" : "ChargeItem"
}
]
}
],
"dependent" : [
{
"name" : "ServiceToChargeItem",
"variable" : [
"service",
"visit",
"chargeItem",
"e"
]
}
]
}
]
}
]
},
{
"name" : "ServiceToChargeItem",
"typeMode" : "none",
"input" : [
{
"name" : "service",
"type" : "Service",
"mode" : "source"
},
{
"name" : "visit",
"type" : "Visit",
"mode" : "source"
},
{
"name" : "chargeItem",
"type" : "ChargeItem",
"mode" : "target"
},
{
"name" : "entry",
"mode" : "target"
}
],
"rule" : [
{
"name" : "R311LaufnummerItemNumber",
"source" : [
{
"context" : "service",
"element" : "ItemNumber",
"variable" : "itemNumber"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "id",
"variable" : "uuid",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%itemNumber.data.lower()"
}
]
},
{
"context" : "entry",
"contextType" : "variable",
"element" : "fullUrl",
"transform" : "append",
"parameter" : [
{
"valueString" : "urn:uuid:"
},
{
"valueId" : "uuid"
}
]
}
]
},
{
"name" : "patient",
"source" : [
{
"context" : "service"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "contained",
"variable" : "patient",
"transform" : "create",
"parameter" : [
{
"valueString" : "Patient"
}
]
},
{
"context" : "patient",
"contextType" : "variable",
"element" : "id",
"variable" : "containedid",
"transform" : "copy",
"parameter" : [
{
"valueString" : "pat"
}
]
},
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "subject",
"variable" : "ref",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "ref",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'#' + %containedid"
}
]
}
],
"dependent" : [
{
"name" : "ServiceToPatient",
"variable" : [
"service",
"visit",
"patient"
]
}
]
},
{
"name" : "encounter",
"source" : [
{
"context" : "visit"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "contained",
"variable" : "encounter",
"transform" : "create",
"parameter" : [
{
"valueString" : "Encounter"
}
]
},
{
"context" : "encounter",
"contextType" : "variable",
"element" : "id",
"variable" : "containedid",
"transform" : "copy",
"parameter" : [
{
"valueString" : "enc"
}
]
},
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "context",
"variable" : "ref",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "ref",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'#' + %containedid"
}
]
}
],
"rule" : [
{
"name" : "VisitToEncounter",
"source" : [
{
"context" : "visit"
}
],
"dependent" : [
{
"name" : "VisitToEncounter",
"variable" : [
"visit",
"encounter"
]
}
]
},
{
"name" : "DiagnosisToCondition",
"source" : [
{
"context" : "service",
"element" : "Diagnosis",
"variable" : "diag"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "contained",
"variable" : "condition",
"transform" : "create",
"parameter" : [
{
"valueString" : "Condition"
}
]
},
{
"context" : "condition",
"contextType" : "variable",
"element" : "id",
"variable" : "containedid",
"transform" : "uuid"
},
{
"context" : "encounter",
"contextType" : "variable",
"element" : "diagnosis",
"variable" : "diag"
},
{
"context" : "diag",
"contextType" : "variable",
"element" : "condition",
"variable" : "ref",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "ref",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'#' + %containedid"
}
]
}
],
"dependent" : [
{
"name" : "DiagnosisToCondition",
"variable" : [
"diag",
"condition"
]
}
]
}
]
},
{
"name" : "DiagGroupToCondition",
"source" : [
{
"context" : "visit",
"element" : "DiagGroup",
"variable" : "diaggroup"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "contained",
"variable" : "cond",
"transform" : "create",
"parameter" : [
{
"valueString" : "Condition"
}
]
},
{
"context" : "cond",
"contextType" : "variable",
"element" : "id",
"variable" : "containedid",
"transform" : "copy",
"parameter" : [
{
"valueString" : "cond"
}
]
}
],
"dependent" : [
{
"name" : "DiagGroupToCondition",
"variable" : [
"diaggroup",
"cond"
]
}
]
},
{
"name" : "POSTDEFAULT",
"source" : [
{
"context" : "service",
"condition" : "(service.Transaction.exists() = false)"
}
],
"target" : [
{
"context" : "entry",
"contextType" : "variable",
"element" : "request",
"variable" : "request"
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ChargeItem"
}
]
}
]
},
{
"name" : "POST",
"source" : [
{
"context" : "service",
"element" : "Transaction",
"condition" : "(service.Transaction = 'insert')"
}
],
"target" : [
{
"context" : "entry",
"contextType" : "variable",
"element" : "request",
"variable" : "request"
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "POST"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ChargeItem"
}
]
}
]
},
{
"name" : "UPDATE",
"source" : [
{
"context" : "service",
"element" : "Transaction",
"condition" : "(service.Transaction = 'update')"
}
],
"target" : [
{
"context" : "entry",
"contextType" : "variable",
"element" : "request",
"variable" : "request"
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "PUT"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ChargeItem"
}
]
}
]
},
{
"name" : "DELETE",
"source" : [
{
"context" : "service",
"element" : "Transaction",
"condition" : "(service.Transaction = 'delete')"
}
],
"target" : [
{
"context" : "entry",
"contextType" : "variable",
"element" : "request",
"variable" : "request"
},
{
"context" : "request",
"contextType" : "variable",
"element" : "method",
"transform" : "copy",
"parameter" : [
{
"valueString" : "DELETE"
}
]
},
{
"context" : "request",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ChargeItem"
}
]
}
]
},
{
"name" : "R32SitzungSessionID",
"source" : [
{
"context" : "service",
"element" : "SessionID",
"variable" : "sessionID"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "extension",
"variable" : "extension"
},
{
"context" : "extension",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-sessionid"
}
]
},
{
"context" : "extension",
"contextType" : "variable",
"element" : "value",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "string"
}
]
},
{
"context" : "value",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%sessionID.data"
}
]
}
]
},
{
"name" : "R33AuftragsnummerOrderID",
"source" : [
{
"context" : "service",
"element" : "OrderID",
"variable" : "orderID"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "extension",
"variable" : "extension"
},
{
"context" : "extension",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-orderid"
}
]
},
{
"context" : "extension",
"contextType" : "variable",
"element" : "value",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "string"
}
]
},
{
"context" : "value",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%orderID.data"
}
]
}
]
},
{
"name" : "R33AuftragsnummerOrderID",
"source" : [
{
"context" : "service",
"element" : "OrderDate",
"variable" : "orderDate"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "extension",
"variable" : "extension"
},
{
"context" : "extension",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-orderdate"
}
]
},
{
"context" : "extension",
"contextType" : "variable",
"element" : "value",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
},
{
"context" : "value",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%orderDate.data"
}
]
}
]
},
{
"name" : "R37FormularbezeichnungForm",
"source" : [
{
"context" : "service",
"element" : "Form",
"variable" : "form"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "extension",
"variable" : "extension"
},
{
"context" : "extension",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-form"
}
]
},
{
"context" : "extension",
"contextType" : "variable",
"element" : "value",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "string"
}
]
},
{
"context" : "value",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%form.data"
}
]
}
]
},
{
"name" : "R4ParamterV40ParameterV40",
"source" : [
{
"context" : "service",
"element" : "ParameterV40",
"variable" : "parameterV40"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "extension",
"variable" : "extension"
},
{
"context" : "extension",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-parameterv40"
}
]
}
],
"dependent" : [
{
"name" : "ParameterV40ToExtension",
"variable" : [
"parameterV40",
"extension"
]
}
]
},
{
"name" : "billable",
"source" : [
{
"context" : "service"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "billable"
}
]
}
]
},
{
"name" : "RefItemNumber",
"source" : [
{
"context" : "service",
"element" : "RefItemNumber",
"variable" : "refItemNumber"
}
],
"rule" : [
{
"name" : "R312ReferenzzuHauptleistungRefItemNumber",
"source" : [
{
"context" : "refItemNumber",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "partOf",
"variable" : "ref",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "ref",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'urn:uuid:' + %data.lower()"
}
]
},
{
"context" : "ref",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "ChargeItem"
}
]
}
]
}
]
},
{
"name" : "R36Tarifposition",
"source" : [
{
"context" : "service",
"element" : "ServiceItem",
"variable" : "serviceItem"
}
],
"rule" : [
{
"name" : "R36TarifpositionServiceItem",
"source" : [
{
"context" : "serviceItem",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "code",
"variable" : "cc",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
},
{
"context" : "cc",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueId" : "data"
}
]
}
],
"rule" : [
{
"name" : "servicType",
"source" : [
{
"context" : "service",
"element" : "ServiceType",
"variable" : "serviceType"
}
],
"rule" : [
{
"name" : "R35KatalogServiceType",
"source" : [
{
"context" : "serviceType",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "translate",
"parameter" : [
{
"valueId" : "data"
},
{
"valueString" : "#serviceMap"
},
{
"valueString" : "code"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "R31LeistungsdatumServiceDate",
"source" : [
{
"context" : "service",
"element" : "ServiceDate",
"variable" : "serviceData"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "occurrence",
"variable" : "occurrence",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
},
{
"context" : "occurrence",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%serviceData.data"
}
]
}
]
},
{
"name" : "R315PersonV40PersonV40",
"source" : [
{
"context" : "service",
"element" : "PersonV40",
"variable" : "personV40"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "performer",
"variable" : "performer",
"transform" : "create",
"parameter" : [
{
"valueString" : "BackboneElement"
}
]
}
],
"dependent" : [
{
"name" : "PersonV40ToPerformer",
"variable" : [
"personV40",
"performer"
]
}
]
},
{
"name" : "R39ErbringendeOrganizationProviderID",
"source" : [
{
"context" : "service",
"element" : "ProviderID",
"variable" : "providerID"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "performingOrganization",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "display",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%providerID.data"
}
]
}
]
},
{
"name" : "R34AuftraggebendeKostenstelleReferrerID",
"source" : [
{
"context" : "service",
"element" : "ReferrerID",
"variable" : "referrerID"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "costCenter",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "display",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%referrerID.data"
}
]
}
]
},
{
"name" : "R313AnzahlQuantity",
"source" : [
{
"context" : "service",
"element" : "Quantity",
"variable" : "quantity"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "quantity",
"variable" : "q",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
},
{
"context" : "q",
"contextType" : "variable",
"element" : "value",
"variable" : "value"
},
{
"context" : "value",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%quantity.data"
}
]
}
]
},
{
"name" : "R310ErfasserEnteredBy",
"source" : [
{
"context" : "service",
"element" : "EnteredBy",
"variable" : "enteredBy"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "enterer",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "display",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%enteredBy.data"
}
]
}
]
},
{
"name" : "R38ErfassungsdatumEnteredDateTime",
"source" : [
{
"context" : "service",
"element" : "EnteredDateTime",
"variable" : "enteredDateTime"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "enteredDate",
"variable" : "enteredDate",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
},
{
"context" : "enteredDate",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%enteredDateTime.data"
}
]
}
]
},
{
"name" : "patientContactID",
"source" : [
{
"context" : "service",
"element" : "PatientContactID",
"variable" : "patientContactID"
}
],
"rule" : [
{
"name" : "PatientContactID",
"source" : [
{
"context" : "patientContactID",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier",
"transform" : "create",
"parameter" : [
{
"valueString" : "Identifier"
}
]
},
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "data"
}
]
}
]
}
]
},
{
"name" : "costweight",
"source" : [
{
"context" : "service",
"element" : "Costweight",
"variable" : "costweight"
}
],
"rule" : [
{
"name" : "Costweight",
"source" : [
{
"context" : "costweight",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "factorOverride",
"transform" : "copy",
"parameter" : [
{
"valueId" : "data"
}
]
}
]
}
]
},
{
"name" : "ServiceProcedureToFhirProcedure",
"source" : [
{
"context" : "service",
"element" : "Procedure",
"variable" : "proc"
}
],
"target" : [
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "contained",
"variable" : "procedure",
"transform" : "create",
"parameter" : [
{
"valueString" : "Procedure"
}
]
},
{
"context" : "procedure",
"contextType" : "variable",
"element" : "id",
"variable" : "containedid",
"transform" : "uuid"
},
{
"context" : "chargeItem",
"contextType" : "variable",
"element" : "service",
"variable" : "service",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "service",
"contextType" : "variable",
"element" : "reference",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'#' + %containedid"
}
]
}
],
"dependent" : [
{
"name" : "ServiceProcedureToFhirProcedure",
"variable" : [
"proc",
"procedure"
]
}
]
}
]
},
{
"name" : "ServiceProcedureToFhirProcedure",
"typeMode" : "none",
"input" : [
{
"name" : "proc",
"type" : "Proc",
"mode" : "source"
},
{
"name" : "procedure",
"type" : "Procedure",
"mode" : "target"
}
],
"rule" : [
{
"name" : "R314ProzedurIDIdentifier",
"source" : [
{
"context" : "proc",
"element" : "Identifier",
"variable" : "identifier"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier",
"transform" : "create",
"parameter" : [
{
"valueString" : "Identifier"
}
]
},
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%identifier.data"
}
]
}
]
},
{
"name" : "R316ProzedurcodeCode",
"source" : [
{
"context" : "proc",
"element" : "Code",
"variable" : "chopcode",
"condition" : "(%proc.Category.data = 'CHOP_2023')"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "code",
"variable" : "cc",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
},
{
"context" : "cc",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%chopcode.data"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "https://www.bfs.admin.ch/bfs/statistiche/catalog/chop2023"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%proc.Display.data"
}
]
}
]
},
{
"name" : "R317DatumZeitPerformedDateTime",
"source" : [
{
"context" : "proc",
"element" : "PerformedDateTime",
"variable" : "performedDateTime"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "performed",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%performedDateTime.data"
}
]
}
]
},
{
"name" : "laterality",
"source" : [
{
"context" : "proc",
"element" : "Laterality",
"variable" : "laterality"
}
],
"rule" : [
{
"name" : "R318SeiteLaterality",
"source" : [
{
"context" : "laterality",
"element" : "data",
"variable" : "v"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "bodySite",
"variable" : "cc",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
},
{
"context" : "cc",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "translate",
"parameter" : [
{
"valueId" : "v"
},
{
"valueString" : "#laterality"
},
{
"valueString" : "code"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://snomed.info/sct"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%proc.LateralityDisplay.data"
}
]
}
]
}
]
},
{
"name" : "performer",
"source" : [
{
"context" : "proc",
"element" : "Performer",
"variable" : "performer"
}
],
"rule" : [
{
"name" : "Identifier",
"source" : [
{
"context" : "performer",
"element" : "Identifier",
"variable" : "identifier"
}
],
"rule" : [
{
"name" : "identifier",
"source" : [
{
"context" : "identifier",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "performer",
"variable" : "performer"
},
{
"context" : "performer",
"contextType" : "variable",
"element" : "actor",
"variable" : "actor"
},
{
"context" : "actor",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier"
},
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "data"
}
]
}
]
}
]
}
]
},
{
"name" : "containedpatient",
"source" : [
{
"context" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "subject",
"variable" : "ref",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "ref",
"contextType" : "variable",
"element" : "reference",
"transform" : "copy",
"parameter" : [
{
"valueString" : "#pat"
}
]
}
]
},
{
"name" : "status",
"source" : [
{
"context" : "proc"
}
],
"target" : [
{
"context" : "procedure",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "completed"
}
]
}
]
}
]
},
{
"name" : "PersonV40ToPerformer",
"typeMode" : "none",
"input" : [
{
"name" : "personV40",
"type" : "PersonV40",
"mode" : "source"
},
{
"name" : "performer",
"mode" : "target"
}
],
"rule" : [
{
"name" : "R3152PersonIDPersonID",
"source" : [
{
"context" : "personV40",
"element" : "PersonTyp",
"variable" : "personTyp"
}
],
"target" : [
{
"context" : "performer",
"contextType" : "variable",
"element" : "function",
"variable" : "cc"
},
{
"context" : "cc",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"variable" : "system"
},
{
"context" : "system",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://fhir.ch/ig/ch-alis/CodeSystem/ch-alis-persontyp"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"variable" : "code"
},
{
"context" : "code",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "personTyp"
}
]
}
]
},
{
"name" : "R3152PersonIDPersonID",
"source" : [
{
"context" : "personV40",
"element" : "PersonID",
"variable" : "personId"
}
],
"target" : [
{
"context" : "performer",
"contextType" : "variable",
"element" : "actor",
"variable" : "reference",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "reference",
"contextType" : "variable",
"element" : "display",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%personId.data"
}
]
}
]
}
]
},
{
"name" : "ParameterV40ToExtension",
"typeMode" : "none",
"input" : [
{
"name" : "parameterV40",
"type" : "ParameterV40",
"mode" : "source"
},
{
"name" : "extension",
"type" : "Extension",
"mode" : "target"
}
],
"rule" : [
{
"name" : "ParamTyp",
"source" : [
{
"context" : "parameterV40",
"element" : "ParamTyp",
"variable" : "paramTyp"
}
],
"target" : [
{
"context" : "extension",
"contextType" : "variable",
"element" : "extension",
"variable" : "extInner"
}
],
"dependent" : [
{
"name" : "InnerExtensionParamTyp",
"variable" : [
"paramTyp",
"extInner"
]
}
]
},
{
"name" : "ParamValue",
"source" : [
{
"context" : "parameterV40",
"element" : "ParamValue",
"variable" : "paramValue"
}
],
"rule" : [
{
"name" : "data",
"source" : [
{
"context" : "paramValue",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "extension",
"contextType" : "variable",
"element" : "extension",
"variable" : "extInner"
}
],
"dependent" : [
{
"name" : "InnerExtensionParamValue",
"variable" : [
"data",
"extInner"
]
}
]
}
]
}
]
},
{
"name" : "InnerExtensionParamTyp",
"typeMode" : "none",
"input" : [
{
"name" : "src",
"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" : "ParamTyp"
}
]
}
]
},
{
"name" : "string",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "ext",
"contextType" : "variable",
"element" : "value",
"variable" : "cc",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
},
{
"context" : "cc",
"contextType" : "variable",
"element" : "text",
"variable" : "text"
},
{
"context" : "text",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "src"
}
]
}
]
}
]
},
{
"name" : "InnerExtensionParamValue",
"typeMode" : "none",
"input" : [
{
"name" : "src",
"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" : "ParamValue"
}
]
}
]
},
{
"name" : "string",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "ext",
"contextType" : "variable",
"element" : "value",
"variable" : "string",
"transform" : "create",
"parameter" : [
{
"valueString" : "string"
}
]
},
{
"context" : "string",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "src"
}
]
}
]
}
]
},
{
"name" : "ServiceToPatientName",
"typeMode" : "none",
"input" : [
{
"name" : "visit",
"type" : "Visit",
"mode" : "source"
},
{
"name" : "name",
"type" : "HumanName",
"mode" : "target"
}
],
"rule" : [
{
"name" : "patientName",
"source" : [
{
"context" : "visit",
"element" : "PatientName",
"variable" : "patientName"
}
],
"rule" : [
{
"name" : "R23PatientNamePatientName",
"source" : [
{
"context" : "patientName",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "name",
"contextType" : "variable",
"element" : "family",
"transform" : "copy",
"parameter" : [
{
"valueId" : "data"
}
]
}
]
}
]
},
{
"name" : "patientGivenName",
"source" : [
{
"context" : "visit",
"element" : "PatientGivenName",
"variable" : "patientGivenName"
}
],
"rule" : [
{
"name" : "R24PatientVornamePatientGivenName",
"source" : [
{
"context" : "patientGivenName",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "name",
"contextType" : "variable",
"element" : "given",
"transform" : "copy",
"parameter" : [
{
"valueId" : "data"
}
]
}
]
}
]
}
]
},
{
"name" : "ServiceToPatient",
"typeMode" : "none",
"input" : [
{
"name" : "service",
"type" : "Service",
"mode" : "source"
},
{
"name" : "visit",
"type" : "Visit",
"mode" : "source"
},
{
"name" : "patient",
"type" : "Patient",
"mode" : "target"
}
],
"rule" : [
{
"name" : "patientID",
"source" : [
{
"context" : "visit",
"element" : "PatientID",
"variable" : "patientID"
}
],
"rule" : [
{
"name" : "R22PatientPIDPatientID",
"source" : [
{
"context" : "patientID",
"element" : "data",
"variable" : "patId"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier"
},
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"variable" : "value"
},
{
"context" : "value",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "patId"
}
]
},
{
"context" : "identifier",
"contextType" : "variable",
"element" : "system",
"variable" : "idsystem"
},
{
"context" : "idsystem",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://www.example.ch/patienteniddomain"
}
]
},
{
"context" : "identifier",
"contextType" : "variable",
"element" : "type",
"variable" : "type"
},
{
"context" : "type",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"variable" : "system"
},
{
"context" : "system",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://terminology.hl7.org/CodeSystem/v2-0203"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"variable" : "code"
},
{
"context" : "code",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "MR"
}
]
}
]
}
]
},
{
"name" : "ServiceToPatient",
"source" : [
{
"context" : "visit",
"condition" : "(visit.PatientName or visit.PatientGivenName)"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "name",
"variable" : "name"
}
],
"dependent" : [
{
"name" : "ServiceToPatientName",
"variable" : [
"visit",
"name"
]
}
]
},
{
"name" : "R26PatientGeschlechtPatientGender",
"source" : [
{
"context" : "visit",
"element" : "PatientGender",
"variable" : "gender"
}
],
"rule" : [
{
"name" : "gender",
"source" : [
{
"context" : "gender",
"element" : "data",
"variable" : "v"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "gender",
"transform" : "translate",
"parameter" : [
{
"valueId" : "v"
},
{
"valueString" : "#gender"
},
{
"valueString" : "code"
}
]
}
]
}
]
},
{
"name" : "R25PatientGebDatumPatientBirthDate",
"source" : [
{
"context" : "visit",
"element" : "PatientBirthDate",
"variable" : "birthDate"
}
],
"rule" : [
{
"name" : "birthDate",
"source" : [
{
"context" : "birthDate",
"element" : "data",
"variable" : "v"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "copy",
"parameter" : [
{
"valueId" : "v"
}
]
}
]
}
]
}
]
},
{
"name" : "DiagnosisToCondition",
"typeMode" : "none",
"input" : [
{
"name" : "diagnosis",
"type" : "Diagnosis",
"mode" : "source"
},
{
"name" : "cond",
"type" : "Condition",
"mode" : "target"
}
],
"rule" : [
{
"name" : "containedpatient",
"source" : [
{
"context" : "diagnosis"
}
],
"target" : [
{
"context" : "cond",
"contextType" : "variable",
"element" : "subject",
"variable" : "ref",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "ref",
"contextType" : "variable",
"element" : "reference",
"transform" : "copy",
"parameter" : [
{
"valueString" : "#pat"
}
]
}
]
},
{
"name" : "Identifier",
"source" : [
{
"context" : "diagnosis",
"element" : "Identifier",
"variable" : "identifier"
}
],
"rule" : [
{
"name" : "identifier",
"source" : [
{
"context" : "identifier",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "cond",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier"
},
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "data"
}
]
}
]
}
]
},
{
"name" : "R316ProzedurcodeCode",
"source" : [
{
"context" : "diagnosis",
"element" : "Code",
"variable" : "code"
}
],
"target" : [
{
"context" : "cond",
"contextType" : "variable",
"element" : "code",
"variable" : "cc",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
},
{
"context" : "cc",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%code.data"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%diagnosis.Display.data"
}
]
}
],
"rule" : [
{
"name" : "serviceType",
"source" : [
{
"context" : "diagnosis",
"element" : "Category",
"variable" : "category"
}
],
"rule" : [
{
"name" : "data",
"source" : [
{
"context" : "category",
"element" : "data",
"variable" : "data",
"condition" : "(startsWith('ICD'))"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://hl7.org/fhir/sid/icd-10"
}
]
}
]
}
]
}
]
},
{
"name" : "onsetDateTime",
"source" : [
{
"context" : "diagnosis",
"element" : "OnsetDateTime",
"variable" : "onsetDateTime"
}
],
"target" : [
{
"context" : "cond",
"contextType" : "variable",
"element" : "onset",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%onsetDateTime.data"
}
]
}
]
},
{
"name" : "laterality",
"source" : [
{
"context" : "diagnosis",
"element" : "Laterality",
"variable" : "laterality"
}
],
"rule" : [
{
"name" : "R318SeiteLaterality",
"source" : [
{
"context" : "laterality",
"element" : "data",
"variable" : "v"
}
],
"target" : [
{
"context" : "cond",
"contextType" : "variable",
"element" : "bodySite",
"variable" : "cc",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
},
{
"context" : "cc",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "translate",
"parameter" : [
{
"valueId" : "v"
},
{
"valueString" : "#laterality"
},
{
"valueString" : "code"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://snomed.info/sct"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%diagnosis.LateralityDisplay.data"
}
]
}
]
}
]
}
]
},
{
"name" : "DiagGroupToCondition",
"typeMode" : "none",
"input" : [
{
"name" : "diagGroup",
"type" : "DiagGroup",
"mode" : "source"
},
{
"name" : "cond",
"type" : "Condition",
"mode" : "target"
}
],
"rule" : [
{
"name" : "containedpatient",
"source" : [
{
"context" : "diagGroup"
}
],
"target" : [
{
"context" : "cond",
"contextType" : "variable",
"element" : "subject",
"variable" : "ref",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "ref",
"contextType" : "variable",
"element" : "reference",
"transform" : "copy",
"parameter" : [
{
"valueString" : "#pat"
}
]
}
]
},
{
"name" : "R291DiagnosecodeDiagCode",
"source" : [
{
"context" : "diagGroup",
"element" : "DiagCode",
"variable" : "data"
}
],
"target" : [
{
"context" : "cond",
"contextType" : "variable",
"element" : "code",
"variable" : "cc",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
},
{
"context" : "cc",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueId" : "data"
}
]
}
],
"rule" : [
{
"name" : "serviceType",
"source" : [
{
"context" : "diagGroup",
"element" : "DiagCatType",
"variable" : "diagCatType"
}
],
"rule" : [
{
"name" : "R293KatalogtypDiagCatType",
"source" : [
{
"context" : "diagCatType",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "translate",
"parameter" : [
{
"valueId" : "data"
},
{
"valueString" : "#serviceMap"
},
{
"valueString" : "code"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "TerminationToExtension",
"typeMode" : "none",
"input" : [
{
"name" : "visit",
"type" : "Visit",
"mode" : "source"
},
{
"name" : "ext",
"type" : "Extension",
"mode" : "target"
}
],
"rule" : [
{
"name" : "TerminationVisit",
"source" : [
{
"context" : "visit",
"element" : "TerminationVisit",
"variable" : "visit"
}
],
"rule" : [
{
"name" : "R27FallAbschlussTerminationVisit",
"source" : [
{
"context" : "visit",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "ext",
"contextType" : "variable",
"element" : "extension",
"variable" : "ext1"
},
{
"context" : "ext1",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "TerminationVisit"
}
]
},
{
"context" : "ext1",
"contextType" : "variable",
"element" : "value",
"variable" : "date",
"transform" : "create",
"parameter" : [
{
"valueString" : "date"
}
]
},
{
"context" : "date",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "data"
}
]
}
]
}
]
},
{
"name" : "TerminationVisit",
"source" : [
{
"context" : "visit",
"element" : "TerminationReason",
"variable" : "visit"
}
],
"rule" : [
{
"name" : "R28FallAbschlussgrundTerminationReason",
"source" : [
{
"context" : "visit",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "ext",
"contextType" : "variable",
"element" : "extension",
"variable" : "ext1"
},
{
"context" : "ext1",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "TerminationReason"
}
]
},
{
"context" : "ext1",
"contextType" : "variable",
"element" : "value",
"variable" : "string",
"transform" : "create",
"parameter" : [
{
"valueString" : "string"
}
]
},
{
"context" : "string",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "data"
}
]
}
]
}
]
}
]
},
{
"name" : "VisitToEncounter",
"typeMode" : "none",
"input" : [
{
"name" : "visit",
"type" : "Visit",
"mode" : "source"
},
{
"name" : "encounter",
"type" : "Encounter",
"mode" : "target"
}
],
"rule" : [
{
"name" : "TerminationToExtension",
"source" : [
{
"context" : "visit",
"condition" : "(visit.TerminationVisit or visit.TerminationReason)"
}
],
"target" : [
{
"context" : "encounter",
"contextType" : "variable",
"element" : "extension",
"variable" : "ext"
},
{
"context" : "ext",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-termination"
}
]
}
],
"dependent" : [
{
"name" : "TerminationToExtension",
"variable" : [
"visit",
"ext"
]
}
]
},
{
"name" : "encounterID",
"source" : [
{
"context" : "visit",
"element" : "VisitNumber",
"variable" : "visitNumber"
}
],
"rule" : [
{
"name" : "R21FallVisitNumber",
"source" : [
{
"context" : "visitNumber",
"element" : "data",
"variable" : "data"
}
],
"target" : [
{
"context" : "encounter",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier",
"transform" : "create",
"parameter" : [
{
"valueString" : "Identifier"
}
]
},
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"variable" : "value"
},
{
"context" : "value",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "data"
}
]
},
{
"context" : "identifier",
"contextType" : "variable",
"element" : "system",
"variable" : "idsystem"
},
{
"context" : "idsystem",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://www.example.ch/fallnummerdomain"
}
]
},
{
"context" : "identifier",
"contextType" : "variable",
"element" : "type",
"variable" : "type"
},
{
"context" : "type",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"variable" : "system"
},
{
"context" : "system",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://terminology.hl7.org/CodeSystem/v2-0203"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"variable" : "code"
},
{
"context" : "code",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "VN"
}
]
}
]
}
]
},
{
"name" : "Finished",
"source" : [
{
"context" : "visit"
}
],
"target" : [
{
"context" : "encounter",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "finished"
}
]
}
]
},
{
"name" : "R21FallVisitNumber",
"source" : [
{
"context" : "visit"
}
],
"target" : [
{
"context" : "encounter",
"contextType" : "variable",
"element" : "class",
"variable" : "coding"
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"variable" : "system"
},
{
"context" : "system",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://terminology.hl7.org/CodeSystem/v3-ActCode"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"variable" : "code"
},
{
"context" : "code",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "IMP"
}
]
},
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"variable" : "display"
},
{
"context" : "display",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "inpatient encounter"
}
]
}
]
},
{
"name" : "subject",
"source" : [
{
"context" : "visit"
}
],
"target" : [
{
"context" : "encounter",
"contextType" : "variable",
"element" : "subject",
"variable" : "ref",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "ref",
"contextType" : "variable",
"element" : "reference",
"transform" : "copy",
"parameter" : [
{
"valueString" : "#pat"
}
]
}
]
},
{
"name" : "R29DiagnoseGruppeDiagGroup",
"source" : [
{
"context" : "visit",
"element" : "DiagGroup",
"variable" : "diaggroup"
}
],
"target" : [
{
"context" : "encounter",
"contextType" : "variable",
"element" : "diagnosis",
"variable" : "diag"
},
{
"context" : "diag",
"contextType" : "variable",
"element" : "condition",
"variable" : "ref",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
},
{
"context" : "ref",
"contextType" : "variable",
"element" : "reference",
"transform" : "copy",
"parameter" : [
{
"valueString" : "#cond"
}
]
}
],
"rule" : [
{
"name" : "R292DiagnosetypDiagType",
"source" : [
{
"context" : "diaggroup",
"element" : "DiagType",
"variable" : "diagType"
}
],
"target" : [
{
"context" : "diag",
"contextType" : "variable",
"element" : "use",
"variable" : "use"
},
{
"context" : "use",
"contextType" : "variable",
"element" : "text",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "%diagType.data"
}
]
}
]
}
]
}
]
}
]
}