Documents
Documents Overview
Introduction to FHIR document resources in Esus
FHIR Document Resources in Esus
Esus implements the following resources for clinical and administrative documents:
| Resource | Purpose |
|---|---|
| DocumentReference | Metadata about a document and a pointer to its content |
| Composition | Structured clinical document (titled sections that reference other resources) |
| DiagnosticReport | Lab, imaging, pathology, and other diagnostic reports |
| Media | Clinical 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
- Upload the bytes to
POST /files/uploadand keep the returnedid. - Create a
DocumentReference(orMedia) whose attachment URL points at/files/{id}. - Link it to the patient (
subjectId) and, where the resource supports it, the encounter. - Access it through authorized reads; FHIR and file accesses are written to the audit trail.
Document Types
| Type | Typical resource |
|---|---|
| Clinical notes — progress, consult, H&P | DocumentReference + /files/upload |
| Structured clinical document | Composition |
| Lab, imaging, pathology reports | DiagnosticReport |
| Images and media | Media + /files/upload |
| Administrative (consent forms, referrals) | DocumentReference |
Related Standards
- 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
Compositionis the first entry of aBundleof typedocument. Esus storesCompositionas a regular resource; it does not assemble or acceptdocumentBundles.