DOCUMENT_INVALID

Document Bundle breaks a document rule: what the DOCUMENT_INVALID error means and how to fix it.

HTTP 422. Problem type: https://docs.ovok.com/errors/document-invalid.

What this means

A document Bundle POSTed to the FHIR base breaks a rule every document keeps, so nothing was stored. The message names the rule: the first entry is not a Composition, the Composition has no narrative (Composition.text), the Bundle has no identifier with a system and a value or no timestamp, or the Composition's subject or encounter is not an entry in the Bundle that carries an identifier.

Troubleshooting

  1. Put the Composition first in entry, with text.div holding the human-readable report.
  2. Give the Bundle an identifier with both system and value, and a timestamp.
  3. Reference the Patient and Encounter from the Composition by their fullUrl in the Bundle, and give each entry the identifiers Ovok knows them by.

Retry safely

The same document fails the same way. Fix it and send it again; a document stored once is never stored twice.

If the problem persists

Share the HTTP status, problem type, request path, response timestamp and traceId with your administrator or support contact. Remove access tokens, provider secrets and patient data first. The Error responses guide explains the response fields, and the machine-code registry lists every endpoint-specific type.

Last updated on

On this page