LiveIndependent · Digital twin2026

Taw'am توأم

A hospital digital twin with a decision engine, built as a multi-tenant SaaS · live with a free trial

−46%boarding hours with the recommendations (simulated)
01The problem

Why it exists

My career has been indoor navigation and asset tracking in Saudi hospitals and airports. Taw'am puts that into one product: a 134-bed, three-floor hospital where beds, patients, porters and BLE-tagged equipment move in real time, and operators can find the nearest free wheelchair, forecast beds and test a change before making it. It is now a SaaS product that also decides: which bed each patient should go to under single-sex and isolation room rules, what to clean first, who goes home today, which operations are at risk, with a 3D view, an Arabic/English assistant and pilot reports that compare the same patients with and without its recommendations.

02The system

What I built

BLE beaconsHMM location filter
Hospital simulationER, wards, porters, lifts
Decision enginebeds, cleaning, porters
Forecastsbeds, discharge, ER arrivals
Control roomlive over WebSockets
  1. A discrete-event simulation of the hospital (ER triage, boarding, ward stays, discharge rounds, cleaning crews, surgery, porters, lift congestion) with each patient's course drawn on arrival, so what-if runs are fair comparisons
  2. BLE location from 78 simulated beacons with an HMM filter, tested against a building whose physics it does not expect
  3. Fastest routes on wheels across floors (no stairs, live lift waits), a bed forecast learned from the hospital's history, and a bilingual control-room console
  4. A decision engine (bed placement with room-rule consolidation moves, cleaning order, porter dispatch, isolation-chair cleaning), discharge prediction, an operating-list risk check that runs the day 6 times, and ER arrival forecasts that learn Ramadan, Eid and Hajj-season effects from the Umm al-Qura calendar
  5. The SaaS around it on Cloudflare's free tier: one Durable Object per hospital pushing live state over WebSockets, roles and invites, a porter app, per-hospital API keys with HL7/FHIR/BLE adapters that pseudonymise patients before storage, per-bed billing with VAT and ZATCA-QR invoices, and a hash-chained audit log
03The result

What it achieved

Following the recommendations cut boarding hours by 46% and patients leaving the ER unseen by 32% (10 simulated hospitals × 21 days, same patients each way), and chair exposures to isolation patients to zero; cleaning priority alone showed no gain, and that is published. Room-level location 99.0% (82.1% in the mismatched building) versus 76.1% for the strongest beacon; porters sent to the wrong room fell from 29.5% to 0.6% of wheelchair searches. The bed forecast cuts 8-hour error by 23% versus "no change" (and loses at 2 hours, which is published). What-if results over five seeds show, for example, that an extra cleaning crew cuts dirty-bed hours by 25% while an extra porter changes nothing. A 15-check end-to-end suite (tenant isolation, roles, connector idempotency, billing, audit) passes against production.

Stack

Digital twinDiscrete-event simulationBLE · HMMIndoor routingForecastingSaaSHL7 · FHIRDurable ObjectsJavaScript

Timeline

2026

My role

Product + engineering + research