Getting data (FHIR)
Search medication requests
Find medication requests with search parameters; returns a FHIR Bundle (searchset).
GET
/api/fhir/MedicationRequestScope fhir.readReturns medication requests of your practice as a Bundle of type searchset. Records of restricted (VIP) patients and confidential notes are never returned.
Prescription items (drafts excluded), with NAPPI codes when known, dosage text, quantity and repeats.
GET /api/fhir/MedicationRequest
curl "https://system.clinicview.co.za/api/fhir/MedicationRequest?patient=8f2c6a1e-4b7d-4c1a-9e3f-2d5b7a9c0e11" \
-H "Authorization: Bearer $CLINICVIEW_API_KEY" \
-H "Accept: application/fhir+json"{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "https://system.clinicview.co.za/api/fhir/MedicationRequest?patient=8f2c6a1e-4b7d-4c1a-9e3f-2d5b7a9c0e11"
}
],
"entry": [
{
"fullUrl": "https://system.clinicview.co.za/api/fhir/MedicationRequest/f9b1d3e5-7a9c-4e1b-8d3f-5a7c9e1b3d88",
"resource": {
"resourceType": "MedicationRequest",
"id": "f9b1d3e5-7a9c-4e1b-8d3f-5a7c9e1b3d88",
"status": "active",
"intent": "order",
"groupIdentifier": {
"value": "RX-000412"
},
"medicationCodeableConcept": {
"coding": [
{
"system": "https://fhir.clinicview.co.za/codesystem/nappi",
"code": "700123001"
}
],
"text": "Amlodipine 5 mg tablets"
},
"subject": {
"reference": "Patient/8f2c6a1e-4b7d-4c1a-9e3f-2d5b7a9c0e11"
},
"encounter": {
"reference": "Encounter/e1b3d5f7-2a4c-4e6b-8d0f-1a3c5e7b9d44"
},
"authoredOn": "2026-11-24T09:55:10+02:00",
"requester": {
"reference": "Practitioner/3a9d2f4b-6c1e-4f8a-b2d7-5e0c9a1b3d22"
},
"dosageInstruction": [
{
"text": "5 mg oral once daily for 30 days Take in the morning",
"route": {
"text": "oral"
}
}
],
"dispenseRequest": {
"quantity": {
"value": 30
},
"numberOfRepeatsAllowed": 5
},
"substitution": {
"allowedBoolean": true
}
},
"search": {
"mode": "match"
}
}
]
}Parameters
patientid · queryThe Patient id (or Patient/<id>).
subjectis accepted as an alias.Example:
8f2c6a1e-4b7d-4c1a-9e3f-2d5b7a9c0e11_countinteger · queryResults to return: 1–200, default 50.
Example:
20
Responses
- 200A Bundle of matching resources.Headers:
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset - 400Invalid date parameter "2026/11/01"
- 401Missing or malformed API key
- 403API key lacks the fhir.read scope
- 404Patient not found
- 429Rate limit exceeded: 300 requests per minute per keyHeaders:
Retry-AfterX-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset