This
page
is
part
of
the
FHIR
Specification
(v3.0.2:
STU
3).
The
current
version
which
supercedes
this
version
is
5.0.0
.
For
a
full
list
Continuous
Integration
Build
of
available
versions,
see
FHIR
(will
be
incorrect/inconsistent
at
times).
See
the
Directory
of
published
versions
.
Page
versions:
R5
R4B
R4
R3
R2
Responsible
Owner:
FHIR
Infrastructure
Work
Group
|
|
|
Compartments
:
|
A
collection
of
error,
warning
warning,
or
information
messages
that
result
from
a
system
action.
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
response,
or
component
of
one
one,
and
provide
information
about
the
outcome
of
the
operation.
The OperationOutcome resource is used in the following circumstances:
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.
The
resource
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.
Structure
| Name | Flags | Card. | Type |
Description
&
Constraints
Filter:
|
|---|---|---|---|---|
|
|
DomainResource |
Information
about
the
success/failure
of
an
action
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension |
|
|
Σ | 1..* | BackboneElement |
A
single
issue
associated
with
the
action
|
|
|
1..1 | code |
fatal
|
error
|
warning
|
information
|
success
|
|
Σ | 1..1 | code |
Error
or
warning
code
|
|
Σ | 0..1 | CodeableConcept |
Additional
details
about
the
error
|
|
Σ | 0..1 | string |
Additional
diagnostic
information
about
the
issue
|
|
Σ | 0..* | string |
Deprecated:
Path
of
element(s)
related
to
issue
|
|
Σ | 0..* | string |
FHIRPath
of
element(s)
related
to
issue
|
Documentation
for
this
format
|
||||
See the Extensions for this resource
UML Diagram ( Legend )
XML Template
<<OperationOutcome xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension -->
< < < <</details> < < <<issue> <!-- 1..* A single issue associated with the action --> <severity value="[code]"/><!-- 1..1 fatal | error | warning | information | success --> <code value="[code]"/><!-- 1..1 Error or warning code --> <details><!-- 0..1 CodeableConcept Additional details about the error --></details> <diagnostics value="[string]"/><!-- 0..1 Additional diagnostic information about the issue --> <location value="[string]"/><!-- 0..* Deprecated: Path of element(s) related to issue --> <expression value="[string]"/><!-- 0..* FHIRPath of element(s) related to issue --> </issue> </OperationOutcome>
JSON Template
{
"resourceType" : "",
"resourceType" : "OperationOutcome",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
"
"
"
"
"
"
"
"issue" : [{ // R! A single issue associated with the action
"severity" : "<code>", // R! fatal | error | warning | information | success
"code" : "<code>", // R! Error or warning code
"details" : { CodeableConcept }, // Additional details about the error
"diagnostics" : "<string>", // Additional diagnostic information about the issue
"location" : ["<string>"], // Deprecated: Path of element(s) related to issue
"expression" : ["<string>"] // FHIRPath of element(s) related to issue
}]
}
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> .![]()
[ a fhir:;[ a fhir:OperationOutcome; fhir:nodeRole fhir:treeRoot; # if this is the parser root# from # from fhir: fhir: fhir: fhir: fhir: fhir: fhir: ], ...;# from Resource: fhir:id, fhir:meta, fhir:implicitRules, and fhir:language # from DomainResource: fhir:text, fhir:contained, fhir:extension, and fhir:modifierExtension fhir:issue ( [ # 1..* A single issue associated with the action fhir:severity [ code ] ; # 1..1 fatal | error | warning | information | success fhir:code [ code ] ; # 1..1 Error or warning code fhir:details [ CodeableConcept ] ; # 0..1 Additional details about the error fhir:diagnostics [ string ] ; # 0..1 Additional diagnostic information about the issue fhir:location ( [ string ] ... ) ; # 0..* Deprecated: Path of element(s) related to issue fhir:expression ( [ string ] ... ) ; # 0..* FHIRPath of element(s) related to issue ] ... ) ; ]
Changes
since
DSTU2
from
both
R4
and
R4B
| OperationOutcome | |
|
|
|
| OperationOutcome.issue.code |
|
See the Full Difference for further information
This
analysis
is
available
for
R4
as
XML
or
JSON
.
See
R2
<-->
R3
Conversion
Maps
(status
=
6
tests
that
all
execute
ok.
All
tests
pass
round-trip
testing
and
all
r3
resources
are
valid.).
for
R4B
as
XML
or
JSON
.
Structure
| Name | Flags | Card. | Type |
Description
&
Constraints
Filter:
|
|---|---|---|---|---|
|
|
DomainResource |
Information
about
the
success/failure
of
an
action
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension |
|
|
Σ | 1..* | BackboneElement |
A
single
issue
associated
with
the
action
|
|
|
1..1 | code |
fatal
|
error
|
warning
|
information
|
success
|
|
Σ | 1..1 | code |
Error
or
warning
code
|
|
Σ | 0..1 | CodeableConcept |
Additional
details
about
the
error
|
|
Σ | 0..1 | string |
Additional
diagnostic
information
about
the
issue
|
|
Σ | 0..* | string |
Deprecated:
Path
of
element(s)
related
to
issue
|
|
Σ | 0..* | string |
FHIRPath
of
element(s)
related
to
issue
|
Documentation
for
this
format
|
||||
See the Extensions for this resource
XML Template
<<OperationOutcome xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension -->
< < < <</details> < < <<issue> <!-- 1..* A single issue associated with the action --> <severity value="[code]"/><!-- 1..1 fatal | error | warning | information | success --> <code value="[code]"/><!-- 1..1 Error or warning code --> <details><!-- 0..1 CodeableConcept Additional details about the error --></details> <diagnostics value="[string]"/><!-- 0..1 Additional diagnostic information about the issue --> <location value="[string]"/><!-- 0..* Deprecated: Path of element(s) related to issue --> <expression value="[string]"/><!-- 0..* FHIRPath of element(s) related to issue --> </issue> </OperationOutcome>
JSON Template
{
"resourceType" : "",
"resourceType" : "OperationOutcome",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
"
"
"
"
"
"
"
"issue" : [{ // R! A single issue associated with the action
"severity" : "<code>", // R! fatal | error | warning | information | success
"code" : "<code>", // R! Error or warning code
"details" : { CodeableConcept }, // Additional details about the error
"diagnostics" : "<string>", // Additional diagnostic information about the issue
"location" : ["<string>"], // Deprecated: Path of element(s) related to issue
"expression" : ["<string>"] // FHIRPath of element(s) related to issue
}]
}
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> .![]()
[ a fhir:;[ a fhir:OperationOutcome; fhir:nodeRole fhir:treeRoot; # if this is the parser root# from # from fhir: fhir: fhir: fhir: fhir: fhir: fhir: ], ...;# from Resource: fhir:id, fhir:meta, fhir:implicitRules, and fhir:language # from DomainResource: fhir:text, fhir:contained, fhir:extension, and fhir:modifierExtension fhir:issue ( [ # 1..* A single issue associated with the action fhir:severity [ code ] ; # 1..1 fatal | error | warning | information | success fhir:code [ code ] ; # 1..1 Error or warning code fhir:details [ CodeableConcept ] ; # 0..1 Additional details about the error fhir:diagnostics [ string ] ; # 0..1 Additional diagnostic information about the issue fhir:location ( [ string ] ... ) ; # 0..* Deprecated: Path of element(s) related to issue fhir:expression ( [ string ] ... ) ; # 0..* FHIRPath of element(s) related to issue ] ... ) ; ]
Changes
since
DSTU2
from
both
R4
and
R4B
| OperationOutcome | |
|
|
|
| OperationOutcome.issue.code |
|
See the Full Difference for further information
This
analysis
is
available
for
R4
as
XML
or
JSON
.
See
R2
<-->
R3
Conversion
Maps
(status
=
6
tests
that
all
execute
ok.
All
tests
pass
round-trip
testing
and
all
r3
resources
are
valid.).
for
R4B
as
XML
or
JSON
.
Alternate
Additional
definitions:
Master
Definition
(
XML
,
+
JSON
),
,
XML
Schema
/
Schematron
(for
)
+
JSON
Schema
,
ShEx
(for
Turtle
)
+
see
the
extensions
,
the
spreadsheet
version
&
the
dependency
analysis
| Path |
|
Type |
|
|---|---|---|---|
| OperationOutcome.issue.severity | IssueSeverity | Required |
How the issue affects the success of the action. |
| OperationOutcome.issue.code | IssueType | Required |
A
code
that
describes
the
type
of
issue.
|
| OperationOutcome.issue.details |
)
|
Example |
Example values to indicate more detailed reason for outcome. |
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",
"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.
Each
issue
in
an
operation
outcome
may
SHOULD
have
an
expression
that
reports
a
location
reported.
Systems
that
create
operation
outcomes
SHOULD
populate
for
the
location
of
an
error.
issue.
A
correctly
propulated
location
populated
expression
can
allow
client
systems
to:
In
order
to
support
these
kinds
of
usages,
this
applications
need
to
use
the
location
expression
element
consistently.
Applications
can
use
the
location
expression
element
to
refer
to
a
location
inside
a
resource,
or
some
location
in
the
HTTP
request
(when
appropriate).
While
resources
may
be
represented
in
XML,
JSON,
or
other
forms,
error
Error
locations
are
always
reported
using
a
simplified
XPath
notation:
<location value="/f:Patient/f:identifier"/>
The
XPath
must
use
the
FHIR
standard
XPath
prefixes
f:
and
h:
FHIRPath
for
the
FHIR
and
XHTML
namespaces
respectively.
The
XPath
here
can
be
used
to
automatically
find
the
relevant
XML
element
in
a
resource
if
the
resource
is
represented
in
XML.
Because
resources
are
often
represented
statement
in
JSON,
and
because
applications
will
often
process
the
XPath
directly
(e.g.
expression
element.
In
addition
to
determine
the
relevant
widget),
the
XPath
statement
must
be
simple.
Specifically,
simplified
FHIRPath
restrictions,
the
XPath
expression
SHALL
only
NOT
contain
element
names
and
repetition
indicators.
So
this
is
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"
Servers
may
also
need
to
report
errors
in
the
HTTP
headers
-
especially
query
parameters
when
processing
searches.
Errors
are
reported
using
a
case
sensitive
location
expression
that
has
two
parts,
a
fixed
"http"
"http"
and
the
header
or
query
parameter
name
separated
by
a
".".
".".
Some
examples:
|
|
Description |
|
|
A
reference
to
the
search
parameter
|
| http."name:exact" |
A
reference
to
the
search
parameter
"name"
with
the
modifier
|
| 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 for this resource. See also the full list of search parameters for this resource , and check the Extensions registry for search parameters on extensions related to this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.
(No search parameters for this resource)