Getting data (FHIR)
Search allergies
Find allergies with search parameters; returns a FHIR Bundle (searchset).
GET
/api/fhir/AllergyIntoleranceScope fhir.readReturns allergies of your practice as a Bundle of type searchset. Records of restricted (VIP) patients and confidential notes are never returned.
The patient's recorded allergies.
GET /api/fhir/AllergyIntolerance
curl "https://system.clinicview.co.za/api/fhir/AllergyIntolerance?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/AllergyIntolerance?patient=8f2c6a1e-4b7d-4c1a-9e3f-2d5b7a9c0e11"
}
],
"entry": [
{
"fullUrl": "https://system.clinicview.co.za/api/fhir/AllergyIntolerance/8f2c6a1e-4b7d-4c1a-9e3f-2d5b7a9c0e11-0",
"resource": {
"resourceType": "AllergyIntolerance",
"id": "8f2c6a1e-4b7d-4c1a-9e3f-2d5b7a9c0e11-0",
"clinicalStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
"code": "active"
}
]
},
"verificationStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
"code": "confirmed"
}
]
},
"code": {
"text": "Penicillin"
},
"patient": {
"reference": "Patient/8f2c6a1e-4b7d-4c1a-9e3f-2d5b7a9c0e11"
}
},
"search": {
"mode": "match"
}
}
]
}Parameters
patientid · queryrequiredThe 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 - 400AllergyIntolerance search requires the patient parameter
- 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