Lifeville HMS is a modern, full-featured Hospital Management System designed for clinical environments. This repository contains the React frontend that communicates with the Lifeville HMS API.
- Register patients with full demographics, contact details, next of kin, and medical history (allergies, drug history, family history, social history)
- View, edit, and search patient profiles
- Patient profile sidebar with quick navigation to all clinical sections
- Schedule, view, edit, and cancel appointments
- Filter by upcoming, active, and past appointments
- Appointment status tracking with colour-coded badges
- Admit patients to specific wards and beds
- Track admission details, symptoms, and consultant doctor
- Discharge patients with a formal discharge summary including final diagnosis (ICD-10-CM), treatment given, outcome, condition at discharge, and follow-up instructions
- Record temperature, blood pressure (systolic/diastolic), pulse rate, SpO₂, weight, and height
- Automatic BMI calculation from weight (kg) and height (cm)
- Vitals history table per patient with formatted display
- Record diagnoses using the ICD-10-CM standard (searchable combobox with debounced live search)
- View diagnosis history with full ICD code + description display
- Prescribe lab tests with an optional AI-generated ordering comment based on the patient's latest physical examination findings
- Lab scientists can update test results with a status workflow (To Do → In Progress → Done / Failed)
- AI polish button on the results field to reformat rough entries into structured lab report language
- Image attachments (up to multiple per result)
- 2-minute AI cooldown on the ordering comment to prevent excessive regeneration
- System-by-system examination entry (General Appearance, HEENT, Cardiovascular, Respiration, Gastrointestinal, Genitourinary, Gynecology/Obstetrics, Musculoskeletal, Neurological, Skin)
- AI-generated Findings / Provisional Diagnosis that produces:
- Key findings narrative
- Provisional diagnosis with ICD-10-CM code
- Differential diagnoses with ICD-10-CM codes
- Suggested workup with specific named investigations
- Record patient complaints with AI polish to rewrite informal entries into formal chief complaint language
- Record SOAP-style or narrative progress notes with AI polish
- Record nursing shift observations and interventions with AI polish
- Prescribe medications with drug name, dosage, frequency, duration, and instructions
- Multi-item prescriptions per visit
- Status tracking (Active, Completed, Cancelled)
- Document clinical procedures performed with comments and timestamps
- Linked to admissions; view per-admission discharge details including ICD-10-CM final diagnosis
- Generate patient invoices linked to admissions or outpatient visits
- Line-item billing with quantity, unit price, and totals
- Invoice status tracking (Pending, Partial, Paid, Cancelled)
- Printable formatted bills
- One-click AI-generated clinical patient summary aggregating vitals trends, diagnoses, complaints, doctor notes, nurse notes, physical exams, lab results, prescriptions, procedures, admissions, discharge summaries, and visits
- 10-minute server-side cache to avoid redundant AI calls
- Structured output with bold section headers
- Manage hospital inventory items with stock tracking
- Hospital settings: name, address, contact info, logo, license number, print footer
- Prefixes for patient IDs, admission IDs, lab test IDs, bill numbers
- Currency and print configuration
- Socket.IO-powered live notifications for new appointments and other clinical events
- Notification badge and dismissal
- Printable documents for: Admission Records, Prescriptions, Lab Test Results, Physical Examinations, and Bills
- All documents use a shared hospital header (name, address, contact, license) driven by settings
- Print opens in a new browser window
- Roles:
superadmin,doctor,nurse,lab,pharmacist,receptionist - UI elements and routes conditionally rendered by role via
hasPermission()
- Installable, offline-capable
- Prompt shown when a new version is available
| Layer | Technology |
|---|---|
| Framework | React 18 + Vite |
| Routing | React Router v6 |
| Server State | TanStack Query (React Query) |
| Forms | React Hook Form + Zod |
| UI Components | shadcn/ui + Tailwind CSS |
| Global State | Zustand |
| Real-time | Socket.IO client |
| ICD-10 Search | Debounced API search via custom IcdSearchCombobox |
| HTTP Client | Axios |
- Node.js 18+
- The Lifeville HMS API running on port 3000
cd LHMS
npm installCreate a .env file:
VITE_API_URL=http://localhost:3000/api
VITE_SOCKET_URL=http://localhost:3000npm run devMIT