API Name: Composition.$retrieve
This API retrieves document Bundle(s) containing clinical compositions (Discharge Summary, ED Notes, OT Notes, Summary Notes and Cardiology Report) associated with a patient, identified by the patient's identifier.
Specification
| Endpoint | [baseurl]/Composition/$retrieve |
|---|---|
| Protocol | HTTPS |
| HTTP Method | GET |
| HTTP Header | Accept: application/fhir+json |
Request Parameters
| Parameter | Type | Cardinality | Description |
|---|---|---|---|
patient.identifier |
token | 1..1 | The patient's identifier in system\|value format. Use https://fhir.synapxe.sg/NamingSystem/nric\|<NRIC>. |
type |
token | 0..1 | Filter by composition type. Provide a LOINC code (e.g. http://loinc.org\|18842-5 for Discharge Summary). |
date |
date | 0..2 | Filter by composition date. Supports ge and le prefixes for date range (e.g. ge2026-01-01&date=le2026-06-30). |
_count |
number | 0..1 | Maximum number of results to return per page. |
Composition Type Codes
| Document Type | System | Code |
|---|---|---|
| Discharge Summary | http://loinc.org | 18842-5 |
| ED Notes | http://loinc.org | 34878-9 |
| OT Notes | http://loinc.org | 11506-3 |
| Summary Notes | http://loinc.org | 60591-5 |
| Cardiology Report | http://loinc.org | 11488-4 |
Example Request
GET [baseurl]/Composition/$retrieve?patient.identifier=https://fhir.synapxe.sg/NamingSystem/nric|S1234567A&type=http://loinc.org|18842-5
Successful Response
The response is a searchset Bundle containing the matching document Bundle(s), each conforming to the respective allowed profile.
Business Level Errors
This section details the business level errors exposed by OperationOutcome resource for this operation. Refer to API Error Handling for framework level errors.
For illustration only
| http status code | code | details.coding.code | details.text |
|---|---|---|---|
| 404 | not-found | E-10000 | No matching patient found based on NRIC, Date of Birth and Gender |
| 404 | not-found | E-10001 | Institution code for organization is not found |
| 404 | not-found | E-10002 | Organization code is not found |
| 400 | business-rule | E-10003 | Patient is not currently enrolled to the organization |
| 400 | duplicate | E-10004 | An attempt was made to create a duplicate record |
| 400 | invalid | E-10005 | Invalid allergy intolerance identifier |
| 400 | invalid | E-10006 | Invalid clinical or verification status |