ePMA Implementation Guidance for FHIR STU3

This guidance is under active development by NHS Digital and content may be added or updated on a regular basis.
Please note: This guidance has been superseded by the Implementation guide for digitial medicines, which contains up-to-date information.

Operation Outcome

When a RESTful interaction or operation fails an OperationOutcome resource is used to convey specific detailed processable error information back to the client as part of the HTTP response.

In the event of an error, provider systems MUST respond by providing an OperationOutcome resource profiled to Spine-OperationOutcome-1.

The Spine-OperationOutcome-1:

  • MUST contain a definition of severity in the OperationOutcome.issue.severity field providing a value from the valueset-issue-severity value set. In all cases described in this guidance, the value used will be error.
  • MUST contain a definition of the type of error in the OperationOutcome.issue.code element, providing a value from the issue-type value set.
  • MUST contain details of the Spine error code in the OperationOutcome.issue.details.coding.code and OperationOutcome.issue.details.coding.display fields. These shall be taken from the standard set of NHS Spine error codes as defined in the spine-error-or-warning-code-1 value set. The Spine error and warning codes provide a greater degree of error handling granularity, and also ensure a standardised error handling approach across NHS APIs.
  • SHOULD provide additional diagnostic details of the error in the OperationOutcome.diagnostics property where such details securely provide additional error context for consumer applications. Patient identifiable data should not be included within this property.

The sections below provide guidance on the error details to be returned in a number of key scenarios.


back to top