PackagesCanonicalsLogsProblems
    Packages
    de.gematik.erezept@workflow.r4-1.5.0-beta10
    https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_PAR_EU_CloseOperation_Input
description: This profile defines the parameters for receiving dispense information for a prescription that was redeemed in the EU
package_name: de.gematik.erezept
derivation: constraint
name: GEM_ERP_PR_PAR_EU_CloseOperation_Input
type: Parameters
elements:
  meta:
    index: 0
    elements:
      profile:
        pattern: {type: Canonical, value: 'https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_PAR_EU_CloseOperation_Input|1.5'}
        index: 1
    required: [profile]
  parameter:
    mustSupport: true
    array: true
    min: 5
    index: 2
    slicing:
      rules: closed
      discriminator:
      - {path: name, type: pattern}
      min: 5
      slices:
        rxDispensation:
          match: {name: rxDispensation}
          schema:
            constraint:
              workflow-parameters-close-dispense-medication-references: {human: 'If a reference from a MedicationDispense to a Medication exists, the reference must resolve to the Medication.', source: 'https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_PAR_EU_CloseOperation_Input', severity: error, expression: 'part.where(name = ''medicationDispense'').resource.medication.ofType(Reference).reference.exists() implies ((part.where(name = ''medicationDispense'').resource.medication.reference.split(''/'').last().split('':'').last()) = (part.where(name = ''medication'').resource.id))'}
            array: true
            min: 1
            _required: true
            index: 3
            elements:
              name:
                mustSupport: true
                pattern: {type: String, value: rxDispensation}
                index: 4
              value:
                choices: []
                index: 6
              resource: {index: 7}
              part:
                mustSupport: true
                array: true
                min: 2
                index: 8
                slicing:
                  rules: closed
                  discriminator:
                  - {path: name, type: pattern}
                  min: 2
                  slices:
                    medicationDispense:
                      match: {name: medicationDispense}
                      schema:
                        type: BackboneElement
                        _required: true
                        index: 9
                        elements:
                          name:
                            mustSupport: true
                            pattern: {type: String, value: medicationDispense}
                            index: 10
                          value:
                            choices: []
                            index: 12
                          resource: {type: MedicationDispense, index: 13}
                          part: {index: 14}
                        required: [resource]
                    medication:
                      match: {name: medication}
                      schema:
                        type: BackboneElement
                        _required: true
                        index: 15
                        elements:
                          name:
                            mustSupport: true
                            pattern: {type: String, value: medication}
                            index: 16
                          value:
                            choices: []
                            index: 18
                          resource: {type: Medication, index: 19}
                          part: {index: 20}
                        required: [resource]
        requestData:
          match: {name: requestData}
          schema:
            _required: true
            index: 21
            elements:
              name:
                mustSupport: true
                pattern: {type: String, value: requestData}
                index: 22
              value:
                choices: []
                index: 24
              resource: {index: 25}
              part:
                mustSupport: true
                array: true
                min: 7
                index: 26
                slicing:
                  rules: closed
                  discriminator:
                  - {path: name, type: pattern}
                  min: 7
                  slices:
                    kvnr:
                      match: {name: kvnr}
                      schema:
                        type: BackboneElement
                        mustSupport: true
                        _required: true
                        index: 27
                        elements:
                          name:
                            mustSupport: true
                            pattern: {type: String, value: kvnr}
                            index: 28
                          value:
                            choices: [valueIdentifier]
                            index: 30
                          valueIdentifier: {type: Identifier, choiceOf: value, index: 31}
                          resource: {index: 32}
                          part: {index: 33}
                        required: [valueIdentifier, value]
                    accessCode:
                      match: {name: accessCode}
                      schema:
                        type: BackboneElement
                        mustSupport: true
                        _required: true
                        index: 34
                        elements:
                          name:
                            mustSupport: true
                            pattern: {type: String, value: accessCode}
                            index: 35
                          value:
                            choices: [valueIdentifier]
                            index: 37
                          valueIdentifier: {type: Identifier, choiceOf: value, index: 38}
                          resource: {index: 39}
                          part: {index: 40}
                        required: [valueIdentifier, value]
                    countryCode:
                      match: {name: countryCode}
                      schema:
                        type: BackboneElement
                        mustSupport: true
                        _required: true
                        index: 41
                        elements:
                          name:
                            mustSupport: true
                            pattern: {type: String, value: countryCode}
                            index: 42
                          value:
                            choices: [valueCoding]
                            index: 44
                          valueCoding: {type: Coding, choiceOf: value, index: 45}
                          value[x]:
                            elements:
                              system:
                                pattern: {type: Uri, value: 'urn:iso:std:iso:3166'}
                                index: 46
                            required: [system]
                        required: [valueCoding, value]
                    practitionerName:
                      match: {name: practitionerName}
                      schema:
                        type: BackboneElement
                        mustSupport: true
                        _required: true
                        index: 47
                        elements:
                          name:
                            mustSupport: true
                            pattern: {type: String, value: practitionerName}
                            index: 48
                          value:
                            choices: [valueString]
                            index: 50
                          valueString: {type: string, choiceOf: value, index: 51}
                          resource: {index: 52}
                          part: {index: 53}
                        required: [valueString, value]
                    practitionerRole:
                      match: {name: practitionerRole}
                      schema:
                        type: BackboneElement
                        mustSupport: true
                        _required: true
                        index: 54
                        elements:
                          name:
                            mustSupport: true
                            pattern: {type: String, value: practitionerRole}
                            index: 55
                          value:
                            choices: [valueCoding]
                            index: 57
                          valueCoding: {type: Coding, choiceOf: value, index: 58}
                          value[x]:
                            elements:
                              system: {mustSupport: true, index: 59}
                            required: [system]
                          resource: {index: 60}
                          part: {index: 61}
                        required: [valueCoding, value]
                    pointOfCare:
                      match: {name: pointOfCare}
                      schema:
                        type: BackboneElement
                        mustSupport: true
                        _required: true
                        index: 62
                        elements:
                          name:
                            mustSupport: true
                            pattern: {type: String, value: pointOfCare}
                            index: 63
                          value:
                            choices: [valueString]
                            index: 65
                          valueString: {type: string, choiceOf: value, index: 66}
                          resource: {index: 67}
                          part: {index: 68}
                        required: [valueString, value]
                    healthcare-facility-type:
                      match: {name: healthcare-facility-type}
                      schema:
                        type: BackboneElement
                        mustSupport: true
                        _required: true
                        index: 69
                        elements:
                          name:
                            mustSupport: true
                            pattern: {type: String, value: healthcare-facility-type}
                            index: 70
                          value:
                            choices: [valueCoding]
                            index: 72
                          valueCoding: {type: Coding, choiceOf: value, index: 73}
                          value[x]:
                            elements:
                              system: {mustSupport: true, index: 74}
                            required: [system]
                          resource: {index: 75}
                          part: {index: 76}
                        required: [valueCoding, value]
        practitionerData:
          match: {name: practitionerData}
          schema:
            _required: true
            index: 77
            elements:
              name:
                mustSupport: true
                pattern: {type: String, value: practitionerData}
                index: 78
              value:
                choices: []
                index: 80
              resource: {type: Practitioner, index: 81}
              part: {index: 82}
        organizationData:
          match: {name: organizationData}
          schema:
            _required: true
            index: 83
            elements:
              name:
                mustSupport: true
                pattern: {type: String, value: organizationData}
                index: 84
              value:
                choices: []
                index: 86
              resource: {type: Organization, index: 87}
              part: {index: 88}
        practitionerRoleData:
          match: {name: practitionerRoleData}
          schema:
            _required: true
            index: 89
            elements:
              name:
                mustSupport: true
                pattern: {type: String, value: practitionerRoleData}
                index: 90
              value:
                choices: []
                index: 92
              resource: {type: PractitionerRole, index: 93}
              part: {index: 94}
package_version: workflow.r4-1.5.0-beta10
class: profile
kind: resource
url: https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_PAR_EU_CloseOperation_Input
base: http://hl7.org/fhir/StructureDefinition/Parameters
version: '1.5'
required: [meta]