This page is part of the CH ORF (R4) (v2.0.0-ballot: STU 2 Ballot 1) based on FHIR R4. This is the current published version in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions
Draft as of 2023-06-29 |
@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:text [ fhir:status [ fhir:v "additional" ] ; 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://fhir.ch/ig/ch-orf/Questionnaire-order-referral-form.html\n// QRF QuestionnaireResponse: http://fhir.ch/ig/ch-orf/QuestionnaireResponse-order-referral-form.xml.html\n// Bundle: http://fhir.ch/ig/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/BackboneElement" alias BackboneElement as source\nuses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target\nuses "http://hl7.org/fhir/StructureDefinition/Composition" alias Composition 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/Extension" alias Extension as target\nuses "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare" alias EpisodeOfCare as target\nuses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QuestionnaireResponseTarget 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, \n e.resource = create('Composition') as composition, \n composition.id = uuid() as uuid,\n e.fullUrl = append('urn:uuid:',uuid),\n bundle.entry as e2, \n bundle.timestamp = (now()) as timestamp,\n composition.date = timestamp,\n composition.title = 'Order and Referral by Form',\n composition.type as type, type.coding as coding, coding.code = '419891008', coding.system = 'http://snomed.info/sct',\n composition.category as category, category.coding as coding, coding.code = '721963009', coding.system = 'http://snomed.info/sct',\n e2.resource = create('Patient') as patient,\n patient.id = uuid() as uuid2,\n e2.fullUrl = append('urn:uuid:',uuid2),\n bundle.entry as e4, \n e4.resource = qrcp as questionnaireresp,\n questionnaireresp.id = uuid() as uuid4,\n e4.fullUrl = append('urn:uuid:',uuid4),\n bundle.entry as e5, \n e5.resource = create('ServiceRequest') as servicerequest, \n servicerequest.id = uuid() as uuid5,\n 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) "receiverCopy";\n qr.item as grp where linkId='appointment' then Appointment(grp, bundle, composition, serviceRequest) "appointment";\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\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',\n ext.value = create('Identifier') as value, value.system='urn:ietf:rfc:3986', value.value=('urn:uuid:'+item.answer.valueString) "order.precedentDocumentIdentifier"; \n\n src.item as item where (linkId.value = 'order.placerOrderIdentifier' and answer.exists()) -> serviceRequest.identifier as value share placer, \n value.type as type, type.coding as coding,\n coding.system = 'http://terminology.hl7.org/CodeSystem/v2-0203',\n coding.code = 'PLAC',\n value.value=(item.answer.valueString) "order.placerOrderIdentifier"; \n src.item as item where (linkId.value = 'order.placerOrderIdentifierDomain' and answer.exists()) -> serviceRequest.identifier as value share placer, \n value.system=(item.answer.valueString) "order.placerOrderIdentifierDomain"; \n src.item as item where (linkId.value = 'order.fillerOrderIdentifier' and answer.exists()) -> serviceRequest.identifier as value share filler, \n value.type as type, type.coding as coding,\n coding.system = 'http://terminology.hl7.org/CodeSystem/v2-0203',\n coding.code = 'FILL',\n value.value=(item.answer.valueString) "order.fillerOrderIdentifier"; \n src.item as item where (linkId.value = 'order.fillerOrderIdentifierDomain' and answer.exists()) -> serviceRequest.identifier as value share filler, \n value.system=(item.answer.valueString) "order.fillerOrderIdentifierDomain"; \n\n src.item as item where (linkId.value = 'order.dateTime' and answer.exists()) -> serviceRequest.authoredOn = (item.answer.value);\n\n src.item as item where (linkId.value = 'order.priority' and answer.exists()) -> serviceRequest.priority = (item.answer.value.code);\n\n src.item as item where (linkId.value = 'order.notificationContactDocument') then {\n item -> bundle.entry as e4, \n e4.resource = create('PractitionerRole') as practitionerRoleDataEnterer, \n practitionerRoleDataEnterer.id = uuid() as uuid4,\n e4.fullUrl = append('urn:uuid:',uuid4),\n composition.extension as extension,\n bundle.entry as e5, \n e5.resource = create('Practitioner') as practitionerDataEnterer, \n practitionerDataEnterer.id = uuid() as uuid5,\n e5.fullUrl = append('urn:uuid:',uuid5),\n practitionerRoleDataEnterer.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid5)\n// ,\n// FIXME not known here practitionerRoleDataEnterer.organization = create('Reference') as reference, reference.type='Organization', reference.reference = append('urn:uuid:',uuid3) \n then {\n item then UrgentNotificationContactForRequestItems(item, practitionerRoleDataEnterer, practitionerDataEnterer) "data";\n item then ExtOrfUrgentNotificationContactForRequest(item, practitionerRoleDataEnterer, extension) "extension";\n } "order.notificationContactDocument.items";\n } "order.notificationContactDocument";\n \n src.item as item where (linkId.value = 'order.notificationContactDocumentResponse') then {\n item -> bundle.entry as e4, \n e4.resource = create('PractitionerRole') as practitionerRoleDataEnterer, \n practitionerRoleDataEnterer.id = uuid() as uuid4,\n e4.fullUrl = append('urn:uuid:',uuid4),\n composition.extension as extension,\n bundle.entry as e5, \n e5.resource = create('Practitioner') as practitionerDataEnterer, \n practitionerDataEnterer.id = uuid() as uuid5,\n e5.fullUrl = append('urn:uuid:',uuid5),\n practitionerRoleDataEnterer.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid5)\n// ,\n// FIXME not known here practitionerRoleDataEnterer.organization = create('Reference') as reference, reference.type='Organization', reference.reference = append('urn:uuid:',uuid3) \n then {\n item then UrgentNotificationContactForResponseItems(item, practitionerRoleDataEnterer, practitionerDataEnterer) "data";\n item then ExtOrfUrgentNotificationContactForResponse(item, practitionerRoleDataEnterer, extension) "extension";\n } "order.notificationContactDocumentResponse.items";\n } "order.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, \n name.prefix = (item.answer.value) as prefix,\n prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier',\n ext.value = create('code') as value, value.value='AC' "sender.author.practitioner.title"; \n src.item as item where (linkId.value = 'order.notificationContactDocument.practitioner.phone' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'phone',\n value.value=(item.answer.value) "sender.author.practitioner.phone"; \n src.item as item where (linkId.value = 'order.notificationContactDocument.practitioner.email' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'email',\n value.value=(item.answer.value) "sender.author.practitioner.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, \n 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, \n name.prefix = (item.answer.value) as prefix,\n prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier',\n ext.value = create('code') as value, value.value='AC' "sender.author.practitioner.title"; \n src.item as item where (linkId.value = 'order.notificationContactDocumentResponse.practitioner.phone' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'phone',\n value.value=(item.answer.value) "sender.author.practitioner.phone"; \n src.item as item where (linkId.value = 'order.notificationContactDocumentResponse.practitioner.email' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'email',\n value.value=(item.answer.value) "sender.author.practitioner.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, \n reference.reference = ('urn:uuid:'+%practitionerRole.id) "practitionerRole";\n}\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, \n name.prefix = (item.answer.value) as prefix,\n prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier',\n ext.value = create('code') as value, value.value='AC' "receiver.practitioner.title"; \n src.item as item where (linkId.value = 'receiver.practitioner.gln' and answer.exists()) -> practitioner.identifier as value, \n value.system = 'urn:oid:2.51.1.3',\n value.value=(item.answer.value) "receiver.practitioner.gln"; \n src.item as item where (linkId.value = 'receiver.practitioner.zsr' and answer.exists()) -> practitioner.identifier as value, \n value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1',\n value.value=(item.answer.value) "receiver.practitioner.zsr"; \n src.item as item where (linkId.value = 'receiver.practitioner.phone' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'phone',\n value.value=(item.answer.value) "receiver.practitioner.phone"; \n src.item as item where (linkId.value = 'receiver.practitioner.email' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'email',\n value.value=(item.answer.value) "receiver.practitioner.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, \n value.system = 'urn:oid:2.51.1.3',\n value.value=(item.answer.value) "receiver.organization.gln";\n src.item as item where (linkId.value = 'receiver.organization.zsr' and answer.exists()) -> organization.identifier as value, \n value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1',\n value.value=(item.answer.value) "receiver.organization.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) "receiver.organization.streetAddressLine";\n } "item.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) "receiver.organization.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) "receiver.organization.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) "receiver.organization.country";\n}\n\ngroup ReceiverItems(source src : BackboneElement, target bundle: Bundle, target practitionerRole: practitionerRole) {\n src.item as item where (linkId.value = 'receiver.practitioner') -> \n bundle.entry as e2, \n e2.resource = create('Practitioner') as practitioner, \n practitioner.id = uuid() as uuid2,\n practitionerRole.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid2),\n e2.fullUrl = append('urn:uuid:',uuid2) then ReceiverPractitionerItems(item, practitioner);\n src.item as item where (linkId.value = 'receiver.organization') ->\n bundle.entry as e3, \n e3.resource = create('Organization') as organization, \n organization.id = uuid() as uuid3,\n practitionerRole.organization = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid3), \n e3.fullUrl = append('urn:uuid:',uuid3) then ReceiverOrganizationItems(item, organization);\n}\n\ngroup Consent(source src : BackboneElement, target bundle: Bundle, target composition : Composition) {\n src.item as item where (linkId.value = 'consent.statement' and answer.exists()) -> bundle.entry as e, \n e.resource = create('Consent') as consent,\n consent.status = 'active', \n consent.scope as scope, scope.coding as coding, coding.code = 'treatment', coding.system= 'http://terminology.hl7.org/CodeSystem/consentscope',\n consent.category as category, category.coding as coding, coding.code = '59284-0', coding.system= 'http://loinc.org',\n consent.policyRule as policyRule, policyRule.coding as coding, coding.code = '385432009', coding.system= 'http://snomed.info/sct',\n consent.id = uuid() as uuid,\n e.fullUrl = append('urn:uuid:',uuid),\n composition.extension as ext, \n ext.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-patientconsent',\n ext.value = create('Reference') as reference, \n consent.extension as extcode,\n extcode.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-consentcode',\n extcode.value = create('CodeableConcept') as cc, cc.coding = (item.answer.value),\n 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())\n -> consent.extension as extnote,\n extnote.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-consentnote',\n extnote.value = (item.answer.value) "consent.statement.note";\n } "item.answer";\n } "consent.statement";\n}\n\ngroup ReceiverInit(source src : BackboneElement, target bundle: Bundle, target composition : Composition, target serviceRequest: ServiceRequest) {\n src -> bundle.entry as e, \n e.resource = create('PractitionerRole') as practitionerRole, \n practitionerRole.id = uuid() as uuid,\n e.fullUrl = append('urn:uuid:',uuid),\n composition.extension as ext, \n ext.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-receiver',\n ext.value = create('Reference') as reference, \n reference.reference = append('urn:uuid:',uuid) then\n 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()) -> \n ext.extension as extension, \n extension.url = 'ch-orf-personalrelation', \n extension.value = (item.answer.value) "initiator.personalrelation";\n src.item as item where (linkId.value = 'initiator.legalrelation' and answer.exists()) -> \n ext.extension as extension, \n extension.url = 'ch-orf-legalrelation', \n extension.value = (item.answer.value) "initiator.legalrelation";\n src.item as item where (linkId='initiator.practitionerRole') -> bundle.entry as e4, \n e4.resource = create('PractitionerRole') as practitionerrole, \n ext.extension as extension,\n practitionerrole.id = uuid() as uuid4,\n extension.url = 'ch-orf-personorganization',\n extension.value = create('Reference') as reference, \n reference.reference = append('urn:uuid:',uuid4),\n 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, \n e4.resource = create('RelatedPerson') as relatedPerson,\n ext.extension as extension, \n extension.url = 'ch-orf-personorganization',\n extension.value = create('Reference') as reference, \n relatedPerson.id = uuid() as uuid4,\n reference.reference = append('urn:uuid:',uuid4),\n relatedPerson.patient as reference,\n reference.reference = ('urn:uuid:'+%patient.id),\n e4.fullUrl = append('urn:uuid:',uuid4) then {\n item then InitiatorRelatedPersonItems(item, relatedPerson) "data";\n } "initiator.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',\n value.value= (answer.value) "initiator.relatedPerson.phone"; \n } "phone";\n src.item as item where (linkId.value = 'initiator.relatedPerson.email' and answer.exists()) -> relatedPerson.telecom as value, \n value.system = 'email',\n value.value=(item.answer.value) "initiator.relatedPerson.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) "initiator.relatedPerson.streetAddressLine";\n } "item.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) "initiator.relatedPerson.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) "initiator.relatedPerson.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) "initiator.relatedPerson.country";\n}\n\n\ngroup InitiatorPractitionerRoleItems(source src : BackboneElement, target bundle: Bundle, target practitionerRole: practitionerRole) {\n src.item as item where (linkId.value = 'initiator.practitionerRole.practitioner') -> \n bundle.entry as e2, \n e2.resource = create('Practitioner') as practitioner, \n practitioner.id = uuid() as uuid2,\n practitionerRole.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid2),\n e2.fullUrl = append('urn:uuid:',uuid2) then InitiatorPractitionerItems(item, practitioner);\n src.item as item where (linkId.value = 'initiator.practitionerRole.organization') ->\n bundle.entry as e3, \n e3.resource = create('Organization') as organization, \n organization.id = uuid() as uuid3,\n practitionerRole.organization = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid3), \n 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, \n name.prefix = (item.answer.value) as prefix,\n prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier',\n ext.value = create('code') as value, value.value='AC' "initiator.practitionerRole.practitioner.title"; \n src.item as item where (linkId.value = 'initiator.practitionerRole.practitioner.phone' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'phone',\n value.value=(item.answer.value) "initiator.practitionerRole.practitioner.phone"; \n src.item as item where (linkId.value = 'initiator.practitionerRole.practitioner.email' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'email',\n value.value=(item.answer.value) "initiator.practitionerRole.practitioner.email"; \n src.item as item where (linkId.value = 'initiator.practitionerRole.practitioner.gln' and answer.exists()) -> practitioner.identifier as value, \n value.system = 'urn:oid:2.51.1.3',\n value.value=(item.answer.value) "receiver.practitioner.gln"; \n src.item as item where (linkId.value = 'initiator.practitionerRole.practitioner.zsr' and answer.exists()) -> practitioner.identifier as value, \n value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1',\n value.value=(item.answer.value) "receiver.practitioner.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) "initiator.practitionerRole.organization.streetAddressLine";\n } "item.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) "initiator.practitionerRole.organization.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) "initiator.practitionerRole.organization.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) "initiator.practitionerRole.organization.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, \n e4.resource = create('PractitionerRole') as practitionerRole,\n practitionerRole.id = uuid() as uuid4,\n patient.generalPractitioner = create('Reference') as gp, \n gp.reference = append('urn:uuid:',uuid4),\n e4.fullUrl = append('urn:uuid:',uuid4) then {\n src.item as item where (linkId.value = 'familydoctor.practitioner') -> \n bundle.entry as e2, \n e2.resource = create('Practitioner') as practitioner, \n practitioner.id = uuid() as uuid2,\n practitionerRole.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid2),\n e2.fullUrl = append('urn:uuid:',uuid2) then FamilyDoctorPractitionerItems(item, practitioner);\n\n src.item as item where (linkId.value = 'familydoctor.organization') ->\n bundle.entry as e3, \n e3.resource = create('Organization') as organization, \n organization.id = uuid() as uuid3,\n practitionerRole.organization = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid3), \n 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, \n value.system = 'urn:oid:2.51.1.3',\n value.value=(item.answer.value) "familydoctor.practitioner.gln"; \n src.item as item where (linkId.value = 'familydoctor.practitioner.zsr' and answer.exists()) -> practitioner.identifier as value, \n value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1',\n value.value=(item.answer.value) "familydoctor.practitioner.zsr"; \n src.item as item where (linkId.value = 'familydoctor.practitioner.title' and answer.exists()) -> practitioner.name as name share practitionerName, \n name.prefix = (item.answer.value) as prefix,\n prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier',\n ext.value = create('code') as value, value.value='AC' "familydoctor.practitioner.title"; \n src.item as item where (linkId.value = 'familydoctor.practitioner.phone' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'phone',\n value.value=(item.answer.value) "familydoctor.practitioner.phone"; \n src.item as item where (linkId.value = 'familydoctor.practitioner.email' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'email',\n value.value=(item.answer.value) "familydoctor.practitioner.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) "familydoctor.organization.streetAddressLine";\n } "item.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) "familydoctor.organization.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) "familydoctor.organization.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) "familydoctor.organization.country";\n src.item as item where (linkId.value = 'familydoctor.organization.gln' and answer.exists()) -> organization.identifier as value, \n value.system = 'urn:oid:2.51.1.3',\n value.value=(item.answer.value) "familydoctor.organization.gln";\n src.item as item where (linkId.value = 'familydoctor.organization.zsr' and answer.exists()) -> organization.identifier as value, \n value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1',\n value.value=(item.answer.value) "familydoctorr.organization.zsr"; \n}\n\ngroup AntecedentEpisodeOfCareInit(source src : BackboneElement, target bundle: Bundle, target patient: Patient, target composition : Composition) {\n src -> composition.extension as ext, \n ext.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-antecedentepisodeofcare',\n bundle.entry as e4, \n e4.resource = create('EpisodeOfCare') as episodeofcare, \n episodeofcare.id = uuid() as uuid4,\n e4.fullUrl = ('urn:uuid:'+%uuid4),\n episodeofcare.status = 'finished',\n ext.value = create('Reference') as ref, ref.reference = ('urn:uuid:'+%episodeofcare.id)\n 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 } "antecedentEpisodeOfCare.requestedPeriod.start";\n src.item as item where (linkId.value = 'antecedentEpisodeOfCare.managingOrganization') -> \n bundle.entry as e3, \n e3.resource = create('Organization') as organization, \n organization.id = uuid() as uuid3,\n e3.fullUrl = append('urn:uuid:',uuid3),\n episodeofcare.patient = create('Reference') as reference, reference.reference = ('urn:uuid:'+%tgt.id),\n episodeofcare.managingOrganization = create('Reference') as reference, \n reference.reference = append('urn:uuid:',uuid3) then AntecedentEpisodeOfCareOrganizationItems(item, organization) "antecedentEpisodeOfCare.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) "antecedentEpisodeOfCareorganization.streetAddressLine";\n } "item.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) "sender.author.organization.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) "sender.author.organization.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) "sender.author.organization.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, \n ext.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-initiator'\n 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\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, \n value.type as type, type.coding as coding,\n coding.system = 'http://terminology.hl7.org/CodeSystem/v2-0203',\n coding.code = 'MR',\n value.value=(item.answer.valueString) "patient.localPid";\n src.item as item where (linkId.value = 'patient.localPidDomain' and answer.exists()) -> tgt.identifier as value share localpid, \n value.system=(item.answer.valueString) "patient.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 } "answer";\n } "patient.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) "patient.phone"; \n } "patient.phone";\n src.item as item where (linkId.value = 'patient.email' and answer.exists()) -> tgt.telecom as value, \n value.system = 'email',\n value.value=(item.answer.value) "patient.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) "patient.streetAddressLine";\n } "item.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) "patient.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) "patient.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) "patient.country";\n\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 } "answer";\n } "patient.languageOfCorrespondence"; \n\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\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) "patient.phone"; \n } "patient.contactperson.phone";\n \n item.item as item where (linkId.value = 'patient.contactperson.email' and answer.exists()) -> contact.telecom as value, \n value.system = 'email',\n value.value=(item.answer.value) "patient.email"; \n item.item as item where (linkId.value = 'patient.contactperson.relationship' and answer.exists()) -> contact.relationship as relationship, \n relationship.text=(item.answer.value) "patient.contactperson.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, \n e4.resource = create('Encounter') as encounter, \n encounter.id = uuid() as uuid4,\n e4.fullUrl = ('urn:uuid:'+%uuid4),\n encounter.status = 'planned',\n serviceRequest.extension as extension,\n encounter.subject = create('Reference') as subject, subject.reference = ('urn:uuid:'+%patient.id),\n extension.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-requestedencounterdetails',\n extension.value = create('Reference') as reference, reference.reference = ('urn:uuid:'+%uuid4) \n then {\n src.item as item where (linkId.value = 'requestedEncounter.class' and answer.exists()) -> \n encounter.class = (item.answer.value) "requestedEncounter.class";\n src.item as item where (linkId.value = 'requestedEncounter.desiredAccommodation' and answer.exists()) -> \n encounter.extension as extension,\n extension.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-desiredaccommodation', \n extension.value = (item.answer.value) "requestedEncounter.desiredAccommodation";\n } "RequestedEncounterItems";\n }\n\n group Coverage(source src : BackboneElement, target bundle: Bundle, target patient: Patient, target serviceRequest : ServiceRequest) {\n// coverage.beneficiary\n// coverage.beneficiary.ahvn13\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()) -> \n patient.identifier as identifier, identifier.system = 'urn:oid:2.16.756.5.32', identifier.value = (item.answer.value) "coverage.beneficiary.ahvn13";\n } "coverage.beneficiary";\n\n// coverage.kvg \n// coverage.kvg.name \n// coverage.kvg.insuranceCardNumber \n src.item as item where where (linkId.value = 'coverage.kvg') -> bundle.entry as e4, \n e4.resource = create('Coverage') as coverage, \n coverage.id = uuid() as uuid4,\n e4.fullUrl = ('urn:uuid:'+%uuid4),\n serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:'+%uuid4),\n coverage.status = 'active',\n coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:'+%patient.id),\n 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()) ->\n coverage.payor as payor, payor.reference as refcontained, refcontained.value = '#org', \n coverage.contained = create('Organization') as organization, organization.id = 'org', organization.name = (item.answer.value) "coverage.kvg.name";\n item.item as item where (linkId.value = 'coverage.kvg.insuranceCardNumber' and answer.exists()) ->\n 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', \n identifier.value = (item.answer.value) "coverage.kvg.insuranceCardNumber";\n } "coveragekvg";\n// coverage.uvg Unfallversicherung (nach UVG) 0..1 group Definition: Coverage.type\n// coverage.uvg.name Name der Versicherung 0..1 string Definition: Coverage.payor\n// coverage.uvg.claimNumber Schadennummer 0..1 string Definition: Coverage.identifier\n src.item as item where where (linkId.value = 'coverage.uvg') -> bundle.entry as e4, \n e4.resource = create('Coverage') as coverage, \n coverage.id = uuid() as uuid4,\n e4.fullUrl = ('urn:uuid:'+%uuid4),\n serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:'+%uuid4),\n coverage.status = 'active',\n coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:'+%patient.id),\n 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()) ->\n coverage.payor as payor, payor.reference as refcontained, refcontained.value = '#org', \n coverage.contained = create('Organization') as organization, organization.id = 'org', organization.name = (item.answer.value) "coverage.uvg.name";\n item.item as item where (linkId.value = 'coverage.uvg.claimNumber' and answer.exists()) ->\n 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', \n identifier.value = (item.answer.value) "coverage.uvg.claimNumber";\n } "coverageuvg";\n// coverage.vvg Zusatzversicherung (nach VVG) 0..1 group Definition: Coverage.type\n// coverage.vvg.name Name der Versicherung 0..1 string Definition: Coverage.payor\n// coverage.vvg.insuranceCardNumber Kennnummer der Versichertenkarte 0..1 string Definition: Coverage.identifier\n src.item as item where where (linkId.value = 'coverage.vvg') -> bundle.entry as e4, \n e4.resource = create('Coverage') as coverage, \n coverage.id = uuid() as uuid4,\n e4.fullUrl = ('urn:uuid:'+%uuid4),\n serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:'+%uuid4),\n coverage.status = 'active',\n coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:'+%patient.id),\n 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()) ->\n coverage.payor as payor, payor.reference as refcontained, refcontained.value = '#org', \n coverage.contained = create('Organization') as organization, organization.id = 'org', organization.name = (item.answer.value) "coverage.vvg.name";\n item.item as item where (linkId.value = 'coverage.vvg.insuranceCardNumber' and answer.exists()) ->\n 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', \n identifier.value = (item.answer.value) "coverage.vvg.insuranceCardNumber";\n } "coveragevvg";\n\n// coverage.iv Invalidenversicherung (IV) 0..1 group Definition: Coverage.type\n// coverage.iv.verfuegungsnummer\nsrc.item as item where where (linkId.value = 'coverage.iv') -> bundle.entry as e4, \n e4.resource = create('Coverage') as coverage, \n coverage.id = uuid() as uuid4,\n e4.fullUrl = ('urn:uuid:'+%uuid4),\n serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:'+%uuid4),\n coverage.status = 'active',\n coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:'+%patient.id),\n 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()) ->\n 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', \n identifier.value = (item.answer.value),\n coverage.payor as payor, payor.reference as refcontained, refcontained.value = '#org', \n coverage.contained = create('Organization') as organization, organization.id = 'org', organization.name = 'IV' "coverage.iv.verfuegungsnummer";\n } "coverageiv";\n\n // coverage.mv Militärversicherung (MV) 0..1 group Definition: Coverage.type\n// coverage.mv.versichertennummer\nsrc.item as item where where (linkId.value = 'coverage.mv') -> bundle.entry as e4, \n e4.resource = create('Coverage') as coverage, \n coverage.id = uuid() as uuid4,\n e4.fullUrl = ('urn:uuid:'+%uuid4),\n serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:'+%uuid4),\n coverage.status = 'active',\n coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:'+%patient.id),\n 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()) ->\n 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', \n identifier.value = (item.answer.value),\n coverage.payor as payor, payor.reference as refcontained, refcontained.value = '#org', \n coverage.contained = create('Organization') as organization, organization.id = 'org', organization.name = 'MV' "coverage.mv.versichertennummer";\n } "coveragemv";\n \n // coverage.self Selbstzahler 0..1 group Definition: Coverage.type\n // coverage.self.familyName Name 0..1 string Definition: Coverage.payor\n // coverage.self.givenName Vorname 0..1 string Definition: Coverage.payor\n src.item as item where where (linkId.value = 'coverage.self') then {\n \n item.item as item where (linkId.value = 'coverage.self.patient' and answer.exists() and answer.value) ->\n bundle.entry as e4, \n e4.resource = create('Coverage') as coverage, \n coverage.id = uuid() as uuid4,\n e4.fullUrl = ('urn:uuid:'+%uuid4),\n serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:'+%uuid4),\n coverage.status = 'active',\n coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:'+%patient.id),\n coverage.type as type, type.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype', coding.code = 'Self',\n coverage.payor as subject, subject.reference = ('urn:uuid:'+%patient.id) "payor";\n\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') ->\n bundle.entry as e5, \n e5.resource = create('Coverage') as coverage, \n coverage.id = uuid() as uuid4,\n e5.fullUrl = ('urn:uuid:'+%uuid4),\n serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:'+%uuid4),\n coverage.status = 'active',\n coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:'+%patient.id),\n coverage.type as type, type.coding as coding, coding.system = 'http://fhir.ch/ig/ch-orf/CodeSystem/ch-orf-cs-coveragetype', coding.code = 'Self',\n bundle.entry as e6, \n e6.resource = create('RelatedPerson') as relatedPerson, \n relatedPerson.id = uuid() as uuid6,\n e6.fullUrl = append('urn:uuid:',uuid6),\n coverage.payor as subject, subject.reference = ('urn:uuid:'+%relatedPerson.id),\n relatedPerson.patient as reference, reference.reference = ('urn:uuid:'+%patient.id)\n then \n CoverageRelatedPersonItems(item,relatedPerson) "coverage.self.relatedPerson";\n } "coverage.self.patientrelated.";\n } "self";\n \n// coverage.other Anderer Kostenträger 0..1 group Definition: Coverage.type\n// coverage.other.name Name des Kostenträgers 0..1 string Definition: Coverage.payor\n// coverage.other.id Beliebige ID 0..1 string Definition: Coverage.identifier\n// coverage.other.id.note TODO\n src.item as item where where (linkId.value = 'coverage.other') -> bundle.entry as e4, \n e4.resource = create('Coverage') as coverage, \n coverage.id = uuid() as uuid4,\n e4.fullUrl = ('urn:uuid:'+%uuid4),\n serviceRequest.insurance as insurance, insurance.reference = ('urn:uuid:'+%uuid4),\n coverage.status = 'active',\n coverage.beneficiary = create('Reference') as subject, subject.reference = ('urn:uuid:'+%patient.id),\n 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()) ->\n coverage.payor as payor, payor.reference as refcontained, refcontained.value = '#org', \n coverage.contained = create('Organization') as organization, organization.id = 'org', organization.name = (item.answer.value) "coverage.other.name";\n item.item as item where (linkId.value = 'coverage.other.id' and answer.exists()) ->\n coverage.identifier as identifier, identifier.value = (item.answer.value) "coverage.other.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',\n value.value= (answer.value) "coverage.self.relatedPerson.phone"; \n } "phone";\n src.item as item where (linkId.value = 'coverage.self.relatedPerson.email' and answer.exists()) -> relatedPerson.telecom as value, \n value.system = 'email',\n value.value=(item.answer.value) "coverage.self.relatedPerson.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) "coverage.self.relatedPerson.streetAddressLine";\n } "item.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) "coverage.self.relatedPerson.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) "coverage.self.relatedPerson.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) "coverage.self.relatedPerson.country";\n}\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, \n name.prefix = (item.answer.value) as prefix,\n prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier',\n ext.value = create('code') as value, value.value='AC' "sender.author.practitioner.title"; \n src.item as item where (linkId.value = 'sender.author.practitioner.gln' and answer.exists()) -> practitioner.identifier as value, \n value.system = 'urn:oid:2.51.1.3',\n value.value=(item.answer.value) "sender.author.practitioner.gln"; \n src.item as item where (linkId.value = 'sender.author.practitioner.zsr' and answer.exists()) -> practitioner.identifier as value, \n value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1',\n value.value=(item.answer.value) "recsender.author.practitioner.zsr"; \n src.item as item where (linkId.value = 'sender.author.practitioner.phone' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'phone',\n value.value=(item.answer.value) "sender.author.practitioner.phone"; \n src.item as item where (linkId.value = 'sender.author.practitioner.email' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'email',\n value.value=(item.answer.value) "sender.author.practitioner.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, \n value.system = 'urn:oid:2.51.1.3',\n value.value=(item.answer.value) "sender.author.organization.gln";\n src.item as item where (linkId.value = 'sender.author.organization.zsr' and answer.exists()) -> organization.identifier as value, \n value.system = 'urn:oid:2.16.756.5.30.1.123.100.2.1.1',\n value.value=(item.answer.value) "sender.author.organization.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) "sender.author.organization.streetAddressLine";\n } "item.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) "sender.author.organization.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) "sender.author.organization.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) "sender.author.organization.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, \n value.system = 'phone',\n value.value=(item.answer.value) "sender.author.practitioner.phone"; \n src.item as item where (linkId.value = 'sender.dataenterer.practitioner.email' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'email',\n value.value=(item.answer.value) "sender.author.practitioner.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, \n 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, \n e.resource = create('PractitionerRole') as practitionerRole, \n practitionerRole.id = uuid() as uuid,\n e.fullUrl = append('urn:uuid:',uuid),\n bundle.entry as e2, \n e2.resource = create('Practitioner') as practitioner, \n practitioner.id = uuid() as uuid2,\n e2.fullUrl = append('urn:uuid:',uuid2),\n bundle.entry as e3, \n e3.resource = create('Organization') as organization, \n organization.id = uuid() as uuid3,\n e3.fullUrl = append('urn:uuid:',uuid3),\n composition.author = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid),\n serviceRequest.requester = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid),\n practitionerRole.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid2),\n 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) "sender.author";\n src.item as item where (linkId.value = 'sender.dataenterer') then {\n item -> bundle.entry as e4, \n e4.resource = create('PractitionerRole') as practitionerRoleDataEnterer, \n practitionerRoleDataEnterer.id = uuid() as uuid4,\n e4.fullUrl = append('urn:uuid:',uuid4),\n composition.extension as extension,\n bundle.entry as e5, \n e5.resource = create('Practitioner') as practitionerDataEnterer, \n practitionerDataEnterer.id = uuid() as uuid5,\n e5.fullUrl = append('urn:uuid:',uuid5),\n practitionerRoleDataEnterer.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid5),\n practitionerRoleDataEnterer.organization = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid3) \n then {\n item then SenderDataEntererItems(item, practitionerRoleDataEnterer, practitionerDataEnterer, organization) "data";\n item then ChExtEprDataEnterer(item, practitionerRoleDataEnterer, extension) "extension";\n } "sender.dataenterer.items";\n } "sender.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',\n value.value= (answer.value) "receiverCopy.relatedPerson.phone"; \n } "phone";\n src.item as item where (linkId.value = 'receiverCopy.relatedPerson.email' and answer.exists()) -> relatedPerson.telecom as value, \n value.system = 'email',\n value.value=(item.answer.value) "receiverCopy.relatedPerson.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) "receiverCopy.relatedPerson.streetAddressLine";\n } "item.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) "receiverCopy.relatedPerson.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) "receiverCopy.relatedPerson.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) "receiverCopy.relatedPerson.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, \n name.prefix = (item.answer.value) as prefix,\n prefix.extension as ext, ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier',\n ext.value = create('code') as value, value.value='AC' "receiverCopy.practitionerRole.practitioner.title"; \n src.item as item where (linkId.value = 'receiverCopy.practitionerRole.practitioner.phone' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'phone',\n value.value=(item.answer.value) "receiverCopy.practitionerRole.practitioner.phone"; \n src.item as item where (linkId.value = 'receiverCopy.practitionerRole.practitioner.email' and answer.exists()) -> practitioner.telecom as value, \n value.system = 'email',\n value.value=(item.answer.value) "receiverCopy.practitionerRole.practitioner.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) "receiverCopy.practitionerRole.organization.streetAddressLine";\n } "item.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) "receiverCopy.practitionerRole.organization.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) "receiverCopy.practitionerRole.organization.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) "receiverCopy.practitionerRole.organization.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') -> \n bundle.entry as e2, \n e2.resource = create('Practitioner') as practitioner, \n practitioner.id = uuid() as uuid2,\n practitionerRole.practitioner = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid2),\n e2.fullUrl = append('urn:uuid:',uuid2) then ReceiverCopyPractitionerItems(item, practitioner);\n src.item as item where (linkId.value = 'receiverCopy.practitionerRole.organization') ->\n bundle.entry as e3, \n e3.resource = create('Organization') as organization, \n organization.id = uuid() as uuid3,\n practitionerRole.organization = create('Reference') as reference, reference.reference = append('urn:uuid:',uuid3), \n 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, \n 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, \n 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, \n e4.resource = create('PractitionerRole') as practitionerrole, \n composition.extension as extension,\n practitionerrole.id = uuid() as uuid4,\n 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') -> \n 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, \n e4.resource = create('RelatedPerson') as relatedPerson, \n composition.extension as extension,\n relatedPerson.id = uuid() as uuid4,\n relatedPerson.patient as reference,\n reference.reference = ('urn:uuid:'+%patient.id),\n 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.item -> bundle.entry as e4, \n e4.resource = create('Appointment') as appointment, \n appointment.id = uuid() as uuid4,\n e4.fullUrl = ('urn:uuid:'+%uuid4),\n serviceRequest.extension as extension,\n extension.url = 'http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-locationandtime',\n extension.value = create('Reference') as reference, reference.reference = ('urn:uuid:'+%uuid4) \n 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) "appointment.requestedPeriod.end.if.not.same.as.start";\n } "appointment.requestedPeriod.start";\n } "appointment.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) "appointment.end.if.not.same.as.start";\n } "appointment.start";\n } "appointment.startend";\n } "pendingorbooked";\n grp.item as item where (linkId.value = 'appointment.patientInstruction' and answer.exists()) -> appointment.patientInstruction = (item.answer.value) "appointment.patientInstruction";\n grp.item as item where (linkId.value = 'appointment.location') then {\n item -> bundle.entry as e5, \n e5.resource = create('Location') as location, \n location.id = uuid() as uuid5,\n e5.fullUrl = ('urn:uuid:'+%uuid5),\n 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) "appointment.location.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) "appointment.location.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 } "appointment.location.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) "appointment.location.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) "appointment.location.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) "appointment.location.country";\n } "location";\n } "appointment.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 -> \n bundle.entry as e, \n e.resource = create('Media') as media, \n media.id = uuid() as uuid,\n media.status = 'completed',\n e.fullUrl = append('urn:uuid:',uuid), \n media.content = attachment,\n serviceRequest.supportingInfo as supportingInfo,\n supportingInfo.reference = ('urn:uuid:'+uuid)\n "media"; \n } "answer";\n } "item";\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) "note.text";\n}\n\ngroup QrToBundle(source qr : QuestionnaireResponse, target q: Questionnaire, target patient : Patient, target questionnaireresp: QuestionnaireResponseTarget, 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: QuestionnaireResponseTarget, 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, \n tgtSection.title = 'Order-Referral', \n tgtSection.code as code, code.coding as coding, coding.system='http://loinc.org', coding.code='93037-0', coding.display='Portable medical order form',\n tgtSection.entry = create('Reference') as reference, reference.reference = ('urn:uuid:'+%questionnaireresp.id),\n tgtSection.entry = create('Reference') as reference, reference.reference = ('urn:uuid:'+%servicerequest.id),\n tgtSection.entry = create('Reference') as reference, reference.reference = ('urn:uuid:'+%q.id) "sections";\n qr -> servicerequest.status = 'active',\n servicerequest.intent = 'order',\n servicerequest.subject = create('Reference') as reference, reference.reference = ('urn:uuid:'+%patient.id) "servicerequest";\n}</pre>\n </div>" ] ; # fhir:url [ fhir:v "http://fhir.ch/ig/ch-orf/StructureMap/OrfQrToBundle"^^xsd:anyURI] ; # fhir:version [ fhir:v "2.0.0-ballot"] ; # fhir:name [ fhir:v "OrfQrToBundle"] ; # fhir:status [ fhir:v "draft"] ; # fhir:date [ fhir:v "2023-06-29T21:20:25+02: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:jurisdiction ( [ ( fhir:coding [ fhir:system [ fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ] ; fhir:code [ fhir:v "CH" ] ] ) ] ) ; # fhir:copyright [ fhir:v "CC0-1.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/BackboneElement"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/BackboneElement> ] ; fhir:mode [ fhir:v "source" ] ; fhir:alias [ fhir:v "BackboneElement" ] ] [ 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/Composition"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/Composition> ] ; fhir:mode [ fhir:v "target" ] ; fhir:alias [ fhir:v "Composition" ] ] [ 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/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:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse> ] ; fhir:mode [ fhir:v "target" ] ; fhir:alias [ fhir:v "QuestionnaireResponseTarget" ] ] ) ; # 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:v "q" ] [ fhir:v "patient" ] [ fhir:v "questionnaireresp" ] [ fhir:v "servicerequest" ] [ fhir:v "composition" ] [ fhir:v "bundle" ] ) ] ) ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "composition" ] [ fhir:v "serviceRequest" ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "composition" ] [ fhir:v "serviceRequest" ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "patient" ] [ fhir:v "composition" ] [ fhir:v "serviceRequest" ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "patient" ] [ fhir:v "composition" ] [ fhir:v "serviceRequest" ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "patient" ] [ fhir:v "serviceRequest" ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "patient" ] [ fhir:v "serviceRequest" ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "composition" ] [ fhir:v "serviceRequest" ] ) ] ) ] [ fhir:name [ fhir:v "receiverCopy" ] ; ( 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:v "bundle" ] [ fhir:v "patient" ] [ fhir:v "composition" ] [ fhir:v "serviceRequest" ] ) ] ) ] [ fhir:name [ fhir:v "appointment" ] ; ( 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:v "bundle" ] [ fhir:v "composition" ] [ fhir:v "serviceRequest" ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "serviceRequest" ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "patient" ] [ fhir:v "composition" ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "composition" ] ) ] ) ] [ 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:v "serviceRequest" ] ) ] ) ] ) ] [ 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:v "practitionerRoleDataEnterer" ] [ fhir:v "practitionerDataEnterer" ] ) ] ) ] [ 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:v "practitionerRoleDataEnterer" ] [ fhir:v "extension" ] ) ] ) ] ) ] ) ] [ 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:v "practitionerRoleDataEnterer" ] [ fhir:v "practitionerDataEnterer" ] ) ] ) ] [ 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:v "practitionerRoleDataEnterer" ] [ fhir:v "extension" ] ) ] ) ] ) ] ) ] ) ] [ 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:v "practitioner" ] ) ] ) ] ) ] [ 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:v "practitioner" ] ) ] ) ] ) ] [ 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:v "practitioner" ] ) ] ) ] [ 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:v "organization" ] ) ] ) ] ) ] [ 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: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:v "bundle" ] [ fhir:v "practitionerRole" ] ) ] ) ] ) ] [ 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: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: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:v "bundle" ] [ fhir:v "practitionerrole" ] ) ] ) ] ) ] [ 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:v "relatedPerson" ] ) ] ) ] ) ] ) ] [ 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:v "practitioner" ] ) ] ) ] [ 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:v "organization" ] ) ] ) ] ) ] [ 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:v "practitioner" ] ) ] ) ] [ 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:v "organization" ] ) ] ) ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "patient" ] [ fhir:v "episodeofcare" ] ) ] ) ] ) ] [ 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 "patient" ] ; 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:' + %tgt.id" ] ] ) ] [ 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:v "organization" ] ) ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "patient" ] [ fhir:v "ext" ] ) ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "tgt" ] [ fhir:v "composition" ] [ fhir:v "serviceRequest" ] ) ] ) ] [ 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:v "bundle" ] [ fhir:v "tgt" ] [ fhir:v "composition" ] [ fhir:v "serviceRequest" ] ) ] ) ] [ 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: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: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: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:name [ fhir:v "coverageiv" ] ; ( 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.iv')" ] ] ) ; ( 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 "IVG" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "coverage.iv.verfuegungsnummer" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "((linkId.value = 'coverage.iv.verfuegungsnummer') 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 "IV" ] ] ) ] [ 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: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 "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "IV" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "coveragemv" ] ; ( 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.mv')" ] ] ) ; ( 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 "MVG" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "coverage.mv.versichertennummer" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "((linkId.value = 'coverage.mv.versichertennummer') 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 "MV" ] ] ) ] [ 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: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 "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "MV" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "self" ] ; ( 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.self')" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "payor" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "((linkId.value = 'coverage.self.patient') and answer.exists() and answer.value)" ] ] ) ; ( 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 "Self" ] ] ) ] [ fhir:context [ fhir:v "coverage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "payor" ] ; fhir:variable [ fhir:v "subject" ] ] [ 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:name [ fhir:v "coverage.self.patientrelated." ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item2" ] ; fhir:condition [ fhir:v "((linkId.value = 'coverage.self.patientRelatedPerson') and answer.exists() and answer.value)" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "coverage.self.relatedPerson" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "(linkId.value = 'coverage.self.relatedPerson')" ] ] ) ; ( fhir:target [ 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 "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 "e5" ] ; 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 "Self" ] ] ) ] [ 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 "relatedPerson" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "RelatedPerson" ] ] ) ] [ fhir:context [ fhir:v "relatedPerson" ] ; 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:context [ fhir:v "coverage" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "payor" ] ; fhir:variable [ fhir:v "subject" ] ] [ 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:' + %relatedPerson.id" ] ] ) ] [ 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:dependent [ fhir:name [ fhir:v "CoverageRelatedPersonItems" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "relatedPerson" ] ) ] ) ] ) ] ) ] [ 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.other')" ] ] ) ; ( 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 "Other" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "coverage.other.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.other.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.other.id" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "((linkId.value = 'coverage.other.id') 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 "value" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "CoverageRelatedPersonItems" ] ; 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 = 'coverage.self.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 = 'coverage.self.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 = 'coverage.self.relatedPerson.phone') and answer.exists())" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "coverage.self.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 "coverage.self.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 = 'coverage.self.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 = 'coverage.self.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 "coverage.self.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 "coverage.self.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 = 'coverage.self.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 "coverage.self.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 = 'coverage.self.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 "coverage.self.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 = 'coverage.self.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 "SenderAuthorPractitionerItems" ] ; 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 = 'sender.author.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 = 'sender.author.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 = 'sender.author.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.gln" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "((linkId.value = 'sender.author.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 "recsender.author.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 = 'sender.author.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 "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 = 'sender.author.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 = 'sender.author.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 "SenderAuthorOrganizationItems" ] ; 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 = 'sender.author.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 "sender.author.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 = 'sender.author.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 "sender.author.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 = 'sender.author.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 = 'sender.author.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 "sender.author.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 "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 = 'sender.author.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 "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 = 'sender.author.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 "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 = 'sender.author.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 "SenderAuthorItems" ] ; 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: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 = 'sender.author.practitioner')" ] ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "SenderAuthorPractitionerItems" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "practitioner" ] ) ] ) ] [ 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 = 'sender.author.organization')" ] ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "SenderAuthorOrganizationItems" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "organization" ] ) ] ) ] ) ] [ fhir:name [ fhir:v "SenderDataEntererPractitionerItems" ] ; 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 = 'sender.dataenterer.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 = 'sender.dataenterer.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.phone" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "((linkId.value = 'sender.dataenterer.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 = 'sender.dataenterer.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 "SenderDataEntererItems" ] ; 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: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 = 'sender.dataenterer.practitioner')" ] ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "SenderDataEntererPractitionerItems" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "practitioner" ] ) ] ) ] ) ] [ fhir:name [ fhir:v "ChExtEprDataEnterer" ] ; 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-core/StructureDefinition/ch-ext-epr-dataenterer" ] ] ) ] ) ] [ 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 "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 "enterer" ] ] ) ] [ 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 "SenderAuthorInit" ] ; 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 "sender" ] ; ( 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 "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 "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 "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 "composition" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "author" ] ; 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:context [ fhir:v "serviceRequest" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "requester" ] ; 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: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 "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:rule [ fhir:name [ fhir:v "sender.author" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "(linkId.value = 'sender.author')" ] ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "SenderAuthorItems" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "practitionerRole" ] [ fhir:v "practitioner" ] [ fhir:v "organization" ] ) ] ) ] [ fhir:name [ fhir:v "sender.dataenterer" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "(linkId.value = 'sender.dataenterer')" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "sender.dataenterer.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:context [ fhir:v "practitionerRoleDataEnterer" ] ; 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:rule [ fhir:name [ fhir:v "data" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "SenderDataEntererItems" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "practitionerRoleDataEnterer" ] [ fhir:v "practitionerDataEnterer" ] [ fhir:v "organization" ] ) ] ) ] [ fhir:name [ fhir:v "extension" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "ChExtEprDataEnterer" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "practitionerRoleDataEnterer" ] [ fhir:v "extension" ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "ReceiverCopyRelatedPersonItems" ] ; 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 = 'receiverCopy.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 = 'receiverCopy.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 = 'receiverCopy.relatedPerson.phone') and answer.exists())" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "receiverCopy.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 "receiverCopy.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 = 'receiverCopy.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 = 'receiverCopy.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 "receiverCopy.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 "receiverCopy.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 = 'receiverCopy.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 "receiverCopy.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 = 'receiverCopy.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 "receiverCopy.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 = 'receiverCopy.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 "ReceiverCopyPractitionerItems" ] ; 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 = 'receiverCopy.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 = 'receiverCopy.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 "receiverCopy.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 = 'receiverCopy.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 "receiverCopy.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 = 'receiverCopy.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 "receiverCopy.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 = 'receiverCopy.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 "ReceiverCopyOrganizationItems" ] ; 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 = 'receiverCopy.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 = 'receiverCopy.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 "receiverCopy.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 "receiverCopy.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 = 'receiverCopy.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 "receiverCopy.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 = 'receiverCopy.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 "receiverCopy.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 = 'receiverCopy.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 "ReceiverCopyPractitionerRoleItems" ] ; 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 = 'receiverCopy.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 "ReceiverCopyPractitionerItems" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "practitioner" ] ) ] ) ] [ 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 = 'receiverCopy.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 "ReceiverCopyOrganizationItems" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "organization" ] ) ] ) ] ) ] [ fhir:name [ fhir:v "ExtOrfCopyReceiverPatient" ] ; 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 "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 "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-copyreceiver" ] ] ) ] ) ] [ fhir:name [ fhir:v "patient" ] ; ( 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:' + %patient.id" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "ExtOrfCopyReceiver" ] ; 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 "res" ] ; 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-copyreceiver" ] ] ) ] ) ] [ fhir:name [ fhir:v "organization" ] ; ( 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:' + %res.id" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "ReceiverCopy" ] ; fhir:typeMode [ fhir:v "none" ] ; ( fhir:input [ fhir:name [ fhir:v "grp" ] ; 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 "receiverCopyPractitionerRole1" ] ; ( fhir:source [ fhir:context [ fhir:v "grp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "(linkId = 'receiverCopy.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 "composition" ] ; 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 "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 "ReceiverCopyPractitionerRoleItems" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "bundle" ] [ fhir:v "practitionerrole" ] ) ] ) ] [ fhir:name [ fhir:v "extension" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "ExtOrfCopyReceiver" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "practitionerrole" ] [ fhir:v "extension" ] ) ] ) ] ) ] [ fhir:name [ fhir:v "receiverCopyPractitionerRole2" ] ; ( fhir:source [ fhir:context [ fhir:v "grp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "(linkId = 'receiverCopy.patient')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "composition" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "extension" ] ; fhir:variable [ fhir:v "extension" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "extension" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "ExtOrfCopyReceiver" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "patient" ] [ fhir:v "extension" ] ) ] ) ] ) ] [ fhir:name [ fhir:v "receiverCopyPractitionerRole3" ] ; ( fhir:source [ fhir:context [ fhir:v "grp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "(linkId = 'receiverCopy.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 "composition" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "extension" ] ; fhir:variable [ fhir:v "extension" ] ] [ 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 "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 "ReceiverCopyRelatedPersonItems" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "relatedPerson" ] ) ] ) ] [ fhir:name [ fhir:v "extension" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "ExtOrfCopyReceiver" ] ; ( fhir:variable [ fhir:v "item" ] [ fhir:v "relatedPerson" ] [ fhir:v "extension" ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "Appointment" ] ; fhir:typeMode [ fhir:v "none" ] ; ( fhir:input [ fhir:name [ fhir:v "grp" ] ; 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 "Appointment" ] ; ( fhir:source [ fhir:context [ fhir:v "grp" ] ; fhir:element [ 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 "appointment" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Appointment" ] ] ) ] [ fhir:context [ fhir:v "appointment" ] ; 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 "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-locationandtime" ] ] ) ] [ 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 "proposed" ] ; ( fhir:source [ fhir:context [ fhir:v "grp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.status') and (answer.value.code = 'proposed'))" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "appointment" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "status" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "item.answer.value.code" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "appointment.requestedPeriod" ] ; ( fhir:source [ fhir:context [ fhir:v "grp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "itemp" ] ; fhir:condition [ fhir:v "(linkId.value = 'appointment.requestedPeriod')" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "appointment.requestedPeriod.start" ] ; ( fhir:source [ fhir:context [ fhir:v "itemp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item2" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.requestedPeriod.start') and answer.exists())" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "appointment" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "requestedPeriod" ] ; fhir:variable [ fhir:v "requestedPeriod" ] ] [ fhir:context [ fhir:v "requestedPeriod" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "start" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "item2.answer.value" ] ] ) ] [ fhir:context [ fhir:v "requestedPeriod" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "end" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "item2.answer.value" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "appointment.requestedPeriod.end.if.not.same.as.start" ] ; ( fhir:source [ fhir:context [ fhir:v "itemp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item3" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.requestedPeriod.end') and answer.exists())" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "requestedPeriod" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "end" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "item3.answer.value" ] ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "pendingorbooked" ] ; ( fhir:source [ fhir:context [ fhir:v "grp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.status') and ((answer.value.code = 'pending') or (answer.value.code = 'booked')))" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "appointment" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "status" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "item.answer.value.code" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "appointment.startend" ] ; ( fhir:source [ fhir:context [ fhir:v "grp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "itemp" ] ; fhir:condition [ fhir:v "(linkId.value = 'appointment.requestedPeriod')" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "appointment.start" ] ; ( fhir:source [ fhir:context [ fhir:v "itemp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item2" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.requestedPeriod.start') and answer.exists())" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "appointment" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "start" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "item2.answer.value" ] ] ) ] [ fhir:context [ fhir:v "appointment" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "end" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "item2.answer.value" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "appointment.end.if.not.same.as.start" ] ; ( fhir:source [ fhir:context [ fhir:v "itemp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item3" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.requestedPeriod.end') and answer.exists())" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "appointment" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "end" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "item3.answer.value" ] ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "appointment.patientInstruction" ] ; ( fhir:source [ fhir:context [ fhir:v "grp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.patientInstruction') and answer.exists())" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "appointment" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "patientInstruction" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "item.answer.value" ] ] ) ] ) ] [ fhir:name [ fhir:v "appointment.location" ] ; ( fhir:source [ fhir:context [ fhir:v "grp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "(linkId.value = 'appointment.location')" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "location" ] ; ( 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 "e5" ] ] [ fhir:context [ fhir:v "e5" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "resource" ] ; fhir:variable [ fhir:v "location" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Location" ] ] ) ] [ fhir:context [ fhir:v "location" ] ; 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 "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "'urn:uuid:' + %uuid5" ] ] ) ] [ fhir:context [ fhir:v "appointment" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "participant" ] ; fhir:variable [ fhir:v "participant" ] ] [ fhir:context [ fhir:v "participant" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "status" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "tentative" ] ] ) ] [ fhir:context [ fhir:v "participant" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "actor" ] ; fhir:variable [ fhir:v "actor" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Reference" ] ] ) ] [ fhir:context [ fhir:v "actor" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "reference" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "'urn:uuid:' + %location.id" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "item" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item3" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.location.name') and answer.exists())" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "location" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "name" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "item3.answer.value" ] ] ) ] ) ] [ fhir:name [ fhir:v "appointment.location.phone" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item3" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.location.phone') and answer.exists())" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "location" ] ; 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 "item3.answer.value" ] ] ) ] ) ] [ fhir:name [ fhir:v "appointment.location.email" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item3" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.location.email') and answer.exists())" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "location" ] ; 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 "item3.answer.value" ] ] ) ] ) ] [ fhir:name [ fhir:v "appointment.location.streetAddressLine" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item3" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.location.streetAddressLine') and answer.exists())" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "location" ] ; 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 "line" ] ; ( 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 "appointment.location.postalCode" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item3" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.location.postalCode') and answer.exists())" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "location" ] ; 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 "item3.answer.value" ] ] ) ] ) ] [ fhir:name [ fhir:v "appointment.location.city" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item3" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.location.city') and answer.exists())" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "location" ] ; 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 "item3.answer.value" ] ] ) ] ) ] [ fhir:name [ fhir:v "appointment.location.country" ] ; ( fhir:source [ fhir:context [ fhir:v "item" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item3" ] ; fhir:condition [ fhir:v "((linkId.value = 'appointment.location.country') and answer.exists())" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "location" ] ; 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 "item3.answer.value" ] ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "PreviousResults" ] ; fhir:typeMode [ fhir:v "none" ] ; ( fhir:input [ fhir:name [ fhir:v "grp" ] ; 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 "serviceRequest" ] ; fhir:type [ fhir:v "ServiceRequest" ] ; fhir:mode [ fhir:v "target" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "item" ] ; ( fhir:source [ fhir:context [ fhir:v "grp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "((linkId = 'previousResults.attachment') 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 "media" ] ; ( fhir:source [ fhir:context [ fhir:v "answer" ] ; fhir:type [ fhir:v "Attachment" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "attachment" ] ] ) ; ( 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 "media" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Media" ] ] ) ] [ fhir:context [ fhir:v "media" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "id" ] ; fhir:variable [ fhir:v "uuid" ] ; fhir:transform [ fhir:v "uuid" ] ] [ fhir:context [ fhir:v "media" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "status" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "completed" ] ] ) ] [ 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 "media" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "content" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "attachment" ] ] ) ] [ fhir:context [ fhir:v "serviceRequest" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "supportingInfo" ] ; fhir:variable [ fhir:v "supportingInfo" ] ] [ fhir:context [ fhir:v "supportingInfo" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "reference" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "'urn:uuid:' + uuid" ] ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "Note" ] ; fhir:typeMode [ fhir:v "none" ] ; ( fhir:input [ fhir:name [ fhir:v "grp" ] ; fhir:type [ fhir:v "BackboneElement" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "serviceRequest" ] ; fhir:type [ fhir:v "ServiceRequest" ] ; fhir:mode [ fhir:v "target" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "note.text" ] ; ( fhir:source [ fhir:context [ fhir:v "grp" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "item" ] ; fhir:condition [ fhir:v "((linkId = 'note.text') and answer.exists())" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "serviceRequest" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "note" ] ; fhir:variable [ fhir:v "note" ] ] [ fhir:context [ fhir:v "note" ] ; 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 "QrToBundle" ] ; 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 "q" ] ; fhir:type [ fhir:v "Questionnaire" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "patient" ] ; fhir:type [ fhir:v "Patient" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "questionnaireresp" ] ; fhir:type [ fhir:v "QuestionnaireResponseTarget" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "servicerequest" ] ; fhir:type [ fhir:v "ServiceRequest" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "composition" ] ; fhir:type [ fhir:v "Composition" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "bundle" ] ; fhir:type [ fhir:v "Bundle" ] ; fhir:mode [ fhir:v "target" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "id" ] ; ( fhir:source [ fhir:context [ fhir:v "qr" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "bundle" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "id" ] ; fhir:transform [ fhir:v "uuid" ] ] ) ] [ fhir:name [ fhir:v "type" ] ; ( fhir:source [ fhir:context [ fhir:v "qr" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "bundle" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "type" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "document" ] ] ) ] ) ] [ fhir:name [ fhir:v "composition" ] ; ( fhir:source [ fhir:context [ fhir:v "qr" ] ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "OrfComposition" ] ; ( fhir:variable [ fhir:v "qr" ] [ fhir:v "q" ] [ fhir:v "composition" ] [ fhir:v "patient" ] [ fhir:v "questionnaireresp" ] [ fhir:v "servicerequest" ] [ fhir:v "bundle" ] ) ] ) ] [ fhir:name [ fhir:v "qrgroups" ] ; ( fhir:source [ fhir:context [ fhir:v "qr" ] ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "QrToGroups" ] ; ( fhir:variable [ fhir:v "qr" ] [ fhir:v "patient" ] [ fhir:v "bundle" ] [ fhir:v "composition" ] [ fhir:v "servicerequest" ] ) ] ) ] ) ] [ fhir:name [ fhir:v "OrfComposition" ] ; 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 "q" ] ; fhir:type [ fhir:v "Questionnaire" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "tgt" ] ; fhir:type [ fhir:v "Composition" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "patient" ] ; fhir:type [ fhir:v "Patient" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "questionnaireresp" ] ; fhir:type [ fhir:v "QuestionnaireResponseTarget" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "servicerequest" ] ; fhir:type [ fhir:v "ServiceRequest" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "bundle" ] ; fhir:type [ fhir:v "Bundle" ] ; fhir:mode [ fhir:v "target" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "status" ] ; ( fhir:source [ fhir:context [ fhir:v "qr" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "status" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "final" ] ] ) ] ) ] [ fhir:name [ fhir:v "subject" ] ; ( fhir:source [ fhir:context [ fhir:v "qr" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "subject" ] ; 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:' + %patient.id" ] ] ) ] ) ] [ fhir:name [ fhir:v "sections" ] ; ( fhir:source [ fhir:context [ fhir:v "qr" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "section" ] ; fhir:variable [ fhir:v "tgtSection" ] ] [ fhir:context [ fhir:v "tgtSection" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "title" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Order-Referral" ] ] ) ] [ fhir:context [ fhir:v "tgtSection" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "code" ] ] [ fhir:context [ fhir:v "code" ] ; 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://loinc.org" ] ] ) ] [ 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 "93037-0" ] ] ) ] [ fhir:context [ fhir:v "coding" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "display" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Portable medical order form" ] ] ) ] [ fhir:context [ fhir:v "tgtSection" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "entry" ] ; 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:' + %questionnaireresp.id" ] ] ) ] [ fhir:context [ fhir:v "tgtSection" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "entry" ] ; 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:' + %servicerequest.id" ] ] ) ] [ fhir:context [ fhir:v "tgtSection" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "entry" ] ; 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:' + %q.id" ] ] ) ] ) ] [ fhir:name [ fhir:v "servicerequest" ] ; ( fhir:source [ fhir:context [ fhir:v "qr" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "servicerequest" ] ; 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 "servicerequest" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "intent" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "order" ] ] ) ] [ fhir:context [ fhir:v "servicerequest" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "subject" ] ; 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:' + %patient.id" ] ] ) ] ) ] ) ] ) . #
IG © 2020+ HL7 Switzerland. Package ch.fhir.ig.ch-orf#2.0.0-ballot based on FHIR 4.0.1. Generated 2023-06-29
Links: Table of Contents |
QA Report
| Propose a change