API Reference
Developer documentation for the ClinicalHIS REST API. Integrate your external systems or build custom clients.
Authentication
The API uses Bearer Token authentication. Include the JWT token returned from the login endpoint in the Authorization header of your requests.
Base URL
All API requests should be prefixed with:
Endpoints
Retrieve a list of patients. Supports pagination and searching.
Parameters
page(number): Page numberlimit(number): Items per pagesearch(string): Search by name or ID
Create a new telemedicine session.
Body
{
"patient_id": "uuid",
"doctor_id": "uuid",
"scheduled_at": "ISO-8601 string"
}A HL7 FHIR R4 read API for interoperability: discovery, search and read across five resource types. All responses use application/fhir+json; lists return a FHIR Bundle (type: searchset); errors return an OperationOutcome. This version is read-only.
Discovery
GET /api/v1/fhir/metadata β CapabilityStatement (fhirVersion 4.0.1)
Resources & search parameters
Patientβidentifier(UHID),name,active; read by idEncounterβpatient,status,date; read by idObservationβpatient,category(laboratory|vital-signs),statusDiagnosticReportβpatient,category(LAB|RAD),statusMedicationRequestβpatient,encounter,status(internal values: active/dispensed/cancelled)- All searches:
_count(default 50, max 200),_offset,_lastUpdated
Access requirements
- Bearer JWT like the REST API; requests always resolve to the caller's tenant (superadmins must send
X-Tenant-ID) - The tenant's plan must include the HL7 / FHIR API Gateway capability (
apiAccessβ₯ read) β configured in the superadmin plan editor - Standard RBAC still applies (e.g.
patient.viewfor Patient,lab.viewfor laboratory results,radiology.viewfor imaging reports) - Every request is written to the tenant's audit trail (
fhir_api_read)
Example
GET /api/v1/fhir/Patient?identifier=UHID-12345&_count=5
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"entry": [{
"fullUrl": "Patient/9f8bβ¦",
"resource": {
"resourceType": "Patient",
"id": "9f8bβ¦",
"identifier": [{ "use": "official", "value": "UHID-12345" }],
"name": [{ "family": "Mensah", "given": ["Ama"] }]
}
}]
}Note: the legacy per-patient format GET /patients/:id?format=fhir still works and is unchanged.
Calculate real-time clinical risk scores (e.g., Sepsis, Readmission).
Parameters
patient_id(uuid): Target patientrisk_type(string): 'SEPSIS' | 'READMISSION'