description: Dieses Profil definiert die Parameter für das Schließen eines Workflows für ein Rezept vom AVS zum TI-Flow-Fachdienst. Dies kann für die Operationen $close und $dispense verwendet werden. package_name: de.gematik.tiflow.erezept derivation: constraint name: GEM_ERP_PR_PAR_CloseOperation_Input type: Parameters elements: parameter: index: 0 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/tiflow-erezept/StructureDefinition/GEM-ERP-PR-PAR-Close-Operation-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/tiflow-erezept/StructureDefinition/GEM-ERP-PR-PAR-Close-Operation-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))'} mustSupport: true array: true index: 1 elements: name: mustSupport: true pattern: {type: String, value: rxDispensation} index: 2 value: choices: [] index: 4 resource: {index: 5} part: mustSupport: true index: 6 slicing: rules: closed discriminator: - {path: name, type: pattern} min: 1 slices: medicationDispense: match: {name: medicationDispense} schema: type: BackboneElement mustSupport: true _required: true index: 7 elements: name: mustSupport: true pattern: {type: String, value: medicationDispense} index: 8 value: choices: [] index: 10 resource: {type: MedicationDispense, index: 11} part: {index: 12} required: [resource] medication: match: {name: medication} schema: type: BackboneElement mustSupport: true index: 13 elements: name: mustSupport: true pattern: {type: String, value: medication} index: 14 value: choices: [] index: 16 resource: {type: Medication, index: 17} part: {index: 18} required: [resource] required: [part] package_version: 2.0.0 class: profile kind: resource url: https://gematik.de/fhir/tiflow-erezept/StructureDefinition/GEM-ERP-PR-PAR-Close-Operation-Input base: http://hl7.org/fhir/StructureDefinition/Parameters version: 2.0.0