Implementation Guide
ePA Medication Service
Version 1.0.5-1 - release

## Resource Profile: EPA Medication Service Operation Outcome

Official URL: https://gematik.de/fhir/epa-medication/StructureDefinition/epa-ms-operation-outcome | Version: 1.0.5-1
Active as of 2025-02-28 | Computable Name: EPAMSOperationOutcome

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

Usage:

- Use this Resource Profile: EPA Operation RxDispensation ERP Output-Parameters and EPA Operation RxPrescription ERP Output-Parameters
- Examples for this Resource Profile: OperationOutcome/255002c7-aa1b-4163-bdd4-ede482453cca, OperationOutcome/2b34898e-a9d1-4fa6-9959-5ff6033cfcb0, OperationOutcome/a94b020a-2f34-4013-83ea-cf1bd0a92cdd, OperationOutcome/bef62761-7eea-4daa-a992-36c532232679... Show 4 more, OperationOutcome/c03670fe-eaf2-4a38-a333-4dc1470072a2, OperationOutcome/e730e451-3a44-4842-a8ed-1517a3334465, OperationOutcome/ee1e0518-02f2-4d3a-99ae-bae8e91c382d and OperationOutcome/fc3e8ea4-41ec-4de2-906e-97871b34adcb

### 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
--- | --- | --- | --- | ---
OperationOutcome |  | 0..* | TIOperationOutcome | Information about the success/failure of an action dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated dom-3: 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 dom-6: A resource should have narrative for robust management dom-5: If a resource is contained in another resource, it SHALL NOT have a security label
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created ele-1: All FHIR elements must have a @value or children
modifierExtension | ?!N | 0..* | Extension | Extensions that cannot be ignored Slice: Unordered, Open by value:url ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both
issue | Σ | 1..* | BackboneElement | A single issue associated with the action ele-1: All FHIR elements must have a @value or children
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both
severity | S Σ | 1..1 | code | fatal | error | warning | information Binding: IssueSeverity (required): How the issue affects the success of the action. ele-1: All FHIR elements must have a @value or children
code | S Σ | 1..1 | code | Error or warning code Binding: IssueType (required): A code that describes the type of issue. ele-1: All FHIR elements must have a @value or children
details | S Σ | 1..1 | CodeableConcept | Additional details about the error Binding: EPA Medication Service Operation Outcome ValueSet (required) ele-1: All FHIR elements must have a @value or children
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
OperationOutcome.issue.severity | required | IssueSeverity `http://hl7.org/fhir/ValueSet/issue-severity|4.0.1` from the FHIR Standard
OperationOutcome.issue.code | required | IssueType `http://hl7.org/fhir/ValueSet/issue-type|4.0.1` from the FHIR Standard
OperationOutcome.issue.details | required | EPAMSOperationOutcomeDetailsVS `https://gematik.de/fhir/epa-medication/ValueSet/epa-ms-operation-outcome-details` from this IG

#### Constraints

Id | Grade | Path(s) | Details | Requirements
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** elements | 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
--- | --- | --- | --- | ---
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 | Conformance | ValueSet | URI
OperationOutcome.issue.details | required | EPAMSOperationOutcomeDetailsVS `https://gematik.de/fhir/epa-medication/ValueSet/epa-ms-operation-outcome-details` from this IG

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
OperationOutcome |  | 0..* | TIOperationOutcome | Information about the success/failure of an action
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
contained |  | 0..* | Resource | Contained, inline Resources
extension | N | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
modifierExtension | ?!N | 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 | N | 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 | Conformance | ValueSet | URI
OperationOutcome.language | preferred | CommonLanguages `http://hl7.org/fhir/ValueSet/languages` from the FHIR Standard
Additional Bindings | Purpose
AllLanguages | Max Binding
OperationOutcome.issue.severity | required | IssueSeverity `http://hl7.org/fhir/ValueSet/issue-severity|4.0.1` from the FHIR Standard
OperationOutcome.issue.code | required | IssueType `http://hl7.org/fhir/ValueSet/issue-type|4.0.1` from the FHIR Standard
OperationOutcome.issue.details | required | EPAMSOperationOutcomeDetailsVS `https://gematik.de/fhir/epa-medication/ValueSet/epa-ms-operation-outcome-details` from this IG

#### Constraints

Id | Grade | Path(s) | Details | Requirements
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** elements | 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
--- | --- | --- | --- | ---
OperationOutcome |  | 0..* | TIOperationOutcome | Information about the success/failure of an action dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated dom-3: 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 dom-6: A resource should have narrative for robust management dom-5: If a resource is contained in another resource, it SHALL NOT have a security label
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created ele-1: All FHIR elements must have a @value or children
modifierExtension | ?!N | 0..* | Extension | Extensions that cannot be ignored Slice: Unordered, Open by value:url ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both
issue | Σ | 1..* | BackboneElement | A single issue associated with the action ele-1: All FHIR elements must have a @value or children
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both
severity | S Σ | 1..1 | code | fatal | error | warning | information Binding: IssueSeverity (required): How the issue affects the success of the action. ele-1: All FHIR elements must have a @value or children
code | S Σ | 1..1 | code | Error or warning code Binding: IssueType (required): A code that describes the type of issue. ele-1: All FHIR elements must have a @value or children
details | S Σ | 1..1 | CodeableConcept | Additional details about the error Binding: EPA Medication Service Operation Outcome ValueSet (required) ele-1: All FHIR elements must have a @value or children
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
OperationOutcome.issue.severity | required | IssueSeverity `http://hl7.org/fhir/ValueSet/issue-severity|4.0.1` from the FHIR Standard
OperationOutcome.issue.code | required | IssueType `http://hl7.org/fhir/ValueSet/issue-type|4.0.1` from the FHIR Standard
OperationOutcome.issue.details | required | EPAMSOperationOutcomeDetailsVS `https://gematik.de/fhir/epa-medication/ValueSet/epa-ms-operation-outcome-details` from this IG

#### Constraints

Id | Grade | Path(s) | Details | Requirements
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** elements | 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
--- | --- | --- | --- | ---
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 | Conformance | ValueSet | URI
OperationOutcome.issue.details | required | EPAMSOperationOutcomeDetailsVS `https://gematik.de/fhir/epa-medication/ValueSet/epa-ms-operation-outcome-details` from this IG

Snapshot View

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
OperationOutcome |  | 0..* | TIOperationOutcome | Information about the success/failure of an action
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
contained |  | 0..* | Resource | Contained, inline Resources
extension | N | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
modifierExtension | ?!N | 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 | N | 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 | Conformance | ValueSet | URI
OperationOutcome.language | preferred | CommonLanguages `http://hl7.org/fhir/ValueSet/languages` from the FHIR Standard
Additional Bindings | Purpose
AllLanguages | Max Binding
OperationOutcome.issue.severity | required | IssueSeverity `http://hl7.org/fhir/ValueSet/issue-severity|4.0.1` from the FHIR Standard
OperationOutcome.issue.code | required | IssueType `http://hl7.org/fhir/ValueSet/issue-type|4.0.1` from the FHIR Standard
OperationOutcome.issue.details | required | EPAMSOperationOutcomeDetailsVS `https://gematik.de/fhir/epa-medication/ValueSet/epa-ms-operation-outcome-details` from this IG

#### Constraints

Id | Grade | Path(s) | Details | Requirements
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** elements | 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