The FHIR R4 Composition resource represents a set of healthcare-related documents or a summary of a patient's clinical history. It is used to structure documents such as discharge summaries, progress notes, or other collections of related information.
Health Gorilla exposes Composition as part of its FHIR R4 API to support access to structured clinical documents and document-style summaries.
Use Cases
- Retrieving structured clinical documents associated with an encounter or hospital stay
- Reviewing discharge summaries or continuity-of-care documents as part of longitudinal patient records
- Filtering compositions by patient, type, author, encounter, or status
- Supporting document viewing and care transition workflows
Scope and Behavior
This documentation describes the FHIR R4 API interface for Composition. Health Gorilla’s platform may use additional internal services and data standards to acquire, normalize, and route clinical information. Only the FHIR R4–exposed behavior is documented here.
Health Gorilla supports a subset of the HL7 FHIR R4 Composition resource. Not all optional elements defined in the HL7 specification may be stored, indexed, or returned. Unsupported or unrecognized elements may be ignored or normalized during processing.
In Health Gorilla, Composition is most commonly accessed as part of patient record retrieval workflows, where document-style summaries may be aggregated from connected clinical sources and normalized for longitudinal review. This resource supports document viewing, care transitions, and clinical summary use cases by exposing structured document metadata and sections alongside other patient clinical data.
Authentication
All requests to the FHIR R4 API require OAuth 2.0 authentication using a bearer token. Unauthorized requests return a 401 Unauthorized response.
Required Scopes
composition.readfor GETcomposition.writefor POST, PUT, DELETE
For more information, go to: OAuth 2.0 Authentication.
Search Behavior
- Searches are scoped to the authenticated tenant.
- The
patientparameter is required for patient-scoped searches and is recommended for most search use cases. - Results are returned as a FHIR
Bundle. - Pagination may be applied. Use standard FHIR pagination links (
Bundle.link) to retrieve additional result pages.
Note: The parameters listed below are not exhaustive and reflect commonly used fields in typical Health Gorilla workflows. Supported parameters and behavior may vary by configuration.
Frequently Used Search Parameters
| Parameter | Description | Example Values | FHIR Data Type |
|---|---|---|---|
patient | Filters by patient | Patient/{id} | Reference |
encounter | Filters by associated encounter | Encounter/{id} | Reference |
type | Filters by document type | LOINC codes | token |
status | Filters by composition status | preliminary, final, amended | token |
author | Filters by author | Practitioner/{id}, Organization/{id} | Reference |
Commonly Returned Resource Attributes
| Attribute | Description | Example Values | FHIR Data Type |
|---|---|---|---|
subject | Patient the composition applies to | Patient/{id} | Reference(Patient) |
encounter | Encounter associated with the document | Encounter/{id} | Reference(Encounter) |
status | Workflow status of the document | preliminary, final, amended | code |
type | Kind of clinical document (commonly LOINC-coded) | 18842-5 (Discharge Summary) | CodeableConcept |
category | Classification of the document | summary, report | CodeableConcept[] |
date | When the document was authored | YYYY-MM-DDThh:mm:ssZ | dateTime |
author | Who authored the composition | Practitioner/{id}, Organization/{id} | Reference[] |
title | Human-readable title | Free text | string |
attester | Attestation details for the document | Practitioner reference | BackboneElement[] |
section | Document sections containing titles, codes, and referenced entries | Section titles + referenced entries | BackboneElement[] |
Notifications
The FHIR R4 API does not provide direct resource-change subscriptions for Composition. Changes to composition information may surface through broader notification workflows, depending on enabled Health Gorilla products and configuration.
Error Handling
All Composition operations use standard Health Gorilla error handling practices using the FHIR OperationOutcome structure. For more information, go to: Error Handling.

