FHIR Clinical Documents
1.0.0-ballot - STU1 Ballot International flag

This page is part of the FHIR Clinical Documents (v1.0.0-ballot: STU1 Ballot 1) based on FHIR (HL7® FHIR® Standard) R4. . For a full list of available versions, see the Directory of published versions

Immutable vs. parseable clinical documents

Page standards status: Informative

FHIR Clinical Documents are used in a number of different ways. To support these different uses, it can be necessary to store a received document as an immutable object and/or parse a received document to extract observations and other entries. The following discussion expands upon the Document End-Points discussion in FHIR Documents.

FHIR Clinical Document as an Immutable Object

A FHIR Clinical Document is a FHIR bundle of type=document whose first entry is a FHIR composition. A FHIR Clinical Document that is posted to a FHIR server's [baseURL]/Bundle or [baseURL]/Binary becomes an immutable object on that server in that the document can be retrieved just as it was posted, with no alterations in legally authenticated document contents. (Bundle.id and Bundle.meta will change upon posting).

FHIR Clinical Document as a Parseable Object

FHIR allows for a clinical document to be parseable such that a FHIR server can process all of the resources that it contains as individual resources. The resulting parsed objects are no longer part of the original immutable document which was received. There is no guarantee that reconstruction of a document from parsed objects will return exactly the same legally authenticated document - ordering can change, scope of transitively included bundle entries may differ, etc.

While FHIR servers vary, many FHIR servers are only designed to parse FHIR bundles of specific types (e.g. type=transaction). For example, A FHIR Clinical Document of type=document that is posted to a server's [baseURL] end-point can generate an error. In such a case, it is possible to transform a document bundle into a transaction bundle, which can then be successfully posted to [baseURL]. Transformation from a bundle of type=document to a bundle of type=transaction can be implemented as part of a server-side operation - see Operation convert-to-transaction-bundle for more details.