Hospital API Documentation
https://api.docdroid.ai/api/v1/hospitalAuthentication
All API requests must include a Bearer token in the Authorization header. API keys are provisioned through the hospital admin dashboard.
Authorization: Bearer your_api_key_here
Rate limit: 60 requests per minute per API key.
Patient Access
/patientsList all patients who have granted consent to your hospital. Returns paginated results.
Parameters
pageintegerPage number (default: 1)limitintegerResults per page (default: 20, max: 100)searchstringSearch by patient name or IDResponse Example
{
"data": [
{
"id": "pat_8f3a2b1c",
"name": "Ahmed Al-Mansoori",
"date_of_birth": "1985-03-12",
"consent_status": "active",
"consent_granted_at": "2026-03-15T10:30:00Z",
"last_report_date": "2026-03-28T14:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 142
}
}/patients/:patient_idRetrieve detailed profile and consent information for a specific patient.
Parameters
patient_idstringThe unique patient identifierResponse Example
{
"id": "pat_8f3a2b1c",
"name": "Ahmed Al-Mansoori",
"date_of_birth": "1985-03-12",
"gender": "male",
"blood_type": "O+",
"consent": {
"status": "active",
"granted_at": "2026-03-15T10:30:00Z",
"expires_at": "2027-03-15T10:30:00Z",
"scopes": ["records.read", "briefs.create", "analysis.request"]
},
"reports_count": 24,
"last_report_date": "2026-03-28T14:00:00Z"
}/patients/:patient_id/recordsRetrieve health records for a consented patient. Includes lab reports, extracted biomarkers, and AI interpretations.
Parameters
patient_idstringThe unique patient identifierfromstringStart date filter (ISO 8601)tostringEnd date filter (ISO 8601)categorystringFilter by report category (e.g. blood, urine, imaging)Response Example
{
"data": [
{
"id": "rec_4d7e1a9f",
"report_date": "2026-03-28T14:00:00Z",
"category": "blood",
"lab_name": "Al Borg Diagnostics",
"biomarkers": [
{
"name": "Hemoglobin",
"value": 13.8,
"unit": "g/dL",
"reference_range": "13.0-17.0",
"status": "normal"
},
{
"name": "Fasting Glucose",
"value": 118,
"unit": "mg/dL",
"reference_range": "70-100",
"status": "high"
}
],
"ai_interpretation": "Hemoglobin levels are within normal range. Fasting glucose is elevated, suggesting pre-diabetic levels. Recommend follow-up HbA1c test."
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 24
}
}AI Briefs
/patients/:patient_id/briefsRequest an AI-generated doctor brief summarizing the patient's health history, trends, and key findings.
Parameters
patient_idstringThe unique patient identifierRequest Body
{
"focus_areas": ["cardiovascular", "metabolic"],
"date_range": {
"from": "2025-01-01",
"to": "2026-03-28"
},
"include_trends": true,
"language": "en"
}Response Example
{
"id": "brief_2c8f4e1a",
"status": "completed",
"created_at": "2026-03-29T09:15:00Z",
"patient_id": "pat_8f3a2b1c",
"summary": "Patient is a 41-year-old male with trending elevated fasting glucose over the past 6 months (102 -> 118 mg/dL). LDL cholesterol has improved from 155 to 128 mg/dL following statin therapy. Blood pressure readings remain within normal limits. HbA1c of 6.1% from January 2026 confirms pre-diabetic status.",
"key_findings": [
{
"category": "metabolic",
"finding": "Progressive glucose elevation suggesting pre-diabetes",
"severity": "moderate",
"trend": "worsening"
},
{
"category": "cardiovascular",
"finding": "LDL cholesterol improving with current treatment",
"severity": "low",
"trend": "improving"
}
],
"recommendations": [
"Consider HbA1c retest in 3 months",
"Continue current statin therapy",
"Recommend dietary consultation for glucose management"
]
}/patients/:patient_id/briefs/:brief_idRetrieve a previously generated doctor brief by its ID.
Parameters
patient_idstringThe unique patient identifierbrief_idstringThe brief identifierResponse Example
{
"id": "brief_2c8f4e1a",
"status": "completed",
"created_at": "2026-03-29T09:15:00Z",
"patient_id": "pat_8f3a2b1c",
"summary": "Patient is a 41-year-old male with trending elevated fasting glucose...",
"key_findings": [...],
"recommendations": [...]
}Analysis Requests
/patients/:patient_id/analysisSubmit a targeted analysis request for specific biomarkers, conditions, or health trends.
Parameters
patient_idstringThe unique patient identifierRequest Body
{
"type": "trend_analysis",
"biomarkers": ["fasting_glucose", "hba1c", "insulin"],
"date_range": {
"from": "2025-06-01",
"to": "2026-03-28"
},
"notes": "Evaluate diabetes risk progression"
}Response Example
{
"id": "analysis_7b3d9e2f",
"status": "processing",
"created_at": "2026-03-29T10:00:00Z",
"patient_id": "pat_8f3a2b1c",
"estimated_completion": "2026-03-29T10:02:00Z"
}/patients/:patient_id/analysis/:analysis_idRetrieve the results of a previously submitted analysis request.
Parameters
patient_idstringThe unique patient identifieranalysis_idstringThe analysis request identifierResponse Example
{
"id": "analysis_7b3d9e2f",
"status": "completed",
"created_at": "2026-03-29T10:00:00Z",
"completed_at": "2026-03-29T10:01:45Z",
"patient_id": "pat_8f3a2b1c",
"type": "trend_analysis",
"results": {
"trend_summary": "Fasting glucose shows a steady upward trend over 10 months, increasing from 98 to 118 mg/dL. HbA1c rose from 5.7% to 6.1%. Insulin levels remain within normal range at 12.4 uIU/mL.",
"risk_assessment": "moderate",
"data_points": [
{ "date": "2025-06-15", "biomarker": "fasting_glucose", "value": 98, "unit": "mg/dL" },
{ "date": "2025-09-20", "biomarker": "fasting_glucose", "value": 105, "unit": "mg/dL" },
{ "date": "2025-12-10", "biomarker": "fasting_glucose", "value": 112, "unit": "mg/dL" },
{ "date": "2026-03-28", "biomarker": "fasting_glucose", "value": 118, "unit": "mg/dL" }
]
}
}/analysisList all analysis requests made by your hospital across all patients.
Parameters
statusstringFilter by status: processing, completed, failedpageintegerPage number (default: 1)limitintegerResults per page (default: 20)Response Example
{
"data": [
{
"id": "analysis_7b3d9e2f",
"patient_id": "pat_8f3a2b1c",
"type": "trend_analysis",
"status": "completed",
"created_at": "2026-03-29T10:00:00Z"
},
{
"id": "analysis_1a5c8d4b",
"patient_id": "pat_6e2f9c3d",
"type": "condition_screening",
"status": "processing",
"created_at": "2026-03-29T10:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 87
}
}