Portfolio project

Bed management and early-warning scoring for acute wards

Vital Link follows a patient from the front door to discharge, replacing the ward whiteboard with a shared live view of beds, observations and handover. It was designed with practising NHS doctors and nurses.

Try the demo No sign-up: pick a role and go.
Emergency Assessment (EAU)3 of 6 occupied
Bed 1Available
Bed 2Okafor8
Bed 3Raman2
Bed 4Brennan5
Bed 5Awaiting cleaning
Bed 6Available

One patient, four roles

  1. 01

    Triage nurse

    Records observations at the front door. The NEWS2 score is calculated as each vital sign is entered, including SpO₂ Scale 2 for patients with hypercapnic respiratory failure.

  2. 02

    Site manager

    Sees the queue ordered by four-hour breach risk and NEWS2, and drags each patient into a free bed across every ward.

  3. 03

    Ward doctor

    Reviews the patient, updates observations and notes, prints a handover sheet for the next shift and discharges.

  4. 04

    Housekeeping

    Gets each vacated bed as a cleaning task and releases it back to the board once it is ready.

How it is built

Next.js App Router with Server Actions, PostgreSQL through Prisma, Supabase Realtime, NextAuth and Zod.

NEWS2 scoring engine
An implementation of the Royal College of Physicians chart, scored on the server for every change and covered by unit tests at each threshold.
Role-based access
Route guards plus a role check inside every Server Action, so a request made outside the UI is still refused.
Live bed board
Supabase Realtime pushes bed moves and deteriorating observations to every open board without a refresh.
Safe under contention
A bed is claimed with a single conditional write inside a transaction, so two managers cannot fill the same bed.
Audit trail
Observations, notes, bed moves and discharges are logged against the member of staff who made them.
Tested end to end
Playwright follows one patient through all four roles on every push, alongside Jest, type-checking and linting in CI.