← Back to projects
Case study · Nexus suite · Clinical core

HMS
Hospital Management System

The clinical and operational core of the Nexus suite, covering every department of an inpatient hospital from the front desk to discharge. It is also the hub that joins the lab, radiology, finance and HR systems into one HMIS.

Role
Solution architect & lead engineer
Client
Private hospital, Kurdistan Region of Iraq
Product
Nexus Clinical & Hospital Enterprise Suite, SpaceCraft Ltd (Erbil)
Status
Going live at the reference hospital
Stack
Go · PostgreSQL · Lit · FHIR R5 · CDS Hooks

01 the problem

Private hospitals in the region usually run four or five separate systems: a hospital system, a lab system, a radiology system, an accounting package and spreadsheets for HR. Each has its own patient list and its own prices, and none of them agree on the money.

HMS is the core that replaces them. A patient registered once moves through reception, clinics, the emergency department, wards, theatre, the lab and radiology, and every chargeable event reaches the same bill and the same ledger.

02 at a glance

03 what it covers

Patient access & flow

reception · clinics · ED · wards

  • Reception: registry search across name, MRN, phone and national ID; Arabic four-part names; duplicate guard and patient merge; a 3-step admit wizard.
  • 11 admission types, each with its own policy on deposits, prior authorisation, rooms and specialties. 27 registration fields can each be set to required, optional or hidden per type.
  • Outpatient clinics: a live queue model (patients hold a place in line, not a time slot) with 10 queue states, a two-step call-in and return-after-results ordering.
  • Emergency department: triage board, re-triage history kept as a record of deterioration, full dispositions, and door-to-triage and length-of-stay reported as median and 90th percentile.
  • Wards: atomic bed claims so two nurses cannot book the last bed twice; a raise → accept → complete transfer handshake with an escalation service that survives restarts.

Clinical record & critical care

EMR · scores · ICU · maternity

  • EMR: ICD-10 conditions, allergies, LOINC-coded vitals with automatic interpretation, consents, code status, isolation signage, care plans, SBAR handoff and a patient-journey timeline.
  • Risk scores: NEWS2, Morse, Braden, SOFA, qSOFA and APACHE II. They are computed on the server so they can be reproduced, and missing values are never silently scored as zero.
  • ICU: ventilator episodes, with ventilator-days computed rather than stored.
  • Maternity: labour partogram with WHO alert and action lines, postpartum haemorrhage monitoring, newborns as separate patients with automatic NICU routing below 37 weeks, WHO 2006 and INTERGROWTH-21st growth curves, and a human milk bank.

Theatre, pharmacy & blood

safety gates in the workflow

  • Theatre: the WHO Surgical Safety Checklist acts as a gate: surgery cannot start until sign-in and time-out are complete. Also implant recall tracking, and a team roster that drives the fee split.
  • Pharmacy: pharmacist verification, a formulary gate with audited override, drug–drug and drug–allergy checks at prescribing, controlled drugs with a second signature, and FEFO dispensing.
  • MAR: a dose engine that creates one record per due dose, so a missed dose leaves a record; atomic administration so a dose is never charted twice.
  • Blood bank: donor deferral, quarantine until screening clears, lookback investigation, and crossmatch as a gate before transfusion.

Care pathways

orchestration · decision support

  • FHIR-based workflow orchestrator that turns a care pathway into dependent tasks and escalates them when they are overdue. It ships with the Surviving Sepsis one-hour bundle.
  • CDS Hooks engine, order sets and questionnaires.
  • Shared department kiosk: ED, ICU, maternity, theatre and wards share the same trailing tabs (stock locker, lab reports, front desk, shifts), and the server works out the user's department from their login.

04 architecture

05 joining five systems into one

Much of the effort went into the integration itself: making five sub-systems behave as one product rather than five products sharing a login.

06 shared platform

Arabic / English

A full right-to-left layout served from one stylesheet using CSS logical properties. Translations are stored as locale-keyed JSONB with fallback. Screen text is translated; stored enum values and clinical free text never are.

Clinical terminology

I converted the 58,829-concept CIEL dictionary from MySQL to PostgreSQL and fed it through a Python ETL pipeline into the binary. SNOMED CT, ICD-10/11, RxNorm and LOINC codes come in through CIEL's crosswalks. Search runs on pg_trgm indexes.

Reporting & comms

An on-screen report designer with 9 block types, JsonLogic rules and versioned publishing to HTML and PDF. Notifications can target a department, role or user.

07 engineering approach

08 results

Roadmap

— the nexus suite