PATIENT ADMINISTRTAION (PA) Workgroup Development Draft

6.13 Resource OperationOutcome - Content

This resource maintained by the FHIR Management Group Work Group

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

6.13.1 Scope and Usage

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

Specifically, OperationOutcomes are used in the following circumstances:

  • When an RESTful operation fails
  • As the response on a validation operation, to provide information about the outcomes
  • As part of a message response, usually when the message has not been processed correctly

This resource is referenced by [MessageHeader]

6.13.2 Resource Content

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. OperationOutcome DomainResourceInformation about the success/failure of an action
... issue 1..*ElementA single issue associated with the action
.... severity ?!1..1codefatal | error | warning | information
IssueSeverity (Required)
.... code 1..1CodeableConceptError or warning code
IssueType (Required)
.... details 0..1stringAdditional diagnostic information about the issue
.... location 0..*stringXPath of element(s) related to issue

XML Template

<OperationOutcome xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <issue>  <!-- 1..* A single issue associated with the action -->
  <severity value="[code]"/><!-- 1..1 fatal | error | warning | information -->
  <code><!-- 1..1 CodeableConcept Error or warning code --></code>
  <details value="[string]"/><!-- 0..1 Additional diagnostic information about the issue -->
  <location value="[string]"/><!-- 0..* XPath of element(s) related to issue -->
 </issue>
</OperationOutcome>

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. OperationOutcome DomainResourceInformation about the success/failure of an action
... issue 1..*ElementA single issue associated with the action
.... severity ?!1..1codefatal | error | warning | information
IssueSeverity (Required)
.... code 1..1CodeableConceptError or warning code
IssueType (Required)
.... details 0..1stringAdditional diagnostic information about the issue
.... location 0..*stringXPath of element(s) related to issue

XML Template

<OperationOutcome xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <issue>  <!-- 1..* A single issue associated with the action -->
  <severity value="[code]"/><!-- 1..1 fatal | error | warning | information -->
  <code><!-- 1..1 CodeableConcept Error or warning code --></code>
  <details value="[string]"/><!-- 0..1 Additional diagnostic information about the issue -->
  <location value="[string]"/><!-- 0..* XPath of element(s) related to issue -->
 </issue>
</OperationOutcome>

 

Alternate definitions: Schema/Schematron, Resource Profile (XML, JSON)

6.13.2.1 Terminology Bindings

PathDefinitionTypeReference
OperationOutcome.issue.severity How the issue affects the success of the actionRequiredhttp://hl7.org/fhir/issue-severity
OperationOutcome.issue.code A coded expression of the type of issueRequiredhttp://hl7.org/fhir/issue-type

6.13.3 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:

  • more detail about the location of an issue
  • the ability to identify multiple distinct issues
  • provision of finer error codes that connect to known business failure states

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.