API DOCS GET /analytics/v1/{dept}/{resource}?{filters}&group_by={field} APIs return filtered aggregates — the AI reasons on top

Laboratory المعمل

Filtered counts, totals, and grouped summaries across tests, samples, machines, and revenue. The agent queries these endpoints and forms its own interpretations.

20 Data Questions 7 Endpoints /lab

Each question below maps to an API call that returns aggregated numbers — counts, totals, grouped sums. The agent combines multiple calls to form insights. No raw rows are ever returned.

Data Questions the Agent Can Ask
Q01
How many test reports were generated today?
countdaily
Q02
How many tests are currently pending (not yet resulted)?
countreal-time
Q03
How many samples were rejected this week, grouped by rejection reason?
countgroup_by
Q04
How many tests were processed per category today?
countcategory
Q05
How many STAT (urgent) tests are currently pending?
countpriority
Q06
How many tests exceeded their TAT target today?
countTAT breach
Q07
How many tests were processed per machine this week?
countmachine
Q08
How many critical value results were reported today?
countcritical
Q09
How many tests were processed per shift this week?
countshift
Q10
How many duplicate (repeat) test orders were placed today?
countduplicates
Q11
What is the total lab revenue this month, grouped by test category?
revenuemonthly
Q12
How many tests were requested per ward/department this week?
countrequesting dept
Q13
How many pending tests have already exceeded their expected TAT right now?
countoverdue
Q14
What is the daily test volume for each of the past 30 days?
counttime series
Q15
How many tests were sent to a reference (external) lab this month?
countoutsourced
Q16
How many of each specific test (CBC, RBS, LFT, TSH…) were ordered today?
counttest namedaily
Q17
Which test names have the highest number of pending orders right now?
counttest namepending
Q18
How many CBC tests were rejected this week vs last week?
counttest nameWoW
Q19
Which specific tests have the highest TAT breach count this month?
counttest nameTAT
Q20
What is the revenue per individual test name this month (CBC, Lipid Panel, HbA1c…)?
revenuetest namemonthly
API Endpoints
GET /lab/tests/count Test count with any filter combination
Returns total test count and an optional grouped breakdown. Accepts any combination of filters — date, category, status, shift, ward, machine, priority.
ParameterTypeDescription
datestringoptionalSingle day. Overrides from/to.
fromstringoptionalStart date (ISO)
tostringoptionalEnd date (ISO)
categorystringoptionalhematology | chemistry | microbiology | serology
statusstringoptionalpending | resulted | rejected | outsourced
prioritystringoptionalstat | routine
shiftstringoptionalmorning | afternoon | night
requesting_deptstringoptionalWard or department name
machine_idstringoptionalAnalyzer/machine ID
test_namestringoptionalSpecific test name e.g. CBC, RBS, LFT, TSH, HbA1c, Lipid Panel
group_bystringoptionaltest_name | category | status | shift | machine | requesting_dept | day
Example — today's test count grouped by category
GET /analytics/v1/lab/tests/count?date=2026-05-19&group_by=category
Response
{ "total": 842, "filters": { "date": "2026-05-19" }, "breakdown": [ { "group": "Chemistry", "count": 341 }, { "group": "Hematology", "count": 298 }, { "group": "Microbiology","count": 142 }, { "group": "Serology", "count": 61 } ] }
Example — pending STAT tests right now
GET /analytics/v1/lab/tests/count?status=pending&priority=stat&group_by=requesting_dept
Response
{ "total": 17, "filters": { "status": "pending", "priority": "stat" }, "breakdown": [ { "group": "ICU", "count": 8 }, { "group": "Emergency", "count": 6 }, { "group": "Surgery", "count": 3 } ] }
Example — today's count grouped by test name
GET /analytics/v1/lab/tests/count?date=2026-05-19&group_by=test_name
Response
{ "total": 842, "filters": { "date": "2026-05-19" }, "breakdown": [ { "group": "CBC", "count": 184 }, { "group": "Random Blood Sugar (RBS)", "count": 112 }, { "group": "Liver Function (LFT)", "count": 98 }, { "group": "Kidney Function (KFT)", "count": 87 }, { "group": "TSH", "count": 74 }, { "group": "HbA1c", "count": 68 }, { "group": "Lipid Panel", "count": 61 }, { "group": "Urine Analysis (UA)", "count": 54 }, { "group": "Blood Culture", "count": 42 }, { "group": "CRP", "count": 38 }, { "group": "PT / INR", "count": 24 } ] }
Example — pending CBC tests right now
GET /analytics/v1/lab/tests/count?status=pending&test_name=CBC
Response
{ "total": 9, "filters": { "status": "pending", "test_name": "CBC" } }
GET /lab/rejections/count Rejected sample count by reason, shift, or ward
Count of rejected samples with breakdown by rejection reason, originating ward, or shift. Useful for the agent to identify quality patterns over any time window.
ParameterTypeDescription
fromstringrequiredStart date
tostringrequiredEnd date
test_namestringoptionalFilter rejections for a specific test e.g. CBC, RBS
group_bystringoptionaltest_name | reason | shift | ward | category
Example — this week's rejections by reason
GET /analytics/v1/lab/rejections/count?from=2026-05-13&to=2026-05-19&group_by=reason
Response
{ "total": 74, "breakdown": [ { "group": "Hemolyzed sample", "count": 28 }, { "group": "Clotted sample", "count": 19 }, { "group": "Incorrect tube type", "count": 15 }, { "group": "Insufficient volume", "count": 12 } ] }
GET /lab/tat-breaches/count Tests that exceeded their TAT target
Returns the count of tests that exceeded their category-specific TAT target. Group by category, shift, or machine to isolate where breaches concentrate.
ParameterTypeDescription
datestringoptionalSingle day (defaults to today)
from / tostringoptionalDate range
categorystringoptionalTest category filter
test_namestringoptionalFilter to a specific test e.g. CBC, Blood Culture
group_bystringoptionaltest_name | category | shift | machine
Example — today's breaches grouped by category
GET /analytics/v1/lab/tat-breaches/count?date=2026-05-19&group_by=category
Response
{ "total_breaches": 38, "total_tests": 842, "breach_rate_pct": 4.5, "breakdown": [ { "group": "Microbiology", "count": 21 }, { "group": "Chemistry", "count": 12 }, { "group": "Hematology", "count": 5 } ] }
Example — this month's breaches grouped by test name
GET /analytics/v1/lab/tat-breaches/count?from=2026-05-01&to=2026-05-31&group_by=test_name
Response
{ "total_breaches": 183, "breach_rate_pct": 5.1, "breakdown": [ { "group": "Blood Culture", "count": 61 }, { "group": "HbA1c", "count": 34 }, { "group": "Liver Function (LFT)", "count": 28 }, { "group": "CBC", "count": 22 }, { "group": "TSH", "count": 19 }, { "group": "Random Blood Sugar (RBS)", "count": 11 }, { "group": "Urine Analysis (UA)", "count": 8 } ] }
GET /lab/tests/names Lookup — available test names in the system
Returns the full list of distinct test names active in the system, optionally filtered by category. The agent uses this as a reference lookup before passing test_name values to other endpoints.
ParameterTypeDescription
categorystringoptionalFilter by category e.g. Hematology, Chemistry, Microbiology
Example — all hematology test names
GET /analytics/v1/lab/tests/names?category=Hematology
Response
{ "category": "Hematology", "test_names": [ "CBC", "PT / INR", "aPTT", "ESR", "Reticulocyte Count", "Blood Film" ] }
Example — all chemistry test names
GET /analytics/v1/lab/tests/names?category=Chemistry
Response
{ "category": "Chemistry", "test_names": [ "Random Blood Sugar (RBS)", "Fasting Blood Sugar (FBS)", "HbA1c", "Liver Function (LFT)", "Kidney Function (KFT)", "Lipid Panel", "TSH", "CRP", "Uric Acid", "Serum Iron" ] }
GET /lab/machines/utilization Test count & runtime per machine
Response
{ "machines": [ { "machine_id": "HEMA-01", "name": "Sysmex XN-1000", "tests_count": 298, "runtime_hours":6.2, "idle_hours": 1.8, "downtime_hours":0 }, { "machine_id": "CHEM-02", "name": "Roche Cobas 6000", "tests_count": 341, "runtime_hours":7.8, "idle_hours": 0.2, "downtime_hours":0 } ] }
GET /lab/revenue/summary Revenue totals grouped by category or period
Response — monthly revenue by category
{ "total_revenue": 428400, "breakdown": [ { "group": "Chemistry", "revenue": 171360, "test_count": 8240 }, { "group": "Hematology", "revenue": 132800, "test_count": 7120 }, { "group": "Microbiology","revenue": 82400, "test_count": 2840 }, { "group": "Serology", "revenue": 41840, "test_count": 1480 } ] }
GET /lab/tests/series Daily test volume over a date range
Returns one row per day (or per shift, or per hour) with test counts. The agent uses this to detect trends, drops, and anomalies over time.
ParameterTypeDescription
fromstringrequiredStart date
tostringrequiredEnd date
granularitystringoptionalhour | day | week
categorystringoptionalFilter to one category
Response
{ "granularity": "day", "series": [ { "date": "2026-05-17", "count": 804 }, { "date": "2026-05-18", "count": 761 }, { "date": "2026-05-19", "count": 842 } ] }

Radiology الأشعة

Filtered counts and summaries for scans, pending reports, equipment runtime, cancellations, and revenue across all modalities.

15 Data Questions5 Endpoints/radiology

Asking "how many CT scans happened today?" and "how many CT reports are still pending?" gives the agent everything it needs to calculate completion rates — without pre-computing it server-side.

Data Questions the Agent Can Ask
Q01
How many scans were performed today, per modality?
countmodality
Q02
How many radiology reports are currently pending (unread)?
countreal-time
Q03
How many scans were ordered vs actually completed today?
countordered vs done
Q04
How many scans were cancelled or resulted in a no-show today?
countcancellations
Q05
How many patients are currently waiting for a scan?
countqueue
Q06
How many scans per requesting department were done this week?
countreferral source
Q07
How many reports exceeded the turnaround time target today?
countTAT breach
Q08
How many critical findings were flagged this week?
countcritical
Q09
How many scans were done per machine/unit today?
countequipment
Q10
What is the total radiology revenue this month, by modality?
revenuemonthly
Q11
How many reports were signed off per radiologist today?
countradiologist
Q12
How many inpatient vs outpatient scans were done today?
countpatient class
Q13
What is the daily scan count for each of the past 30 days?
counttime series
Q14
How many scans were done per shift this week?
countshift
Q15
How many open scan slots are there for tomorrow?
countcapacity
API Endpoints
GET/radiology/scans/countScan count with any filter combination
ParameterTypeDescription
datestringoptionalSingle day
from / tostringoptionalDate range
modalitystringoptionalct | mri | xray | us | mammo
statusstringoptionalordered | completed | cancelled | no_show
patient_classstringoptionalinpatient | outpatient | emergency
shiftstringoptionalmorning | afternoon | night
group_bystringoptionalmodality | status | patient_class | shift | machine | referring_dept | day
Example — today's scans by modality
GET /analytics/v1/radiology/scans/count?date=2026-05-19&group_by=modality
Response
{ "total": 149, "breakdown": [ { "group": "X-Ray", "count": 54 }, { "group": "CT", "count": 47 }, { "group": "US", "count": 28 }, { "group": "MRI", "count": 20 } ] }
GET/radiology/reports/pendingUnread report count by radiologist or modality
Response
{ "total_pending": 23, "breakdown": [ { "group": "Dr. Khaled Ibrahim", "count": 11, "oldest_hours": 3.2 }, { "group": "Dr. Mona Saeed", "count": 7, "oldest_hours": 1.1 }, { "group": "Unassigned", "count": 5, "oldest_hours": 5.8 } ] }
GET/radiology/revenue/summaryRevenue totals by modality or period
Response
{ "total_revenue": 1160400, "breakdown": [ { "group": "CT", "revenue": 428000, "scan_count": 910 }, { "group": "MRI", "revenue": 376200, "scan_count": 540 }, { "group": "X-Ray", "revenue": 166200, "scan_count": 1024 }, { "group": "US", "revenue": 190000, "scan_count": 367 } ] }

Call Center

Aggregated call counts, booking counts, and queue sizes filtered by hour, agent, shift, direction, or inquiry type.

15 Data Questions5 Endpoints/callcenter

The agent can ask "how many calls per hour today?" and "how many were abandoned per hour?" separately — then identify peak abandonment windows itself.

Data Questions the Agent Can Ask
Q01
How many calls came in today?
countdaily
Q02
How many calls were abandoned today?
countabandonment
Q03
How many calls came in per hour today?
counthourly
Q04
How many calls were abandoned per hour today?
counthourly
Q05
How many appointments were booked today?
countbookings
Q06
How many appointments were cancelled or rescheduled today?
countcancellations
Q07
How many calls did each agent handle today?
countagent
Q08
How many calls are currently in queue right now?
countreal-time
Q09
How many reminder calls were sent today?
countoutbound
Q10
How many callback requests are currently pending?
countcallbacks
Q11
How many calls per inquiry type were received this week?
countinquiry type
Q12
How many calls went to voicemail today?
countvoicemail
Q13
How many patients called more than once today?
countrepeat callers
Q14
What is the daily call volume for the past 7 days?
counttime series
Q15
How many bookings per department were made this week?
countdepartment
API Endpoints
GET/callcenter/calls/countCall volume with any filter combination
ParameterTypeDescription
datestringoptionalSingle day (default: today)
from / tostringoptionalDate range
directionstringoptionalinbound | outbound
dispositionstringoptionalanswered | abandoned | voicemail
agent_idstringoptionalFilter to a specific agent
inquiry_typestringoptionalbooking | inquiry | complaint | reminder
group_bystringoptionalhour | agent | disposition | inquiry_type | day
Example — today's calls per hour
GET /analytics/v1/callcenter/calls/count?date=2026-05-19&group_by=hour
Response
{ "total": 482, "breakdown": [ { "group": "08:00", "count": 38 }, { "group": "09:00", "count": 74 }, { "group": "10:00", "count": 91 }, { "group": "11:00", "count": 82 }, { "group": "12:00", "count": 44 } ] }
Example — today's abandoned calls per hour
GET /analytics/v1/callcenter/calls/count?date=2026-05-19&disposition=abandoned&group_by=hour
Response
{ "total": 61, "breakdown": [ { "group": "08:00", "count": 4 }, { "group": "09:00", "count": 18 }, { "group": "10:00", "count": 22 }, { "group": "11:00", "count": 11 }, { "group": "12:00", "count": 6 } ] }
GET/callcenter/appointments/countBooking, cancellation, and no-show counts
ParameterTypeDescription
date / from / tostringoptionalDate filter
statusstringoptionalbooked | cancelled | rescheduled | no_show
group_bystringoptionaldepartment | agent | status | day
Response
{ "total": 218, "breakdown": [ { "group": "booked", "count": 162 }, { "group": "cancelled", "count": 34 }, { "group": "rescheduled", "count": 22 } ] }
GET/callcenter/queue/currentReal-time queue snapshot
Response
{ "calls_in_queue": 7, "agents_available": 3, "agents_on_call": 8, "callbacks_pending": 12, "longest_wait_min": 4.2 }

Financial Manager

Revenue totals, payment counts, AR balances, claim counts, and expense sums — all filterable by date, payer, department, or aging bucket.

15 Data Questions5 Endpoints/finance
Data Questions the Agent Can Ask
Q01
What is the total revenue collected today?
revenuedaily
Q02
How many invoices were issued today?
countinvoices
Q03
What is the total outstanding AR balance right now?
balancereal-time
Q04
How many payments were received today, per payer type?
countpayer
Q05
What is the total outstanding balance per payer right now?
balancepayer
Q06
How many invoices are overdue by 30+, 60+, and 90+ days?
countaging
Q07
What is the daily revenue total for each of the past 30 days?
revenuetime series
Q08
How many write-offs were processed this month, and for what total amount?
count + valuewrite-offs
Q09
What is the total revenue per department this month?
revenuedepartment
Q10
How many insurance claims are still pending approval?
countclaims
Q11
What is the total expense amount per category this month?
expensescategory
Q12
How many credit notes were issued this week?
countcredit notes
Q13
What is the total cash collected today vs total invoiced?
revenuecollection
Q14
What is this month's revenue vs the approved budget, per department?
revenue vs budgetdept
Q15
How many new patients vs returning patients were billed this month?
countpatient type
API Endpoints
GET/finance/revenue/summaryRevenue totals with any filter + group_by
ParameterTypeDescription
date / from / tostringoptionalDate filter
payer_typestringoptionalcash | insurance | corporate
departmentstringoptionalDepartment filter
group_bystringoptionaldepartment | payer_type | day | month
Example — today's revenue vs yesterday
GET /analytics/v1/finance/revenue/summary?date=2026-05-19&group_by=payer_type
Response
{ "total_revenue": 284100, "breakdown": [ { "group": "Cash", "revenue": 82400, "invoice_count": 218 }, { "group": "Insurance", "revenue": 148200, "invoice_count": 341 }, { "group": "Corporate", "revenue": 53500, "invoice_count": 84 } ] }
GET/finance/ar/outstandingOutstanding AR balance by aging bucket or payer
Response
{ "total_outstanding": 14280000, "invoice_count": 3841, "breakdown": [ { "group": "0-30 days", "balance": 6840000, "count": 1842 }, { "group": "31-60 days", "balance": 4120000, "count": 1104 }, { "group": "61-90 days", "balance": 2140000, "count": 581 }, { "group": "90+ days", "balance": 1180000, "count": 314 } ] }
GET/finance/expenses/summaryExpense totals by category or department
Response
{ "total_expenses": 6182000, "breakdown": [ { "group": "Salaries", "amount": 3240000 }, { "group": "Medications", "amount": 1120000 }, { "group": "Consumables", "amount": 840000 }, { "group": "Maintenance", "amount": 420000 }, { "group": "Utilities", "amount": 562000 } ] }

Medical Director

Patient census counts, admission/discharge counts, bed availability, incident counts, and readmission counts — filterable by ward, specialty, diagnosis, and date.

15 Data Questions5 Endpoints/medical
Data Questions the Agent Can Ask
Q01
How many patients are currently admitted in each ward?
countcensus
Q02
How many patients were admitted today?
countadmissions
Q03
How many patients were discharged today?
countdischarges
Q04
How many beds are occupied vs available right now, per ward?
countbeds
Q05
How many patients have been admitted for more than 7 days?
countlong stay
Q06
How many patients were readmitted within 30 days this month?
countreadmissions
Q07
How many incident/adverse event reports were filed this week?
countincidents
Q08
How many surgeries were performed today?
countsurgical
Q09
How many patients are currently on isolation precautions?
countinfection control
Q10
How many infection events were reported this month, by type?
countHAI
Q11
How many patients are waiting for an inpatient bed right now?
countwaiting
Q12
How many medication errors were reported this month?
countmed errors
Q13
How many outpatient clinic visits were completed today?
countoutpatient
Q14
What is the daily admission count for each of the past 30 days?
counttime series
Q15
How many admissions were per specialty this month?
countspecialty
API Endpoints
GET/medical/patients/censusCurrent patient count by ward or status
ParameterTypeDescription
wardstringoptionalFilter to a specific ward
specialtystringoptionalFilter to a specialty
statusstringoptionaladmitted | isolation | waiting_bed
min_los_daysintegeroptionalOnly patients admitted ≥ N days ago
group_bystringoptionalward | specialty | status
Response — current census by ward
{ "total_admitted": 284, "breakdown": [ { "group": "ICU", "count": 18, "bed_capacity": 20 }, { "group": "Cardiology", "count": 42, "bed_capacity": 48 }, { "group": "Orthopedics", "count": 38, "bed_capacity": 40 }, { "group": "General Surgery","count": 61, "bed_capacity": 64 } ] }
GET/medical/admissions/countAdmission & discharge counts with filters
Response
{ "admissions": 34, "discharges": 28, "net_change": +6, "breakdown": [ { "group": "Cardiology", "admissions": 8, "discharges": 5 }, { "group": "Orthopedics", "admissions": 6, "discharges": 8 }, { "group": "Surgery", "admissions": 12,"discharges": 9 } ] }
GET/medical/incidents/countIncident and adverse event counts by type
Response
{ "total": 14, "breakdown": [ { "group": "Medication error", "count": 5 }, { "group": "Patient fall", "count": 4 }, { "group": "Pressure ulcer", "count": 3 }, { "group": "Hospital infection", "count": 2 } ] }

Top Management

Cross-department totals and counts: patient volume, revenue, staffing, bed occupancy, complaints, and strategic milestone progress — all in aggregated form.

15 Data Questions5 Endpoints/executive
Data Questions the Agent Can Ask
Q01
What is total revenue across all departments today?
revenuedaily
Q02
How many patients were seen across all units today?
countall units
Q03
What is the current bed occupancy count and percentage per department?
countbeds
Q04
How many staff members are currently on duty, per department?
countstaffing
Q05
What is the total cost incurred this month vs the approved budget?
cost vs budgetmonthly
Q06
How many patient complaints were received this week?
countcomplaints
Q07
What is the revenue per department this month?
revenuedepartment
Q08
How many new vs returning patients visited this month?
countpatient type
Q09
How many open staff vacancies exist right now?
countHR
Q10
What is the YTD revenue total vs the YTD plan amount?
revenue vs planYTD
Q11
How many quality incidents occurred this quarter, by type?
countquality
Q12
How many patient satisfaction surveys were collected this month?
countsurveys
Q13
How many departments are currently at or above 90% bed occupancy?
counthigh occupancy
Q14
What is the total patient volume for each of the past 12 months?
counttime series
Q15
How many strategic initiative milestones are on track vs delayed?
countstrategy
API Endpoints
GET/executive/volume/summaryAll-unit patient volume counts
ParameterTypeDescription
date / from / tostringoptionalDate filter
unitstringoptionalinpatient | outpatient | emergency | surgical
group_bystringoptionalunit | department | day | month
Response — today's patient count by unit
{ "total": 1284, "breakdown": [ { "group": "Outpatient", "count": 841 }, { "group": "Emergency", "count": 222 }, { "group": "Inpatient", "count": 284 }, { "group": "Surgical", "count": 24 } ] }
GET/executive/kpi/currentAll KPI current values — no pre-analysis
Returns the latest measured value for each configured KPI, along with the target and the previous period value. The agent decides what "good" or "bad" means in context.
Response
{ "as_of": "2026-05-19", "kpis": [ { "name": "Bed Occupancy %", "value": 88.4, "target": 85.0, "prev_value": 84.1 }, { "name": "30-Day Readmission %","value": 6.2, "target": 7.0, "prev_value": 6.8 }, { "name": "Days AR", "value": 42.3, "target": 40.0, "prev_value": 45.8 }, { "name": "Patient NPS", "value": 72, "target": 70, "prev_value": 68 } ] }

Stock Control & Purchasing

Inventory item counts, stock values, expiry counts, PO counts, consumption totals, and supplier delivery counts — filtered by category, department, vendor, or date.

15 Data Questions5 Endpoints/inventory
Data Questions the Agent Can Ask
Q01
How many items are currently below their reorder point?
countreorder
Q02
How many items are expiring within the next 30 days?
countexpiry
Q03
What is the total value of items expiring within 30 days?
valueexpiry
Q04
How many purchase orders are currently pending delivery?
countPO
Q05
What is the total inventory value by category right now?
valuecategory
Q06
How many units of each item category were consumed this week?
countconsumption
Q07
How many stockout events occurred this month?
countstockout
Q08
What is the total value of expired and wasted items this month?
valuewaste
Q09
How many items currently have zero stock?
countzero stock
Q10
How many deliveries were received from vendors today?
countGRN
Q11
What is the total PO spending this month, by category?
valuepurchasing
Q12
How many items are above their maximum stock threshold?
countoverstock
Q13
How many vendor deliveries are currently late (past expected date)?
countlate delivery
Q14
How many items have had zero consumption in the past 90 days?
countslow-moving
Q15
How much was consumed per department this week, by category?
count + valuedept
API Endpoints
GET/inventory/items/countItem counts filtered by stock status or category
ParameterTypeDescription
statusstringoptionalbelow_reorder | zero_stock | overstock | expiring_30d | expiring_60d | slow_moving
categorystringoptionalmedications | consumables | reagents | equipment
group_bystringoptionalcategory | status | location
Example — items below reorder by category
GET /analytics/v1/inventory/items/count?status=below_reorder&group_by=category
Response
{ "total": 14, "breakdown": [ { "group": "Medications", "count": 8, "total_value_at_risk": 42000 }, { "group": "Consumables", "count": 4, "total_value_at_risk": 18200 }, { "group": "Reagents", "count": 2, "total_value_at_risk": 9400 } ] }
GET/inventory/consumption/summaryUnits consumed with department & category filters
Response
{ "total_units_consumed": 18420, "total_value_consumed": 284100, "breakdown": [ { "group": "ICU", "units": 4210, "value": 84200 }, { "group": "Emergency", "units": 3840, "value": 62100 }, { "group": "Surgery", "units": 3120, "value": 58400 }, { "group": "General Wards","units": 7250, "value": 79400 } ] }
GET/inventory/purchase-orders/countPO counts by status, vendor, or category
Response
{ "total": 38, "total_value": 841200, "breakdown": [ { "group": "pending", "count": 24, "value": 512000 }, { "group": "late", "count": 7, "value": 184200 }, { "group": "received", "count": 7, "value": 145000 } ] }

Emergency Department الطوارئ

Arrival counts, triage counts, wait counts, disposition counts, and ER capacity — filterable by hour, shift, triage level, and date range.

15 Data Questions5 Endpoints/emergency

Asking "how many patients arrived per hour today?" + "how many per hour left without being seen?" gives the agent everything needed to detect understaffed windows — without the API doing that reasoning.

Data Questions the Agent Can Ask
Q01
How many patients arrived in the ER today?
countarrivals
Q02
How many patients are currently in the ER right now?
countreal-time
Q03
How many patients per triage level are currently waiting?
counttriage
Q04
How many patients arrived per hour today?
counthourly
Q05
How many patients were admitted from the ER today?
countadmissions
Q06
How many patients left without being seen (LWBS) today?
countLWBS
Q07
How many LWBS occurred per hour today?
countLWBS hourly
Q08
How many Code Blue events occurred this week?
countcodes
Q09
How many patients have been waiting for more than 4 hours?
countlong wait
Q10
How many ER beds are occupied vs available right now?
countcapacity
Q11
How many patients arrived via ambulance today?
countambulance
Q12
How many patients arrived per shift today?
countshift
Q13
How many patients returned within 72 hours of discharge this week?
countreturns
Q14
What is the daily ER arrival count for each of the past 30 days?
counttime series
Q15
How many patients are currently boarding (waiting for an inpatient bed)?
countboarding
API Endpoints
GET/emergency/arrivals/countArrival count with any filter + group_by
ParameterTypeDescription
date / from / tostringoptionalDate filter
triage_levelstringoptionalP1 | P2 | P3 | P4 | P5
arrival_modestringoptionalambulance | walk_in | police
shiftstringoptionalmorning | afternoon | night
group_bystringoptionalhour | shift | triage_level | arrival_mode | day
Example — today's arrivals per hour
GET /analytics/v1/emergency/arrivals/count?date=2026-05-19&group_by=hour
Response
{ "total": 222, "breakdown": [ { "group": "08:00", "count": 14 }, { "group": "09:00", "count": 28 }, { "group": "10:00", "count": 34 }, { "group": "11:00", "count": 31 }, { "group": "12:00", "count": 22 } ] }
GET/emergency/patients/currentReal-time ER census by triage or status
Response
{ "total_in_er": 41, "waiting_for_doctor": 18, "under_treatment": 16, "boarding": 7, "beds_occupied": 38, "beds_total": 45, "by_triage": [ { "group": "P1", "count": 2 }, { "group": "P2", "count": 8 }, { "group": "P3", "count": 19 }, { "group": "P4", "count": 12 } ] }
GET/emergency/dispositions/countAdmit / discharge / LWBS / transfer counts
Response
{ "total_dispositioned": 198, "breakdown": [ { "group": "discharged", "count": 138 }, { "group": "admitted", "count": 46 }, { "group": "transferred", "count": 6 }, { "group": "lwbs", "count": 8 } ] }

Revenue Cycle Management (RCM)

Claim submission counts, denial counts, pending claim values, prior-auth counts, underpayment totals — all filterable by payer, reason code, date, and department.

15 Data Questions5 Endpoints/rcm
Data Questions the Agent Can Ask
Q01
How many claims were submitted today?
countsubmissions
Q02
How many claims were denied today, per payer?
countdenials
Q03
How many claims are currently pending payer response?
countpending
Q04
What is the total value of denied claims this month, per payer?
valuedenials
Q05
How many prior authorization requests were submitted today?
countprior auth
Q06
How many prior auth requests are still pending a decision?
countPA pending
Q07
How many claims were appealed this month?
countappeals
Q08
How many claims were paid today?
countpayments
Q09
How many claims are older than 90 days and still unpaid?
countaged AR
Q10
How many underpayment cases were identified this month?
countunderpayment
Q11
How many claims were denied per denial reason code this month?
countdenial reason
Q12
How many new charges were posted today?
countcharge posting
Q13
How many clean vs dirty claims were submitted this week?
countclean claim
Q14
What is the total value of claims submitted this month, per payer?
valuesubmission
Q15
How many prior auth requests were denied this month, per payer?
countPA denials
API Endpoints
GET/rcm/claims/countClaim counts with any filter + group_by
The core RCM endpoint. Returns claim counts and total values filtered by status, payer, denial code, date, or department. One endpoint covers submitted, denied, pending, paid, and appealed states.
ParameterTypeDescription
date / from / tostringoptionalDate filter
statusstringoptionalsubmitted | denied | pending | paid | appealed | written_off
payer_idstringoptionalSpecific payer ID
denial_codestringoptionalDenial reason code e.g. CO-96
departmentstringoptionalOriginating department
min_age_daysintegeroptionalClaims older than N days
group_bystringoptionalpayer | status | denial_code | department | day
Example — today's denials per payer
GET /analytics/v1/rcm/claims/count?date=2026-05-19&status=denied&group_by=payer
Response
{ "total": 38, "total_value": 142800, "breakdown": [ { "group": "Bupa Arabia", "count": 17, "value": 68400 }, { "group": "Tawuniya", "count": 12, "value": 41200 }, { "group": "Medgulf", "count": 9, "value": 33200 } ] }
Example — this month's denials by reason code
GET /analytics/v1/rcm/claims/count?from=2026-05-01&to=2026-05-19&status=denied&group_by=denial_code
Response
{ "total": 714, "breakdown": [ { "group": "CO-96 (Missing prior auth)", "count": 184 }, { "group": "CO-4 (Not medically necessary)", "count": 218 }, { "group": "CO-11 (Diagnosis mismatch)", "count": 142 }, { "group": "CO-29 (Timely filing)", "count": 98 } ] }
GET/rcm/prior-auth/countPA request counts by status or payer
Response
{ "total": 1842, "breakdown": [ { "group": "approved", "count": 1594 }, { "group": "denied", "count": 162 }, { "group": "pending", "count": 86 } ] }
GET/rcm/underpayments/summaryUnderpayment count and value by payer
Response
{ "total_cases": 1248, "total_underpayment":842100, "breakdown": [ { "group": "Bupa Arabia", "count": 580, "value": 412000 }, { "group": "Tawuniya", "count": 398, "value": 284100 }, { "group": "Medgulf", "count": 270, "value": 146000 } ] }