description: This profile defines the parameters for closing a workflow for a prescription from AVS to the E-Rezept-Fachdienst. This can be used for the Operations $close and $dispense. package_name: de.gematik.erezept derivation: constraint name: GEM_ERP_PR_PAR_CloseOperation_Input type: Parameters elements: meta: index: 0 elements: profile: pattern: {type: Canonical, value: 'https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_PAR_CloseOperation_Input|1.5'} index: 1 required: [profile] parameter: index: 2 slicing: rules: closed discriminator: - {path: name, type: pattern} min: null slices: rxDispensation: match: {name: rxDispensation} schema: constraint: workflow-parameters-close-medication-exists: {human: 'If a reference from a MedicationDispense to a Medication exists, a Medication resource must exist.', source: 'https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_PAR_CloseOperation_Input', severity: error, expression: part.where(name = 'medicationDispense').resource.medication.ofType(Reference).reference.exists() implies part.where(name = 'medication').exists()} 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_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 index: 3 elements: name: mustSupport: true pattern: {type: String, value: rxDispensation} index: 4 value: choices: [] index: 6 resource: {index: 7} part: mustSupport: true index: 8 slicing: rules: closed discriminator: - {path: name, type: pattern} min: 1 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 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] required: [part] package_version: workflow.r4-1.5.0-beta7 class: profile kind: resource url: https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_PAR_CloseOperation_Input base: http://hl7.org/fhir/StructureDefinition/Parameters version: '1.5' required: [meta]