Overview

A hospital runs on a sequence: the patient pays, a nurse takes vitals, then a doctor consults. That sequence is usually held together by paper and hallway conversations. We built a facility application and a national dashboard where the sequence lives in the software: every role sees the same visit, at the stage it has actually reached.

The doctor's queue is the visit pipeline itself: what is ready, and what is blocked upstream on payment or vitals.
The doctor's queue is the visit pipeline itself: what is ready, and what is blocked upstream on payment or vitals.
Client
West African ministry of health
Industry
Public health

The challenge

  • Doctor, nurse, lab, imaging, pharmacist, cashier, billing, store keeper, accountant, facility admin, super admin: eleven roles need different views of one patient visit without duplicating the record.
  • Clinical work is payment-gated. Nursing and medication steps must stay locked until the cashier clears payment, and the software has to enforce that rather than trust it.
  • Departments are licensed centrally: a facility cannot switch on Laboratory or Maternity, or assign staff to them, until the national level grants the licence.
  • Inventory crosses departments, so a pharmacist dispensing drugs and a store keeper running the warehouse cannot share one unguarded catalogue.

Approach

The national licensing console: 19 modules toggled per facility, gating which departments a facility can run at all.
The national licensing console: 19 modules toggled per facility, gating which departments a facility can run at all.
  1. 01

    Model the visit, not the screens

    Every role dashboard reads one visit pipeline of ready for consultation, awaiting nurse vitals and awaiting cashier payment, so the doctor's queue and the nurse's queue are two views of the same state, and 'blocked upstream' is a first-class thing the UI can show.

  2. 02

    One shell, eleven workspaces

    A shared application shell of sidebar, global patient search, theme and account menu, with role-scoped navigation and permissions. Adding a role means adding its links and its slice of the data, not another application.

  3. 03

    Licensing as a national control plane

    A super-admin console toggles 19 modules per facility across clinical and clinical-support categories. A facility can only enable a department, or assign staff to it, once the licence is on.

  4. 04

    Separation of duties in the supply chain

    Pharmacists request stock from the warehouse and receive approved transfers rather than editing the catalogue; the store keeper's view is read-only on the catalogue itself, which facility admin owns. Dispensing is tied to paid invoice items.

Pharmacy workspace: stock is requested from the warehouse and received as transfers, never edited directly.
Pharmacy workspace: stock is requested from the warehouse and received as transfers, never edited directly.

What shipped

11

role-based workspaces, from doctor to store keeper

19

licensable modules controlled nationally

2

applications: facility app and national dashboard

Payment-gated

clinical workflow enforced end to end

Facility administrator overview: activity, finances and capacity, with bed occupancy and registry counts read live.
Facility administrator overview: activity, finances and capacity, with bed occupancy and registry counts read live.

Stack

  • Next.js 16
  • React 19
  • NestJS 11
  • TypeScript
  • Drizzle ORM
  • PostgreSQL
  • Redis
  • BullMQ
  • Socket.IO