Current Build

Переводит команда Health Samurai . Приглашаем поучаствовать в русификации стандарта FHIR: GitHub , Email.

2.45 Ресурс OperationOutcome - Назначение

FHIR Infrastructure Work GroupMaturity Level: 5 Normative Compartments: Not linked to any defined compartments

Normative Candidate Note: This page is candidate normative content for R4 in the Infrastructure Package. Once normative, it will lose it's Maturity Level, and breaking changes will no longer be made.

Коллекция ошибок, предупреждений или информационных сообщений, являющихся результатом действия системы.

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:

  • When an RESTful 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

This resource is referenced by GuidanceResponse and MessageHeader. The reference from GuidanceResponse indicates that there is an additional use context that needs to be addressed in the scope.

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 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.

На этот ресурс ссылаются GuidanceResponse и MessageHeader

Структура

ИмяФлагиКард.ТипОписание и ограниченияdoco
.. OperationOutcome ΣNDomainResourceИнформация об успешности/сбое действия
Элементы, определённые в прародителе: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... issue Σ1..*BackboneElementОдна проблема, связанная с этим действием
.... severity Σ1..1codefatal | error | warning | information
IssueSeverity (Required)
.... code Σ1..1codeКод ошибки или предупреждения
IssueType (Required)
.... details Σ0..1CodeableConceptДополнительные сведения об этой ошибке
Operation Outcome Codes (Example)
.... diagnostics Σ0..1stringДополнительная диагностическая информация о проблеме
.... location ΣXD0..*stringDeprecated: Path of element(s) related to issue
.... expression Σ0..*stringFHIRPath of element(s) related to issue

doco Документация по этому формату

UML-диаграмма (Legend)

OperationOutcome (DomainResource)IssueIndicates whether the issue indicates a variation from successful processingseverity : code [1..1] « Как эта проблема влияет на действие. (Strength=Required)IssueSeverity! »Описывает тип проблемы. Система, которая создаёт OperationOutcome, должна выбрать наиболее подходящий код из набора значений IssueType, и может дополнительно предоставить свой собственный код ошибки в элементе detailscode : code [1..1] « Код типа проблемы. (Strength=Required)IssueType! »Дополнительные сведения об этой ошибке. Это может быть текстовое описание ошибки или системный код, идентифицирующий ошибкуdetails : CodeableConcept [0..1] « Код, предоставляющий детальные сведения о проблеме. (Strength=Example)OperationOutcomeCodes?? »Дополнительная диагностическая информация о проблеме. Обычно это описание того, в каком значении ошибка, либо стек ошибки для трассировки проблемыdiagnostics : string [0..1]This 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 namelocation : string [0..*]A [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 raisedexpression : string [0..*]Ошибка, предупреждение или информационное сообщение, являющиеся результатом действия системыissue[1..*]

XML-шаблон

<OperationOutcome xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <issue>  <!-- 1..* Одна проблема, связанная с этим действием -->
  <severity value="[code]"/><!-- 1..1 fatal | error | warning | information -->
  <code value="[code]"/><!-- 1..1 Код ошибки или предупреждения -->
  <details><!-- 0..1 CodeableConcept Дополнительные сведения об этой ошибке --></details>
  <diagnostics value="[string]"/><!-- 0..1 Дополнительная диагностическая информация о проблеме -->
  <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>

Turtle-шаблон

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:OperationOutcome;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:OperationOutcome.issue [ # 1..* Одна проблема, связанная с этим действием
    fhir:OperationOutcome.issue.severity [ code ]; # 1..1 fatal | error | warning | information
    fhir:OperationOutcome.issue.code [ code ]; # 1..1 Код ошибки или предупреждения
    fhir:OperationOutcome.issue.details [ CodeableConcept ]; # 0..1 Дополнительные сведения об этой ошибке
    fhir:OperationOutcome.issue.diagnostics [ string ]; # 0..1 Дополнительная диагностическая информация о проблеме
    fhir:OperationOutcome.issue.location [ string ], ... ; # 0..* Deprecated: Path of element(s) related to issue
    fhir:OperationOutcome.issue.expression [ string ], ... ; # 0..* FHIRPath of element(s) related to issue
  ], ...;
]

Changes since R3

OperationOutcome
OperationOutcome.issue.severity
  • No longer marked as Modifier
OperationOutcome.issue.code
  • Add Codes multiple-matches, deleted

See the Full Difference for further information

This analysis is available as XML or JSON.

See R3 <--> R4 Conversion Maps (status = 6 tests that all execute ok. All tests pass round-trip testing and all r3 resources are valid.)

Структура

ИмяФлагиКард.ТипОписание и ограниченияdoco
.. OperationOutcome ΣNDomainResourceИнформация об успешности/сбое действия
Элементы, определённые в прародителе: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... issue Σ1..*BackboneElementОдна проблема, связанная с этим действием
.... severity Σ1..1codefatal | error | warning | information
IssueSeverity (Required)
.... code Σ1..1codeКод ошибки или предупреждения
IssueType (Required)
.... details Σ0..1CodeableConceptДополнительные сведения об этой ошибке
Operation Outcome Codes (Example)
.... diagnostics Σ0..1stringДополнительная диагностическая информация о проблеме
.... location ΣXD0..*stringDeprecated: Path of element(s) related to issue
.... expression Σ0..*stringFHIRPath of element(s) related to issue

doco Документация по этому формату

UML-диаграмма (Legend)

OperationOutcome (DomainResource)IssueIndicates whether the issue indicates a variation from successful processingseverity : code [1..1] « Как эта проблема влияет на действие. (Strength=Required)IssueSeverity! »Описывает тип проблемы. Система, которая создаёт OperationOutcome, должна выбрать наиболее подходящий код из набора значений IssueType, и может дополнительно предоставить свой собственный код ошибки в элементе detailscode : code [1..1] « Код типа проблемы. (Strength=Required)IssueType! »Дополнительные сведения об этой ошибке. Это может быть текстовое описание ошибки или системный код, идентифицирующий ошибкуdetails : CodeableConcept [0..1] « Код, предоставляющий детальные сведения о проблеме. (Strength=Example)OperationOutcomeCodes?? »Дополнительная диагностическая информация о проблеме. Обычно это описание того, в каком значении ошибка, либо стек ошибки для трассировки проблемыdiagnostics : string [0..1]This 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 namelocation : string [0..*]A [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 raisedexpression : string [0..*]Ошибка, предупреждение или информационное сообщение, являющиеся результатом действия системыissue[1..*]

XML-шаблон

<OperationOutcome xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <issue>  <!-- 1..* Одна проблема, связанная с этим действием -->
  <severity value="[code]"/><!-- 1..1 fatal | error | warning | information -->
  <code value="[code]"/><!-- 1..1 Код ошибки или предупреждения -->
  <details><!-- 0..1 CodeableConcept Дополнительные сведения об этой ошибке --></details>
  <diagnostics value="[string]"/><!-- 0..1 Дополнительная диагностическая информация о проблеме -->
  <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>

Turtle-шаблон

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:OperationOutcome;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:OperationOutcome.issue [ # 1..* Одна проблема, связанная с этим действием
    fhir:OperationOutcome.issue.severity [ code ]; # 1..1 fatal | error | warning | information
    fhir:OperationOutcome.issue.code [ code ]; # 1..1 Код ошибки или предупреждения
    fhir:OperationOutcome.issue.details [ CodeableConcept ]; # 0..1 Дополнительные сведения об этой ошибке
    fhir:OperationOutcome.issue.diagnostics [ string ]; # 0..1 Дополнительная диагностическая информация о проблеме
    fhir:OperationOutcome.issue.location [ string ], ... ; # 0..* Deprecated: Path of element(s) related to issue
    fhir:OperationOutcome.issue.expression [ string ], ... ; # 0..* FHIRPath of element(s) related to issue
  ], ...;
]

Changes since Release 3

OperationOutcome
OperationOutcome.issue.severity
  • No longer marked as Modifier
OperationOutcome.issue.code
  • Add Codes multiple-matches, deleted

See the Full Difference for further information

This analysis is available as XML or JSON.

See R3 <--> R4 Conversion Maps (status = 6 tests that all execute ok. All tests pass round-trip testing and all r3 resources are valid.)

 

See the Profiles & Extensions and the Альтернативные определения: Основное определение XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) + see the extensions & the Анализ зависимостей

PathОписаниеТипСсылка
OperationOutcome.issue.severity Как эта проблема влияет на действие.RequiredIssueSeverity
OperationOutcome.issue.code Код типа проблемы.RequiredIssueType
OperationOutcome.issue.details Код, предоставляющий детальные сведения о проблеме.ExampleOperationOutcomeCodes

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.

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 SHOUD have an expression that reports a location for the issue. A correctly populated expression can allow client systems to:

  • Connect return errors with the appropriate UI widget
  • Route errors to the correct application or system log
  • Develop more intelligent testing applications

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"

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.