Profiles & Operations Index > Profile: OperationOutcome

Profile: OperationOutcome

Simplifier project page: OperationOutcome

Derived from: OperationOutcome (R4)

Canonical_URLProfile_StatusProfile_VersionFHIR_Version
http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-consumer-profile-OperationOutcomedraft1.0.04.0.1

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work

Differential View

idS Σ0..1System.String
severityS Σ1..1codeBinding
codeS Σ1..1codeBinding
systemS Σ0..1uri
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
diagnosticsS Σ0..1string
locationΣ0..*string
expressionS Σ0..*string

Hybrid View

idS Σ0..1System.String
severityS Σ1..1codeBinding
codeS Σ1..1codeBinding
systemS Σ0..1uri
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
diagnosticsS Σ0..1string
locationΣ0..*string
expressionS Σ0..*string

Snapshot View

idS Σ0..1System.String
severityS Σ1..1codeBinding
codeS Σ1..1codeBinding
systemS Σ0..1uri
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
diagnosticsS Σ0..1string
locationΣ0..*string
expressionS Σ0..*string

Table View

OperationOutcome..
OperationOutcome.id..
OperationOutcome.issue..
OperationOutcome.issue.severity..
OperationOutcome.issue.code..
OperationOutcome.issue.details..
OperationOutcome.issue.details.coding..1
OperationOutcome.issue.details.coding.system..
OperationOutcome.issue.details.coding.code..
OperationOutcome.issue.details.coding.display..
OperationOutcome.issue.details.text..
OperationOutcome.issue.diagnostics..
OperationOutcome.issue.expression..


JSON View

{
    "resourceType": "StructureDefinition",
    "id": "54492531-8f28-4f33-b716-27b4120275n5",
    "meta": {
        "lastUpdated": "2022-02-18T18:47:47.148+00:00"
    },
    "text": {
        "status": "empty",
        --- We have skipped the narrative for better readability of the resource ---
    },
    "url": "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-consumer-profile-OperationOutcome",
    "version": "1.0.0",
    "name": "OperationOutcome",
    "status": "draft",
    "date": "2022-02-18",
    "description": "Operation Outcomes are sets of error, warning and information messages that provide detailed information about the outcome of some attempted system operation.",
    "fhirVersion": "4.0.1",
    "kind": "resource",
    "abstract": false,
    "type": "OperationOutcome",
    "baseDefinition": "http://hl7.org/fhir/StructureDefinition/OperationOutcome",
    "derivation": "constraint",
    "differential": {
        "element":  [
            {
                "id": "OperationOutcome",
                "path": "OperationOutcome",
                "mustSupport": true
            },
            {
                "id": "OperationOutcome.id",
                "path": "OperationOutcome.id",
                "mustSupport": true
            },
            {
                "id": "OperationOutcome.issue",
                "path": "OperationOutcome.issue",
                "mustSupport": true
            },
            {
                "id": "OperationOutcome.issue.severity",
                "path": "OperationOutcome.issue.severity",
                "mustSupport": true,
                "binding": {
                    "strength": "required",
                    "valueSet": "http://hl7.org/fhir/ValueSet/issue-severity|4.0.0"
                }
            },
            {
                "id": "OperationOutcome.issue.code",
                "path": "OperationOutcome.issue.code",
                "mustSupport": true,
                "binding": {
                    "strength": "required",
                    "valueSet": "http://hl7.org/fhir/ValueSet/issue-type|4.0.0"
                }
            },
            {
                "id": "OperationOutcome.issue.details",
                "path": "OperationOutcome.issue.details",
                "mustSupport": true
            },
            {
                "id": "OperationOutcome.issue.details.coding",
                "path": "OperationOutcome.issue.details.coding",
                "max": "1",
                "mustSupport": true
            },
            {
                "id": "OperationOutcome.issue.details.coding.system",
                "path": "OperationOutcome.issue.details.coding.system",
                "mustSupport": true
            },
            {
                "id": "OperationOutcome.issue.details.coding.code",
                "path": "OperationOutcome.issue.details.coding.code",
                "mustSupport": true
            },
            {
                "id": "OperationOutcome.issue.details.coding.display",
                "path": "OperationOutcome.issue.details.coding.display",
                "mustSupport": true
            },
            {
                "id": "OperationOutcome.issue.details.text",
                "path": "OperationOutcome.issue.details.text",
                "mustSupport": true
            },
            {
                "id": "OperationOutcome.issue.diagnostics",
                "path": "OperationOutcome.issue.diagnostics",
                "mustSupport": true
            },
            {
                "id": "OperationOutcome.issue.expression",
                "path": "OperationOutcome.issue.expression",
                "mustSupport": true
            }
        ]
    }
}

Note:

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.

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


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

COVaxON in OperationOutcome

The OperationOutcome resource may be included in the DHDR response bundle, in response to a MedicationDispense search request. This may indicate that COVID-19 Immunization information is not available at this time. The OperationOutcome resource will have the following values:

  • severity = information

OperationOutcome.issue.code ValueSet for a consent directive

Code Display Definition
incomplete Information Message COVID-19 Immunization information is not available at this time.

Reporting Errors in the HTTP Headers

Server may also need to report errors in the HTTP headers - especially query parameters when processing searches. Errors are reported using a case sensitive location that has two parts, a fixed "http" and the header or query parameter name separated by a ".". Some examples:

HTTP Header Parameters.

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