clinik.documents namespace manages FHIR Composition resources — structured clinical documents organized into titled sections. Use compositions for multi-section documents like discharge summaries, referral letters, care plans, and operative reports. For single-body narrative notes, use clinik.notes instead.
create
Create a newComposition. The status, type, patientId, practitionerId, title, and sections fields are required.
Document status. Accepted values:
preliminary, final, amended.Document type identifier, for example
discharge-summary, referral-letter, care-plan.ID of the patient the document is about.
ID of the practitioner who authored the document.
Document title.
Ordered array of document sections. Each section requires a
title and text, and optionally a code and an array of resourceIds that this section references.Encounter this document is associated with.
Document date in
YYYY-MM-DD format.Confidentiality level.
N = Normal, R = Restricted, V = Very Restricted.Section structure
Each section in thesections array accepts:
Example
read
Fetch a single composition by ID.update
Partially update a document. Only the fields you include are changed. To amend a final document, updatestatus to amended alongside your content changes.
Example: amend a final document
delete
Permanently delete a composition.search
Search compositions with filters on patient, author, type, status, and date.Filter by patient.
Filter by authoring practitioner.
Filter by document type.
Filter by document status.
Filter by document date.
Results per page.
Pagination cursor from a previous response.