OperationOutcome
OperationOutcome is a FHIR resource that contains error, warning and information messages about an attempted system operation.
Put simply, an OperationOutcome will not contain any patient data.
Instead, the OperationOutcome resource helps developers understand the behavior and state of a FHIR server.
The OperationOutcome resource may be used in the following circumstances:
- When a RESTful interaction or operation fails
- As the response on a validation operation to provide information about the outcome
- As part of a message response, usually when the message has not been processed correctly
- As the response to a batch/transaction, when requested
- As part of a search's Bundle response containing information about the search
More specifically, an OperationOutcome can have any one of the following issue severities.
Code | Display | Definition |
---|
fatal | Fatal | The issue caused the action to fail and no further checking could be performed. |
error | Error | The issue is sufficiently important to cause the action to fail. |
warning | Warning | The issue is not important enough to cause the action to fail but may cause it to be performed suboptimally or in a way that is not as desired. |
information | Information | The issue has no relation to the degree of success of the action. |
success | Operation Successful | The operation completed successfully. |
While you cannot query an OperationOutcome resource directly by its id
, performing an operation against a FHIR server via API may yield an OperationOutcome in the response.
#Sample request
This is a sample request using curl
that causes an OperationOutcome using Flexpa API in test mode. The OperationOutcome occurs because the patient does not have an Observation resource with an id
of 123.
ACCESS_TOKEN=flexpa-link-access-token
curl "https://api.flexpa.com/fhir/Observation/123?patient=$PATIENT_ID" \
-H "Authorization: Bearer $ACCESS_TOKEN"
#Sample response
This is a sample response from Humana using Flexpa API in test mode