Implementation Guide
ePA Medication Service
Version 1.3.0 - release

## Resource Profile: EPA Medication Service Operation Outcome

Official URL: https://gematik.de/fhir/epa-medication/StructureDefinition/epa-ms-operation-outcome | Version: 1.0.6-2
Active as of 2025-05-12 | Computable Name: EPAMSOperationOutcome
Copyright/Legal: gematik GmbH / Dieses Artefakt ist lizenziert unter Apache License, Version 2.0.

Das Operation Outcome-Profil für den Medication Service der ePA.

Usages:

- Use this Profile: EPA Operation RxDispensation ERP Output-Parameters and EPA Operation RxPrescription ERP Output-Parameters
- Examples for this Profile: OperationOutcome/0a30eb5d-289f-44cf-a0bd-ec4ec38edaa8, OperationOutcome/0b476e35-02d5-4fb0-ad60-79f5eb05e2b4, OperationOutcome/0b967346-00bf-412c-8e05-077ed13e873e, OperationOutcome/12f5513f-3eef-41ad-baca-826627c890f2... Show 24 more, OperationOutcome/1a5a1db0-7bab-4d25-a43d-3ad1efb29cb5, OperationOutcome/1e5838dd-ec29-4f68-9739-dfa717db515d, OperationOutcome/24b64018-89f4-4a52-8e9c-c0af279c4e86, OperationOutcome/255002c7-aa1b-4163-bdd4-ede482453cca, OperationOutcome/2b34898e-a9d1-4fa6-9959-5ff6033cfcb0, OperationOutcome/41d25882-4a02-47e3-a367-f5b5fe8c8015, OperationOutcome/446e77ff-9fcb-4232-8de3-74986f78d85f, OperationOutcome/52c59e99-eba0-4488-b829-39983b9169f5, OperationOutcome/912a5e81-6274-439e-9d79-5172c4855a70, OperationOutcome/98ca7dff-aa8d-47d0-a074-4055f55cb4db, OperationOutcome/98ca7dff-aa8d-47d0-a074-4055f55cb4dc, OperationOutcome/a1dc2bb2-1776-4ccd-929f-355472077cf6, OperationOutcome/a4da96e5-84d6-4883-8789-5df2e1363c40, OperationOutcome/a94b020a-2f34-4013-83ea-cf1bd0a92cdd, OperationOutcome/b29880f0-6c99-4fe2-aae2-007e8cb4d9cf, OperationOutcome/bef62761-7eea-4daa-a992-36c532232679, OperationOutcome/c03670fe-eaf2-4a38-a333-4dc1470072a2, OperationOutcome/c146f801-8f50-4ca4-8578-514d5938e3c3, OperationOutcome/dc558008-4fbd-4e51-a16a-0cbc382a529f, OperationOutcome/e4f1ed42-7741-40f5-a84e-fd688ac74d3e, OperationOutcome/e69228bf-6f07-4055-8190-e832d2c670dc, OperationOutcome/e730e451-3a44-4842-a8ed-1517a3334465, OperationOutcome/ee1e0518-02f2-4d3a-99ae-bae8e91c382d and OperationOutcome/fc3e8ea4-41ec-4de2-906e-97871b34adcb

You can also check for usages in the FHIR IG Statistics

### Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

- Key Elements Table
- Differential Table
- Snapshot Table
- Statistics/References
- All

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
OperationOutcome |  | 0..* | TIOperationOutcome | Information about the success/failure of an action Constraints: dom-2, dom-3, dom-4, dom-5, dom-6
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored Slice: Unordered, Open by value:url
issue | Σ | 1..* | BackboneElement | A single issue associated with the action
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
severity | S Σ | 1..1 | code | fatal | error | warning | information Binding: IssueSeverity (required): How the issue affects the success of the action.
code | S Σ | 1..1 | code | Error or warning code Binding: IssueType (required): A code that describes the type of issue.
details | S Σ | 1..1 | CodeableConcept | Additional details about the error Binding: EPA Medication Service Operation Outcome ValueSet (required)
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
OperationOutcome.issue.​severity | Base | required | IssueSeverity | 📍4.0.1 | FHIR Std.
OperationOutcome.issue.​code | Base | required | IssueType | 📍4.0.1 | FHIR Std.
OperationOutcome.issue.​details | Base | required | EPA Medication Service Operation Outcome ValueSet | 📦1.3.0 | This IG

#### Constraints

Id | Grade | Path(s) | Description | Expression
dom-2 | error | OperationOutcome | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | OperationOutcome | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | OperationOutcome | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | OperationOutcome | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | OperationOutcome | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`

This structure is derived from TIOperationOutcome

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
OperationOutcome |  | 0..* | TIOperationOutcome | Information about the success/failure of an action
issue |  |  |  |
details |  | 1..1 | CodeableConcept | Additional details about the error Binding: EPA Medication Service Operation Outcome ValueSet (required)
Documentation for this format

#### Terminology Bindings (Differential)

Path | Status | Usage | ValueSet | Version | Source
OperationOutcome.issue.​details | Base | required | EPA Medication Service Operation Outcome ValueSet | 📦1.3.0 | This IG

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
OperationOutcome |  | 0..* | TIOperationOutcome | Information about the success/failure of an action Constraints: dom-2, dom-3, dom-4, dom-5, dom-6
id | Σ | 0..1 | id | Logical id of this artifact
meta | Σ | 0..1 | Meta | Metadata about the resource
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
language |  | 0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): A human language.
Additional Bindings | Purpose
AllLanguages | Max Binding
text |  | 0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements
contained |  | 0..* | Resource | Contained, inline Resources
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored Slice: Unordered, Open by value:url
issue | Σ | 1..* | BackboneElement | A single issue associated with the action
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
severity | S Σ | 1..1 | code | fatal | error | warning | information Binding: IssueSeverity (required): How the issue affects the success of the action.
code | S Σ | 1..1 | code | Error or warning code Binding: IssueType (required): A code that describes the type of issue.
details | S Σ | 1..1 | CodeableConcept | Additional details about the error Binding: EPA Medication Service Operation Outcome ValueSet (required)
diagnostics | Σ | 0..1 | string | Additional diagnostic information about the issue
location | Σ | 0..* | string | Deprecated: Path of element(s) related to issue
expression | Σ | 0..* | string | FHIRPath of element(s) related to issue
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
OperationOutcome.language | Base | preferred | Common Languages | 📦4.0.1 | FHIR Std.
OperationOutcome.issue.​severity | Base | required | IssueSeverity | 📍4.0.1 | FHIR Std.
OperationOutcome.issue.​code | Base | required | IssueType | 📍4.0.1 | FHIR Std.
OperationOutcome.issue.​details | Base | required | EPA Medication Service Operation Outcome ValueSet | 📦1.3.0 | This IG

#### Constraints

Id | Grade | Path(s) | Description | Expression
dom-2 | error | OperationOutcome | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | OperationOutcome | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | OperationOutcome | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | OperationOutcome | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | OperationOutcome | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`

This structure is derived from TIOperationOutcome

Summary

Mandatory: 1 element

Key Elements View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
OperationOutcome |  | 0..* | TIOperationOutcome | Information about the success/failure of an action Constraints: dom-2, dom-3, dom-4, dom-5, dom-6
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored Slice: Unordered, Open by value:url
issue | Σ | 1..* | BackboneElement | A single issue associated with the action
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
severity | S Σ | 1..1 | code | fatal | error | warning | information Binding: IssueSeverity (required): How the issue affects the success of the action.
code | S Σ | 1..1 | code | Error or warning code Binding: IssueType (required): A code that describes the type of issue.
details | S Σ | 1..1 | CodeableConcept | Additional details about the error Binding: EPA Medication Service Operation Outcome ValueSet (required)
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
OperationOutcome.issue.​severity | Base | required | IssueSeverity | 📍4.0.1 | FHIR Std.
OperationOutcome.issue.​code | Base | required | IssueType | 📍4.0.1 | FHIR Std.
OperationOutcome.issue.​details | Base | required | EPA Medication Service Operation Outcome ValueSet | 📦1.3.0 | This IG

#### Constraints

Id | Grade | Path(s) | Description | Expression
dom-2 | error | OperationOutcome | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | OperationOutcome | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | OperationOutcome | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | OperationOutcome | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | OperationOutcome | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`

Differential View

This structure is derived from TIOperationOutcome

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
OperationOutcome |  | 0..* | TIOperationOutcome | Information about the success/failure of an action
issue |  |  |  |
details |  | 1..1 | CodeableConcept | Additional details about the error Binding: EPA Medication Service Operation Outcome ValueSet (required)
Documentation for this format

#### Terminology Bindings (Differential)

Path | Status | Usage | ValueSet | Version | Source
OperationOutcome.issue.​details | Base | required | EPA Medication Service Operation Outcome ValueSet | 📦1.3.0 | This IG

Snapshot View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
OperationOutcome |  | 0..* | TIOperationOutcome | Information about the success/failure of an action Constraints: dom-2, dom-3, dom-4, dom-5, dom-6
id | Σ | 0..1 | id | Logical id of this artifact
meta | Σ | 0..1 | Meta | Metadata about the resource
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
language |  | 0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): A human language.
Additional Bindings | Purpose
AllLanguages | Max Binding
text |  | 0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements
contained |  | 0..* | Resource | Contained, inline Resources
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored Slice: Unordered, Open by value:url
issue | Σ | 1..* | BackboneElement | A single issue associated with the action
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
severity | S Σ | 1..1 | code | fatal | error | warning | information Binding: IssueSeverity (required): How the issue affects the success of the action.
code | S Σ | 1..1 | code | Error or warning code Binding: IssueType (required): A code that describes the type of issue.
details | S Σ | 1..1 | CodeableConcept | Additional details about the error Binding: EPA Medication Service Operation Outcome ValueSet (required)
diagnostics | Σ | 0..1 | string | Additional diagnostic information about the issue
location | Σ | 0..* | string | Deprecated: Path of element(s) related to issue
expression | Σ | 0..* | string | FHIRPath of element(s) related to issue
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
OperationOutcome.language | Base | preferred | Common Languages | 📦4.0.1 | FHIR Std.
OperationOutcome.issue.​severity | Base | required | IssueSeverity | 📍4.0.1 | FHIR Std.
OperationOutcome.issue.​code | Base | required | IssueType | 📍4.0.1 | FHIR Std.
OperationOutcome.issue.​details | Base | required | EPA Medication Service Operation Outcome ValueSet | 📦1.3.0 | This IG

#### Constraints

Id | Grade | Path(s) | Description | Expression
dom-2 | error | OperationOutcome | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | OperationOutcome | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | OperationOutcome | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | OperationOutcome | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | OperationOutcome | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`

This structure is derived from TIOperationOutcome

Summary

Mandatory: 1 element

Other representations of profile: CSV, Excel, Schematron