Profiles & Interactions 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-profile-OperationOutcomeactive4.0.14.0.1

Formal Views of Profile Content

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

Differential View

idS Σ0..1string
id0..1string
extensionI0..*Extension
versionIdΣ0..1id
lastUpdatedΣ0..1instant
sourceS Σ0..1uri
profileS Σ1..*canonical(StructureDefinition)
securityΣ0..*CodingBinding
tagΣ0..*Coding
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
extensionI0..*Extension
modifierExtension?! I0..*Extension
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
severityS Σ1..1codeBinding
codeS Σ1..1codeBinding
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
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..1string
id0..1string
extensionI0..*Extension
versionIdΣ0..1id
lastUpdatedΣ0..1instant
sourceS Σ0..1uri
profileS Σ1..*canonical(StructureDefinition)
securityΣ0..*CodingBinding
tagΣ0..*Coding
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
extensionI0..*Extension
modifierExtension?! I0..*Extension
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
severityS Σ1..1codeBinding
codeS Σ1..1codeBinding
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
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..1string
id0..1string
extensionI0..*Extension
versionIdΣ0..1id
lastUpdatedΣ0..1instant
sourceS Σ0..1uri
profileS Σ1..*canonical(StructureDefinition)
securityΣ0..*CodingBinding
tagΣ0..*Coding
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
extensionI0..*Extension
modifierExtension?! I0..*Extension
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
severityS Σ1..1codeBinding
codeS Σ1..1codeBinding
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
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.meta1..
OperationOutcome.meta.source..
OperationOutcome.meta.profile1..
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-27b4120275bb",
    "meta": {
        "lastUpdated": "2023-12-14T20:19:49.8011614+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-profile-OperationOutcome",
    "version": "4.0.1",
    "name": "OperationOutcome",
    "title": "OperationOutcome",
    "status": "active",
    "date": "2021-11-24T18:55:56.0619708Z",
    "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.meta",
                "path": "OperationOutcome.meta",
                "min": 1,
                "mustSupport": true
            },
            {
                "id": "OperationOutcome.meta.source",
                "path": "OperationOutcome.meta.source",
                "mustSupport": true
            },
            {
                "id": "OperationOutcome.meta.profile",
                "path": "OperationOutcome.meta.profile",
                "min": 1,
                "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

The OperationOutcome resource may be included in the DHDR response bundle, in response to a MedicationDispense search request. This may indicate that MedicationDispense records were not included due to a patient privacy consent directive. The OperationOutcome resource will have the following values:

  • severity = warning
  • code = suppressed

OperationOutcome.issue.code ValueSet for a consent directive

Code Display Definition
suppressed Information Suppressed Some information was not or may not have been returned due to business rules, consent or privacy rules, or access permission constraints. This information may be accessible through alternate processes.


The OperationOutcome resource may be included in the DHDR response bundle, in response to a MedicationDispense search request. This may indicate that there is a patient privacy consent directive, but MedicationDispense records were included due to a patient's temporary unblock directive. The OperationOutcome resource will have the following values:

  • severity = informational
  • code = information

OperationOutcome ValueSet.issue.code for a temporaily unblocked consent directive

Code Display Definition
information Informational Note Patient has temporarily unblocked access to view and use dispense information.

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.