Explore documentation

Documents Overview

Introduction to FHIR document resources in Esus

FHIR Document Resources in Esus

Esus implements the following resources for clinical and administrative documents:

ResourcePurpose
DocumentReferenceMetadata about a document and a pointer to its content
CompositionStructured clinical document (titled sections that reference other resources)
DiagnosticReportLab, imaging, pathology, and other diagnostic reports
MediaClinical audio, video, and images

All four are served under /fhir/<Resource> with the standard FHIR interactions: search, read, create (201), update (PUT), PATCH, delete (204), and version history (/_history, /_history/:vid).

Esus does not expose the FHIR Binary or DocumentManifest resources. Document content (PDF, images, DICOM, etc.) is uploaded through the file-storage endpoints (POST /files/upload) and then referenced by URL from the FHIR resource (e.g. DocumentReference.content[].attachment.url).

Document Lifecycle

  1. Upload the bytes to POST /files/upload and keep the returned id.
  2. Create a DocumentReference (or Media) whose attachment URL points at /files/{id}.
  3. Link it to the patient (subjectId) and, where the resource supports it, the encounter.
  4. Access it through authorized reads; FHIR and file accesses are written to the audit trail.

Document Types

TypeTypical resource
Clinical notes — progress, consult, H&PDocumentReference + /files/upload
Structured clinical documentComposition
Lab, imaging, pathology reportsDiagnosticReport
Images and mediaMedia + /files/upload
Administrative (consent forms, referrals)DocumentReference
  • HL7 CDA / C-CDA — XML clinical documents. Esus does not generate or parse CDA; a CDA file can be stored like any other file and referenced from a DocumentReference.
  • FHIR Documents — in FHIR, a Composition is the first entry of a Bundle of type document. Esus stores Composition as a regular resource; it does not assemble or accept document Bundles.