FHIR:Vprepub-1.0 FHIR Error handling examples: verschil tussen versies

Uit informatiestandaarden
Naar navigatie springen Naar zoeken springen
k Publish prepub to live environment
k Create prepub environment from FHIR:V1.0
 
(2 tussenliggende versies door dezelfde gebruiker niet weergegeven)
Regel 1: Regel 1:
__NOINDEX__
__NUMBEREDHEADINGS__
__NUMBEREDHEADINGS__
{{DISPLAYTITLE:FHIR IG Error handling examples}}
{{DISPLAYTITLE:FHIR IG Error handling examples}}

Huidige versie van 12 okt 2026 21:56

__NUMBEREDHEADINGS__

1 Error handling examples[bewerken]

This page provides guidance on how a server could handle errors. Examples are provided in XML format but could have been in JSON format as well. Please note: these examples are not considered to be part of the normative content of the implementation guide.

1.1 All interactions[bewerken]

1.1.1 Not authorized[bewerken]

Scenario Not authorized.
Request
 GET [base]/Practitioner/86475712701
Response
  • HTTP 401 Unauthorized
  • OperationOutcome with OperationOutcome.issue.code set to security or if applicable a more specific child code.

1.1.2 Invalid authorization[bewerken]

Scenario Invalid authorization.
Request
 GET [base]/Patient/20118482245
Response
  • HTTP 403 Forbidden
  • OperationOutcome with OperationOutcome.issue.code set to security or if applicable a more specific child code.

1.1.3 Resource is not supported[bewerken]

Scenario The Resource is not supported by the resource server.
Request
GET [base]/Questionnaire
Response
  • HTTP 404 Not Found
  • OperationOutcome with OperationOutcome.issue.code set to not-supported.

1.2 Search[bewerken]

1.2.1 Unkown or unsupported search parameter value[bewerken]

Scenario

Unknown or unsupported search parameter value. In this example scenario, the Consent endpoint is supported. Although a system has implemented support for the HCIM TreatmentDirective (category=http://snomed.info/sct|11291000146105) it has not implemented the HCIM AdvanceDirective (category=http://snomed.info/sct|11341000146107).

Request
GET [base]/Consent?category=http://snomed.info/sct|11341000146107
Response
  • HTTP 200 OK
  • Empty Bundle of .type searchset.
  • OperationOutcome in Bundle as an entry marked with Bundle.entry.search.mode set to outcome.
  • OperationOutcome with OperationOutcome.issue.code set to not-found and OperationOutcome.severity not set to fatal or error.

1.2.2 Syntactically incorrect parameter[bewerken]

Scenario Syntactically incorrect parameter in the search request.
Request
 GET [base]/Procedure?patient:john
Response
  • HTTP 400 Bad Request
  • OperationOutcome. There are various issue type codes that could be used, depending on the nature of the error.

1.3 Read[bewerken]

1.3.1 Request on an unknown id[bewerken]

Scenario The id is not known by the server.
Request
GET [base]/Patient/wrong-id
Response
  • HTTP 404 Not Found
  • OperationOutcome with OperationOutcome.issue.code set to not-found.

1.4 Create/Update[bewerken]

1.4.1 No or incorrect Resource id[bewerken]

Scenario Update an existing Patient resource, using a wrong id in the Resource.
Request
 PUT [base]/Patient/34235234
Response
  • HTTP 400 Bad Request
  • OperationOutcome with OperationOutcome.issue.code set to invalid.

1.4.2 Resource syntax or data is incorrect, invalid or unsupported[bewerken]

Scenario Resource syntax or data is incorrect, invalid or unsupported.
Request
 POST [base]/Patient
Response
  • HTTP 400 Bad Request or HTTP 422 Unprocessable Entity
  • OperationOutcome with OperationOutcome.issue.code set to invalid or a more specific child code.
Scenario Resource syntax or data is incorrect, invalid or unsupported.
Request
 POST [base]/Observation
Response
  • HTTP 400 Bad Request or HTTP 422 Unprocessable Entity
  • OperationOutcome with OperationOutcome.issue.code set to invalid or a more specific child code.