
Hospital OS: Billing, Admin & Analytics
Overview
Part 3 of the Hospital Operating System is the layer that lets management run the hospital rather than chase it: billing driven by the clinical modules, an admin console that controls who can see and do what, immutable audit trails, and dashboards that show occupancy, revenue and delays as they happen.
Dashboard for the whole hospital
Modules in the full system
Workflow digitised
Full build delivered
The challenge
we had to solve
Bills were assembled at the end of a visit or stay from paper slips, so consultations, medicines and tests could be missed or double-counted. There was no structured way to limit who could see sensitive psychiatric records, no record of who changed what, and owners had to ask around (or wait for month-end) to know how full the wards were or how the hospital was performing.

How we
approached it
Every billable event (a consultation, a dispensed medicine, a lab test, a bed-day) raises a charge line at the moment it happens, so the invoice is built continuously instead of reconstructed at discharge. Billing endpoints are idempotent, so a retried request cannot create a duplicate charge, and treatment packages can be applied across an episode. Access runs on role-based access control (RBAC) with JWT-authenticated sessions, sensitive clinical data is restricted to the roles that need it, and every create, update and cancellation is written to an append-only audit log. Management dashboards query the same PostgreSQL data to show occupancy, revenue, pending bills and waiting-time delays without a separate reporting process.

Charges at Source
Consultations, medicines, tests and bed-days raise charge lines as they happen, so the bill is always current and nothing depends on paper slips reaching the counter.
Billing You Can Trust
Idempotent billing operations, packages, discounts and cancellations with reasons, every figure traceable back to the clinical event that created it.
Access by Role, Logged by Default
RBAC limits each role to what it needs, and an append-only audit trail records who viewed or changed what, following a HIPAA-aligned design built to support DPDP obligations.
Management at a Glance
Real-time dashboards for occupancy, revenue, pending bills and OPD delays, built on the same data the departments work from.
Four phases
zero shortcuts
Charge Model & Tariffs
Defined service tariffs, packages and the charge-line model so every clinical module can raise billable events against an OPD visit or IPD episode.
Billing & Invoicing Engine
Built invoicing, receipts, packages, discounts and cancellations on idempotent endpoints with server-side validation and transactional writes.
Access Control & Audit
Implemented RBAC with JWT session auth, encryption in transit, and an append-only audit log across clinical and financial actions.
Dashboards & Reporting
Delivered management dashboards for occupancy, revenue, collections and delays, with filters by department, doctor and date range.
The work,
in full resolution
Drag to explore. Click to open full screen.



Before vs.
after
The system transformed the way we manage appointments and patient workflows while giving us a professional digital presence.
Want results like these? Let's talk about what we can build together.
Start a project