{ "description": null, "_filename": "StructureMap-OrfQrToBundle.json", "package_name": "ch.fhir.ig.ch-orf", "date": "2023-06-29T21:20:25+02:00", "group": [ { "name": "OrfQrToBundle", "rule": [ { "name": "documentIdentifier", "source": [ { "context": "qr" } ], "target": [ { "context": "bundle", "element": "identifier", "variable": "documentIdentifier", "contextType": "variable" }, { "context": "documentIdentifier", "element": "system", "parameter": [ { "valueString": "urn:ietf:rfc:3986" } ], "transform": "copy", "contextType": "variable" }, { "variable": "uuidDoc", "transform": "uuid", "contextType": "variable" }, { "context": "documentIdentifier", "element": "value", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuidDoc" } ], "transform": "append", "contextType": "variable" } ] }, { "name": "orfbundle", "rule": [ { "name": "orfbundle", "source": [ { "context": "qr", "element": "questionnaire", "variable": "can" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e6", "contextType": "variable" }, { "context": "e6", "element": "resource", "variable": "q", "parameter": [ { "valueString": "can.resolve()" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "q", "element": "id", "variable": "uuid6", "transform": "uuid", "contextType": "variable" }, { "context": "e6", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid6" } ], "transform": "append", "contextType": "variable" } ], "dependent": [ { "name": "QrToBundle", "variable": [ "qr", "q", "patient", "questionnaireresp", "servicerequest", "composition", "bundle" ] } ] } ], "source": [ { "context": "qr", "variable": "qrcp" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e", "contextType": "variable" }, { "context": "e", "element": "resource", "variable": "composition", "parameter": [ { "valueString": "Composition" } ], "transform": "create", "contextType": "variable" }, { "context": "composition", "element": "id", "variable": "uuid", "transform": "uuid", "contextType": "variable" }, { "context": "e", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid" } ], "transform": "append", "contextType": "variable" }, { "context": "bundle", "element": "entry", "variable": "e2", "contextType": "variable" }, { "context": "bundle", "element": "timestamp", "variable": "timestamp", "parameter": [ { "valueString": "now()" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "composition", "element": "date", "parameter": [ { "valueId": "timestamp" } ], "transform": "copy", "contextType": "variable" }, { "context": "composition", "element": "title", "parameter": [ { "valueString": "Order and Referral by Form" } ], "transform": "copy", "contextType": "variable" }, { "context": "composition", "element": "type", "variable": "type", "contextType": "variable" }, { "context": "type", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "419891008" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://snomed.info/sct" } ], "transform": "copy", "contextType": "variable" }, { "context": "composition", "element": "category", "variable": "category", "contextType": "variable" }, { "context": "category", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "721963009" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://snomed.info/sct" } ], "transform": "copy", "contextType": "variable" }, { "context": "e2", "element": "resource", "variable": "patient", "parameter": [ { "valueString": "Patient" } ], "transform": "create", "contextType": "variable" }, { "context": "patient", "element": "id", "variable": "uuid2", "transform": "uuid", "contextType": "variable" }, { "context": "e2", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid2" } ], "transform": "append", "contextType": "variable" }, { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "questionnaireresp", "parameter": [ { "valueId": "qrcp" } ], "transform": "copy", "contextType": "variable" }, { "context": "questionnaireresp", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid4" } ], "transform": "append", "contextType": "variable" }, { "context": "bundle", "element": "entry", "variable": "e5", "contextType": "variable" }, { "context": "e5", "element": "resource", "variable": "servicerequest", "parameter": [ { "valueString": "ServiceRequest" } ], "transform": "create", "contextType": "variable" }, { "context": "servicerequest", "element": "id", "variable": "uuid5", "transform": "uuid", "contextType": "variable" }, { "context": "e5", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid5" } ], "transform": "append", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "qr", "type": "QuestionnaireResponse" }, { "mode": "target", "name": "bundle", "type": "Bundle" } ], "typeMode": "none" }, { "name": "QrToGroups", "rule": [ { "name": "grporder", "source": [ { "context": "qr", "element": "item", "variable": "grp", "condition": "linkId = 'order'" } ], "dependent": [ { "name": "OrderItems", "variable": [ "grp", "bundle", "composition", "serviceRequest" ] } ] }, { "name": "receiver", "source": [ { "context": "qr", "element": "item", "variable": "grp", "condition": "linkId = 'receiver'" } ], "dependent": [ { "name": "ReceiverInit", "variable": [ "grp", "bundle", "composition", "serviceRequest" ] } ] }, { "name": "grpinitiator", "source": [ { "context": "qr", "element": "item", "variable": "grp", "condition": "linkId = 'initiator'" } ], "dependent": [ { "name": "InitiatorInit", "variable": [ "grp", "bundle", "patient", "composition", "serviceRequest" ] } ] }, { "name": "grppatient", "source": [ { "context": "qr", "element": "item", "variable": "grp", "condition": "linkId = 'patient'" } ], "dependent": [ { "name": "PatientItems", "variable": [ "grp", "bundle", "patient", "composition", "serviceRequest" ] } ] }, { "name": "grprequestedencounter", "source": [ { "context": "qr", "element": "item", "variable": "grp", "condition": "linkId = 'requestedEncounter'" } ], "dependent": [ { "name": "RequestedEncounterItems", "variable": [ "grp", "bundle", "patient", "serviceRequest" ] } ] }, { "name": "grprequestedencounter", "source": [ { "context": "qr", "element": "item", "variable": "grp", "condition": "linkId = 'coverage'" } ], "dependent": [ { "name": "Coverage", "variable": [ "grp", "bundle", "patient", "serviceRequest" ] } ] }, { "name": "grpsender", "source": [ { "context": "qr", "element": "item", "variable": "grp", "condition": "linkId = 'sender'" } ], "dependent": [ { "name": "SenderAuthorInit", "variable": [ "grp", "bundle", "composition", "serviceRequest" ] } ] }, { "name": "receiverCopy", "source": [ { "context": "qr", "element": "item", "variable": "grp", "condition": "linkId = 'receiverCopy'" } ], "dependent": [ { "name": "ReceiverCopy", "variable": [ "grp", "bundle", "patient", "composition", "serviceRequest" ] } ] }, { "name": "appointment", "source": [ { "context": "qr", "element": "item", "variable": "grp", "condition": "linkId = 'appointment'" } ], "dependent": [ { "name": "Appointment", "variable": [ "grp", "bundle", "composition", "serviceRequest" ] } ] }, { "name": "previousResults", "source": [ { "context": "qr", "element": "item", "variable": "grp", "condition": "linkId = 'previousResults'" } ], "dependent": [ { "name": "PreviousResults", "variable": [ "grp", "bundle", "serviceRequest" ] } ] }, { "name": "AntecedentEpisodeOfCareInit", "source": [ { "context": "qr", "element": "item", "variable": "grp", "condition": "linkId = 'antecedentEpisodeOfCare'" } ], "dependent": [ { "name": "AntecedentEpisodeOfCareInit", "variable": [ "grp", "bundle", "patient", "composition" ] } ] }, { "name": "consent", "source": [ { "context": "qr", "element": "item", "variable": "grp", "condition": "linkId = 'consent'" } ], "dependent": [ { "name": "Consent", "variable": [ "grp", "bundle", "composition" ] } ] }, { "name": "note", "source": [ { "context": "qr", "element": "item", "variable": "grp", "condition": "linkId = 'note'" } ], "dependent": [ { "name": "Note", "variable": [ "grp", "serviceRequest" ] } ] } ], "input": [ { "mode": "source", "name": "qr", "type": "QuestionnaireResponse" }, { "mode": "target", "name": "patient", "type": "Patient" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "composition", "type": "Composition" }, { "mode": "target", "name": "serviceRequest", "type": "ServiceRequest" } ], "typeMode": "none" }, { "name": "OrderItems", "rule": [ { "name": "order.precedentDocumentIdentifier", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.precedentDocumentIdentifier') and answer.exists())" } ], "target": [ { "context": "composition", "element": "extension", "variable": "ext", "contextType": "variable" }, { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-precedentdocument" } ], "transform": "copy", "contextType": "variable" }, { "context": "ext", "element": "value", "variable": "value", "parameter": [ { "valueString": "Identifier" } ], "transform": "create", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:ietf:rfc:3986" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "'urn:uuid:' + item.answer.valueString" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "order.placerOrderIdentifier", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.placerOrderIdentifier') and answer.exists())" } ], "target": [ { "context": "serviceRequest", "element": "identifier", "listMode": [ "share" ], "variable": "value", "listRuleId": "placer", "contextType": "variable" }, { "context": "value", "element": "type", "variable": "type", "contextType": "variable" }, { "context": "type", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://terminology.hl7.org/CodeSystem/v2-0203" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "PLAC" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.valueString" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "order.placerOrderIdentifierDomain", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.placerOrderIdentifierDomain') and answer.exists())" } ], "target": [ { "context": "serviceRequest", "element": "identifier", "listMode": [ "share" ], "variable": "value", "listRuleId": "placer", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "item.answer.valueString" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "order.fillerOrderIdentifier", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.fillerOrderIdentifier') and answer.exists())" } ], "target": [ { "context": "serviceRequest", "element": "identifier", "listMode": [ "share" ], "variable": "value", "listRuleId": "filler", "contextType": "variable" }, { "context": "value", "element": "type", "variable": "type", "contextType": "variable" }, { "context": "type", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://terminology.hl7.org/CodeSystem/v2-0203" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "FILL" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.valueString" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "order.fillerOrderIdentifierDomain", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.fillerOrderIdentifierDomain') and answer.exists())" } ], "target": [ { "context": "serviceRequest", "element": "identifier", "listMode": [ "share" ], "variable": "value", "listRuleId": "filler", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "item.answer.valueString" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.dateTime') and answer.exists())" } ], "target": [ { "context": "serviceRequest", "element": "authoredOn", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.priority') and answer.exists())" } ], "target": [ { "context": "serviceRequest", "element": "priority", "parameter": [ { "valueString": "item.answer.value.code" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "order.notificationContactDocument", "rule": [ { "name": "order.notificationContactDocument.items", "rule": [ { "name": "data", "source": [ { "context": "item" } ], "dependent": [ { "name": "UrgentNotificationContactForRequestItems", "variable": [ "item", "practitionerRoleDataEnterer", "practitionerDataEnterer" ] } ] }, { "name": "extension", "source": [ { "context": "item" } ], "dependent": [ { "name": "ExtOrfUrgentNotificationContactForRequest", "variable": [ "item", "practitionerRoleDataEnterer", "extension" ] } ] } ], "source": [ { "context": "item" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "practitionerRoleDataEnterer", "parameter": [ { "valueString": "PractitionerRole" } ], "transform": "create", "contextType": "variable" }, { "context": "practitionerRoleDataEnterer", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid4" } ], "transform": "append", "contextType": "variable" }, { "context": "composition", "element": "extension", "variable": "extension", "contextType": "variable" }, { "context": "bundle", "element": "entry", "variable": "e5", "contextType": "variable" }, { "context": "e5", "element": "resource", "variable": "practitionerDataEnterer", "parameter": [ { "valueString": "Practitioner" } ], "transform": "create", "contextType": "variable" }, { "context": "practitionerDataEnterer", "element": "id", "variable": "uuid5", "transform": "uuid", "contextType": "variable" }, { "context": "e5", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid5" } ], "transform": "append", "contextType": "variable" }, { "context": "practitionerRoleDataEnterer", "element": "practitioner", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid5" } ], "transform": "append", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'order.notificationContactDocument')" } ] }, { "name": "order.notificationContactDocumentResponse", "rule": [ { "name": "order.notificationContactDocumentResponse.items", "rule": [ { "name": "data", "source": [ { "context": "item" } ], "dependent": [ { "name": "UrgentNotificationContactForResponseItems", "variable": [ "item", "practitionerRoleDataEnterer", "practitionerDataEnterer" ] } ] }, { "name": "extension", "source": [ { "context": "item" } ], "dependent": [ { "name": "ExtOrfUrgentNotificationContactForResponse", "variable": [ "item", "practitionerRoleDataEnterer", "extension" ] } ] } ], "source": [ { "context": "item" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "practitionerRoleDataEnterer", "parameter": [ { "valueString": "PractitionerRole" } ], "transform": "create", "contextType": "variable" }, { "context": "practitionerRoleDataEnterer", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid4" } ], "transform": "append", "contextType": "variable" }, { "context": "composition", "element": "extension", "variable": "extension", "contextType": "variable" }, { "context": "bundle", "element": "entry", "variable": "e5", "contextType": "variable" }, { "context": "e5", "element": "resource", "variable": "practitionerDataEnterer", "parameter": [ { "valueString": "Practitioner" } ], "transform": "create", "contextType": "variable" }, { "context": "practitionerDataEnterer", "element": "id", "variable": "uuid5", "transform": "uuid", "contextType": "variable" }, { "context": "e5", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid5" } ], "transform": "append", "contextType": "variable" }, { "context": "practitionerRoleDataEnterer", "element": "practitioner", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid5" } ], "transform": "append", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'order.notificationContactDocumentResponse')" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "composition" }, { "mode": "target", "name": "serviceRequest", "type": "ServiceRequest" } ], "typeMode": "none" }, { "name": "UrgentNotificationContactForRequestPractitionerItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.notificationContactDocument.practitioner.familyName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.notificationContactDocument.practitioner.givenName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "given", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.practitioner.title", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.notificationContactDocument.practitioner.title') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "prefix", "variable": "prefix", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "prefix", "element": "extension", "variable": "ext", "contextType": "variable" }, { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier" } ], "transform": "copy", "contextType": "variable" }, { "context": "ext", "element": "value", "variable": "value", "parameter": [ { "valueString": "code" } ], "transform": "create", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "AC" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "sender.author.practitioner.phone", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.notificationContactDocument.practitioner.phone') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.practitioner.email", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.notificationContactDocument.practitioner.email') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitioner", "type": "Practitioner" } ], "typeMode": "none" }, { "name": "UrgentNotificationContactForRequestItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'order.notificationContactDocument.practitioner')" } ], "dependent": [ { "name": "UrgentNotificationContactForRequestPractitionerItems", "variable": [ "item", "practitioner" ] } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitionerRole", "type": "practitionerRole" }, { "mode": "target", "name": "practitioner", "type": "Practitioner" } ], "typeMode": "none" }, { "name": "ExtOrfUrgentNotificationContactForRequest", "rule": [ { "name": "url", "source": [ { "context": "src" } ], "target": [ { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-urgentnoficationcontactforthisdocument" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "practitionerRole", "source": [ { "context": "src" } ], "target": [ { "context": "ext", "element": "value", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %practitionerRole.id" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitionerRole", "type": "PractitionerRole" }, { "mode": "target", "name": "ext", "type": "Extension" } ], "typeMode": "none" }, { "name": "UrgentNotificationContactForResponsePractitionerItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.notificationContactDocumentResponse.practitioner.familyName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.notificationContactDocumentResponse.practitioner.givenName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "given", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.practitioner.title", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.notificationContactDocumentResponse.practitioner.title') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "prefix", "variable": "prefix", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "prefix", "element": "extension", "variable": "ext", "contextType": "variable" }, { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier" } ], "transform": "copy", "contextType": "variable" }, { "context": "ext", "element": "value", "variable": "value", "parameter": [ { "valueString": "code" } ], "transform": "create", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "AC" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "sender.author.practitioner.phone", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.notificationContactDocumentResponse.practitioner.phone') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.practitioner.email", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'order.notificationContactDocumentResponse.practitioner.email') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitioner", "type": "Practitioner" } ], "typeMode": "none" }, { "name": "UrgentNotificationContactForResponseItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'order.notificationContactDocumentResponse.practitioner')" } ], "dependent": [ { "name": "UrgentNotificationContactForResponsePractitionerItems", "variable": [ "item", "practitioner" ] } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitionerRole", "type": "practitionerRole" }, { "mode": "target", "name": "practitioner", "type": "Practitioner" } ], "typeMode": "none" }, { "name": "ExtOrfUrgentNotificationContactForResponse", "rule": [ { "name": "url", "source": [ { "context": "src" } ], "target": [ { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-urgentnoficationcontactfortheresponsetothisdocument" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "practitionerRole", "source": [ { "context": "src" } ], "target": [ { "context": "ext", "element": "value", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %practitionerRole.id" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitionerRole", "type": "PractitionerRole" }, { "mode": "target", "name": "ext", "type": "Extension" } ], "typeMode": "none" }, { "name": "ReceiverPractitionerItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.practitioner.familyName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.practitioner.givenName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "given", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiver.practitioner.title", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.practitioner.title') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "prefix", "variable": "prefix", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "prefix", "element": "extension", "variable": "ext", "contextType": "variable" }, { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier" } ], "transform": "copy", "contextType": "variable" }, { "context": "ext", "element": "value", "variable": "value", "parameter": [ { "valueString": "code" } ], "transform": "create", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "AC" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "receiver.practitioner.gln", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.practitioner.gln') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.51.1.3" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiver.practitioner.zsr", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.practitioner.zsr') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.16.756.5.30.1.123.100.2.1.1" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiver.practitioner.phone", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.practitioner.phone') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiver.practitioner.email", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.practitioner.email') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitioner", "type": "Practitioner" } ], "typeMode": "none" }, { "name": "ReceiverOrganizationItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.organization.name') and answer.exists())" } ], "target": [ { "context": "organization", "element": "name", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiver.organization.gln", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.organization.gln') and answer.exists())" } ], "target": [ { "context": "organization", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.51.1.3" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiver.organization.zsr", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.organization.zsr') and answer.exists())" } ], "target": [ { "context": "organization", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.16.756.5.30.1.123.100.2.1.1" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item.answer", "rule": [ { "name": "receiver.organization.streetAddressLine", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "address", "element": "line", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.organization.streetAddressLine') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" } ] }, { "name": "receiver.organization.postalCode", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.organization.postalCode') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "postalCode", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiver.organization.city", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.organization.city') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "city", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiver.organization.country", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiver.organization.country') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "country", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "organization", "type": "Organization" } ], "typeMode": "none" }, { "name": "ReceiverItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'receiver.practitioner')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e2", "contextType": "variable" }, { "context": "e2", "element": "resource", "variable": "practitioner", "parameter": [ { "valueString": "Practitioner" } ], "transform": "create", "contextType": "variable" }, { "context": "practitioner", "element": "id", "variable": "uuid2", "transform": "uuid", "contextType": "variable" }, { "context": "practitionerRole", "element": "practitioner", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid2" } ], "transform": "append", "contextType": "variable" }, { "context": "e2", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid2" } ], "transform": "append", "contextType": "variable" } ], "dependent": [ { "name": "ReceiverPractitionerItems", "variable": [ "item", "practitioner" ] } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'receiver.organization')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e3", "contextType": "variable" }, { "context": "e3", "element": "resource", "variable": "organization", "parameter": [ { "valueString": "Organization" } ], "transform": "create", "contextType": "variable" }, { "context": "organization", "element": "id", "variable": "uuid3", "transform": "uuid", "contextType": "variable" }, { "context": "practitionerRole", "element": "organization", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid3" } ], "transform": "append", "contextType": "variable" }, { "context": "e3", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid3" } ], "transform": "append", "contextType": "variable" } ], "dependent": [ { "name": "ReceiverOrganizationItems", "variable": [ "item", "organization" ] } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "practitionerRole", "type": "practitionerRole" } ], "typeMode": "none" }, { "name": "Consent", "rule": [ { "name": "consent.statement", "rule": [ { "name": "item.answer", "rule": [ { "name": "consent.statement.note", "source": [ { "context": "answer", "element": "item", "variable": "item", "condition": "((linkId.value = 'consent.statement.note') and answer.exists())" } ], "target": [ { "context": "consent", "element": "extension", "variable": "extnote", "contextType": "variable" }, { "context": "extnote", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-consentnote" } ], "transform": "copy", "contextType": "variable" }, { "context": "extnote", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "item", "element": "answer", "variable": "answer" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'consent.statement') and answer.exists())" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e", "contextType": "variable" }, { "context": "e", "element": "resource", "variable": "consent", "parameter": [ { "valueString": "Consent" } ], "transform": "create", "contextType": "variable" }, { "context": "consent", "element": "status", "parameter": [ { "valueString": "active" } ], "transform": "copy", "contextType": "variable" }, { "context": "consent", "element": "scope", "variable": "scope", "contextType": "variable" }, { "context": "scope", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "treatment" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://terminology.hl7.org/CodeSystem/consentscope" } ], "transform": "copy", "contextType": "variable" }, { "context": "consent", "element": "category", "variable": "category", "contextType": "variable" }, { "context": "category", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "59284-0" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://loinc.org" } ], "transform": "copy", "contextType": "variable" }, { "context": "consent", "element": "policyRule", "variable": "policyRule", "contextType": "variable" }, { "context": "policyRule", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "385432009" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://snomed.info/sct" } ], "transform": "copy", "contextType": "variable" }, { "context": "consent", "element": "id", "variable": "uuid", "transform": "uuid", "contextType": "variable" }, { "context": "e", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid" } ], "transform": "append", "contextType": "variable" }, { "context": "composition", "element": "extension", "variable": "ext", "contextType": "variable" }, { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-patientconsent" } ], "transform": "copy", "contextType": "variable" }, { "context": "ext", "element": "value", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "consent", "element": "extension", "variable": "extcode", "contextType": "variable" }, { "context": "extcode", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-consentcode" } ], "transform": "copy", "contextType": "variable" }, { "context": "extcode", "element": "value", "variable": "cc", "parameter": [ { "valueString": "CodeableConcept" } ], "transform": "create", "contextType": "variable" }, { "context": "cc", "element": "coding", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid" } ], "transform": "append", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "composition", "type": "Composition" } ], "typeMode": "none" }, { "name": "ReceiverInit", "rule": [ { "name": "receiver", "source": [ { "context": "src" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e", "contextType": "variable" }, { "context": "e", "element": "resource", "variable": "practitionerRole", "parameter": [ { "valueString": "PractitionerRole" } ], "transform": "create", "contextType": "variable" }, { "context": "practitionerRole", "element": "id", "variable": "uuid", "transform": "uuid", "contextType": "variable" }, { "context": "e", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid" } ], "transform": "append", "contextType": "variable" }, { "context": "composition", "element": "extension", "variable": "ext", "contextType": "variable" }, { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-receiver" } ], "transform": "copy", "contextType": "variable" }, { "context": "ext", "element": "value", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid" } ], "transform": "append", "contextType": "variable" } ], "dependent": [ { "name": "ReceiverItems", "variable": [ "src", "bundle", "practitionerRole" ] } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "composition", "type": "Composition" }, { "mode": "target", "name": "serviceRequest", "type": "ServiceRequest" } ], "typeMode": "none" }, { "name": "InitiatorItems", "rule": [ { "name": "initiator.personalrelation", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.personalrelation') and answer.exists())" } ], "target": [ { "context": "ext", "element": "extension", "variable": "extension", "contextType": "variable" }, { "context": "extension", "element": "url", "parameter": [ { "valueString": "ch-orf-personalrelation" } ], "transform": "copy", "contextType": "variable" }, { "context": "extension", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "initiator.legalrelation", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.legalrelation') and answer.exists())" } ], "target": [ { "context": "ext", "element": "extension", "variable": "extension", "contextType": "variable" }, { "context": "extension", "element": "url", "parameter": [ { "valueString": "ch-orf-legalrelation" } ], "transform": "copy", "contextType": "variable" }, { "context": "extension", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "InitiatorPractitionerRoleItems", "rule": [ { "name": "data", "source": [ { "context": "item" } ], "dependent": [ { "name": "InitiatorPractitionerRoleItems", "variable": [ "item", "bundle", "practitionerrole" ] } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId = 'initiator.practitionerRole')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "practitionerrole", "parameter": [ { "valueString": "PractitionerRole" } ], "transform": "create", "contextType": "variable" }, { "context": "ext", "element": "extension", "variable": "extension", "contextType": "variable" }, { "context": "practitionerrole", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "extension", "element": "url", "parameter": [ { "valueString": "ch-orf-personorganization" } ], "transform": "copy", "contextType": "variable" }, { "context": "extension", "element": "value", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid4" } ], "transform": "append", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid4" } ], "transform": "append", "contextType": "variable" } ] }, { "name": "initiator.relatedPerson", "rule": [ { "name": "data", "source": [ { "context": "item" } ], "dependent": [ { "name": "InitiatorRelatedPersonItems", "variable": [ "item", "relatedPerson" ] } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId = 'initiator.relatedPerson')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "relatedPerson", "parameter": [ { "valueString": "RelatedPerson" } ], "transform": "create", "contextType": "variable" }, { "context": "ext", "element": "extension", "variable": "extension", "contextType": "variable" }, { "context": "extension", "element": "url", "parameter": [ { "valueString": "ch-orf-personorganization" } ], "transform": "copy", "contextType": "variable" }, { "context": "extension", "element": "value", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "relatedPerson", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid4" } ], "transform": "append", "contextType": "variable" }, { "context": "relatedPerson", "element": "patient", "variable": "reference", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid4" } ], "transform": "append", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "patient", "type": "Patient" }, { "mode": "target", "name": "ext", "type": "Extension" } ], "typeMode": "none" }, { "name": "InitiatorRelatedPersonItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.relatedPerson.familyName') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "name", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.relatedPerson.givenName') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "name", "contextType": "variable" }, { "context": "name", "element": "given", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "phone", "rule": [ { "name": "initiator.relatedPerson.phone", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "relatedPerson", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.relatedPerson.phone') and answer.exists())" } ] }, { "name": "initiator.relatedPerson.email", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.relatedPerson.email') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item.answer", "rule": [ { "name": "initiator.relatedPerson.streetAddressLine", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "address", "element": "line", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.relatedPerson.streetAddressLine') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" } ] }, { "name": "initiator.relatedPerson.postalCode", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.relatedPerson.postalCode') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "postalCode", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "initiator.relatedPerson.city", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.relatedPerson.city') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "city", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "initiator.relatedPerson.country", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.relatedPerson.country') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "country", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "relatedPerson", "type": "RelatedPerson" } ], "typeMode": "none" }, { "name": "InitiatorPractitionerRoleItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'initiator.practitionerRole.practitioner')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e2", "contextType": "variable" }, { "context": "e2", "element": "resource", "variable": "practitioner", "parameter": [ { "valueString": "Practitioner" } ], "transform": "create", "contextType": "variable" }, { "context": "practitioner", "element": "id", "variable": "uuid2", "transform": "uuid", "contextType": "variable" }, { "context": "practitionerRole", "element": "practitioner", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid2" } ], "transform": "append", "contextType": "variable" }, { "context": "e2", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid2" } ], "transform": "append", "contextType": "variable" } ], "dependent": [ { "name": "InitiatorPractitionerItems", "variable": [ "item", "practitioner" ] } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'initiator.practitionerRole.organization')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e3", "contextType": "variable" }, { "context": "e3", "element": "resource", "variable": "organization", "parameter": [ { "valueString": "Organization" } ], "transform": "create", "contextType": "variable" }, { "context": "organization", "element": "id", "variable": "uuid3", "transform": "uuid", "contextType": "variable" }, { "context": "practitionerRole", "element": "organization", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid3" } ], "transform": "append", "contextType": "variable" }, { "context": "e3", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid3" } ], "transform": "append", "contextType": "variable" } ], "dependent": [ { "name": "InitiatorOrganizationItems", "variable": [ "item", "organization" ] } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "practitionerRole", "type": "practitionerRole" } ], "typeMode": "none" }, { "name": "InitiatorPractitionerItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.practitionerRole.practitioner.familyName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.practitionerRole.practitioner.givenName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "given", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "initiator.practitionerRole.practitioner.title", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.practitionerRole.practitioner.title') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "prefix", "variable": "prefix", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "prefix", "element": "extension", "variable": "ext", "contextType": "variable" }, { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier" } ], "transform": "copy", "contextType": "variable" }, { "context": "ext", "element": "value", "variable": "value", "parameter": [ { "valueString": "code" } ], "transform": "create", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "AC" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "initiator.practitionerRole.practitioner.phone", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.practitionerRole.practitioner.phone') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "initiator.practitionerRole.practitioner.email", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.practitionerRole.practitioner.email') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiver.practitioner.gln", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.practitionerRole.practitioner.gln') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.51.1.3" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiver.practitioner.zsr", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.practitionerRole.practitioner.zsr') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.16.756.5.30.1.123.100.2.1.1" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitioner", "type": "Practitioner" } ], "typeMode": "none" }, { "name": "InitiatorOrganizationItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.practitionerRole.organization.name') and answer.exists())" } ], "target": [ { "context": "organization", "element": "name", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item.answer", "rule": [ { "name": "initiator.practitionerRole.organization.streetAddressLine", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "address", "element": "line", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.practitionerRole.organization.streetAddressLine') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" } ] }, { "name": "initiator.practitionerRole.organization.postalCode", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.practitionerRole.organization.postalCode') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "postalCode", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "initiator.practitionerRole.organization.city", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.practitionerRole.organization.city') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "city", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "initiator.practitionerRole.organization.country", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'initiator.practitionerRole.organization.country') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "country", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "organization", "type": "Organization" } ], "typeMode": "none" }, { "name": "FamilyDoctorInit", "rule": [ { "name": "FamilyDoctorInit", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'familydoctor.practitioner')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e2", "contextType": "variable" }, { "context": "e2", "element": "resource", "variable": "practitioner", "parameter": [ { "valueString": "Practitioner" } ], "transform": "create", "contextType": "variable" }, { "context": "practitioner", "element": "id", "variable": "uuid2", "transform": "uuid", "contextType": "variable" }, { "context": "practitionerRole", "element": "practitioner", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid2" } ], "transform": "append", "contextType": "variable" }, { "context": "e2", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid2" } ], "transform": "append", "contextType": "variable" } ], "dependent": [ { "name": "FamilyDoctorPractitionerItems", "variable": [ "item", "practitioner" ] } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'familydoctor.organization')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e3", "contextType": "variable" }, { "context": "e3", "element": "resource", "variable": "organization", "parameter": [ { "valueString": "Organization" } ], "transform": "create", "contextType": "variable" }, { "context": "organization", "element": "id", "variable": "uuid3", "transform": "uuid", "contextType": "variable" }, { "context": "practitionerRole", "element": "organization", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid3" } ], "transform": "append", "contextType": "variable" }, { "context": "e3", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid3" } ], "transform": "append", "contextType": "variable" } ], "dependent": [ { "name": "FamilyDoctorOrganizationItems", "variable": [ "item", "organization" ] } ] } ], "source": [ { "context": "src" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "practitionerRole", "parameter": [ { "valueString": "PractitionerRole" } ], "transform": "create", "contextType": "variable" }, { "context": "practitionerRole", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "patient", "element": "generalPractitioner", "variable": "gp", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "gp", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid4" } ], "transform": "append", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid4" } ], "transform": "append", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "patient", "type": "Patient" }, { "mode": "target", "name": "composition", "type": "Composition" }, { "mode": "target", "name": "serviceRequest", "type": "ServiceRequest" } ], "typeMode": "none" }, { "name": "FamilyDoctorPractitionerItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.practitioner.familyName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.practitioner.givenName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "given", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "familydoctor.practitioner.gln", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.practitioner.gln') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.51.1.3" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "familydoctor.practitioner.zsr", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.practitioner.zsr') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.16.756.5.30.1.123.100.2.1.1" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "familydoctor.practitioner.title", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.practitioner.title') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "prefix", "variable": "prefix", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "prefix", "element": "extension", "variable": "ext", "contextType": "variable" }, { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier" } ], "transform": "copy", "contextType": "variable" }, { "context": "ext", "element": "value", "variable": "value", "parameter": [ { "valueString": "code" } ], "transform": "create", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "AC" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "familydoctor.practitioner.phone", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.practitioner.phone') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "familydoctor.practitioner.email", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.practitioner.email') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitioner", "type": "Practitioner" } ], "typeMode": "none" }, { "name": "FamilyDoctorOrganizationItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.organization.name') and answer.exists())" } ], "target": [ { "context": "organization", "element": "name", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item.answer", "rule": [ { "name": "familydoctor.organization.streetAddressLine", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "address", "element": "line", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.organization.streetAddressLine') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" } ] }, { "name": "familydoctor.organization.postalCode", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.organization.postalCode') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "postalCode", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "familydoctor.organization.city", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.organization.city') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "city", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "familydoctor.organization.country", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.organization.country') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "country", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "familydoctor.organization.gln", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.organization.gln') and answer.exists())" } ], "target": [ { "context": "organization", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.51.1.3" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "familydoctorr.organization.zsr", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'familydoctor.organization.zsr') and answer.exists())" } ], "target": [ { "context": "organization", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.16.756.5.30.1.123.100.2.1.1" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "organization", "type": "Organization" } ], "typeMode": "none" }, { "name": "AntecedentEpisodeOfCareInit", "rule": [ { "name": "AntecedentEpisodeOfCareItems", "source": [ { "context": "src" } ], "target": [ { "context": "composition", "element": "extension", "variable": "ext", "contextType": "variable" }, { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-antecedentepisodeofcare" } ], "transform": "copy", "contextType": "variable" }, { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "episodeofcare", "parameter": [ { "valueString": "EpisodeOfCare" } ], "transform": "create", "contextType": "variable" }, { "context": "episodeofcare", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "episodeofcare", "element": "status", "parameter": [ { "valueString": "finished" } ], "transform": "copy", "contextType": "variable" }, { "context": "ext", "element": "value", "variable": "ref", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "ref", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %episodeofcare.id" } ], "transform": "evaluate", "contextType": "variable" } ], "dependent": [ { "name": "AntecedentEpisodeOfCareItems", "variable": [ "src", "bundle", "patient", "episodeofcare" ] } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "patient", "type": "Patient" }, { "mode": "target", "name": "composition", "type": "Composition" } ], "typeMode": "none" }, { "name": "AntecedentEpisodeOfCareItems", "rule": [ { "name": "antecedentEpisodeOfCare.requestedPeriod.start", "rule": [ { "name": "antecedentEpisodeOfCareEndNotSameAsStart", "source": [ { "context": "src", "element": "item", "variable": "iteme", "condition": "((linkId.value = 'antecedentEpisodeOfCare.end') and answer.exists())" } ], "target": [ { "context": "period", "element": "end", "parameter": [ { "valueString": "iteme.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'antecedentEpisodeOfCare.start') and answer.exists())" } ], "target": [ { "context": "episodeofcare", "element": "statusHistory", "variable": "statusHistory", "contextType": "variable" }, { "context": "statusHistory", "element": "status", "parameter": [ { "valueString": "finished" } ], "transform": "copy", "contextType": "variable" }, { "context": "statusHistory", "element": "period", "variable": "period", "contextType": "variable" }, { "context": "period", "element": "start", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "period", "element": "end", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "antecedentEpisodeOfCare.managingOrganization", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'antecedentEpisodeOfCare.managingOrganization')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e3", "contextType": "variable" }, { "context": "e3", "element": "resource", "variable": "organization", "parameter": [ { "valueString": "Organization" } ], "transform": "create", "contextType": "variable" }, { "context": "organization", "element": "id", "variable": "uuid3", "transform": "uuid", "contextType": "variable" }, { "context": "e3", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid3" } ], "transform": "append", "contextType": "variable" }, { "context": "episodeofcare", "element": "patient", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %tgt.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "episodeofcare", "element": "managingOrganization", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid3" } ], "transform": "append", "contextType": "variable" } ], "dependent": [ { "name": "AntecedentEpisodeOfCareOrganizationItems", "variable": [ "item", "organization" ] } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "tgt", "type": "Patient" }, { "mode": "target", "name": "episodeofcare", "type": "EpisodeOfCare" } ], "typeMode": "none" }, { "name": "AntecedentEpisodeOfCareOrganizationItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.name') and answer.exists())" } ], "target": [ { "context": "organization", "element": "name", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item.answer", "rule": [ { "name": "antecedentEpisodeOfCareorganization.streetAddressLine", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "address", "element": "line", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.streetAddressLine') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" } ] }, { "name": "sender.author.organization.postalCode", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.postalCode') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "postalCode", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.organization.city", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.city') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "city", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.organization.country", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.country') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "country", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "organization", "type": "Organization" } ], "typeMode": "none" }, { "name": "InitiatorInit", "rule": [ { "name": "receiver", "source": [ { "context": "src" } ], "target": [ { "context": "composition", "element": "extension", "variable": "ext", "contextType": "variable" }, { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-initiator" } ], "transform": "copy", "contextType": "variable" } ], "dependent": [ { "name": "InitiatorItems", "variable": [ "src", "bundle", "patient", "ext" ] } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "patient", "type": "Patient" }, { "mode": "target", "name": "composition", "type": "Composition" }, { "mode": "target", "name": "serviceRequest", "type": "ServiceRequest" } ], "typeMode": "none" }, { "name": "PatientItems", "rule": [ { "name": "grpfamily", "source": [ { "context": "src", "element": "item", "variable": "grp", "condition": "linkId = 'familydoctor'" } ], "dependent": [ { "name": "FamilyDoctorInit", "variable": [ "grp", "bundle", "tgt", "composition", "serviceRequest" ] } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item" } ], "dependent": [ { "name": "PatientItems", "variable": [ "item", "bundle", "tgt", "composition", "serviceRequest" ] } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.familyName') and answer.exists())" } ], "target": [ { "context": "tgt", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "patientName", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.maidenName') and answer.exists())" } ], "target": [ { "context": "tgt", "element": "name", "variable": "name", "contextType": "variable" }, { "context": "name", "element": "use", "parameter": [ { "valueString": "maiden" } ], "transform": "copy", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.givenName') and answer.exists())" } ], "target": [ { "context": "tgt", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "patientName", "contextType": "variable" }, { "context": "name", "element": "given", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "patient.localPid", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.localPid') and answer.exists())" } ], "target": [ { "context": "tgt", "element": "identifier", "listMode": [ "share" ], "variable": "value", "listRuleId": "localpid", "contextType": "variable" }, { "context": "value", "element": "type", "variable": "type", "contextType": "variable" }, { "context": "type", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://terminology.hl7.org/CodeSystem/v2-0203" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "MR" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.valueString" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "patient.localPidDomain", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.localPidDomain') and answer.exists())" } ], "target": [ { "context": "tgt", "element": "identifier", "listMode": [ "share" ], "variable": "value", "listRuleId": "localpid", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "item.answer.valueString" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.birthDate') and answer.exists())" } ], "target": [ { "context": "tgt", "element": "birthDate", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.gender') and answer.exists())" } ], "target": [ { "context": "tgt", "element": "gender", "parameter": [ { "valueString": "item.answer.value.code" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "patient.maritalStatus", "rule": [ { "name": "answer", "rule": [ { "name": "maritalStatus", "source": [ { "type": "Coding", "context": "answer", "element": "value", "variable": "coding" } ], "target": [ { "context": "tgt", "element": "maritalStatus", "variable": "maritalStatus", "contextType": "variable" }, { "context": "maritalStatus", "element": "coding", "parameter": [ { "valueId": "coding" } ], "transform": "copy", "contextType": "variable" } ] } ], "source": [ { "context": "item", "element": "answer", "variable": "answer" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.maritalStatus') and answer.exists())" } ] }, { "name": "patient.phone", "rule": [ { "name": "patient.phone", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "tgt", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.phone') and answer.exists())" } ] }, { "name": "patient.email", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.email') and answer.exists())" } ], "target": [ { "context": "tgt", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item.answer", "rule": [ { "name": "patient.streetAddressLine", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "address", "element": "line", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.streetAddressLine') and answer.exists())" } ], "target": [ { "context": "tgt", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" } ] }, { "name": "patient.postalCode", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.postalCode') and answer.exists())" } ], "target": [ { "context": "tgt", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "postalCode", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "patient.city", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.city') and answer.exists())" } ], "target": [ { "context": "tgt", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "city", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "patient.country", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.country') and answer.exists())" } ], "target": [ { "context": "tgt", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "country", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "patient.languageOfCorrespondence", "rule": [ { "name": "answer", "rule": [ { "name": "languageOfCorrespondence", "source": [ { "type": "Coding", "context": "answer", "element": "value", "variable": "coding" } ], "target": [ { "context": "tgt", "element": "communication", "variable": "communication", "contextType": "variable" }, { "context": "communication", "element": "preferred", "parameter": [ { "valueBoolean": true } ], "transform": "copy", "contextType": "variable" }, { "context": "communication", "element": "language", "variable": "language", "contextType": "variable" }, { "context": "language", "element": "coding", "parameter": [ { "valueId": "coding" } ], "transform": "copy", "contextType": "variable" } ] } ], "source": [ { "context": "item", "element": "answer", "variable": "answer" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.languageOfCorrespondence') and answer.exists())" } ] }, { "name": "contact", "rule": [ { "name": "item", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.contactperson.familyName') and answer.exists())" } ], "target": [ { "context": "contact", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "contactName", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.contactperson.givenName') and answer.exists())" } ], "target": [ { "context": "contact", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "contactName", "contextType": "variable" }, { "context": "name", "element": "given", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "patient.contactperson.phone", "rule": [ { "name": "patient.phone", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "tgt", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.contactperson.phone') and answer.exists())" } ] }, { "name": "patient.email", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.contactperson.email') and answer.exists())" } ], "target": [ { "context": "contact", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "patient.contactperson.relationship", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'patient.contactperson.relationship') and answer.exists())" } ], "target": [ { "context": "contact", "element": "relationship", "variable": "relationship", "contextType": "variable" }, { "context": "relationship", "element": "text", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'patient.contactperson')" } ], "target": [ { "context": "tgt", "element": "contact", "variable": "contact", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "tgt", "type": "Patient" }, { "mode": "target", "name": "composition", "type": "Composition" }, { "mode": "target", "name": "serviceRequest", "type": "ServiceRequest" } ], "typeMode": "none" }, { "name": "RequestedEncounterItems", "rule": [ { "name": "RequestedEncounterItems", "rule": [ { "name": "requestedEncounter.class", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'requestedEncounter.class') and answer.exists())" } ], "target": [ { "context": "encounter", "element": "class", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "requestedEncounter.desiredAccommodation", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'requestedEncounter.desiredAccommodation') and answer.exists())" } ], "target": [ { "context": "encounter", "element": "extension", "variable": "extension", "contextType": "variable" }, { "context": "extension", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-desiredaccommodation" } ], "transform": "copy", "contextType": "variable" }, { "context": "extension", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "encounter", "parameter": [ { "valueString": "Encounter" } ], "transform": "create", "contextType": "variable" }, { "context": "encounter", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "encounter", "element": "status", "parameter": [ { "valueString": "planned" } ], "transform": "copy", "contextType": "variable" }, { "context": "serviceRequest", "element": "extension", "variable": "extension", "contextType": "variable" }, { "context": "encounter", "element": "subject", "variable": "subject", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "subject", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "extension", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-requestedencounterdetails" } ], "transform": "copy", "contextType": "variable" }, { "context": "extension", "element": "value", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "patient", "type": "Patient" }, { "mode": "target", "name": "serviceRequest", "type": "ServiceRequest" } ], "typeMode": "none" }, { "name": "Coverage", "rule": [ { "name": "coverage.beneficiary", "rule": [ { "name": "coverage.beneficiary.ahvn13", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.beneficiary.ahvn13') and answer.exists())" } ], "target": [ { "context": "patient", "element": "identifier", "variable": "identifier", "contextType": "variable" }, { "context": "identifier", "element": "system", "parameter": [ { "valueString": "urn:oid:2.16.756.5.32" } ], "transform": "copy", "contextType": "variable" }, { "context": "identifier", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "where(linkId.value = 'coverage.beneficiary')" } ] }, { "name": "coveragekvg", "rule": [ { "name": "coverage.kvg.name", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.kvg.name') and answer.exists())" } ], "target": [ { "context": "coverage", "element": "payor", "variable": "payor", "contextType": "variable" }, { "context": "payor", "element": "reference", "variable": "refcontained", "contextType": "variable" }, { "context": "refcontained", "element": "value", "parameter": [ { "valueString": "#org" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "contained", "variable": "organization", "parameter": [ { "valueString": "Organization" } ], "transform": "create", "contextType": "variable" }, { "context": "organization", "element": "id", "parameter": [ { "valueString": "org" } ], "transform": "copy", "contextType": "variable" }, { "context": "organization", "element": "name", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "coverage.kvg.insuranceCardNumber", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.kvg.insuranceCardNumber') and answer.exists())" } ], "target": [ { "context": "coverage", "element": "identifier", "variable": "identifier", "contextType": "variable" }, { "context": "identifier", "element": "type", "variable": "typeid", "contextType": "variable" }, { "context": "typeid", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coverageidentifiertype" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "VeKa" } ], "transform": "copy", "contextType": "variable" }, { "context": "identifier", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "where(linkId.value = 'coverage.kvg')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "coverage", "parameter": [ { "valueString": "Coverage" } ], "transform": "create", "contextType": "variable" }, { "context": "coverage", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "serviceRequest", "element": "insurance", "variable": "insurance", "contextType": "variable" }, { "context": "insurance", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "status", "parameter": [ { "valueString": "active" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "beneficiary", "variable": "subject", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "subject", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "type", "variable": "type", "contextType": "variable" }, { "context": "type", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "KVG" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "coverageuvg", "rule": [ { "name": "coverage.uvg.name", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.uvg.name') and answer.exists())" } ], "target": [ { "context": "coverage", "element": "payor", "variable": "payor", "contextType": "variable" }, { "context": "payor", "element": "reference", "variable": "refcontained", "contextType": "variable" }, { "context": "refcontained", "element": "value", "parameter": [ { "valueString": "#org" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "contained", "variable": "organization", "parameter": [ { "valueString": "Organization" } ], "transform": "create", "contextType": "variable" }, { "context": "organization", "element": "id", "parameter": [ { "valueString": "org" } ], "transform": "copy", "contextType": "variable" }, { "context": "organization", "element": "name", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "coverage.uvg.claimNumber", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.uvg.claimNumber') and answer.exists())" } ], "target": [ { "context": "coverage", "element": "identifier", "variable": "identifier", "contextType": "variable" }, { "context": "identifier", "element": "type", "variable": "typeid", "contextType": "variable" }, { "context": "typeid", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coverageidentifiertype" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "Claim" } ], "transform": "copy", "contextType": "variable" }, { "context": "identifier", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "where(linkId.value = 'coverage.uvg')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "coverage", "parameter": [ { "valueString": "Coverage" } ], "transform": "create", "contextType": "variable" }, { "context": "coverage", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "serviceRequest", "element": "insurance", "variable": "insurance", "contextType": "variable" }, { "context": "insurance", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "status", "parameter": [ { "valueString": "active" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "beneficiary", "variable": "subject", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "subject", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "type", "variable": "type", "contextType": "variable" }, { "context": "type", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "UVG" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "coveragevvg", "rule": [ { "name": "coverage.vvg.name", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.vvg.name') and answer.exists())" } ], "target": [ { "context": "coverage", "element": "payor", "variable": "payor", "contextType": "variable" }, { "context": "payor", "element": "reference", "variable": "refcontained", "contextType": "variable" }, { "context": "refcontained", "element": "value", "parameter": [ { "valueString": "#org" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "contained", "variable": "organization", "parameter": [ { "valueString": "Organization" } ], "transform": "create", "contextType": "variable" }, { "context": "organization", "element": "id", "parameter": [ { "valueString": "org" } ], "transform": "copy", "contextType": "variable" }, { "context": "organization", "element": "name", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "coverage.vvg.insuranceCardNumber", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.vvg.insuranceCardNumber') and answer.exists())" } ], "target": [ { "context": "coverage", "element": "identifier", "variable": "identifier", "contextType": "variable" }, { "context": "identifier", "element": "type", "variable": "typeid", "contextType": "variable" }, { "context": "typeid", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coverageidentifiertype" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "VeKa" } ], "transform": "copy", "contextType": "variable" }, { "context": "identifier", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "where(linkId.value = 'coverage.vvg')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "coverage", "parameter": [ { "valueString": "Coverage" } ], "transform": "create", "contextType": "variable" }, { "context": "coverage", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "serviceRequest", "element": "insurance", "variable": "insurance", "contextType": "variable" }, { "context": "insurance", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "status", "parameter": [ { "valueString": "active" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "beneficiary", "variable": "subject", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "subject", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "type", "variable": "type", "contextType": "variable" }, { "context": "type", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "VVG" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "coverageiv", "rule": [ { "name": "coverage.iv.verfuegungsnummer", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.iv.verfuegungsnummer') and answer.exists())" } ], "target": [ { "context": "coverage", "element": "identifier", "variable": "identifier", "contextType": "variable" }, { "context": "identifier", "element": "type", "variable": "typeid", "contextType": "variable" }, { "context": "typeid", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coverageidentifiertype" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "IV" } ], "transform": "copy", "contextType": "variable" }, { "context": "identifier", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "payor", "variable": "payor", "contextType": "variable" }, { "context": "payor", "element": "reference", "variable": "refcontained", "contextType": "variable" }, { "context": "refcontained", "element": "value", "parameter": [ { "valueString": "#org" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "contained", "variable": "organization", "parameter": [ { "valueString": "Organization" } ], "transform": "create", "contextType": "variable" }, { "context": "organization", "element": "id", "parameter": [ { "valueString": "org" } ], "transform": "copy", "contextType": "variable" }, { "context": "organization", "element": "name", "parameter": [ { "valueString": "IV" } ], "transform": "copy", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "where(linkId.value = 'coverage.iv')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "coverage", "parameter": [ { "valueString": "Coverage" } ], "transform": "create", "contextType": "variable" }, { "context": "coverage", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "serviceRequest", "element": "insurance", "variable": "insurance", "contextType": "variable" }, { "context": "insurance", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "status", "parameter": [ { "valueString": "active" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "beneficiary", "variable": "subject", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "subject", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "type", "variable": "type", "contextType": "variable" }, { "context": "type", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "IVG" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "coveragemv", "rule": [ { "name": "coverage.mv.versichertennummer", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.mv.versichertennummer') and answer.exists())" } ], "target": [ { "context": "coverage", "element": "identifier", "variable": "identifier", "contextType": "variable" }, { "context": "identifier", "element": "type", "variable": "typeid", "contextType": "variable" }, { "context": "typeid", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coverageidentifiertype" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "MV" } ], "transform": "copy", "contextType": "variable" }, { "context": "identifier", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "payor", "variable": "payor", "contextType": "variable" }, { "context": "payor", "element": "reference", "variable": "refcontained", "contextType": "variable" }, { "context": "refcontained", "element": "value", "parameter": [ { "valueString": "#org" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "contained", "variable": "organization", "parameter": [ { "valueString": "Organization" } ], "transform": "create", "contextType": "variable" }, { "context": "organization", "element": "id", "parameter": [ { "valueString": "org" } ], "transform": "copy", "contextType": "variable" }, { "context": "organization", "element": "name", "parameter": [ { "valueString": "MV" } ], "transform": "copy", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "where(linkId.value = 'coverage.mv')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "coverage", "parameter": [ { "valueString": "Coverage" } ], "transform": "create", "contextType": "variable" }, { "context": "coverage", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "serviceRequest", "element": "insurance", "variable": "insurance", "contextType": "variable" }, { "context": "insurance", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "status", "parameter": [ { "valueString": "active" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "beneficiary", "variable": "subject", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "subject", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "type", "variable": "type", "contextType": "variable" }, { "context": "type", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "MVG" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "self", "rule": [ { "name": "payor", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.self.patient') and answer.exists() and answer.value)" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "coverage", "parameter": [ { "valueString": "Coverage" } ], "transform": "create", "contextType": "variable" }, { "context": "coverage", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "serviceRequest", "element": "insurance", "variable": "insurance", "contextType": "variable" }, { "context": "insurance", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "status", "parameter": [ { "valueString": "active" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "beneficiary", "variable": "subject", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "subject", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "type", "variable": "type", "contextType": "variable" }, { "context": "type", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "Self" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "payor", "variable": "subject", "contextType": "variable" }, { "context": "subject", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "coverage.self.patientrelated.", "rule": [ { "name": "coverage.self.relatedPerson", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "(linkId.value = 'coverage.self.relatedPerson')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e5", "contextType": "variable" }, { "context": "e5", "element": "resource", "variable": "coverage", "parameter": [ { "valueString": "Coverage" } ], "transform": "create", "contextType": "variable" }, { "context": "coverage", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e5", "element": "fullUrl", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "serviceRequest", "element": "insurance", "variable": "insurance", "contextType": "variable" }, { "context": "insurance", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "status", "parameter": [ { "valueString": "active" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "beneficiary", "variable": "subject", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "subject", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "type", "variable": "type", "contextType": "variable" }, { "context": "type", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "Self" } ], "transform": "copy", "contextType": "variable" }, { "context": "bundle", "element": "entry", "variable": "e6", "contextType": "variable" }, { "context": "e6", "element": "resource", "variable": "relatedPerson", "parameter": [ { "valueString": "RelatedPerson" } ], "transform": "create", "contextType": "variable" }, { "context": "relatedPerson", "element": "id", "variable": "uuid6", "transform": "uuid", "contextType": "variable" }, { "context": "e6", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid6" } ], "transform": "append", "contextType": "variable" }, { "context": "coverage", "element": "payor", "variable": "subject", "contextType": "variable" }, { "context": "subject", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %relatedPerson.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "relatedPerson", "element": "patient", "variable": "reference", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" } ], "dependent": [ { "name": "CoverageRelatedPersonItems", "variable": [ "item", "relatedPerson" ] } ] } ], "source": [ { "context": "item", "element": "item", "variable": "item2", "condition": "((linkId.value = 'coverage.self.patientRelatedPerson') and answer.exists() and answer.value)" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "where(linkId.value = 'coverage.self')" } ] }, { "name": "coveragevvg", "rule": [ { "name": "coverage.other.name", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.other.name') and answer.exists())" } ], "target": [ { "context": "coverage", "element": "payor", "variable": "payor", "contextType": "variable" }, { "context": "payor", "element": "reference", "variable": "refcontained", "contextType": "variable" }, { "context": "refcontained", "element": "value", "parameter": [ { "valueString": "#org" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "contained", "variable": "organization", "parameter": [ { "valueString": "Organization" } ], "transform": "create", "contextType": "variable" }, { "context": "organization", "element": "id", "parameter": [ { "valueString": "org" } ], "transform": "copy", "contextType": "variable" }, { "context": "organization", "element": "name", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "coverage.other.id", "source": [ { "context": "item", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.other.id') and answer.exists())" } ], "target": [ { "context": "coverage", "element": "identifier", "variable": "identifier", "contextType": "variable" }, { "context": "identifier", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "where(linkId.value = 'coverage.other')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "coverage", "parameter": [ { "valueString": "Coverage" } ], "transform": "create", "contextType": "variable" }, { "context": "coverage", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "serviceRequest", "element": "insurance", "variable": "insurance", "contextType": "variable" }, { "context": "insurance", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "status", "parameter": [ { "valueString": "active" } ], "transform": "copy", "contextType": "variable" }, { "context": "coverage", "element": "beneficiary", "variable": "subject", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "subject", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "coverage", "element": "type", "variable": "type", "contextType": "variable" }, { "context": "type", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "Other" } ], "transform": "copy", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "patient", "type": "Patient" }, { "mode": "target", "name": "serviceRequest", "type": "ServiceRequest" } ], "typeMode": "none" }, { "name": "CoverageRelatedPersonItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.self.relatedPerson.familyName') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "name", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.self.relatedPerson.givenName') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "name", "contextType": "variable" }, { "context": "name", "element": "given", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "phone", "rule": [ { "name": "coverage.self.relatedPerson.phone", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "relatedPerson", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.self.relatedPerson.phone') and answer.exists())" } ] }, { "name": "coverage.self.relatedPerson.email", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.self.relatedPerson.email') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item.answer", "rule": [ { "name": "coverage.self.relatedPerson.streetAddressLine", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "address", "element": "line", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.self.relatedPerson.streetAddressLine') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" } ] }, { "name": "coverage.self.relatedPerson.postalCode", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.self.relatedPerson.postalCode') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "postalCode", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "coverage.self.relatedPerson.city", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.self.relatedPerson.city') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "city", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "coverage.self.relatedPerson.country", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'coverage.self.relatedPerson.country') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "country", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "relatedPerson", "type": "RelatedPerson" } ], "typeMode": "none" }, { "name": "SenderAuthorPractitionerItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.practitioner.familyName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.practitioner.givenName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "given", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.practitioner.title", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.practitioner.title') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "prefix", "variable": "prefix", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "prefix", "element": "extension", "variable": "ext", "contextType": "variable" }, { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier" } ], "transform": "copy", "contextType": "variable" }, { "context": "ext", "element": "value", "variable": "value", "parameter": [ { "valueString": "code" } ], "transform": "create", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "AC" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "sender.author.practitioner.gln", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.practitioner.gln') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.51.1.3" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "recsender.author.practitioner.zsr", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.practitioner.zsr') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.16.756.5.30.1.123.100.2.1.1" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.practitioner.phone", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.practitioner.phone') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.practitioner.email", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.practitioner.email') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitioner", "type": "Practitioner" } ], "typeMode": "none" }, { "name": "SenderAuthorOrganizationItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.organization.name') and answer.exists())" } ], "target": [ { "context": "organization", "element": "name", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.organization.gln", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.organization.gln') and answer.exists())" } ], "target": [ { "context": "organization", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.51.1.3" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.organization.zsr", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.organization.zsr') and answer.exists())" } ], "target": [ { "context": "organization", "element": "identifier", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "urn:oid:2.16.756.5.30.1.123.100.2.1.1" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item.answer", "rule": [ { "name": "sender.author.organization.streetAddressLine", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "address", "element": "line", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.organization.streetAddressLine') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" } ] }, { "name": "sender.author.organization.postalCode", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.organization.postalCode') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "postalCode", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.organization.city", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.organization.city') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "city", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.organization.country", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.author.organization.country') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "country", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "organization", "type": "Organization" } ], "typeMode": "none" }, { "name": "SenderAuthorItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'sender.author.practitioner')" } ], "dependent": [ { "name": "SenderAuthorPractitionerItems", "variable": [ "item", "practitioner" ] } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'sender.author.organization')" } ], "dependent": [ { "name": "SenderAuthorOrganizationItems", "variable": [ "item", "organization" ] } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitionerRole", "type": "practitionerRole" }, { "mode": "target", "name": "practitioner", "type": "Practitioner" }, { "mode": "target", "name": "organization", "type": "Organization" } ], "typeMode": "none" }, { "name": "SenderDataEntererPractitionerItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.dataenterer.practitioner.familyName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.dataenterer.practitioner.givenName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "given", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.practitioner.phone", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.dataenterer.practitioner.phone') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sender.author.practitioner.email", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'sender.dataenterer.practitioner.email') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitioner", "type": "Practitioner" } ], "typeMode": "none" }, { "name": "SenderDataEntererItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'sender.dataenterer.practitioner')" } ], "dependent": [ { "name": "SenderDataEntererPractitionerItems", "variable": [ "item", "practitioner" ] } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitionerRole", "type": "practitionerRole" }, { "mode": "target", "name": "practitioner", "type": "Practitioner" }, { "mode": "target", "name": "organization", "type": "Organization" } ], "typeMode": "none" }, { "name": "ChExtEprDataEnterer", "rule": [ { "name": "url", "source": [ { "context": "src" } ], "target": [ { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-dataenterer" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "practitionerRole", "source": [ { "context": "src" } ], "target": [ { "context": "ext", "element": "extension", "variable": "ext", "contextType": "variable" }, { "context": "ext", "element": "url", "parameter": [ { "valueString": "enterer" } ], "transform": "copy", "contextType": "variable" }, { "context": "ext", "element": "value", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %practitionerRole.id" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitionerRole", "type": "PractitionerRole" }, { "mode": "target", "name": "ext", "type": "Extension" } ], "typeMode": "none" }, { "name": "SenderAuthorInit", "rule": [ { "name": "sender", "rule": [ { "name": "sender.author", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'sender.author')" } ], "dependent": [ { "name": "SenderAuthorItems", "variable": [ "item", "practitionerRole", "practitioner", "organization" ] } ] }, { "name": "sender.dataenterer", "rule": [ { "name": "sender.dataenterer.items", "rule": [ { "name": "data", "source": [ { "context": "item" } ], "dependent": [ { "name": "SenderDataEntererItems", "variable": [ "item", "practitionerRoleDataEnterer", "practitionerDataEnterer", "organization" ] } ] }, { "name": "extension", "source": [ { "context": "item" } ], "dependent": [ { "name": "ChExtEprDataEnterer", "variable": [ "item", "practitionerRoleDataEnterer", "extension" ] } ] } ], "source": [ { "context": "item" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "practitionerRoleDataEnterer", "parameter": [ { "valueString": "PractitionerRole" } ], "transform": "create", "contextType": "variable" }, { "context": "practitionerRoleDataEnterer", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid4" } ], "transform": "append", "contextType": "variable" }, { "context": "composition", "element": "extension", "variable": "extension", "contextType": "variable" }, { "context": "bundle", "element": "entry", "variable": "e5", "contextType": "variable" }, { "context": "e5", "element": "resource", "variable": "practitionerDataEnterer", "parameter": [ { "valueString": "Practitioner" } ], "transform": "create", "contextType": "variable" }, { "context": "practitionerDataEnterer", "element": "id", "variable": "uuid5", "transform": "uuid", "contextType": "variable" }, { "context": "e5", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid5" } ], "transform": "append", "contextType": "variable" }, { "context": "practitionerRoleDataEnterer", "element": "practitioner", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid5" } ], "transform": "append", "contextType": "variable" }, { "context": "practitionerRoleDataEnterer", "element": "organization", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid3" } ], "transform": "append", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'sender.dataenterer')" } ] } ], "source": [ { "context": "src" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e", "contextType": "variable" }, { "context": "e", "element": "resource", "variable": "practitionerRole", "parameter": [ { "valueString": "PractitionerRole" } ], "transform": "create", "contextType": "variable" }, { "context": "practitionerRole", "element": "id", "variable": "uuid", "transform": "uuid", "contextType": "variable" }, { "context": "e", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid" } ], "transform": "append", "contextType": "variable" }, { "context": "bundle", "element": "entry", "variable": "e2", "contextType": "variable" }, { "context": "e2", "element": "resource", "variable": "practitioner", "parameter": [ { "valueString": "Practitioner" } ], "transform": "create", "contextType": "variable" }, { "context": "practitioner", "element": "id", "variable": "uuid2", "transform": "uuid", "contextType": "variable" }, { "context": "e2", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid2" } ], "transform": "append", "contextType": "variable" }, { "context": "bundle", "element": "entry", "variable": "e3", "contextType": "variable" }, { "context": "e3", "element": "resource", "variable": "organization", "parameter": [ { "valueString": "Organization" } ], "transform": "create", "contextType": "variable" }, { "context": "organization", "element": "id", "variable": "uuid3", "transform": "uuid", "contextType": "variable" }, { "context": "e3", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid3" } ], "transform": "append", "contextType": "variable" }, { "context": "composition", "element": "author", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid" } ], "transform": "append", "contextType": "variable" }, { "context": "serviceRequest", "element": "requester", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid" } ], "transform": "append", "contextType": "variable" }, { "context": "practitionerRole", "element": "practitioner", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid2" } ], "transform": "append", "contextType": "variable" }, { "context": "practitionerRole", "element": "organization", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid3" } ], "transform": "append", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "composition", "type": "Composition" }, { "mode": "target", "name": "serviceRequest", "type": "ServiceRequest" } ], "typeMode": "none" }, { "name": "ReceiverCopyRelatedPersonItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.relatedPerson.familyName') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "name", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.relatedPerson.givenName') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "name", "contextType": "variable" }, { "context": "name", "element": "given", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "phone", "rule": [ { "name": "receiverCopy.relatedPerson.phone", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "relatedPerson", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.relatedPerson.phone') and answer.exists())" } ] }, { "name": "receiverCopy.relatedPerson.email", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.relatedPerson.email') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item.answer", "rule": [ { "name": "receiverCopy.relatedPerson.streetAddressLine", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "address", "element": "line", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.relatedPerson.streetAddressLine') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" } ] }, { "name": "receiverCopy.relatedPerson.postalCode", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.relatedPerson.postalCode') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "postalCode", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiverCopy.relatedPerson.city", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.relatedPerson.city') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "city", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiverCopy.relatedPerson.country", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.relatedPerson.country') and answer.exists())" } ], "target": [ { "context": "relatedPerson", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "country", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "relatedPerson", "type": "RelatedPerson" } ], "typeMode": "none" }, { "name": "ReceiverCopyPractitionerItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.practitionerRole.practitioner.familyName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "family", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.practitionerRole.practitioner.givenName') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "given", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiverCopy.practitionerRole.practitioner.title", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.practitionerRole.practitioner.title') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "name", "listMode": [ "share" ], "variable": "name", "listRuleId": "practitionerName", "contextType": "variable" }, { "context": "name", "element": "prefix", "variable": "prefix", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "prefix", "element": "extension", "variable": "ext", "contextType": "variable" }, { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier" } ], "transform": "copy", "contextType": "variable" }, { "context": "ext", "element": "value", "variable": "value", "parameter": [ { "valueString": "code" } ], "transform": "create", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "AC" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "receiverCopy.practitionerRole.practitioner.phone", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.practitionerRole.practitioner.phone') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiverCopy.practitionerRole.practitioner.email", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.practitionerRole.practitioner.email') and answer.exists())" } ], "target": [ { "context": "practitioner", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "practitioner", "type": "Practitioner" } ], "typeMode": "none" }, { "name": "ReceiverCopyOrganizationItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.practitionerRole.organization.name') and answer.exists())" } ], "target": [ { "context": "organization", "element": "name", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "item.answer", "rule": [ { "name": "receiverCopy.practitionerRole.organization.streetAddressLine", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "address", "element": "line", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.practitionerRole.organization.streetAddressLine') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" } ] }, { "name": "receiverCopy.practitionerRole.organization.postalCode", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.practitionerRole.organization.postalCode') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "postalCode", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiverCopy.practitionerRole.organization.city", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.practitionerRole.organization.city') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "city", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "receiverCopy.practitionerRole.organization.country", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "((linkId.value = 'receiverCopy.practitionerRole.organization.country') and answer.exists())" } ], "target": [ { "context": "organization", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "country", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "organization", "type": "Organization" } ], "typeMode": "none" }, { "name": "ReceiverCopyPractitionerRoleItems", "rule": [ { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'receiverCopy.practitionerRole.practitioner')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e2", "contextType": "variable" }, { "context": "e2", "element": "resource", "variable": "practitioner", "parameter": [ { "valueString": "Practitioner" } ], "transform": "create", "contextType": "variable" }, { "context": "practitioner", "element": "id", "variable": "uuid2", "transform": "uuid", "contextType": "variable" }, { "context": "practitionerRole", "element": "practitioner", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid2" } ], "transform": "append", "contextType": "variable" }, { "context": "e2", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid2" } ], "transform": "append", "contextType": "variable" } ], "dependent": [ { "name": "ReceiverCopyPractitionerItems", "variable": [ "item", "practitioner" ] } ] }, { "name": "item", "source": [ { "context": "src", "element": "item", "variable": "item", "condition": "(linkId.value = 'receiverCopy.practitionerRole.organization')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e3", "contextType": "variable" }, { "context": "e3", "element": "resource", "variable": "organization", "parameter": [ { "valueString": "Organization" } ], "transform": "create", "contextType": "variable" }, { "context": "organization", "element": "id", "variable": "uuid3", "transform": "uuid", "contextType": "variable" }, { "context": "practitionerRole", "element": "organization", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid3" } ], "transform": "append", "contextType": "variable" }, { "context": "e3", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid3" } ], "transform": "append", "contextType": "variable" } ], "dependent": [ { "name": "ReceiverCopyOrganizationItems", "variable": [ "item", "organization" ] } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "practitionerRole", "type": "practitionerRole" } ], "typeMode": "none" }, { "name": "ExtOrfCopyReceiverPatient", "rule": [ { "name": "url", "source": [ { "context": "src" } ], "target": [ { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-copyreceiver" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "patient", "source": [ { "context": "src" } ], "target": [ { "context": "ext", "element": "value", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "patient", "type": "Patient" }, { "mode": "target", "name": "ext", "type": "Extension" } ], "typeMode": "none" }, { "name": "ExtOrfCopyReceiver", "rule": [ { "name": "url", "source": [ { "context": "src" } ], "target": [ { "context": "ext", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-copyreceiver" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "organization", "source": [ { "context": "src" } ], "target": [ { "context": "ext", "element": "value", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %res.id" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "src", "type": "BackboneElement" }, { "mode": "target", "name": "res" }, { "mode": "target", "name": "ext", "type": "Extension" } ], "typeMode": "none" }, { "name": "ReceiverCopy", "rule": [ { "name": "receiverCopyPractitionerRole1", "rule": [ { "name": "data", "source": [ { "context": "item" } ], "dependent": [ { "name": "ReceiverCopyPractitionerRoleItems", "variable": [ "item", "bundle", "practitionerrole" ] } ] }, { "name": "extension", "source": [ { "context": "item" } ], "dependent": [ { "name": "ExtOrfCopyReceiver", "variable": [ "item", "practitionerrole", "extension" ] } ] } ], "source": [ { "context": "grp", "element": "item", "variable": "item", "condition": "(linkId = 'receiverCopy.practitionerRole')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "practitionerrole", "parameter": [ { "valueString": "PractitionerRole" } ], "transform": "create", "contextType": "variable" }, { "context": "composition", "element": "extension", "variable": "extension", "contextType": "variable" }, { "context": "practitionerrole", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid4" } ], "transform": "append", "contextType": "variable" } ] }, { "name": "receiverCopyPractitionerRole2", "rule": [ { "name": "extension", "source": [ { "context": "item" } ], "dependent": [ { "name": "ExtOrfCopyReceiver", "variable": [ "item", "patient", "extension" ] } ] } ], "source": [ { "context": "grp", "element": "item", "variable": "item", "condition": "(linkId = 'receiverCopy.patient')" } ], "target": [ { "context": "composition", "element": "extension", "variable": "extension", "contextType": "variable" } ] }, { "name": "receiverCopyPractitionerRole3", "rule": [ { "name": "data", "source": [ { "context": "item" } ], "dependent": [ { "name": "ReceiverCopyRelatedPersonItems", "variable": [ "item", "relatedPerson" ] } ] }, { "name": "extension", "source": [ { "context": "item" } ], "dependent": [ { "name": "ExtOrfCopyReceiver", "variable": [ "item", "relatedPerson", "extension" ] } ] } ], "source": [ { "context": "grp", "element": "item", "variable": "item", "condition": "(linkId = 'receiverCopy.relatedPerson')" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "relatedPerson", "parameter": [ { "valueString": "RelatedPerson" } ], "transform": "create", "contextType": "variable" }, { "context": "composition", "element": "extension", "variable": "extension", "contextType": "variable" }, { "context": "relatedPerson", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "relatedPerson", "element": "patient", "variable": "reference", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid4" } ], "transform": "append", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "grp", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "patient", "type": "Patient" }, { "mode": "target", "name": "composition", "type": "Composition" }, { "mode": "target", "name": "serviceRequest", "type": "ServiceRequest" } ], "typeMode": "none" }, { "name": "Appointment", "rule": [ { "name": "Appointment", "rule": [ { "name": "proposed", "rule": [ { "name": "appointment.requestedPeriod", "rule": [ { "name": "appointment.requestedPeriod.start", "rule": [ { "name": "appointment.requestedPeriod.end.if.not.same.as.start", "source": [ { "context": "itemp", "element": "item", "variable": "item3", "condition": "((linkId.value = 'appointment.requestedPeriod.end') and answer.exists())" } ], "target": [ { "context": "requestedPeriod", "element": "end", "parameter": [ { "valueString": "item3.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "itemp", "element": "item", "variable": "item2", "condition": "((linkId.value = 'appointment.requestedPeriod.start') and answer.exists())" } ], "target": [ { "context": "appointment", "element": "requestedPeriod", "variable": "requestedPeriod", "contextType": "variable" }, { "context": "requestedPeriod", "element": "start", "parameter": [ { "valueString": "item2.answer.value" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "requestedPeriod", "element": "end", "parameter": [ { "valueString": "item2.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "grp", "element": "item", "variable": "itemp", "condition": "(linkId.value = 'appointment.requestedPeriod')" } ] } ], "source": [ { "context": "grp", "element": "item", "variable": "item", "condition": "((linkId.value = 'appointment.status') and (answer.value.code = 'proposed'))" } ], "target": [ { "context": "appointment", "element": "status", "parameter": [ { "valueString": "item.answer.value.code" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "pendingorbooked", "rule": [ { "name": "appointment.startend", "rule": [ { "name": "appointment.start", "rule": [ { "name": "appointment.end.if.not.same.as.start", "source": [ { "context": "itemp", "element": "item", "variable": "item3", "condition": "((linkId.value = 'appointment.requestedPeriod.end') and answer.exists())" } ], "target": [ { "context": "appointment", "element": "end", "parameter": [ { "valueString": "item3.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "itemp", "element": "item", "variable": "item2", "condition": "((linkId.value = 'appointment.requestedPeriod.start') and answer.exists())" } ], "target": [ { "context": "appointment", "element": "start", "parameter": [ { "valueString": "item2.answer.value" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "appointment", "element": "end", "parameter": [ { "valueString": "item2.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "grp", "element": "item", "variable": "itemp", "condition": "(linkId.value = 'appointment.requestedPeriod')" } ] } ], "source": [ { "context": "grp", "element": "item", "variable": "item", "condition": "((linkId.value = 'appointment.status') and ((answer.value.code = 'pending') or (answer.value.code = 'booked')))" } ], "target": [ { "context": "appointment", "element": "status", "parameter": [ { "valueString": "item.answer.value.code" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "appointment.patientInstruction", "source": [ { "context": "grp", "element": "item", "variable": "item", "condition": "((linkId.value = 'appointment.patientInstruction') and answer.exists())" } ], "target": [ { "context": "appointment", "element": "patientInstruction", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "appointment.location", "rule": [ { "name": "location", "rule": [ { "name": "item", "source": [ { "context": "item", "element": "item", "variable": "item3", "condition": "((linkId.value = 'appointment.location.name') and answer.exists())" } ], "target": [ { "context": "location", "element": "name", "parameter": [ { "valueString": "item3.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "appointment.location.phone", "source": [ { "context": "item", "element": "item", "variable": "item3", "condition": "((linkId.value = 'appointment.location.phone') and answer.exists())" } ], "target": [ { "context": "location", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "phone" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item3.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "appointment.location.email", "source": [ { "context": "item", "element": "item", "variable": "item3", "condition": "((linkId.value = 'appointment.location.email') and answer.exists())" } ], "target": [ { "context": "location", "element": "telecom", "variable": "value", "contextType": "variable" }, { "context": "value", "element": "system", "parameter": [ { "valueString": "email" } ], "transform": "copy", "contextType": "variable" }, { "context": "value", "element": "value", "parameter": [ { "valueString": "item3.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "appointment.location.streetAddressLine", "rule": [ { "name": "line", "source": [ { "context": "item", "element": "answer", "variable": "answer" } ], "target": [ { "context": "address", "element": "line", "parameter": [ { "valueString": "answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "item", "element": "item", "variable": "item3", "condition": "((linkId.value = 'appointment.location.streetAddressLine') and answer.exists())" } ], "target": [ { "context": "location", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" } ] }, { "name": "appointment.location.postalCode", "source": [ { "context": "item", "element": "item", "variable": "item3", "condition": "((linkId.value = 'appointment.location.postalCode') and answer.exists())" } ], "target": [ { "context": "location", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "postalCode", "parameter": [ { "valueString": "item3.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "appointment.location.city", "source": [ { "context": "item", "element": "item", "variable": "item3", "condition": "((linkId.value = 'appointment.location.city') and answer.exists())" } ], "target": [ { "context": "location", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "city", "parameter": [ { "valueString": "item3.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "appointment.location.country", "source": [ { "context": "item", "element": "item", "variable": "item3", "condition": "((linkId.value = 'appointment.location.country') and answer.exists())" } ], "target": [ { "context": "location", "element": "address", "listMode": [ "share" ], "variable": "address", "listRuleId": "orgAddress", "contextType": "variable" }, { "context": "address", "element": "country", "parameter": [ { "valueString": "item3.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "item" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e5", "contextType": "variable" }, { "context": "e5", "element": "resource", "variable": "location", "parameter": [ { "valueString": "Location" } ], "transform": "create", "contextType": "variable" }, { "context": "location", "element": "id", "variable": "uuid5", "transform": "uuid", "contextType": "variable" }, { "context": "e5", "element": "fullUrl", "parameter": [ { "valueString": "'urn:uuid:' + %uuid5" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "appointment", "element": "participant", "variable": "participant", "contextType": "variable" }, { "context": "participant", "element": "status", "parameter": [ { "valueString": "tentative" } ], "transform": "copy", "contextType": "variable" }, { "context": "participant", "element": "actor", "variable": "actor", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "actor", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %location.id" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "grp", "element": "item", "variable": "item", "condition": "(linkId.value = 'appointment.location')" } ] } ], "source": [ { "context": "grp", "element": "item" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e4", "contextType": "variable" }, { "context": "e4", "element": "resource", "variable": "appointment", "parameter": [ { "valueString": "Appointment" } ], "transform": "create", "contextType": "variable" }, { "context": "appointment", "element": "id", "variable": "uuid4", "transform": "uuid", "contextType": "variable" }, { "context": "e4", "element": "fullUrl", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "serviceRequest", "element": "extension", "variable": "extension", "contextType": "variable" }, { "context": "extension", "element": "url", "parameter": [ { "valueString": "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-locationandtime" } ], "transform": "copy", "contextType": "variable" }, { "context": "extension", "element": "value", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %uuid4" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "grp", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "composition", "type": "Composition" }, { "mode": "target", "name": "serviceRequest", "type": "ServiceRequest" } ], "typeMode": "none" }, { "name": "PreviousResults", "rule": [ { "name": "item", "rule": [ { "name": "answer", "rule": [ { "name": "media", "source": [ { "type": "Attachment", "context": "answer", "element": "value", "variable": "attachment" } ], "target": [ { "context": "bundle", "element": "entry", "variable": "e", "contextType": "variable" }, { "context": "e", "element": "resource", "variable": "media", "parameter": [ { "valueString": "Media" } ], "transform": "create", "contextType": "variable" }, { "context": "media", "element": "id", "variable": "uuid", "transform": "uuid", "contextType": "variable" }, { "context": "media", "element": "status", "parameter": [ { "valueString": "completed" } ], "transform": "copy", "contextType": "variable" }, { "context": "e", "element": "fullUrl", "parameter": [ { "valueString": "urn:uuid:" }, { "valueId": "uuid" } ], "transform": "append", "contextType": "variable" }, { "context": "media", "element": "content", "parameter": [ { "valueId": "attachment" } ], "transform": "copy", "contextType": "variable" }, { "context": "serviceRequest", "element": "supportingInfo", "variable": "supportingInfo", "contextType": "variable" }, { "context": "supportingInfo", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + uuid" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "item", "element": "answer", "variable": "answer" } ] } ], "source": [ { "context": "grp", "element": "item", "variable": "item", "condition": "((linkId = 'previousResults.attachment') and answer.exists())" } ] } ], "input": [ { "mode": "source", "name": "grp", "type": "BackboneElement" }, { "mode": "target", "name": "bundle", "type": "Bundle" }, { "mode": "target", "name": "serviceRequest", "type": "ServiceRequest" } ], "typeMode": "none" }, { "name": "Note", "rule": [ { "name": "note.text", "source": [ { "context": "grp", "element": "item", "variable": "item", "condition": "((linkId = 'note.text') and answer.exists())" } ], "target": [ { "context": "serviceRequest", "element": "note", "variable": "note", "contextType": "variable" }, { "context": "note", "element": "text", "parameter": [ { "valueString": "item.answer.value" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "grp", "type": "BackboneElement" }, { "mode": "target", "name": "serviceRequest", "type": "ServiceRequest" } ], "typeMode": "none" }, { "name": "QrToBundle", "rule": [ { "name": "id", "source": [ { "context": "qr" } ], "target": [ { "context": "bundle", "element": "id", "transform": "uuid", "contextType": "variable" } ] }, { "name": "type", "source": [ { "context": "qr" } ], "target": [ { "context": "bundle", "element": "type", "parameter": [ { "valueString": "document" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "composition", "source": [ { "context": "qr" } ], "dependent": [ { "name": "OrfComposition", "variable": [ "qr", "q", "composition", "patient", "questionnaireresp", "servicerequest", "bundle" ] } ] }, { "name": "qrgroups", "source": [ { "context": "qr" } ], "dependent": [ { "name": "QrToGroups", "variable": [ "qr", "patient", "bundle", "composition", "servicerequest" ] } ] } ], "input": [ { "mode": "source", "name": "qr", "type": "QuestionnaireResponse" }, { "mode": "target", "name": "q", "type": "Questionnaire" }, { "mode": "target", "name": "patient", "type": "Patient" }, { "mode": "target", "name": "questionnaireresp", "type": "QuestionnaireResponseTarget" }, { "mode": "target", "name": "servicerequest", "type": "ServiceRequest" }, { "mode": "target", "name": "composition", "type": "Composition" }, { "mode": "target", "name": "bundle", "type": "Bundle" } ], "typeMode": "none" }, { "name": "OrfComposition", "rule": [ { "name": "status", "source": [ { "context": "qr" } ], "target": [ { "context": "tgt", "element": "status", "parameter": [ { "valueString": "final" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "subject", "source": [ { "context": "qr" } ], "target": [ { "context": "tgt", "element": "subject", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "sections", "source": [ { "context": "qr" } ], "target": [ { "context": "tgt", "element": "section", "variable": "tgtSection", "contextType": "variable" }, { "context": "tgtSection", "element": "title", "parameter": [ { "valueString": "Order-Referral" } ], "transform": "copy", "contextType": "variable" }, { "context": "tgtSection", "element": "code", "variable": "code", "contextType": "variable" }, { "context": "code", "element": "coding", "variable": "coding", "contextType": "variable" }, { "context": "coding", "element": "system", "parameter": [ { "valueString": "http://loinc.org" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "code", "parameter": [ { "valueString": "93037-0" } ], "transform": "copy", "contextType": "variable" }, { "context": "coding", "element": "display", "parameter": [ { "valueString": "Portable medical order form" } ], "transform": "copy", "contextType": "variable" }, { "context": "tgtSection", "element": "entry", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %questionnaireresp.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "tgtSection", "element": "entry", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %servicerequest.id" } ], "transform": "evaluate", "contextType": "variable" }, { "context": "tgtSection", "element": "entry", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %q.id" } ], "transform": "evaluate", "contextType": "variable" } ] }, { "name": "servicerequest", "source": [ { "context": "qr" } ], "target": [ { "context": "servicerequest", "element": "status", "parameter": [ { "valueString": "active" } ], "transform": "copy", "contextType": "variable" }, { "context": "servicerequest", "element": "intent", "parameter": [ { "valueString": "order" } ], "transform": "copy", "contextType": "variable" }, { "context": "servicerequest", "element": "subject", "variable": "reference", "parameter": [ { "valueString": "Reference" } ], "transform": "create", "contextType": "variable" }, { "context": "reference", "element": "reference", "parameter": [ { "valueString": "'urn:uuid:' + %patient.id" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "input": [ { "mode": "source", "name": "qr", "type": "QuestionnaireResponse" }, { "mode": "target", "name": "q", "type": "Questionnaire" }, { "mode": "target", "name": "tgt", "type": "Composition" }, { "mode": "target", "name": "patient", "type": "Patient" }, { "mode": "target", "name": "questionnaireresp", "type": "QuestionnaireResponseTarget" }, { "mode": "target", "name": "servicerequest", "type": "ServiceRequest" }, { "mode": "target", "name": "bundle", "type": "Bundle" } ], "typeMode": "none" } ], "publisher": "HL7 Switzerland", "jurisdiction": [ { "coding": [ { "code": "CH", "system": "urn:iso:std:iso:3166" } ] } ], "name": "OrfQrToBundle", "copyright": "CC0-1.0", "type": null, "experimental": null, "resourceType": "StructureMap", "title": null, "package_version": "2.0.0-ballot", "structure": [ { "url": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse", "mode": "source", "alias": "QuestionnaireResponse" }, { "url": "http://hl7.org/fhir/StructureDefinition/BackboneElement", "mode": "source", "alias": "BackboneElement" }, { "url": "http://hl7.org/fhir/StructureDefinition/Bundle", "mode": "target", "alias": "Bundle" }, { "url": "http://hl7.org/fhir/StructureDefinition/Composition", "mode": "target", "alias": "Composition" }, { "url": "http://hl7.org/fhir/StructureDefinition/Patient", "mode": "target", "alias": "Patient" }, { "url": "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "mode": "target", "alias": "RelatedPerson" }, { "url": "http://hl7.org/fhir/StructureDefinition/Organization", "mode": "target", "alias": "Organization" }, { "url": "http://hl7.org/fhir/StructureDefinition/Practitioner", "mode": "target", "alias": "Practitioner" }, { "url": "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "mode": "target", "alias": "PractitionerRole" }, { "url": "http://hl7.org/fhir/StructureDefinition/ServiceRequest", "mode": "target", "alias": "ServiceRequest" }, { "url": "http://hl7.org/fhir/StructureDefinition/Extension", "mode": "target", "alias": "Extension" }, { "url": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare", "mode": "target", "alias": "EpisodeOfCare" }, { "url": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse", "mode": "target", "alias": "QuestionnaireResponseTarget" } ], "status": "draft", "id": "bb119807-1d29-4da2-8b30-10985b4e0780", "kind": null, "url": "http://fhir.ch/ig/ch-orf/StructureMap/OrfQrToBundle", "version": "2.0.0-ballot", "contact": [ { "name": "HL7 Switzerland", "telecom": [ { "value": "https://www.hl7.ch/", "system": "url" } ] } ] }