Resource type: operationoutcome

Description

A collection of error, warning, or information messages that result from a system action.

Elements

PathShortDefinitionComments
Information about the success/failure of an actionA collection of error, warning, or information messages that result from a system action.Can result from the failure of a REST call or be part of the response message returned from a request message.
issueA single issue associated with the actionAn error, warning, or information message that results from a system action.
issue.idUnique id for inter-element referencingUnique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
issue.extensionAdditional content defined by implementationsMay be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
issue.modifierExtensionExtensions that cannot be ignored even if unrecognizedMay be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
issue.severityfatal | error | warning | informationIndicates whether the issue indicates a variation from successful processing.This is labeled as "Is Modifier" because applications should not confuse hints and warnings with errors.
issue.codeError or warning codeDescribes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.
issue.detailsAdditional details about the errorAdditional details about the error. This may be a text description of the error or a system code that identifies the error.A human readable description of the error issue SHOULD be placed in details.text.
issue.diagnosticsAdditional diagnostic information about the issueAdditional diagnostic information about the issue.This may be a description of how a value is erroneous, a stack dump to help trace the issue or other troubleshooting information.
issue.locationDeprecated: Path of element(s) related to issueThis element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be "http." + the parameter name.The root of the XPath is the resource or bundle that generated OperationOutcome. Each XPath SHALL resolve to a single node. This element is deprecated, and is being replaced by expression.
issue.expressionFHIRPath of element(s) related to issueA [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.The root of the FHIRPath is the resource or bundle that generated OperationOutcome. Each FHIRPath SHALL resolve to a single node.

Scope and Usage

Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. They are provided as a direct system response, or component of one, and provide information about the outcome of the operation.

The OperationOutcome resource is used in the following circumstances:

Boundaries and Relationships

This resource is not used for reporting clinical or workflow issues associated with a proposed or ongoing action; these would be handled using DetectedIssue or other resources. OperationOutcome is not designed to be persisted or referenced from other parts of the workflow.

It is possible to have both OperationOutcome and DetectedIssue together, where the OperationOutcome might indicate that a requested action was rejected due to a clinical issue and the DetectedIssue provides the details of the issue.

Using Operation Outcome Resources

On the RESTful interface, operation outcome resources are only relevant when a level of computable detail is required that is more granular than that provided by the HTTP response codes. This granularity could include:

Operation outcomes returned SHOULD be in alignment with the HTTP response code. For example, if the HTTP code indicates a failure (300+), at least one of the issues should have a severity of "error", indicating the reason for the failure.

Operation outcomes must include at least one issue. See the All OK example for a template for an operation that returns no errors.

Using the Expression

Each issue in an operation outcome SHOUD have an expression that reports a location for the issue. A correctly populated expression can allow client systems to:

In order to support these kinds of usages, applications need to use the expression element consistently. Applications can use the expression element to refer to a location inside a resource, or some location in the HTTP request (when appropriate).

Error locations are always reported using a simplified FHIRPath statement in the expression element. In addition to the simplified FHIRPath restrictions, the expression SHALL not contain a .resolve() function. These examples are legal:

 <expression value="Patient.identifier"/>
  "expression" : "Patient.identifier[2].value"

but this is not:

  "expression" : "Patient.identifier.where(system.value='http://example.com/mrn').value"

Reporting Errors in the HTTP Headers

Servers may also need to report errors in the HTTP headers - especially query parameters when processing searches. Errors are reported using a case sensitive expression that has two parts, a fixed "http" and the header or query parameter name separated by a ".". Some examples:

Expresson Description
http.code A reference to the search parameter "code"
http."name:exact" A reference to the search parameter "name" with the modifier ":exact"
http.Authorization A reference to the Authorization header - perhaps to indicate that it is missing, and some form of authentication is required.

This specification follows the convention that HTTP headers start with an uppercase character, and URL parameters start with a lowercase character. Implementations are encouraged to follow this convention, so that no name collisions occur.

Search Parameters

Extension Definitions

These are extension definitions for this resource defined by the spec