CH ORF (R4), published by HL7 Switzerland. This is not an authorized publication; it is the continuous build for version 1.1.0). This version is based on the current content of https://github.com/hl7ch/ch-orf/ and changes regularly. See the Directory of published versions
Draft as of 2023-03-08 |
@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
# - resource -------------------------------------------------------------------
a fhir:StructureMap ;
fhir:nodeRole fhir:treeRoot ;
fhir:id [ fhir:v "OrfQrToBundle"] ; #
fhir:meta [
fhir:versionId [ fhir:v "94" ] ;
fhir:lastUpdated [ fhir:v "2022-09-08T09:39:44.461+00:00"^^xsd:dateTime ]
] ; #
fhir:text [
fhir:status [ fhir:v "generated" ] ;
fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <pre>map "http://fhir.ch/ig/ch-orf/StructureMap/OrfQrToBundle" = "OrfQrToBundle"\n\n\n// ORF QuestionnaireResponse to Bundle\n// 2021-01-11 Oliver Egger, copyright ahdis ag, Apache License\n// QRF Questionnaire: http://build.fhir.org/ig/hl7ch/ch-orf/Questionnaire-order-referral-form.html\n// QRF QuestionnaireResponse: http://build.fhir.org/ig/hl7ch/ch-orf/QuestionnaireResponse-order-referral-form.xml.html\n// Bundle: http://build.fhir.org/ig/hl7ch/ch-orf/StructureDefinition-ch-orf-document.html\n\nuses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QuestionnaireResponse as source\nuses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target\nuses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as target\nuses "http://hl7.org/fhir/StructureDefinition/RelatedPerson" alias RelatedPerson as target\nuses "http://hl7.org/fhir/StructureDefinition/Organization" alias Organization as target\nuses "http://hl7.org/fhir/StructureDefinition/Practitioner" alias Practitioner as target\nuses "http://hl7.org/fhir/StructureDefinition/PractitionerRole" alias PractitionerRole as target\nuses "http://hl7.org/fhir/StructureDefinition/ServiceRequest" alias ServiceRequest as target\nuses "http://hl7.org/fhir/StructureDefinition/BackboneElement" alias BackboneElement as target\nuses "http://hl7.org/fhir/StructureDefinition/Extension" alias Extension as target\nuses "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare" alias EpisodeOfCare as target\n\ngroup OrfQrToBundle(source qr : QuestionnaireResponse, target bundle : Bundle) {\n qr -> bundle.identifier as documentIdentifier, documentIdentifier.system = 'urn:ietf:rfc:3986', uuid() as uuidDoc, documentIdentifier.value = append('urn:uuid:', uuidDoc) "documentIdentifier";\n qr as qrcp -> bundle.entry as e, e.resource = create('Composition') as composition, composition.id = uuid() as uuid, e.fullUrl = append('urn:uuid:', uuid), bundle.entry as e2, bundle.timestamp = (now()) as timestamp, composition.date = timestamp, composition.title = 'Order and Referral by Form', composition.type as type, type.coding as coding, coding.code = '419891008', coding.system = 'http://snomed.info/sct', composition.category as category, category.coding as coding, coding.code = '721963009', coding.system = 'http://snomed.info/sct', e2.resource = create('Patient') as patient, patient.id = uuid() as uuid2, e2.fullUrl = append('urn:uuid:', uuid2), bundle.entry as e4, e4.resource = qrcp as questionnaireresp, questionnaireresp.id = uuid() as uuid4, e4.fullUrl = append('urn:uuid:', uuid4), bundle.entry as e5, e5.resource = create('ServiceRequest') as servicerequest, servicerequest.id = uuid() as uuid5, e5.fullUrl = append('urn:uuid:', uuid5) then {\n qr.questionnaire as can -> bundle.entry as e6, e6.resource = (can.resolve()) as q, q.id = uuid() as uuid6, e6.fullUrl = append('urn:uuid:', uuid6) then QrToBundle(qr, q, patient, questionnaireresp, servicerequest, composition, bundle) "orfbundle";\n } "orfbundle";\n}\n\ngroup QrToGroups(source qr : QuestionnaireResponse, target patient : Patient, target bundle : Bundle, target composition : Composition, target serviceRequest : ServiceRequest) {\n qr.item as grp where linkId = 'order' then OrderItems(grp, bundle, composition, serviceRequest) "grporder";\n qr.item as grp where linkId = 'receiver' then ReceiverInit(grp, bundle, composition, serviceRequest) "receiver";\n qr.item as grp where linkId = 'initiator' then InitiatorInit(grp, bundle, patient, composition, serviceRequest) "grpinitiator";\n qr.item as grp where linkId = 'patient' then PatientItems(grp, bundle, patient, composition, serviceRequest) "grppatient";\n qr.item as grp where linkId = 'requestedEncounter' then RequestedEncounterItems(grp, bundle, patient, serviceRequest) "grprequestedencounter";\n qr.item as grp where linkId = 'coverage' then Coverage(grp, bundle, patient, serviceRequest) "grprequestedencounter";\n qr.item as grp where linkId = 'sender' then SenderAuthorInit(grp, bundle, composition, serviceRequest) "grpsender";\n qr.item as grp where linkId = 'receiverCopy' then ReceiverCopy(grp, bundle, patient, composition, serviceRequest) "grpsender";\n qr.item as grp where linkId = 'appointment' then Appointment(grp, bundle, composition, serviceRequest) "grpsender";\n qr.item as grp where linkId = 'previousResults' then PreviousResults(grp, bundle, serviceRequest) "previousResults";\n qr.item as grp where linkId = 'antecedentEpisodeOfCare' then AntecedentEpisodeOfCareInit(grp, bundle, patient, composition) "AntecedentEpisodeOfCareInit";\n qr.item as grp where linkId = 'consent' then Consent(grp, bundle, composition) "consent";\n qr.item as grp where linkId = 'note' then Note(grp, serviceRequest) "note";\n}\n\ngroup OrderItems(source src : BackboneElement, target bundle : Bundle, target composition, target serviceRequest : ServiceRequest) {\n src.item as item where ((linkId.value = 'order.precedentDocumentIdentifier') and answer.exists()) -> composition.extension as ext, ext.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-precedentdocument', ext.value = create('Identifier') as value, value.system = 'urn:ietf:rfc:3986', value.value = ('urn:uuid:' + item.answer.valueString) "precedentDocumentIdentifier";\n src.item as item where ((linkId.value = 'order.placerOrderIdentifier') and answer.exists()) -> serviceRequest.identifier as value share placer, value.type as type, type.coding as coding, coding.system = 'http://terminology.hl7.org/CodeSystem/v2-0203', coding.code = 'PLAC', value.value = (item.answer.valueString) "placerOrderIdentifier";\n src.item as item where ((linkId.value = 'order.placerOrderIdentifierDomain') and answer.exists()) -> serviceRequest.identifier as value share placer, value.system = (item.answer.valueString) "placerOrderIdentifierDomain";\n src.item as item where ((linkId.value = 'order.fillerOrderIdentifier') and answer.exists()) -> serviceRequest.identifier as value share filler, value.type as type, type.coding as coding, coding.system = 'http://terminology.hl7.org/CodeSystem/v2-0203', coding.code = 'FILL', value.value = (item.answer.valueString) "fillerOrderIdentifier";\n src.item as item where ((linkId.value = 'order.fillerOrderIdentifierDomain') and answer.exists()) -> serviceRequest.identifier as value share filler, value.system = (item.answer.valueString) "fillerOrderIdentifierDomain";\n src.item as item where ((linkId.value = 'order.dateTime') and answer.exists()) -> serviceRequest.authoredOn = (item.answer.value);\n src.item as item where ((linkId.value = 'order.priority') and answer.exists()) -> serviceRequest.priority = (item.answer.value.code);\n src.item as item where (linkId.value = 'order.notificationContactDocument') then {\n item -> bundle.entry as e4, e4.resource = create('PractitionerRole') as practitionerRoleDataEnterer, practitionerRoleDataEnterer.id = uuid() as uuid4, e4.fullUrl = append('urn:uuid:', uuid4), composition.extension as extension, bundle.entry as e5, e5.resource = create('Practitioner') as practitionerDataEnterer, practitionerDataEnterer.id = uuid() as uuid5, e5.fullUrl = append('urn:uuid:', uuid5), practitionerRoleDataEnterer.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid5) then {\n item then UrgentNotificationContactForRequestItems(item, practitionerRoleDataEnterer, practitionerDataEnterer) "data";\n item then ExtOrfUrgentNotificationContactForRequest(item, practitionerRoleDataEnterer, extension) "extension";\n } "items";\n } "notificationContactDocument";\n src.item as item where (linkId.value = 'order.notificationContactDocumentResponse') then {\n item -> bundle.entry as e4, e4.resource = create('PractitionerRole') as practitionerRoleDataEnterer, practitionerRoleDataEnterer.id = uuid() as uuid4, e4.fullUrl = append('urn:uuid:', uuid4), composition.extension as extension, bundle.entry as e5, e5.resource = create('Practitioner') as practitionerDataEnterer, practitionerDataEnterer.id = uuid() as uuid5, e5.fullUrl = append('urn:uuid:', uuid5), practitionerRoleDataEnterer.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid5) then {\n item then UrgentNotificationContactForResponseItems(item, practitionerRoleDataEnterer, practitionerDataEnterer) "data";\n item then ExtOrfUrgentNotificationContactForResponse(item, practitionerRoleDataEnterer, extension) "extension";\n } "items";\n } "notificationContactDocumentResponse";\n}\n\ngroup UrgentNotificationContactForRequestPractitionerItems(source src : BackboneElement, target practitioner : Practitioner) {\n src.item as item where ((linkId.value = 'order.notificationContactDocument.practitioner.familyName') and answer.exists()) -> practitioner.name as name share practitionerName, name.family = (item.answer.value);\n src.item as item where ((linkId.value = 'order.notificationContactDocument.practitioner.givenName') and answer.exists()) -> practitioner.name as name share practitionerName, name.given = (item.answer.value);\n src.item as item where ((linkId.value = 'order.notificationContactDocument.practitioner.title') and answer.exists()) -> practitioner.name as name share practitionerName, name.prefix = (item.answer.value) as prefix, prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier', ext.value = create('code') as value, value.value = 'AC' "title";\n src.item as item where ((linkId.value = 'order.notificationContactDocument.practitioner.phone') and answer.exists()) -> practitioner.telecom as value, value.system = 'phone', value.value = (item.answer.value) "phone";\n src.item as item where ((linkId.value = 'order.notificationContactDocument.practitioner.email') and answer.exists()) -> practitioner.telecom as value, value.system = 'email', value.value = (item.answer.value) "email";\n}\n\ngroup UrgentNotificationContactForRequestItems(source src : BackboneElement, target practitionerRole : practitionerRole, target practitioner : Practitioner) {\n src.item as item where (linkId.value = 'order.notificationContactDocument.practitioner') then UrgentNotificationContactForRequestPractitionerItems(item, practitioner);\n}\n\ngroup ExtOrfUrgentNotificationContactForRequest(source src : BackboneElement, target practitionerRole : PractitionerRole, target ext : Extension) {\n src -> ext.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-urgentnoficationcontactforthisdocument' "url";\n src -> ext.value = create('Reference') as reference, reference.reference = ('urn:uuid:' + %practitionerRole.id) "practitionerRole";\n}\n\ngroup UrgentNotificationContactForResponsePractitionerItems(source src : BackboneElement, target practitioner : Practitioner) {\n src.item as item where ((linkId.value = 'order.notificationContactDocumentResponse.practitioner.familyName') and answer.exists()) -> practitioner.name as name share practitionerName, name.family = (item.answer.value);\n src.item as item where ((linkId.value = 'order.notificationContactDocumentResponse.practitioner.givenName') and answer.exists()) -> practitioner.name as name share practitionerName, name.given = (item.answer.value);\n src.item as item where ((linkId.value = 'order.notificationContactDocumentResponse.practitioner.title') and answer.exists()) -> practitioner.name as name share practitionerName, name.prefix = (item.answer.value) as prefix, prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier', ext.value = create('code') as value, value.value = 'AC' "title";\n src.item as item where ((linkId.value = 'order.notificationContactDocumentResponse.practitioner.phone') and answer.exists()) -> practitioner.telecom as value, value.system = 'phone', value.value = (item.answer.value) "phone";\n src.item as item where ((linkId.value = 'order.notificationContactDocumentResponse.practitioner.email') and answer.exists()) -> practitioner.telecom as value, value.system = 'email', value.value = (item.answer.value) "email";\n}\n\ngroup UrgentNotificationContactForResponseItems(source src : BackboneElement, target practitionerRole : practitionerRole, target practitioner : Practitioner) {\n src.item as item where (linkId.value = 'order.notificationContactDocumentResponse.practitioner') then UrgentNotificationContactForResponsePractitionerItems(item, practitioner);\n}\n\ngroup ExtOrfUrgentNotificationContactForResponse(source src : BackboneElement, target practitionerRole : PractitionerRole, target ext : Extension) {\n src -> ext.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-urgentnoficationcontactfortheresponsetothisdocument' "url";\n src -> ext.value = create('Reference') as reference, reference.reference = ('urn:uuid:' + %practitionerRole.id) "practitionerRole";\n}\n\ngroup ReceiverPractitionerItems(source src : BackboneElement, target practitioner : Practitioner) {\n src.item as item where ((linkId.value = 'receiver.practitioner.familyName') and answer.exists()) -> practitioner.name as name share practitionerName, name.family = (item.answer.value);\n src.item as item where ((linkId.value = 'receiver.practitioner.givenName') and answer.exists()) -> practitioner.name as name share practitionerName, name.given = (item.answer.value);\n src.item as item where ((linkId.value = 'receiver.practitioner.title') and answer.exists()) -> practitioner.name as name share practitionerName, name.prefix = (item.answer.value) as prefix, prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier', ext.value = create('code') as value, value.value = 'AC' "title";\n src.item as item where ((linkId.value = 'receiver.practitioner.gln') and answer.exists()) -> practitioner.identifier as value, value.system = 'urn:oid:2.51.1.3', value.value = (item.answer.value) "gln";\n src.item as item where ((linkId.value = 'receiver.practitioner.zsr') and answer.exists()) -> practitioner.identifier as value, value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1', value.value = (item.answer.value) "zsr";\n src.item as item where ((linkId.value = 'receiver.practitioner.phone') and answer.exists()) -> practitioner.telecom as value, value.system = 'phone', value.value = (item.answer.value) "phone";\n src.item as item where ((linkId.value = 'receiver.practitioner.email') and answer.exists()) -> practitioner.telecom as value, value.system = 'email', value.value = (item.answer.value) "email";\n}\n\ngroup ReceiverOrganizationItems(source src : BackboneElement, target organization : Organization) {\n src.item as item where ((linkId.value = 'receiver.organization.name') and answer.exists()) -> organization.name = (item.answer.value);\n src.item as item where ((linkId.value = 'receiver.organization.gln') and answer.exists()) -> organization.identifier as value, value.system = 'urn:oid:2.51.1.3', value.value = (item.answer.value) "gln";\n src.item as item where ((linkId.value = 'receiver.organization.zsr') and answer.exists()) -> organization.identifier as value, value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1', value.value = (item.answer.value) "zsr";\n src.item as item where ((linkId.value = 'receiver.organization.streetAddressLine') and answer.exists()) -> organization.address as address share orgAddress then {\n item.answer as answer -> address.line = (answer.value) "streetAddressLine";\n } "answer";\n src.item as item where ((linkId.value = 'receiver.organization.postalCode') and answer.exists()) -> organization.address as address share orgAddress, address.postalCode = (item.answer.value) "postalCode";\n src.item as item where ((linkId.value = 'receiver.organization.city') and answer.exists()) -> organization.address as address share orgAddress, address.city = (item.answer.value) "city";\n src.item as item where ((linkId.value = 'receiver.organization.country') and answer.exists()) -> organization.address as address share orgAddress, address.country = (item.answer.value) "country";\n}\n\ngroup ReceiverItems(source src : BackboneElement, target bundle : Bundle, target practitionerRole : practitionerRole) {\n src.item as item where (linkId.value = 'receiver.practitioner') -> bundle.entry as e2, e2.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid2, practitionerRole.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid2), e2.fullUrl = append('urn:uuid:', uuid2) then ReceiverPractitionerItems(item, practitioner);\n src.item as item where (linkId.value = 'receiver.organization') -> bundle.entry as e3, e3.resource = create('Organization') as organization, organization.id = uuid() as uuid3, practitionerRole.organization = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid3), e3.fullUrl = append('urn:uuid:', uuid3) then ReceiverOrganizationItems(item, organization);\n}\n\ngroup Consent(source src : BackboneElement, target bundle : Bundle, target composition : Composition) {\n // TODO after https://github.com/hl7ch/ch-orf/issues/115\n src.item as item where ((linkId.value = 'consent.statement') and answer.exists()) -> bundle.entry as e, e.resource = create('Consent') as consent, consent.status = 'active', consent.scope as scope, scope.coding as coding, coding.code = 'treatment', coding.system = 'http://terminology.hl7.org/CodeSystem/consentscope', consent.category as category, category.coding as coding, coding.code = '59284-0', coding.system = 'http://loinc.org', consent.policyRule as policyRule, policyRule.coding as coding, coding.code = '385432009', coding.system = 'http://snomed.info/sct', consent.id = uuid() as uuid, e.fullUrl = append('urn:uuid:', uuid), composition.extension as ext, ext.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-patientconsent', ext.value = create('Reference') as reference, consent.extension as extcode, extcode.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-consentcode', extcode.value = create('CodeableConcept') as cc, cc.coding = (item.answer.value), reference.reference = append('urn:uuid:', uuid) then {\n item.answer as answer then {\n answer.item as item where ((linkId.value = 'consent.statement.note') and answer.exists()) -> consent.extension as extnote, extnote.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-consentnote', extnote.value = (item.answer.value) "note";\n };\n } "statement";\n}\n\ngroup ReceiverInit(source src : BackboneElement, target bundle : Bundle, target composition : Composition, target serviceRequest : ServiceRequest) {\n src -> bundle.entry as e, e.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid, e.fullUrl = append('urn:uuid:', uuid), composition.extension as ext, ext.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-receiver', ext.value = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid) then ReceiverItems(src, bundle, practitionerRole) "receiver";\n}\n\ngroup InitiatorItems(source src : BackboneElement, target bundle : Bundle, target patient : Patient, target ext : Extension) {\n src.item as item where ((linkId.value = 'initiator.personalrelation') and answer.exists()) -> ext.extension as extension, extension.url = 'ch-orf-personalrelation', extension.value = create('CodeableConcept') as cc, cc.coding = (item.answer.value) "personalrelation";\n src.item as item where ((linkId.value = 'initiator.legalrelation') and answer.exists()) -> ext.extension as extension, extension.url = 'ch-orf-legalrelation', extension.value = create('CodeableConcept') as cc, cc.coding = (item.answer.value) "legalrelation";\n src.item as item where (linkId = 'initiator.practitionerRole') -> bundle.entry as e4, e4.resource = create('PractitionerRole') as practitionerrole, ext.extension as extension, practitionerrole.id = uuid() as uuid4, extension.url = 'ch-orf-personorganization', extension.value = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid4), e4.fullUrl = append('urn:uuid:', uuid4) then {\n item then InitiatorPractitionerRoleItems(item, bundle, practitionerrole) "data";\n } "InitiatorPractitionerRoleItems";\n src.item as item where (linkId = 'initiator.relatedPerson') -> bundle.entry as e4, e4.resource = create('RelatedPerson') as relatedPerson, ext.extension as extension, extension.url = 'ch-orf-personorganization', extension.value = create('Reference') as reference, relatedPerson.id = uuid() as uuid4, reference.reference = append('urn:uuid:', uuid4), relatedPerson.patient as reference, reference.reference = ('urn:uuid:' + %patient.id), e4.fullUrl = append('urn:uuid:', uuid4) then {\n item then InitiatorRelatedPersonItems(item, relatedPerson) "data";\n } "relatedPerson";\n}\n\ngroup InitiatorRelatedPersonItems(source src : BackboneElement, target relatedPerson : RelatedPerson) {\n src.item as item where ((linkId.value = 'initiator.relatedPerson.familyName') and answer.exists()) -> relatedPerson.name as name share name, name.family = (item.answer.value);\n src.item as item where ((linkId.value = 'initiator.relatedPerson.givenName') and answer.exists()) -> relatedPerson.name as name share name, name.given = (item.answer.value);\n src.item as item where ((linkId.value = 'initiator.relatedPerson.phone') and answer.exists()) then {\n item.answer as answer -> relatedPerson.telecom as value, value.system = 'phone', value.value = (answer.value) "phone";\n } "phone";\n src.item as item where ((linkId.value = 'initiator.relatedPerson.email') and answer.exists()) -> relatedPerson.telecom as value, value.system = 'email', value.value = (item.answer.value) "email";\n src.item as item where ((linkId.value = 'initiator.relatedPerson.streetAddressLine') and answer.exists()) -> relatedPerson.address as address share orgAddress then {\n item.answer as answer -> address.line = (answer.value) "streetAddressLine";\n } "answer";\n src.item as item where ((linkId.value = 'initiator.relatedPerson.postalCode') and answer.exists()) -> relatedPerson.address as address share orgAddress, address.postalCode = (item.answer.value) "postalCode";\n src.item as item where ((linkId.value = 'initiator.relatedPerson.city') and answer.exists()) -> relatedPerson.address as address share orgAddress, address.city = (item.answer.value) "city";\n src.item as item where ((linkId.value = 'initiator.relatedPerson.country') and answer.exists()) -> relatedPerson.address as address share orgAddress, address.country = (item.answer.value) "country";\n}\n\ngroup InitiatorPractitionerRoleItems(source src : BackboneElement, target bundle : Bundle, target practitionerRole : practitionerRole) {\n src.item as item where (linkId.value = 'initiator.practitionerRole.practitioner') -> bundle.entry as e2, e2.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid2, practitionerRole.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid2), e2.fullUrl = append('urn:uuid:', uuid2) then InitiatorPractitionerItems(item, practitioner);\n src.item as item where (linkId.value = 'initiator.practitionerRole.organization') -> bundle.entry as e3, e3.resource = create('Organization') as organization, organization.id = uuid() as uuid3, practitionerRole.organization = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid3), e3.fullUrl = append('urn:uuid:', uuid3) then InitiatorOrganizationItems(item, organization);\n}\n\ngroup InitiatorPractitionerItems(source src : BackboneElement, target practitioner : Practitioner) {\n src.item as item where ((linkId.value = 'initiator.practitionerRole.practitioner.familyName') and answer.exists()) -> practitioner.name as name share practitionerName, name.family = (item.answer.value);\n src.item as item where ((linkId.value = 'initiator.practitionerRole.practitioner.givenName') and answer.exists()) -> practitioner.name as name share practitionerName, name.given = (item.answer.value);\n src.item as item where ((linkId.value = 'initiator.practitionerRole.practitioner.title') and answer.exists()) -> practitioner.name as name share practitionerName, name.prefix = (item.answer.value) as prefix, prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier', ext.value = create('code') as value, value.value = 'AC' "title";\n src.item as item where ((linkId.value = 'initiator.practitionerRole.practitioner.phone') and answer.exists()) -> practitioner.telecom as value, value.system = 'phone', value.value = (item.answer.value) "phone";\n src.item as item where ((linkId.value = 'initiator.practitionerRole.practitioner.email') and answer.exists()) -> practitioner.telecom as value, value.system = 'email', value.value = (item.answer.value) "email";\n src.item as item where ((linkId.value = 'initiator.practitionerRole.practitioner.gln') and answer.exists()) -> practitioner.identifier as value, value.system = 'urn:oid:2.51.1.3', value.value = (item.answer.value) "gln";\n src.item as item where ((linkId.value = 'initiator.practitionerRole.practitioner.zsr') and answer.exists()) -> practitioner.identifier as value, value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1', value.value = (item.answer.value) "zsr";\n}\n\ngroup InitiatorOrganizationItems(source src : BackboneElement, target organization : Organization) {\n src.item as item where ((linkId.value = 'initiator.practitionerRole.organization.name') and answer.exists()) -> organization.name = (item.answer.value);\n src.item as item where ((linkId.value = 'initiator.practitionerRole.organization.streetAddressLine') and answer.exists()) -> organization.address as address share orgAddress then {\n item.answer as answer -> address.line = (answer.value) "streetAddressLine";\n } "answer";\n src.item as item where ((linkId.value = 'initiator.practitionerRole.organization.postalCode') and answer.exists()) -> organization.address as address share orgAddress, address.postalCode = (item.answer.value) "postalCode";\n src.item as item where ((linkId.value = 'initiator.practitionerRole.organization.city') and answer.exists()) -> organization.address as address share orgAddress, address.city = (item.answer.value) "city";\n src.item as item where ((linkId.value = 'initiator.practitionerRole.organization.country') and answer.exists()) -> organization.address as address share orgAddress, address.country = (item.answer.value) "country";\n}\n\ngroup FamilyDoctorInit(source src : BackboneElement, target bundle : Bundle, target patient : Patient, target composition : Composition, target serviceRequest : ServiceRequest) {\n src -> bundle.entry as e4, e4.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid4, patient.generalPractitioner = create('Reference') as gp, gp.reference = append('urn:uuid:', uuid4), e4.fullUrl = append('urn:uuid:', uuid4) then {\n src.item as item where (linkId.value = 'familydoctor.practitioner') -> bundle.entry as e2, e2.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid2, practitionerRole.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid2), e2.fullUrl = append('urn:uuid:', uuid2) then FamilyDoctorPractitionerItems(item, practitioner);\n src.item as item where (linkId.value = 'familydoctor.organization') -> bundle.entry as e3, e3.resource = create('Organization') as organization, organization.id = uuid() as uuid3, practitionerRole.organization = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid3), e3.fullUrl = append('urn:uuid:', uuid3) then FamilyDoctorOrganizationItems(item, organization);\n } "FamilyDoctorInit";\n}\n\ngroup FamilyDoctorPractitionerItems(source src : BackboneElement, target practitioner : Practitioner) {\n src.item as item where ((linkId.value = 'familydoctor.practitioner.familyName') and answer.exists()) -> practitioner.name as name share practitionerName, name.family = (item.answer.value);\n src.item as item where ((linkId.value = 'familydoctor.practitioner.givenName') and answer.exists()) -> practitioner.name as name share practitionerName, name.given = (item.answer.value);\n src.item as item where ((linkId.value = 'familydoctor.practitioner.gln') and answer.exists()) -> practitioner.identifier as value, value.system = 'urn:oid:2.51.1.3', value.value = (item.answer.value) "gln";\n src.item as item where ((linkId.value = 'familydoctor.practitioner.zsr') and answer.exists()) -> practitioner.identifier as value, value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1', value.value = (item.answer.value) "zsr";\n src.item as item where ((linkId.value = 'familydoctor.practitioner.title') and answer.exists()) -> practitioner.name as name share practitionerName, name.prefix = (item.answer.value) as prefix, prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier', ext.value = create('code') as value, value.value = 'AC' "title";\n src.item as item where ((linkId.value = 'familydoctor.practitioner.phone') and answer.exists()) -> practitioner.telecom as value, value.system = 'phone', value.value = (item.answer.value) "phone";\n src.item as item where ((linkId.value = 'familydoctor.practitioner.email') and answer.exists()) -> practitioner.telecom as value, value.system = 'email', value.value = (item.answer.value) "email";\n}\n\ngroup FamilyDoctorOrganizationItems(source src : BackboneElement, target organization : Organization) {\n src.item as item where ((linkId.value = 'familydoctor.organization.name') and answer.exists()) -> organization.name = (item.answer.value);\n src.item as item where ((linkId.value = 'familydoctor.organization.streetAddressLine') and answer.exists()) -> organization.address as address share orgAddress then {\n item.answer as answer -> address.line = (answer.value) "streetAddressLine";\n } "answer";\n src.item as item where ((linkId.value = 'familydoctor.organization.postalCode') and answer.exists()) -> organization.address as address share orgAddress, address.postalCode = (item.answer.value) "postalCode";\n src.item as item where ((linkId.value = 'familydoctor.organization.city') and answer.exists()) -> organization.address as address share orgAddress, address.city = (item.answer.value) "city";\n src.item as item where ((linkId.value = 'familydoctor.organization.country') and answer.exists()) -> organization.address as address share orgAddress, address.country = (item.answer.value) "country";\n src.item as item where ((linkId.value = 'familydoctor.organization.gln') and answer.exists()) -> organization.identifier as value, value.system = 'urn:oid:2.51.1.3', value.value = (item.answer.value) "gln";\n src.item as item where ((linkId.value = 'familydoctor.organization.zsr') and answer.exists()) -> organization.identifier as value, value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1', value.value = (item.answer.value) "zsr";\n}\n\ngroup AntecedentEpisodeOfCareInit(source src : BackboneElement, target bundle : Bundle, target patient : Patient, target composition : Composition) {\n src -> composition.extension as ext, ext.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-antecedentepisodeofcare', bundle.entry as e4, e4.resource = create('EpisodeOfCare') as episodeofcare, episodeofcare.id = uuid() as uuid4, e4.fullUrl = ('urn:uuid:' + %uuid4), episodeofcare.status = 'finished', ext.value = create('Reference') as ref, ref.reference = ('urn:uuid:' + %episodeofcare.id) then AntecedentEpisodeOfCareItems(src, bundle, patient, episodeofcare) "AntecedentEpisodeOfCareItems";\n}\n\ngroup AntecedentEpisodeOfCareItems(source src : BackboneElement, target bundle : Bundle, target tgt : Patient, target episodeofcare : EpisodeOfCare) {\n src.item as item where ((linkId.value = 'antecedentEpisodeOfCare.start') and answer.exists()) -> episodeofcare.statusHistory as statusHistory, statusHistory.status = 'finished', statusHistory.period as period, period.start = (item.answer.value), period.end = (item.answer.value) then {\n src.item as iteme where ((linkId.value = 'antecedentEpisodeOfCare.end') and answer.exists()) -> period.end = (iteme.answer.value) "antecedentEpisodeOfCareEndNotSameAsStart";\n } "start";\n src.item as item where (linkId.value = 'antecedentEpisodeOfCare.managingOrganization') -> bundle.entry as e3, e3.resource = create('Organization') as organization, organization.id = uuid() as uuid3, e3.fullUrl = append('urn:uuid:', uuid3), episodeofcare.managingOrganization = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid3) then AntecedentEpisodeOfCareOrganizationItems(item, organization) "managingOrganization";\n}\n\ngroup AntecedentEpisodeOfCareOrganizationItems(source src : BackboneElement, target organization : Organization) {\n src.item as item where ((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.name') and answer.exists()) -> organization.name = (item.answer.value);\n src.item as item where ((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.streetAddressLine') and answer.exists()) -> organization.address as address share orgAddress then {\n item.answer as answer -> address.line = (answer.value) "streetAddressLine";\n } "answer";\n src.item as item where ((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.postalCode') and answer.exists()) -> organization.address as address share orgAddress, address.postalCode = (item.answer.value) "postalCode";\n src.item as item where ((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.city') and answer.exists()) -> organization.address as address share orgAddress, address.city = (item.answer.value) "city";\n src.item as item where ((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.country') and answer.exists()) -> organization.address as address share orgAddress, address.country = (item.answer.value) "country";\n}\n\ngroup InitiatorInit(source src : BackboneElement, target bundle : Bundle, target patient : Patient, target composition : Composition, target serviceRequest : ServiceRequest) {\n src -> composition.extension as ext, ext.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-initiator' then InitiatorItems(src, bundle, patient, ext) "receiver";\n}\n\ngroup PatientItems(source src : BackboneElement, target bundle : Bundle, target tgt : Patient, target composition : Composition, target serviceRequest : ServiceRequest) {\n src.item as grp where linkId = 'familydoctor' then FamilyDoctorInit(grp, bundle, tgt, composition, serviceRequest) "grpfamily";\n src.item as item then PatientItems(item, bundle, tgt, composition, serviceRequest);\n src.item as item where ((linkId.value = 'patient.familyName') and answer.exists()) -> tgt.name as name share patientName, name.family = (item.answer.value);\n src.item as item where ((linkId.value = 'patient.maidenName') and answer.exists()) -> tgt.name as name, name.use = 'maiden', name.family = (item.answer.value);\n src.item as item where ((linkId.value = 'patient.givenName') and answer.exists()) -> tgt.name as name share patientName, name.given = (item.answer.value);\n src.item as item where ((linkId.value = 'patient.localPid') and answer.exists()) -> tgt.identifier as value share localpid, value.type as type, type.coding as coding, coding.system = 'http://terminology.hl7.org/CodeSystem/v2-0203', coding.code = 'MR', value.value = (item.answer.valueString) "localPid";\n src.item as item where ((linkId.value = 'patient.localPidDomain') and answer.exists()) -> tgt.identifier as value share localpid, value.system = (item.answer.valueString) "localPidDomain";\n src.item as item where ((linkId.value = 'patient.birthDate') and answer.exists()) -> tgt.birthDate = (item.answer.value);\n src.item as item where ((linkId.value = 'patient.gender') and answer.exists()) -> tgt.gender = (item.answer.value.code);\n src.item as item where ((linkId.value = 'patient.maritalStatus') and answer.exists()) then {\n item.answer as answer then {\n answer.value : Coding as coding -> tgt.maritalStatus as maritalStatus, maritalStatus.coding = coding "maritalStatus";\n };\n } "maritalStatus";\n src.item as item where ((linkId.value = 'patient.phone') and answer.exists()) then {\n item.answer as answer -> tgt.telecom as value, value.system = 'phone', value.value = (answer.value) "phone";\n } "phone";\n src.item as item where ((linkId.value = 'patient.email') and answer.exists()) -> tgt.telecom as value, value.system = 'email', value.value = (item.answer.value) "email";\n src.item as item where ((linkId.value = 'patient.streetAddressLine') and answer.exists()) -> tgt.address as address share orgAddress then {\n item.answer as answer -> address.line = (answer.value) "streetAddressLine";\n } "answer";\n src.item as item where ((linkId.value = 'patient.postalCode') and answer.exists()) -> tgt.address as address share orgAddress, address.postalCode = (item.answer.value) "postalCode";\n src.item as item where ((linkId.value = 'patient.city') and answer.exists()) -> tgt.address as address share orgAddress, address.city = (item.answer.value) "city";\n src.item as item where ((linkId.value = 'patient.country') and answer.exists()) -> tgt.address as address share orgAddress, address.country = (item.answer.value) "country";\n src.item as item where ((linkId.value = 'patient.languageOfCorrespondence') and answer.exists()) then {\n item.answer as answer then {\n answer.value : Coding as coding -> tgt.communication as communication, communication.preferred = true, communication.language as language, language.coding = coding "languageOfCorrespondence";\n };\n } "languageOfCorrespondence";\n src.item as item where (linkId.value = 'patient.contactperson') -> tgt.contact as contact then {\n item.item as item where ((linkId.value = 'patient.contactperson.familyName') and answer.exists()) -> contact.name as name share contactName, name.family = (item.answer.value);\n item.item as item where ((linkId.value = 'patient.contactperson.givenName') and answer.exists()) -> contact.name as name share contactName, name.given = (item.answer.value);\n src.item as item where ((linkId.value = 'patient.contactperson.phone') and answer.exists()) then {\n item.answer as answer -> tgt.telecom as value, value.system = 'phone', value.value = (answer.value) "phone";\n } "phone";\n item.item as item where ((linkId.value = 'patient.contactperson.email') and answer.exists()) -> contact.telecom as value, value.system = 'email', value.value = (item.answer.value) "email";\n item.item as item where ((linkId.value = 'patient.contactperson.relationship') and answer.exists()) -> contact.relationship as relationship, relationship.text = (item.answer.value) "relationship";\n } "contact";\n}\n\ngroup RequestedEncounterItems(source src : BackboneElement, target bundle : Bundle, target patient : Patient, target serviceRequest : ServiceRequest) {\n src -> bundle.entry as e4, e4.resource = create('Encounter') as encounter, encounter.id = uuid() as uuid4, e4.fullUrl = ('urn:uuid:' + %uuid4), encounter.status = 'planned', serviceRequest.extension as extension, encounter.subject = create('Reference') as subject, subject.reference = ('urn:uuid:' + %patient.id), extension.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-requestedencounterdetails', extension.value = create('Reference') as reference, reference.reference = ('urn:uuid:' + %uuid4) then {\n src.item as item where ((linkId.value = 'requestedEncounter.class') and answer.exists()) -> encounter.class = (item.answer.value) "class";\n src.item as item where ((linkId.value = 'requestedEncounter.desiredAccommodation') and answer.exists()) -> encounter.extension as extension, extension.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-desiredaccommodation', extension.value = (item.answer.value) "desiredAccommodation";\n } "RequestedEncounterItems";\n}\n\ngroup Coverage(source src : BackboneElement, target bundle : Bundle, target patient : Patient, target serviceRequest : ServiceRequest) {\n // coverage.beneficiary\n src.item as item where where(linkId.value = 'coverage.beneficiary') then {\n item.item as item where ((linkId.value = 'coverage.beneficiary.ahvn13') and answer.exists()) -> patient.identifier as identifier, identifier.system = 'urn:oid:2.16.756.5.32', identifier.value = (item.answer.value) "ahvn13";\n } "beneficiary";\n // coverage.kvg\n src.item as item where where(linkId.value = 'coverage.kvg') -> bundle.entry as e4, e4.resource = create('Coverage') as coverage, coverage.id = uuid() as uuid4, e4.fullUrl = ('urn:uuid:' + %uuid4), serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:' + %uuid4), coverage.status = 'active', coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:' + %patient.id), coverage.type as type, type.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype', coding.code = 'KVG' then {\n item.item as item where ((linkId.value = 'coverage.kvg.name') and answer.exists()) -> coverage.payor as payor, payor.reference as refcontained, refcontained.value = '#org', coverage.contained = create('Organization') as organization, organization.id = 'org', organization.name = (item.answer.value) "name";\n item.item as item where ((linkId.value = 'coverage.kvg.insuranceCardNumber') and answer.exists()) -> coverage.identifier as identifier, identifier.type as typeid, typeid.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coverageidentifiertype', coding.code = 'VeKa', identifier.value = (item.answer.value) "insuranceCardNumber";\n } "coveragekvg";\n // coverage.uvg Unfallversicherung (nach UVG) 0..1 group Definition: Coverage.type\n src.item as item where where(linkId.value = 'coverage.uvg') -> bundle.entry as e4, e4.resource = create('Coverage') as coverage, coverage.id = uuid() as uuid4, e4.fullUrl = ('urn:uuid:' + %uuid4), serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:' + %uuid4), coverage.status = 'active', coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:' + %patient.id), coverage.type as type, type.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype', coding.code = 'UVG' then {\n item.item as item where ((linkId.value = 'coverage.uvg.name') and answer.exists()) -> coverage.payor as payor, payor.reference as refcontained, refcontained.value = '#org', coverage.contained = create('Organization') as organization, organization.id = 'org', organization.name = (item.answer.value) "name";\n item.item as item where ((linkId.value = 'coverage.uvg.claimNumber') and answer.exists()) -> coverage.identifier as identifier, identifier.type as typeid, typeid.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coverageidentifiertype', coding.code = 'Claim', identifier.value = (item.answer.value) "claimNumber";\n } "coverageuvg";\n // coverage.vvg Zusatzversicherung (nach VVG) 0..1 group Definition: Coverage.type\n src.item as item where where(linkId.value = 'coverage.vvg') -> bundle.entry as e4, e4.resource = create('Coverage') as coverage, coverage.id = uuid() as uuid4, e4.fullUrl = ('urn:uuid:' + %uuid4), serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:' + %uuid4), coverage.status = 'active', coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:' + %patient.id), coverage.type as type, type.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype', coding.code = 'VVG' then {\n item.item as item where ((linkId.value = 'coverage.vvg.name') and answer.exists()) -> coverage.payor as payor, payor.reference as refcontained, refcontained.value = '#org', coverage.contained = create('Organization') as organization, organization.id = 'org', organization.name = (item.answer.value) "name";\n item.item as item where ((linkId.value = 'coverage.vvg.insuranceCardNumber') and answer.exists()) -> coverage.identifier as identifier, identifier.type as typeid, typeid.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coverageidentifiertype', coding.code = 'VeKa', identifier.value = (item.answer.value) "insuranceCardNumber";\n } "coveragevvg";\n // coverage.iv Invalidenversicherung (IV) 0..1 group Definition: Coverage.type\n src.item as item where where(linkId.value = 'coverage.iv') -> bundle.entry as e4, e4.resource = create('Coverage') as coverage, coverage.id = uuid() as uuid4, e4.fullUrl = ('urn:uuid:' + %uuid4), serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:' + %uuid4), coverage.status = 'active', coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:' + %patient.id), coverage.type as type, type.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype', coding.code = 'IVG' then {\n item.item as item where ((linkId.value = 'coverage.iv.verfuegungsnummer') and answer.exists()) -> coverage.identifier as identifier, identifier.type as typeid, typeid.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coverageidentifiertype', coding.code = 'IV', identifier.value = (item.answer.value), coverage.payor as payor, payor.reference as refcontained, refcontained.value = '#org', coverage.contained = create('Organization') as organization, organization.id = 'org', organization.name = 'IV' "verfuegungsnummer";\n } "coverageiv";\n // coverage.mv Militärversicherung (MV) 0..1 group Definition: Coverage.type\n src.item as item where where(linkId.value = 'coverage.mv') -> bundle.entry as e4, e4.resource = create('Coverage') as coverage, coverage.id = uuid() as uuid4, e4.fullUrl = ('urn:uuid:' + %uuid4), serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:' + %uuid4), coverage.status = 'active', coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:' + %patient.id), coverage.type as type, type.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype', coding.code = 'MVG' then {\n item.item as item where ((linkId.value = 'coverage.mv.versichertennummer') and answer.exists()) -> coverage.identifier as identifier, identifier.type as typeid, typeid.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coverageidentifiertype', coding.code = 'MV', identifier.value = (item.answer.value), coverage.payor as payor, payor.reference as refcontained, refcontained.value = '#org', coverage.contained = create('Organization') as organization, organization.id = 'org', organization.name = 'MV' "versichertennummer";\n } "coveragemv";\n // coverage.self Selbstzahler 0..1 group Definition: Coverage.type\n src.item as item where where(linkId.value = 'coverage.self') then {\n item.item as item where ((linkId.value = 'coverage.self.patient') and answer.exists() and answer.value) -> bundle.entry as e4, e4.resource = create('Coverage') as coverage, coverage.id = uuid() as uuid4, e4.fullUrl = ('urn:uuid:' + %uuid4), serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:' + %uuid4), coverage.status = 'active', coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:' + %patient.id), coverage.type as type, type.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype', coding.code = 'Self', coverage.payor as subject, subject.reference = ('urn:uuid:' + %patient.id) "payor";\n item.item as item2 where ((linkId.value = 'coverage.self.patientRelatedPerson') and answer.exists() and answer.value) then {\n item.item as item where (linkId.value = 'coverage.self.relatedPerson') -> bundle.entry as e5, e5.resource = create('Coverage') as coverage, coverage.id = uuid() as uuid4, e5.fullUrl = ('urn:uuid:' + %uuid4), serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:' + %uuid4), coverage.status = 'active', coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:' + %patient.id), coverage.type as type, type.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype', coding.code = 'Self', bundle.entry as e6, e6.resource = create('RelatedPerson') as relatedPerson, relatedPerson.id = uuid() as uuid6, e6.fullUrl = append('urn:uuid:', uuid6), coverage.payor as subject, subject.reference = ('urn:uuid:' + %relatedPerson.id), relatedPerson.patient as reference, reference.reference = ('urn:uuid:' + %patient.id) then CoverageRelatedPersonItems(item, relatedPerson) "relatedPerson";\n } "";\n } "self";\n // coverage.other Anderer Kostenträger 0..1 group Definition: Coverage.type\n src.item as item where where(linkId.value = 'coverage.other') -> bundle.entry as e4, e4.resource = create('Coverage') as coverage, coverage.id = uuid() as uuid4, e4.fullUrl = ('urn:uuid:' + %uuid4), serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:' + %uuid4), coverage.status = 'active', coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:' + %patient.id), coverage.type as type, type.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype', coding.code = 'Other' then {\n item.item as item where ((linkId.value = 'coverage.other.name') and answer.exists()) -> coverage.payor as payor, payor.reference as refcontained, refcontained.value = '#org', coverage.contained = create('Organization') as organization, organization.id = 'org', organization.name = (item.answer.value) "name";\n item.item as item where ((linkId.value = 'coverage.other.id') and answer.exists()) -> coverage.identifier as identifier, identifier.value = (item.answer.value) "id";\n } "coveragevvg";\n}\n\ngroup CoverageRelatedPersonItems(source src : BackboneElement, target relatedPerson : RelatedPerson) {\n src.item as item where ((linkId.value = 'coverage.self.relatedPerson.familyName') and answer.exists()) -> relatedPerson.name as name share name, name.family = (item.answer.value);\n src.item as item where ((linkId.value = 'coverage.self.relatedPerson.givenName') and answer.exists()) -> relatedPerson.name as name share name, name.given = (item.answer.value);\n src.item as item where ((linkId.value = 'coverage.self.relatedPerson.phone') and answer.exists()) then {\n item.answer as answer -> relatedPerson.telecom as value, value.system = 'phone', value.value = (answer.value) "phone";\n } "phone";\n src.item as item where ((linkId.value = 'coverage.self.relatedPerson.email') and answer.exists()) -> relatedPerson.telecom as value, value.system = 'email', value.value = (item.answer.value) "email";\n src.item as item where ((linkId.value = 'coverage.self.relatedPerson.streetAddressLine') and answer.exists()) -> relatedPerson.address as address share orgAddress then {\n item.answer as answer -> address.line = (answer.value) "streetAddressLine";\n } "answer";\n src.item as item where ((linkId.value = 'coverage.self.relatedPerson.postalCode') and answer.exists()) -> relatedPerson.address as address share orgAddress, address.postalCode = (item.answer.value) "postalCode";\n src.item as item where ((linkId.value = 'coverage.self.relatedPerson.city') and answer.exists()) -> relatedPerson.address as address share orgAddress, address.city = (item.answer.value) "city";\n src.item as item where ((linkId.value = 'coverage.self.relatedPerson.country') and answer.exists()) -> relatedPerson.address as address share orgAddress, address.country = (item.answer.value) "country";\n}\n\ngroup SenderAuthorPractitionerItems(source src : BackboneElement, target practitioner : Practitioner) {\n src.item as item where ((linkId.value = 'sender.author.practitioner.familyName') and answer.exists()) -> practitioner.name as name share practitionerName, name.family = (item.answer.value);\n src.item as item where ((linkId.value = 'sender.author.practitioner.givenName') and answer.exists()) -> practitioner.name as name share practitionerName, name.given = (item.answer.value);\n src.item as item where ((linkId.value = 'sender.author.practitioner.title') and answer.exists()) -> practitioner.name as name share practitionerName, name.prefix = (item.answer.value) as prefix, prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier', ext.value = create('code') as value, value.value = 'AC' "title";\n src.item as item where ((linkId.value = 'sender.author.practitioner.gln') and answer.exists()) -> practitioner.identifier as value, value.system = 'urn:oid:2.51.1.3', value.value = (item.answer.value) "gln";\n src.item as item where ((linkId.value = 'sender.author.practitioner.zsr') and answer.exists()) -> practitioner.identifier as value, value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1', value.value = (item.answer.value) "zsr";\n src.item as item where ((linkId.value = 'sender.author.practitioner.phone') and answer.exists()) -> practitioner.telecom as value, value.system = 'phone', value.value = (item.answer.value) "phone";\n src.item as item where ((linkId.value = 'sender.author.practitioner.email') and answer.exists()) -> practitioner.telecom as value, value.system = 'email', value.value = (item.answer.value) "email";\n}\n\ngroup SenderAuthorOrganizationItems(source src : BackboneElement, target organization : Organization) {\n src.item as item where ((linkId.value = 'sender.author.organization.name') and answer.exists()) -> organization.name = (item.answer.value);\n src.item as item where ((linkId.value = 'sender.author.organization.gln') and answer.exists()) -> organization.identifier as value, value.system = 'urn:oid:2.51.1.3', value.value = (item.answer.value) "gln";\n src.item as item where ((linkId.value = 'sender.author.organization.zsr') and answer.exists()) -> organization.identifier as value, value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1', value.value = (item.answer.value) "zsr";\n src.item as item where ((linkId.value = 'sender.author.organization.streetAddressLine') and answer.exists()) -> organization.address as address share orgAddress then {\n item.answer as answer -> address.line = (answer.value) "streetAddressLine";\n } "answer";\n src.item as item where ((linkId.value = 'sender.author.organization.postalCode') and answer.exists()) -> organization.address as address share orgAddress, address.postalCode = (item.answer.value) "postalCode";\n src.item as item where ((linkId.value = 'sender.author.organization.city') and answer.exists()) -> organization.address as address share orgAddress, address.city = (item.answer.value) "city";\n src.item as item where ((linkId.value = 'sender.author.organization.country') and answer.exists()) -> organization.address as address share orgAddress, address.country = (item.answer.value) "country";\n}\n\ngroup SenderAuthorItems(source src : BackboneElement, target practitionerRole : practitionerRole, target practitioner : Practitioner, target organization : Organization) {\n src.item as item where (linkId.value = 'sender.author.practitioner') then SenderAuthorPractitionerItems(item, practitioner);\n src.item as item where (linkId.value = 'sender.author.organization') then SenderAuthorOrganizationItems(item, organization);\n}\n\ngroup SenderDataEntererPractitionerItems(source src : BackboneElement, target practitioner : Practitioner) {\n src.item as item where ((linkId.value = 'sender.dataenterer.practitioner.familyName') and answer.exists()) -> practitioner.name as name share practitionerName, name.family = (item.answer.value);\n src.item as item where ((linkId.value = 'sender.dataenterer.practitioner.givenName') and answer.exists()) -> practitioner.name as name share practitionerName, name.given = (item.answer.value);\n src.item as item where ((linkId.value = 'sender.dataenterer.practitioner.phone') and answer.exists()) -> practitioner.telecom as value, value.system = 'phone', value.value = (item.answer.value) "phone";\n src.item as item where ((linkId.value = 'sender.dataenterer.practitioner.email') and answer.exists()) -> practitioner.telecom as value, value.system = 'email', value.value = (item.answer.value) "email";\n}\n\ngroup SenderDataEntererItems(source src : BackboneElement, target practitionerRole : practitionerRole, target practitioner : Practitioner, target organization : Organization) {\n src.item as item where (linkId.value = 'sender.dataenterer.practitioner') then SenderDataEntererPractitionerItems(item, practitioner);\n}\n\ngroup ChExtEprDataEnterer(source src : BackboneElement, target practitionerRole : PractitionerRole, target ext : Extension) {\n src -> ext.url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-dataenterer' "url";\n src -> ext.extension as ext, ext.url = 'enterer', ext.value = create('Reference') as reference, reference.reference = ('urn:uuid:' + %practitionerRole.id) "practitionerRole";\n}\n\ngroup SenderAuthorInit(source src : BackboneElement, target bundle : Bundle, target composition : Composition, target serviceRequest : ServiceRequest) {\n src -> bundle.entry as e, e.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid, e.fullUrl = append('urn:uuid:', uuid), bundle.entry as e2, e2.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid2, e2.fullUrl = append('urn:uuid:', uuid2), bundle.entry as e3, e3.resource = create('Organization') as organization, organization.id = uuid() as uuid3, e3.fullUrl = append('urn:uuid:', uuid3), composition.author = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid), serviceRequest.requester = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid), practitionerRole.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid2), practitionerRole.organization = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid3) then {\n src.item as item where (linkId.value = 'sender.author') then SenderAuthorItems(item, practitionerRole, practitioner, organization) "author";\n src.item as item where (linkId.value = 'sender.dataenterer') then {\n item -> bundle.entry as e4, e4.resource = create('PractitionerRole') as practitionerRoleDataEnterer, practitionerRoleDataEnterer.id = uuid() as uuid4, e4.fullUrl = append('urn:uuid:', uuid4), composition.extension as extension, bundle.entry as e5, e5.resource = create('Practitioner') as practitionerDataEnterer, practitionerDataEnterer.id = uuid() as uuid5, e5.fullUrl = append('urn:uuid:', uuid5), practitionerRoleDataEnterer.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid5), practitionerRoleDataEnterer.organization = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid3) then {\n item then SenderDataEntererItems(item, practitionerRoleDataEnterer, practitionerDataEnterer, organization) "data";\n item then ChExtEprDataEnterer(item, practitionerRoleDataEnterer, extension) "extension";\n } "items";\n } "dataenterer";\n } "sender";\n}\n\ngroup ReceiverCopyRelatedPersonItems(source src : BackboneElement, target relatedPerson : RelatedPerson) {\n src.item as item where ((linkId.value = 'receiverCopy.relatedPerson.familyName') and answer.exists()) -> relatedPerson.name as name share name, name.family = (item.answer.value);\n src.item as item where ((linkId.value = 'receiverCopy.relatedPerson.givenName') and answer.exists()) -> relatedPerson.name as name share name, name.given = (item.answer.value);\n src.item as item where ((linkId.value = 'receiverCopy.relatedPerson.phone') and answer.exists()) then {\n item.answer as answer -> relatedPerson.telecom as value, value.system = 'phone', value.value = (answer.value) "phone";\n } "phone";\n src.item as item where ((linkId.value = 'receiverCopy.relatedPerson.email') and answer.exists()) -> relatedPerson.telecom as value, value.system = 'email', value.value = (item.answer.value) "email";\n src.item as item where ((linkId.value = 'receiverCopy.relatedPerson.streetAddressLine') and answer.exists()) -> relatedPerson.address as address share orgAddress then {\n item.answer as answer -> address.line = (answer.value) "streetAddressLine";\n } "answer";\n src.item as item where ((linkId.value = 'receiverCopy.relatedPerson.postalCode') and answer.exists()) -> relatedPerson.address as address share orgAddress, address.postalCode = (item.answer.value) "postalCode";\n src.item as item where ((linkId.value = 'receiverCopy.relatedPerson.city') and answer.exists()) -> relatedPerson.address as address share orgAddress, address.city = (item.answer.value) "city";\n src.item as item where ((linkId.value = 'receiverCopy.relatedPerson.country') and answer.exists()) -> relatedPerson.address as address share orgAddress, address.country = (item.answer.value) "country";\n}\n\ngroup ReceiverCopyPractitionerItems(source src : BackboneElement, target practitioner : Practitioner) {\n src.item as item where ((linkId.value = 'receiverCopy.practitionerRole.practitioner.familyName') and answer.exists()) -> practitioner.name as name share practitionerName, name.family = (item.answer.value);\n src.item as item where ((linkId.value = 'receiverCopy.practitionerRole.practitioner.givenName') and answer.exists()) -> practitioner.name as name share practitionerName, name.given = (item.answer.value);\n src.item as item where ((linkId.value = 'receiverCopy.practitionerRole.practitioner.title') and answer.exists()) -> practitioner.name as name share practitionerName, name.prefix = (item.answer.value) as prefix, prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier', ext.value = create('code') as value, value.value = 'AC' "title";\n src.item as item where ((linkId.value = 'receiverCopy.practitionerRole.practitioner.phone') and answer.exists()) -> practitioner.telecom as value, value.system = 'phone', value.value = (item.answer.value) "phone";\n src.item as item where ((linkId.value = 'receiverCopy.practitionerRole.practitioner.email') and answer.exists()) -> practitioner.telecom as value, value.system = 'email', value.value = (item.answer.value) "email";\n}\n\ngroup ReceiverCopyOrganizationItems(source src : BackboneElement, target organization : Organization) {\n src.item as item where ((linkId.value = 'receiverCopy.practitionerRole.organization.name') and answer.exists()) -> organization.name = (item.answer.value);\n src.item as item where ((linkId.value = 'receiverCopy.practitionerRole.organization.streetAddressLine') and answer.exists()) -> organization.address as address share orgAddress then {\n item.answer as answer -> address.line = (answer.value) "streetAddressLine";\n } "answer";\n src.item as item where ((linkId.value = 'receiverCopy.practitionerRole.organization.postalCode') and answer.exists()) -> organization.address as address share orgAddress, address.postalCode = (item.answer.value) "postalCode";\n src.item as item where ((linkId.value = 'receiverCopy.practitionerRole.organization.city') and answer.exists()) -> organization.address as address share orgAddress, address.city = (item.answer.value) "city";\n src.item as item where ((linkId.value = 'receiverCopy.practitionerRole.organization.country') and answer.exists()) -> organization.address as address share orgAddress, address.country = (item.answer.value) "country";\n}\n\ngroup ReceiverCopyPractitionerRoleItems(source src : BackboneElement, target bundle : Bundle, target practitionerRole : practitionerRole) {\n src.item as item where (linkId.value = 'receiverCopy.practitionerRole.practitioner') -> bundle.entry as e2, e2.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid2, practitionerRole.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid2), e2.fullUrl = append('urn:uuid:', uuid2) then ReceiverCopyPractitionerItems(item, practitioner);\n src.item as item where (linkId.value = 'receiverCopy.practitionerRole.organization') -> bundle.entry as e3, e3.resource = create('Organization') as organization, organization.id = uuid() as uuid3, practitionerRole.organization = create('Reference') as reference, reference.reference = append('urn:uuid:', uuid3), e3.fullUrl = append('urn:uuid:', uuid3) then ReceiverCopyOrganizationItems(item, organization);\n}\n\ngroup ExtOrfCopyReceiverPatient(source src : BackboneElement, target patient : Patient, target ext : Extension) {\n src -> ext.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-copyreceiver' "url";\n src -> ext.value = create('Reference') as reference, reference.reference = ('urn:uuid:' + %patient.id) "patient";\n}\n\ngroup ExtOrfCopyReceiver(source src : BackboneElement, target res, target ext : Extension) {\n src -> ext.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-copyreceiver' "url";\n src -> ext.value = create('Reference') as reference, reference.reference = ('urn:uuid:' + %res.id) "organization";\n}\n\ngroup ReceiverCopy(source grp : BackboneElement, target bundle : Bundle, target patient : Patient, target composition : Composition, target serviceRequest : ServiceRequest) {\n grp.item as item where (linkId = 'receiverCopy.practitionerRole') -> bundle.entry as e4, e4.resource = create('PractitionerRole') as practitionerrole, composition.extension as extension, practitionerrole.id = uuid() as uuid4, e4.fullUrl = append('urn:uuid:', uuid4) then {\n item then ReceiverCopyPractitionerRoleItems(item, bundle, practitionerrole) "data";\n item then ExtOrfCopyReceiver(item, practitionerrole, extension) "extension";\n } "receiverCopyPractitionerRole1";\n grp.item as item where (linkId = 'receiverCopy.patient') -> composition.extension as extension then {\n item then ExtOrfCopyReceiver(item, patient, extension) "extension";\n } "receiverCopyPractitionerRole2";\n grp.item as item where (linkId = 'receiverCopy.relatedPerson') -> bundle.entry as e4, e4.resource = create('RelatedPerson') as relatedPerson, composition.extension as extension, relatedPerson.id = uuid() as uuid4, relatedPerson.patient as reference, reference.reference = ('urn:uuid:' + %patient.id), e4.fullUrl = append('urn:uuid:', uuid4) then {\n item then ReceiverCopyRelatedPersonItems(item, relatedPerson) "data";\n item then ExtOrfCopyReceiver(item, relatedPerson, extension) "extension";\n } "receiverCopyPractitionerRole3";\n}\n\ngroup Appointment(source grp : BackboneElement, target bundle : Bundle, target composition : Composition, target serviceRequest : ServiceRequest) {\n grp -> bundle.entry as e4, e4.resource = create('Appointment') as appointment, appointment.id = uuid() as uuid4, e4.fullUrl = ('urn:uuid:' + %uuid4), serviceRequest.extension as extension, extension.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-locationandtime', extension.value = create('Reference') as reference, reference.reference = ('urn:uuid:' + %uuid4) then {\n grp.item as item where ((linkId.value = 'appointment.status') and (answer.value.code = 'proposed')) -> appointment.status = (item.answer.value.code) then {\n grp.item as itemp where (linkId.value = 'appointment.requestedPeriod') then {\n itemp.item as item2 where ((linkId.value = 'appointment.requestedPeriod.start') and answer.exists()) -> appointment.requestedPeriod as requestedPeriod, requestedPeriod.start = (item2.answer.value), requestedPeriod.end = (item2.answer.value) then {\n itemp.item as item3 where ((linkId.value = 'appointment.requestedPeriod.end') and answer.exists()) -> requestedPeriod.end = (item3.answer.value) "start";\n } "start";\n } "requestedPeriod";\n } "proposed";\n grp.item as item where ((linkId.value = 'appointment.status') and ((answer.value.code = 'pending') or (answer.value.code = 'booked'))) -> appointment.status = (item.answer.value.code) then {\n grp.item as itemp where (linkId.value = 'appointment.requestedPeriod') then {\n itemp.item as item2 where ((linkId.value = 'appointment.requestedPeriod.start') and answer.exists()) -> appointment.start = (item2.answer.value), appointment.end = (item2.answer.value) then {\n itemp.item as item3 where ((linkId.value = 'appointment.requestedPeriod.end') and answer.exists()) -> appointment.end = (item3.answer.value) "start";\n } "start";\n } "startend";\n } "pendingorbooked";\n grp.item as item where ((linkId.value = 'appointment.patientInstruction') and answer.exists()) -> appointment.patientInstruction = (item.answer.value) "patientInstruction";\n grp.item as item where (linkId.value = 'appointment.location') then {\n item -> bundle.entry as e5, e5.resource = create('Location') as location, location.id = uuid() as uuid5, e5.fullUrl = ('urn:uuid:' + %uuid5), appointment.participant as participant, participant.status = 'tentative', participant.actor = create('Reference') as actor, actor.reference = ('urn:uuid:' + %location.id) then {\n item.item as item3 where ((linkId.value = 'appointment.location.name') and answer.exists()) -> location.name = (item3.answer.value);\n item.item as item3 where ((linkId.value = 'appointment.location.phone') and answer.exists()) -> location.telecom as value, value.system = 'phone', value.value = (item3.answer.value) "phone";\n item.item as item3 where ((linkId.value = 'appointment.location.email') and answer.exists()) -> location.telecom as value, value.system = 'email', value.value = (item3.answer.value) "email";\n item.item as item3 where ((linkId.value = 'appointment.location.streetAddressLine') and answer.exists()) -> location.address as address share orgAddress then {\n item.answer as answer -> address.line = (answer.value) "line";\n } "streetAddressLine";\n item.item as item3 where ((linkId.value = 'appointment.location.postalCode') and answer.exists()) -> location.address as address share orgAddress, address.postalCode = (item3.answer.value) "postalCode";\n item.item as item3 where ((linkId.value = 'appointment.location.city') and answer.exists()) -> location.address as address share orgAddress, address.city = (item3.answer.value) "city";\n item.item as item3 where ((linkId.value = 'appointment.location.country') and answer.exists()) -> location.address as address share orgAddress, address.country = (item3.answer.value) "country";\n } "location";\n } "location";\n } "Appointment";\n}\n\ngroup PreviousResults(source grp : BackboneElement, target bundle : Bundle, target serviceRequest : ServiceRequest) {\n grp.item as item where ((linkId = 'previousResults.attachment') and answer.exists()) then {\n item.answer as answer then {\n answer.value : Attachment as attachment -> bundle.entry as e, e.resource = create('Media') as media, media.id = uuid() as uuid, media.status = 'completed', e.fullUrl = append('urn:uuid:', uuid), media.content = attachment, serviceRequest.supportingInfo as supportingInfo, supportingInfo.reference = ('urn:uuid:' + uuid) "media";\n };\n };\n}\n\ngroup Note(source grp : BackboneElement, target serviceRequest : ServiceRequest) {\n grp.item as item where ((linkId = 'note.text') and answer.exists()) -> serviceRequest.note as note, note.text = (item.answer.value) "text";\n}\n\ngroup QrToBundle(source qr : QuestionnaireResponse, target q : Questionnaire, target patient : Patient, target questionnaireresp : QuestionnaireResponse, target servicerequest : ServiceRequest, target composition : Composition, target bundle : Bundle) {\n qr -> bundle.id = uuid() "id";\n qr -> bundle.type = 'document' "type";\n qr then OrfComposition(qr, q, composition, patient, questionnaireresp, servicerequest, bundle) "composition";\n qr then QrToGroups(qr, patient, bundle, composition, servicerequest) "qrgroups";\n}\n\ngroup OrfComposition(source qr : QuestionnaireResponse, target q : Questionnaire, target tgt : Composition, target patient : Patient, target questionnaireresp : QuestionnaireResponse, target servicerequest : ServiceRequest, target bundle : Bundle) {\n qr -> tgt.status = 'final' "status";\n qr -> tgt.subject = create('Reference') as reference, reference.reference = ('urn:uuid:' + %patient.id) "subject";\n qr -> tgt.section as tgtSection, tgtSection.title = 'Order-Referral', tgtSection.code as code, code.coding as coding, coding.system = 'http://loinc.org', coding.code = '93037-0', coding.display = 'Portable medical order form', tgtSection.entry = create('Reference') as reference, reference.reference = ('urn:uuid:' + %questionnaireresp.id), tgtSection.entry = create('Reference') as reference, reference.reference = ('urn:uuid:' + %servicerequest.id), tgtSection.entry = create('Reference') as reference, reference.reference = ('urn:uuid:' + %q.id) "sections";\n qr -> servicerequest.status = 'active', servicerequest.intent = 'order', servicerequest.subject = create('Reference') as reference, reference.reference = ('urn:uuid:' + %patient.id) "servicerequest";\n}\n\n</pre>\n </div>"
] ; #
fhir:url [ fhir:v "http://fhir.ch/ig/ch-orf/StructureMap/OrfQrToBundle"^^xsd:anyURI] ; #
fhir:version [ fhir:v "1.1.0"] ; #
fhir:name [ fhir:v "OrfQrToBundle"] ; #
fhir:status [ fhir:v "draft"] ; #
fhir:date [ fhir:v "2023-03-08T18:07:00+00:00"^^xsd:dateTime] ; #
fhir:publisher [ fhir:v "HL7 Switzerland"] ; #
fhir:contact ( [
fhir:name [ fhir:v "HL7 Switzerland" ] ;
( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "https://www.hl7.ch/" ] ] )
] ) ; #
fhir:description [ fhir:v "\r\nORF QuestionnaireResponse to Bundle\r\n2021-01-11 Oliver Egger, copyright ahdis ag, Apache License\r\nQRF Questionnaire: http://build.fhir.org/ig/hl7ch/ch-orf/Questionnaire-order-referral-form.html\r\nQRF QuestionnaireResponse: http://build.fhir.org/ig/hl7ch/ch-orf/QuestionnaireResponse-order-referral-form.xml.html\r\nBundle: http://build.fhir.org/ig/hl7ch/ch-orf/StructureDefinition-ch-orf-document.html"] ; #
fhir:jurisdiction ( [
( fhir:coding [
fhir:system [ fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ] ;
fhir:code [ fhir:v "CH" ] ] )
] ) ; #
fhir:copyright [ fhir:v "CC-BY-SA-4.0"] ; #
fhir:structure ( [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse> ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "QuestionnaireResponse" ]
] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Bundle"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle> ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "Bundle" ]
] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Patient"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Patient> ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "Patient" ]
] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/RelatedPerson"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/RelatedPerson> ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "RelatedPerson" ]
] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Organization"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Organization> ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "Organization" ]
] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Practitioner"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Practitioner> ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "Practitioner" ]
] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/PractitionerRole"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/PractitionerRole> ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "PractitionerRole" ]
] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/ServiceRequest"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/ServiceRequest> ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "ServiceRequest" ]
] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/BackboneElement"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/BackboneElement> ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "BackboneElement" ]
] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Extension> ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "Extension" ]
] [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/EpisodeOfCare> ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "EpisodeOfCare" ]
] ) ; #
fhir:group ( [
fhir:name [ fhir:v "OrfQrToBundle" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "qr" ] ;
fhir:type [ fhir:v "QuestionnaireResponse" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "documentIdentifier" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "documentIdentifier" ] ] [
fhir:context [ fhir:v "documentIdentifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:ietf:rfc:3986" ] ] ) ] [
fhir:contextType [ fhir:v "variable" ] ;
fhir:variable [ fhir:v "uuidDoc" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "documentIdentifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuidDoc" ] ] ) ] ) ] [
fhir:name [ fhir:v "orfbundle" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:variable [ fhir:v "qrcp" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e" ] ] [
fhir:context [ fhir:v "e" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "composition" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Composition" ] ] ) ] [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid" ] ] ) ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e2" ] ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "timestamp" ] ;
fhir:variable [ fhir:v "timestamp" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "now()" ] ] ) ] [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "date" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "timestamp" ] ] ) ] [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "title" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Order and Referral by Form" ] ] ) ] [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "type" ] ] [
fhir:context [ fhir:v "type" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "419891008" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://snomed.info/sct" ] ] ) ] [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "category" ] ;
fhir:variable [ fhir:v "category" ] ] [
fhir:context [ fhir:v "category" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "721963009" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://snomed.info/sct" ] ] ) ] [
fhir:context [ fhir:v "e2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "patient" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Patient" ] ] ) ] [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid2" ] ] ) ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e4" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "questionnaireresp" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "qrcp" ] ] ) ] [
fhir:context [ fhir:v "questionnaireresp" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid4" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid4" ] ] ) ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e5" ] ] [
fhir:context [ fhir:v "e5" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "servicerequest" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "ServiceRequest" ] ] ) ] [
fhir:context [ fhir:v "servicerequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid5" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e5" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid5" ] ] ) ] ) ;
( fhir:rule [
fhir:name [ fhir:v "orfbundle" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "questionnaire" ] ;
fhir:variable [ fhir:v "can" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e6" ] ] [
fhir:context [ fhir:v "e6" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "q" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "can.resolve()" ] ] ) ] [
fhir:context [ fhir:v "q" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid6" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e6" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid6" ] ] ) ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "QrToBundle" ] ;
( fhir:variable [
fhir:v "qr" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "q" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "patient" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "questionnaireresp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "servicerequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "composition" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "QrToGroups" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "qr" ] ;
fhir:type [ fhir:v "QuestionnaireResponse" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "composition" ] ;
fhir:type [ fhir:v "Composition" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "serviceRequest" ] ;
fhir:type [ fhir:v "ServiceRequest" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "grporder" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'order'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "OrderItems" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "composition" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "serviceRequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "receiver" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'receiver'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "ReceiverInit" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "composition" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "serviceRequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "grpinitiator" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'initiator'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "InitiatorInit" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "patient" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "composition" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "serviceRequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "grppatient" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'patient'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "PatientItems" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "patient" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "composition" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "serviceRequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "grprequestedencounter" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'requestedEncounter'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "RequestedEncounterItems" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "patient" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "serviceRequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "grprequestedencounter" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'coverage'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "Coverage" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "patient" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "serviceRequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "grpsender" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'sender'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "SenderAuthorInit" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "composition" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "serviceRequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "grpsender" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'receiverCopy'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "ReceiverCopy" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "patient" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "composition" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "serviceRequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "grpsender" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'appointment'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "Appointment" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "composition" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "serviceRequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "previousResults" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'previousResults'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "PreviousResults" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "serviceRequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "AntecedentEpisodeOfCareInit" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'antecedentEpisodeOfCare'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "AntecedentEpisodeOfCareInit" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "patient" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "composition" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "consent" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'consent'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "Consent" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "composition" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "note" ] ;
( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'note'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "Note" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "serviceRequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "OrderItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "composition" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "serviceRequest" ] ;
fhir:type [ fhir:v "ServiceRequest" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "order.precedentDocumentIdentifier" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.precedentDocumentIdentifier') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ] ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-precedentdocument" ] ] ) ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Identifier" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:ietf:rfc:3986" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + item.answer.valueString" ] ] ) ] ) ] [
fhir:name [ fhir:v "order.placerOrderIdentifier" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.placerOrderIdentifier') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "placer" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "type" ] ] [
fhir:context [ fhir:v "type" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "PLAC" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.valueString" ] ] ) ] ) ] [
fhir:name [ fhir:v "order.placerOrderIdentifierDomain" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.placerOrderIdentifierDomain') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "placer" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.valueString" ] ] ) ] ) ] [
fhir:name [ fhir:v "order.fillerOrderIdentifier" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.fillerOrderIdentifier') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "filler" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "type" ] ] [
fhir:context [ fhir:v "type" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "FILL" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.valueString" ] ] ) ] ) ] [
fhir:name [ fhir:v "order.fillerOrderIdentifierDomain" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.fillerOrderIdentifierDomain') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "filler" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.valueString" ] ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.dateTime') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "authoredOn" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.priority') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "priority" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value.code" ] ] ) ] ) ] [
fhir:name [ fhir:v "order.notificationContactDocument" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId.value = 'order.notificationContactDocument')" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "order.notificationContactDocument.items" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e4" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitionerRoleDataEnterer" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "PractitionerRole" ] ] ) ] [
fhir:context [ fhir:v "practitionerRoleDataEnterer" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid4" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid4" ] ] ) ] [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "extension" ] ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e5" ] ] [
fhir:context [ fhir:v "e5" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitionerDataEnterer" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ] ] ) ] [
fhir:context [ fhir:v "practitionerDataEnterer" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid5" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e5" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid5" ] ] ) ] [
fhir:context [ fhir:v "practitionerRoleDataEnterer" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "practitioner" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid5" ] ] ) ] ) ;
( fhir:rule [
fhir:name [ fhir:v "data" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "UrgentNotificationContactForRequestItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "practitionerRoleDataEnterer" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "practitionerDataEnterer" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "extension" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "ExtOrfUrgentNotificationContactForRequest" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "practitionerRoleDataEnterer" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "extension" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] ) ] ) ] [
fhir:name [ fhir:v "order.notificationContactDocumentResponse" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId.value = 'order.notificationContactDocumentResponse')" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "order.notificationContactDocumentResponse.items" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e4" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitionerRoleDataEnterer" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "PractitionerRole" ] ] ) ] [
fhir:context [ fhir:v "practitionerRoleDataEnterer" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid4" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid4" ] ] ) ] [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "extension" ] ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e5" ] ] [
fhir:context [ fhir:v "e5" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitionerDataEnterer" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ] ] ) ] [
fhir:context [ fhir:v "practitionerDataEnterer" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid5" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e5" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid5" ] ] ) ] [
fhir:context [ fhir:v "practitionerRoleDataEnterer" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "practitioner" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid5" ] ] ) ] ) ;
( fhir:rule [
fhir:name [ fhir:v "data" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "UrgentNotificationContactForResponseItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "practitionerRoleDataEnterer" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "practitionerDataEnterer" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "extension" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "ExtOrfUrgentNotificationContactForResponse" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "practitionerRoleDataEnterer" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "extension" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "UrgentNotificationContactForRequestPractitionerItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "practitioner" ] ;
fhir:type [ fhir:v "Practitioner" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.notificationContactDocument.practitioner.familyName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "family" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.notificationContactDocument.practitioner.givenName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "given" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "sender.author.practitioner.title" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.notificationContactDocument.practitioner.title') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "prefix" ] ;
fhir:variable [ fhir:v "prefix" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] [
fhir:context [ fhir:v "prefix" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ] ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier" ] ] ) ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "code" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "AC" ] ] ) ] ) ] [
fhir:name [ fhir:v "sender.author.practitioner.phone" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.notificationContactDocument.practitioner.phone') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "phone" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "sender.author.practitioner.email" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.notificationContactDocument.practitioner.email') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "email" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] )
] [
fhir:name [ fhir:v "UrgentNotificationContactForRequestItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "practitionerRole" ] ;
fhir:type [ fhir:v "practitionerRole" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "practitioner" ] ;
fhir:type [ fhir:v "Practitioner" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId.value = 'order.notificationContactDocument.practitioner')" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "UrgentNotificationContactForRequestPractitionerItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "practitioner" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "ExtOrfUrgentNotificationContactForRequest" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "practitionerRole" ] ;
fhir:type [ fhir:v "PractitionerRole" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "ext" ] ;
fhir:type [ fhir:v "Extension" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "url" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-urgentnoficationcontactforthisdocument" ] ] ) ] ) ] [
fhir:name [ fhir:v "practitionerRole" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %practitionerRole.id" ] ] ) ] ) ] )
] [
fhir:name [ fhir:v "UrgentNotificationContactForResponsePractitionerItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "practitioner" ] ;
fhir:type [ fhir:v "Practitioner" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.notificationContactDocumentResponse.practitioner.familyName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "family" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.notificationContactDocumentResponse.practitioner.givenName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "given" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "sender.author.practitioner.title" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.notificationContactDocumentResponse.practitioner.title') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "prefix" ] ;
fhir:variable [ fhir:v "prefix" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] [
fhir:context [ fhir:v "prefix" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ] ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier" ] ] ) ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "code" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "AC" ] ] ) ] ) ] [
fhir:name [ fhir:v "sender.author.practitioner.phone" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.notificationContactDocumentResponse.practitioner.phone') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "phone" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "sender.author.practitioner.email" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'order.notificationContactDocumentResponse.practitioner.email') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "email" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] )
] [
fhir:name [ fhir:v "UrgentNotificationContactForResponseItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "practitionerRole" ] ;
fhir:type [ fhir:v "practitionerRole" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "practitioner" ] ;
fhir:type [ fhir:v "Practitioner" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId.value = 'order.notificationContactDocumentResponse.practitioner')" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "UrgentNotificationContactForResponsePractitionerItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "practitioner" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "ExtOrfUrgentNotificationContactForResponse" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "practitionerRole" ] ;
fhir:type [ fhir:v "PractitionerRole" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "ext" ] ;
fhir:type [ fhir:v "Extension" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "url" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-urgentnoficationcontactfortheresponsetothisdocument" ] ] ) ] ) ] [
fhir:name [ fhir:v "practitionerRole" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %practitionerRole.id" ] ] ) ] ) ] )
] [
fhir:name [ fhir:v "ReceiverPractitionerItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "practitioner" ] ;
fhir:type [ fhir:v "Practitioner" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.practitioner.familyName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "family" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.practitioner.givenName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "given" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "receiver.practitioner.title" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.practitioner.title') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "prefix" ] ;
fhir:variable [ fhir:v "prefix" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] [
fhir:context [ fhir:v "prefix" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ] ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier" ] ] ) ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "code" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "AC" ] ] ) ] ) ] [
fhir:name [ fhir:v "receiver.practitioner.gln" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.practitioner.gln') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:oid:2.51.1.3" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "receiver.practitioner.zsr" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.practitioner.zsr') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:oid:2.16.756.5.30.1.123.100.2.1.1" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "receiver.practitioner.phone" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.practitioner.phone') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "phone" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "receiver.practitioner.email" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.practitioner.email') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "email" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] )
] [
fhir:name [ fhir:v "ReceiverOrganizationItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "organization" ] ;
fhir:type [ fhir:v "Organization" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.organization.name') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "receiver.organization.gln" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.organization.gln') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:oid:2.51.1.3" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "receiver.organization.zsr" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.organization.zsr') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:oid:2.16.756.5.30.1.123.100.2.1.1" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item.answer" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.organization.streetAddressLine') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "receiver.organization.streetAddressLine" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "line" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "answer.value" ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "receiver.organization.postalCode" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.organization.postalCode') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "postalCode" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "receiver.organization.city" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.organization.city') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "city" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "receiver.organization.country" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'receiver.organization.country') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "country" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] )
] [
fhir:name [ fhir:v "ReceiverItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "practitionerRole" ] ;
fhir:type [ fhir:v "practitionerRole" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId.value = 'receiver.practitioner')" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e2" ] ] [
fhir:context [ fhir:v "e2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ] ] ) ] [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "practitionerRole" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "practitioner" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid2" ] ] ) ] [
fhir:context [ fhir:v "e2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid2" ] ] ) ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "ReceiverPractitionerItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "practitioner" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId.value = 'receiver.organization')" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e3" ] ] [
fhir:context [ fhir:v "e3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "organization" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Organization" ] ] ) ] [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid3" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "practitionerRole" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "organization" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid3" ] ] ) ] [
fhir:context [ fhir:v "e3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid3" ] ] ) ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "ReceiverOrganizationItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "organization" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "Consent" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "composition" ] ;
fhir:type [ fhir:v "Composition" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "consent.statement" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'consent.statement') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e" ] ] [
fhir:context [ fhir:v "e" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "consent" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Consent" ] ] ) ] [
fhir:context [ fhir:v "consent" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "active" ] ] ) ] [
fhir:context [ fhir:v "consent" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "scope" ] ;
fhir:variable [ fhir:v "scope" ] ] [
fhir:context [ fhir:v "scope" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "treatment" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://terminology.hl7.org/CodeSystem/consentscope" ] ] ) ] [
fhir:context [ fhir:v "consent" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "category" ] ;
fhir:variable [ fhir:v "category" ] ] [
fhir:context [ fhir:v "category" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "59284-0" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://loinc.org" ] ] ) ] [
fhir:context [ fhir:v "consent" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "policyRule" ] ;
fhir:variable [ fhir:v "policyRule" ] ] [
fhir:context [ fhir:v "policyRule" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "385432009" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://snomed.info/sct" ] ] ) ] [
fhir:context [ fhir:v "consent" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid" ] ] ) ] [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ] ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-patientconsent" ] ] ) ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "consent" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "extcode" ] ] [
fhir:context [ fhir:v "extcode" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-consentcode" ] ] ) ] [
fhir:context [ fhir:v "extcode" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "cc" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ] ] ) ] [
fhir:context [ fhir:v "cc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid" ] ] ) ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item.answer" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "consent.statement.note" ] ;
( fhir:source [
fhir:context [ fhir:v "answer" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'consent.statement.note') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "consent" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "extnote" ] ] [
fhir:context [ fhir:v "extnote" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-consentnote" ] ] ) ] [
fhir:context [ fhir:v "extnote" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] ) ] ) ;
fhir:documentation [ fhir:v "TODO after https://github.com/hl7ch/ch-orf/issues/115" ] ] )
] [
fhir:name [ fhir:v "ReceiverInit" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "composition" ] ;
fhir:type [ fhir:v "Composition" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "serviceRequest" ] ;
fhir:type [ fhir:v "ServiceRequest" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "receiver" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e" ] ] [
fhir:context [ fhir:v "e" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitionerRole" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "PractitionerRole" ] ] ) ] [
fhir:context [ fhir:v "practitionerRole" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid" ] ] ) ] [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ] ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-receiver" ] ] ) ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid" ] ] ) ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "ReceiverItems" ] ;
( fhir:variable [
fhir:v "src" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "practitionerRole" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "InitiatorItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "ext" ] ;
fhir:type [ fhir:v "Extension" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "initiator.personalrelation" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.personalrelation') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "extension" ] ] [
fhir:context [ fhir:v "extension" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "ch-orf-personalrelation" ] ] ) ] [
fhir:context [ fhir:v "extension" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "cc" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ] ] ) ] [
fhir:context [ fhir:v "cc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "initiator.legalrelation" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.legalrelation') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "extension" ] ] [
fhir:context [ fhir:v "extension" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "ch-orf-legalrelation" ] ] ) ] [
fhir:context [ fhir:v "extension" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "cc" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ] ] ) ] [
fhir:context [ fhir:v "cc" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "InitiatorPractitionerRoleItems" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId = 'initiator.practitionerRole')" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e4" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitionerrole" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "PractitionerRole" ] ] ) ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "extension" ] ] [
fhir:context [ fhir:v "practitionerrole" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid4" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "extension" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "ch-orf-personorganization" ] ] ) ] [
fhir:context [ fhir:v "extension" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid4" ] ] ) ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid4" ] ] ) ] ) ;
( fhir:rule [
fhir:name [ fhir:v "data" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "InitiatorPractitionerRoleItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "practitionerrole" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] ) ] [
fhir:name [ fhir:v "initiator.relatedPerson" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId = 'initiator.relatedPerson')" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e4" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "relatedPerson" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "RelatedPerson" ] ] ) ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "extension" ] ] [
fhir:context [ fhir:v "extension" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "ch-orf-personorganization" ] ] ) ] [
fhir:context [ fhir:v "extension" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "relatedPerson" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid4" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid4" ] ] ) ] [
fhir:context [ fhir:v "relatedPerson" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "patient" ] ;
fhir:variable [ fhir:v "reference" ] ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %patient.id" ] ] ) ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid4" ] ] ) ] ) ;
( fhir:rule [
fhir:name [ fhir:v "data" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "InitiatorRelatedPersonItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "relatedPerson" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "InitiatorRelatedPersonItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "relatedPerson" ] ;
fhir:type [ fhir:v "RelatedPerson" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.relatedPerson.familyName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "relatedPerson" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "name" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "family" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.relatedPerson.givenName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "relatedPerson" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "name" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "given" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "phone" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.relatedPerson.phone') and answer.exists())" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "initiator.relatedPerson.phone" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "relatedPerson" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "phone" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "answer.value" ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "initiator.relatedPerson.email" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.relatedPerson.email') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "relatedPerson" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "email" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item.answer" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.relatedPerson.streetAddressLine') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "relatedPerson" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "initiator.relatedPerson.streetAddressLine" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "line" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "answer.value" ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "initiator.relatedPerson.postalCode" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.relatedPerson.postalCode') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "relatedPerson" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "postalCode" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "initiator.relatedPerson.city" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.relatedPerson.city') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "relatedPerson" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "city" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "initiator.relatedPerson.country" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.relatedPerson.country') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "relatedPerson" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "country" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] )
] [
fhir:name [ fhir:v "InitiatorPractitionerRoleItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "practitionerRole" ] ;
fhir:type [ fhir:v "practitionerRole" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId.value = 'initiator.practitionerRole.practitioner')" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e2" ] ] [
fhir:context [ fhir:v "e2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ] ] ) ] [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "practitionerRole" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "practitioner" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid2" ] ] ) ] [
fhir:context [ fhir:v "e2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid2" ] ] ) ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "InitiatorPractitionerItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "practitioner" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId.value = 'initiator.practitionerRole.organization')" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e3" ] ] [
fhir:context [ fhir:v "e3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "organization" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Organization" ] ] ) ] [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid3" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "practitionerRole" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "organization" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid3" ] ] ) ] [
fhir:context [ fhir:v "e3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid3" ] ] ) ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "InitiatorOrganizationItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "organization" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "InitiatorPractitionerItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "practitioner" ] ;
fhir:type [ fhir:v "Practitioner" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.practitionerRole.practitioner.familyName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "family" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.practitionerRole.practitioner.givenName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "given" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "initiator.practitionerRole.practitioner.title" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.practitionerRole.practitioner.title') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "prefix" ] ;
fhir:variable [ fhir:v "prefix" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] [
fhir:context [ fhir:v "prefix" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ] ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier" ] ] ) ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "code" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "AC" ] ] ) ] ) ] [
fhir:name [ fhir:v "initiator.practitionerRole.practitioner.phone" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.practitionerRole.practitioner.phone') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "phone" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "initiator.practitionerRole.practitioner.email" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.practitionerRole.practitioner.email') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "email" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "receiver.practitioner.gln" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.practitionerRole.practitioner.gln') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:oid:2.51.1.3" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "receiver.practitioner.zsr" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.practitionerRole.practitioner.zsr') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:oid:2.16.756.5.30.1.123.100.2.1.1" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] )
] [
fhir:name [ fhir:v "InitiatorOrganizationItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "organization" ] ;
fhir:type [ fhir:v "Organization" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.practitionerRole.organization.name') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item.answer" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.practitionerRole.organization.streetAddressLine') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "initiator.practitionerRole.organization.streetAddressLine" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "line" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "answer.value" ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "initiator.practitionerRole.organization.postalCode" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.practitionerRole.organization.postalCode') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "postalCode" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "initiator.practitionerRole.organization.city" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.practitionerRole.organization.city') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "city" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "initiator.practitionerRole.organization.country" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'initiator.practitionerRole.organization.country') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "country" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] )
] [
fhir:name [ fhir:v "FamilyDoctorInit" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "composition" ] ;
fhir:type [ fhir:v "Composition" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "serviceRequest" ] ;
fhir:type [ fhir:v "ServiceRequest" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "FamilyDoctorInit" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e4" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitionerRole" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "PractitionerRole" ] ] ) ] [
fhir:context [ fhir:v "practitionerRole" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid4" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "generalPractitioner" ] ;
fhir:variable [ fhir:v "gp" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "gp" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid4" ] ] ) ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid4" ] ] ) ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId.value = 'familydoctor.practitioner')" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e2" ] ] [
fhir:context [ fhir:v "e2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "practitioner" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Practitioner" ] ] ) ] [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid2" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "practitionerRole" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "practitioner" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid2" ] ] ) ] [
fhir:context [ fhir:v "e2" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid2" ] ] ) ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "FamilyDoctorPractitionerItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "practitioner" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId.value = 'familydoctor.organization')" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e3" ] ] [
fhir:context [ fhir:v "e3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "organization" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Organization" ] ] ) ] [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid3" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "practitionerRole" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "organization" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid3" ] ] ) ] [
fhir:context [ fhir:v "e3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid3" ] ] ) ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "FamilyDoctorOrganizationItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "organization" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "FamilyDoctorPractitionerItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "practitioner" ] ;
fhir:type [ fhir:v "Practitioner" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.practitioner.familyName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "family" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.practitioner.givenName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "given" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "familydoctor.practitioner.gln" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.practitioner.gln') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:oid:2.51.1.3" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "familydoctor.practitioner.zsr" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.practitioner.zsr') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:oid:2.16.756.5.30.1.123.100.2.1.1" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "familydoctor.practitioner.title" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.practitioner.title') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "practitionerName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "prefix" ] ;
fhir:variable [ fhir:v "prefix" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] [
fhir:context [ fhir:v "prefix" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ] ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier" ] ] ) ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "value" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "code" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "AC" ] ] ) ] ) ] [
fhir:name [ fhir:v "familydoctor.practitioner.phone" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.practitioner.phone') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "phone" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "familydoctor.practitioner.email" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.practitioner.email') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "practitioner" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "email" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] )
] [
fhir:name [ fhir:v "FamilyDoctorOrganizationItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "organization" ] ;
fhir:type [ fhir:v "Organization" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.organization.name') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item.answer" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.organization.streetAddressLine') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "familydoctor.organization.streetAddressLine" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "line" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "answer.value" ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "familydoctor.organization.postalCode" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.organization.postalCode') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "postalCode" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "familydoctor.organization.city" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.organization.city') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "city" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "familydoctor.organization.country" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.organization.country') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "country" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "familydoctor.organization.gln" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.organization.gln') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:oid:2.51.1.3" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "familydoctorr.organization.zsr" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'familydoctor.organization.zsr') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:oid:2.16.756.5.30.1.123.100.2.1.1" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] )
] [
fhir:name [ fhir:v "AntecedentEpisodeOfCareInit" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "composition" ] ;
fhir:type [ fhir:v "Composition" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "AntecedentEpisodeOfCareItems" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ] ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-antecedentepisodeofcare" ] ] ) ] [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e4" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "episodeofcare" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "EpisodeOfCare" ] ] ) ] [
fhir:context [ fhir:v "episodeofcare" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid4" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %uuid4" ] ] ) ] [
fhir:context [ fhir:v "episodeofcare" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "finished" ] ] ) ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "ref" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "ref" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %episodeofcare.id" ] ] ) ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "AntecedentEpisodeOfCareItems" ] ;
( fhir:variable [
fhir:v "src" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "patient" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "episodeofcare" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "AntecedentEpisodeOfCareItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "tgt" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "episodeofcare" ] ;
fhir:type [ fhir:v "EpisodeOfCare" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "antecedentEpisodeOfCare.requestedPeriod.start" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'antecedentEpisodeOfCare.start') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "episodeofcare" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "statusHistory" ] ;
fhir:variable [ fhir:v "statusHistory" ] ] [
fhir:context [ fhir:v "statusHistory" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "finished" ] ] ) ] [
fhir:context [ fhir:v "statusHistory" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "period" ] ;
fhir:variable [ fhir:v "period" ] ] [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "start" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "end" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ;
( fhir:rule [
fhir:name [ fhir:v "antecedentEpisodeOfCareEndNotSameAsStart" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "iteme" ] ;
fhir:condition [ fhir:v "((linkId.value = 'antecedentEpisodeOfCare.end') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "period" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "end" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "iteme.answer.value" ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "antecedentEpisodeOfCare.managingOrganization" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId.value = 'antecedentEpisodeOfCare.managingOrganization')" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e3" ] ] [
fhir:context [ fhir:v "e3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "organization" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Organization" ] ] ) ] [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid3" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e3" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid3" ] ] ) ] [
fhir:context [ fhir:v "episodeofcare" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "managingOrganization" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "append" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:uuid:" ] ] [
fhir:value [ fhir:v "uuid3" ] ] ) ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "AntecedentEpisodeOfCareOrganizationItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "organization" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "AntecedentEpisodeOfCareOrganizationItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "organization" ] ;
fhir:type [ fhir:v "Organization" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.name') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item.answer" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.streetAddressLine') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "antecedentEpisodeOfCareorganization.streetAddressLine" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "line" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "answer.value" ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "sender.author.organization.postalCode" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.postalCode') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "postalCode" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "sender.author.organization.city" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.city') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "city" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "sender.author.organization.country" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'antecedentEpisodeOfCare.managingOrganization.country') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "country" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] )
] [
fhir:name [ fhir:v "InitiatorInit" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "composition" ] ;
fhir:type [ fhir:v "Composition" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "serviceRequest" ] ;
fhir:type [ fhir:v "ServiceRequest" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "receiver" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "composition" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "ext" ] ] [
fhir:context [ fhir:v "ext" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-initiator" ] ] ) ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "InitiatorItems" ] ;
( fhir:variable [
fhir:v "src" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "patient" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "ext" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "PatientItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "tgt" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "composition" ] ;
fhir:type [ fhir:v "Composition" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "serviceRequest" ] ;
fhir:type [ fhir:v "ServiceRequest" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "grpfamily" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "grp" ] ;
fhir:condition [ fhir:v "linkId = 'familydoctor'" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "FamilyDoctorInit" ] ;
( fhir:variable [
fhir:v "grp" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "tgt" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "composition" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "serviceRequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ] ) ;
( fhir:dependent [
fhir:name [ fhir:v "PatientItems" ] ;
( fhir:variable [
fhir:v "item" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "bundle" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "tgt" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "composition" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] [
fhir:v "serviceRequest" ;
( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/original-item-type"^^xsd:anyURI ] ;
fhir:value [ fhir:v "id"^^xsd:anyURI ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.familyName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "patientName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "family" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.maidenName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "use" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "maiden" ] ] ) ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "family" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.givenName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "patientName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "given" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "patient.localPid" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.localPid') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "localpid" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "type" ] ] [
fhir:context [ fhir:v "type" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "MR" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.valueString" ] ] ) ] ) ] [
fhir:name [ fhir:v "patient.localPidDomain" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.localPidDomain') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "value" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "localpid" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.valueString" ] ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.birthDate') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "birthDate" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.gender') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "gender" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value.code" ] ] ) ] ) ] [
fhir:name [ fhir:v "patient.maritalStatus" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.maritalStatus') and answer.exists())" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "answer" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "maritalStatus" ] ;
( fhir:source [
fhir:context [ fhir:v "answer" ] ;
fhir:type [ fhir:v "Coding" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "coding" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "maritalStatus" ] ;
fhir:variable [ fhir:v "maritalStatus" ] ] [
fhir:context [ fhir:v "maritalStatus" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "coding" ] ] ) ] ) ] ) ] ) ] [
fhir:name [ fhir:v "patient.phone" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.phone') and answer.exists())" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "patient.phone" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "phone" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "answer.value" ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "patient.email" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.email') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "email" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item.answer" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.streetAddressLine') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "patient.streetAddressLine" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "line" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "answer.value" ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "patient.postalCode" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.postalCode') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "postalCode" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "patient.city" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.city') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "city" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "patient.country" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.country') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address" ] ;
fhir:variable [ fhir:v "address" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "orgAddress" ] ] [
fhir:context [ fhir:v "address" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "country" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "patient.languageOfCorrespondence" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.languageOfCorrespondence') and answer.exists())" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "answer" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "languageOfCorrespondence" ] ;
( fhir:source [
fhir:context [ fhir:v "answer" ] ;
fhir:type [ fhir:v "Coding" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "coding" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "communication" ] ;
fhir:variable [ fhir:v "communication" ] ] [
fhir:context [ fhir:v "communication" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "preferred" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "true"^^xsd:boolean ] ] ) ] [
fhir:context [ fhir:v "communication" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "language" ] ;
fhir:variable [ fhir:v "language" ] ] [
fhir:context [ fhir:v "language" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "coding" ] ] ) ] ) ] ) ] ) ] [
fhir:name [ fhir:v "contact" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId.value = 'patient.contactperson')" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "contact" ] ;
fhir:variable [ fhir:v "contact" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.contactperson.familyName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "contact" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "contactName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "family" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "item" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.contactperson.givenName') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "contact" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:variable [ fhir:v "name" ] ;
( fhir:listMode [ fhir:v "share" ] ) ;
fhir:listRuleId [ fhir:v "contactName" ] ] [
fhir:context [ fhir:v "name" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "given" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "patient.contactperson.phone" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.contactperson.phone') and answer.exists())" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "patient.phone" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "phone" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "answer.value" ] ] ) ] ) ] ) ] [
fhir:name [ fhir:v "patient.email" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.contactperson.email') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "contact" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "telecom" ] ;
fhir:variable [ fhir:v "value" ] ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "email" ] ] ) ] [
fhir:context [ fhir:v "value" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "patient.contactperson.relationship" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'patient.contactperson.relationship') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "contact" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "relationship" ] ;
fhir:variable [ fhir:v "relationship" ] ] [
fhir:context [ fhir:v "relationship" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "RequestedEncounterItems" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "serviceRequest" ] ;
fhir:type [ fhir:v "ServiceRequest" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "RequestedEncounterItems" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e4" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "encounter" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Encounter" ] ] ) ] [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid4" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %uuid4" ] ] ) ] [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "planned" ] ] ) ] [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "extension" ] ] [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "subject" ] ;
fhir:variable [ fhir:v "subject" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "subject" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %patient.id" ] ] ) ] [
fhir:context [ fhir:v "extension" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-requestedencounterdetails" ] ] ) ] [
fhir:context [ fhir:v "extension" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "reference" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %uuid4" ] ] ) ] ) ;
( fhir:rule [
fhir:name [ fhir:v "requestedEncounter.class" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'requestedEncounter.class') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "class" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "requestedEncounter.desiredAccommodation" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'requestedEncounter.desiredAccommodation') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "encounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "extension" ] ] [
fhir:context [ fhir:v "extension" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "url" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-desiredaccommodation" ] ] ) ] [
fhir:context [ fhir:v "extension" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] ) ] )
] [
fhir:name [ fhir:v "Coverage" ] ;
fhir:typeMode [ fhir:v "none" ] ;
( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "BackboneElement" ] ;
fhir:mode [ fhir:v "source" ] ] [
fhir:name [ fhir:v "bundle" ] ;
fhir:type [ fhir:v "Bundle" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "patient" ] ;
fhir:type [ fhir:v "Patient" ] ;
fhir:mode [ fhir:v "target" ] ] [
fhir:name [ fhir:v "serviceRequest" ] ;
fhir:type [ fhir:v "ServiceRequest" ] ;
fhir:mode [ fhir:v "target" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "coverage.beneficiary" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "where(linkId.value = 'coverage.beneficiary')" ] ] ) ;
( fhir:rule [
fhir:name [ fhir:v "coverage.beneficiary.ahvn13" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'coverage.beneficiary.ahvn13') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "patient" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ] ] [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "urn:oid:2.16.756.5.32" ] ] ) ] [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] ) ;
fhir:documentation [ fhir:v "coverage.beneficiary" ] ] [
fhir:name [ fhir:v "coveragekvg" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "where(linkId.value = 'coverage.kvg')" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e4" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "coverage" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Coverage" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid4" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %uuid4" ] ] ) ] [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "insurance" ] ;
fhir:variable [ fhir:v "insurance" ] ] [
fhir:context [ fhir:v "insurance" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %uuid4" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "active" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "beneficiary" ] ;
fhir:variable [ fhir:v "subject" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "subject" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %patient.id" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "type" ] ] [
fhir:context [ fhir:v "type" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "KVG" ] ] ) ] ) ;
( fhir:rule [
fhir:name [ fhir:v "coverage.kvg.name" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'coverage.kvg.name') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "payor" ] ;
fhir:variable [ fhir:v "payor" ] ] [
fhir:context [ fhir:v "payor" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "refcontained" ] ] [
fhir:context [ fhir:v "refcontained" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "#org" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "contained" ] ;
fhir:variable [ fhir:v "organization" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Organization" ] ] ) ] [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "org" ] ] ) ] [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "coverage.kvg.insuranceCardNumber" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'coverage.kvg.insuranceCardNumber') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ] ] [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "typeid" ] ] [
fhir:context [ fhir:v "typeid" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coverageidentifiertype" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "VeKa" ] ] ) ] [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] ) ;
fhir:documentation [ fhir:v "coverage.kvg" ] ] [
fhir:name [ fhir:v "coverageuvg" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "where(linkId.value = 'coverage.uvg')" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e4" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "coverage" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Coverage" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid4" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %uuid4" ] ] ) ] [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "insurance" ] ;
fhir:variable [ fhir:v "insurance" ] ] [
fhir:context [ fhir:v "insurance" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %uuid4" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "active" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "beneficiary" ] ;
fhir:variable [ fhir:v "subject" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "subject" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %patient.id" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "type" ] ] [
fhir:context [ fhir:v "type" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "UVG" ] ] ) ] ) ;
( fhir:rule [
fhir:name [ fhir:v "coverage.uvg.name" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'coverage.uvg.name') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "payor" ] ;
fhir:variable [ fhir:v "payor" ] ] [
fhir:context [ fhir:v "payor" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "refcontained" ] ] [
fhir:context [ fhir:v "refcontained" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "#org" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "contained" ] ;
fhir:variable [ fhir:v "organization" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Organization" ] ] ) ] [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "org" ] ] ) ] [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "coverage.uvg.claimNumber" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'coverage.uvg.claimNumber') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ] ] [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "typeid" ] ] [
fhir:context [ fhir:v "typeid" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coverageidentifiertype" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Claim" ] ] ) ] [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] ) ;
fhir:documentation [ fhir:v "coverage.uvg Unfallversicherung (nach UVG) 0..1 group Definition: Coverage.type" ] ] [
fhir:name [ fhir:v "coveragevvg" ] ;
( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "where(linkId.value = 'coverage.vvg')" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "bundle" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "entry" ] ;
fhir:variable [ fhir:v "e4" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "resource" ] ;
fhir:variable [ fhir:v "coverage" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Coverage" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:variable [ fhir:v "uuid4" ] ;
fhir:transform [ fhir:v "uuid" ] ] [
fhir:context [ fhir:v "e4" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "fullUrl" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %uuid4" ] ] ) ] [
fhir:context [ fhir:v "serviceRequest" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "insurance" ] ;
fhir:variable [ fhir:v "insurance" ] ] [
fhir:context [ fhir:v "insurance" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %uuid4" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "active" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "beneficiary" ] ;
fhir:variable [ fhir:v "subject" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Reference" ] ] ) ] [
fhir:context [ fhir:v "subject" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "'urn:uuid:' + %patient.id" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "type" ] ] [
fhir:context [ fhir:v "type" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "VVG" ] ] ) ] ) ;
( fhir:rule [
fhir:name [ fhir:v "coverage.vvg.name" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'coverage.vvg.name') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "payor" ] ;
fhir:variable [ fhir:v "payor" ] ] [
fhir:context [ fhir:v "payor" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:variable [ fhir:v "refcontained" ] ] [
fhir:context [ fhir:v "refcontained" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "#org" ] ] ) ] [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "contained" ] ;
fhir:variable [ fhir:v "organization" ] ;
fhir:transform [ fhir:v "create" ] ;
( fhir:parameter [
fhir:value [ fhir:v "Organization" ] ] ) ] [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "org" ] ] ) ] [
fhir:context [ fhir:v "organization" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "name" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [
fhir:name [ fhir:v "coverage.vvg.insuranceCardNumber" ] ;
( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "((linkId.value = 'coverage.vvg.insuranceCardNumber') and answer.exists())" ] ] ) ;
( fhir:target [
fhir:context [ fhir:v "coverage" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "identifier" ] ] [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "typeid" ] ] [
fhir:context [ fhir:v "typeid" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "coding" ] ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "system" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coverageidentifiertype" ] ] ) ] [
fhir:context [ fhir:v "coding" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "copy" ] ;
( fhir:parameter [
fhir:value [ fhir:v "VeKa" ] ] ) ] [
fhir:context [ fhir:v "identifier" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
( fhir:parameter [
fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] ) ;
fhir:documentation [ fhir:v "cover