Hospital Management Suite

Hospital Management Suite

A full-stack hospital management system built on ERPNext/Frappe v15, covering the complete clinical and administrative workflow of a multi-speciality hospital. Designed for Indian healthcare compliance (NABH/NABL, GST, TDS 194J, ABDM-ready).

Live stack: ERPNext v15 Β· Docker Β· MariaDB
Demo URL: http://localhost:8090
Demo password: Hospital@2026


Modules & Feature Inventory

HMS Setup

  • Multi-branch hospital configuration (Hospital, Hospital Branch)

  • Bed Category master with daily rates, GST treatment, nursing charges

  • Diagnosis Code (ICD-10) master

  • Custom fields on Patient, Patient Appointment, Healthcare Service Unit, Item

HMS Registration

  • Patient registration with MRN auto-generation, ABHA number, blood group + Rh factor

  • Patient consent tracking

  • Payer category (Self / Insurance / Corporate / Government Scheme)

  • Override of standard Patient DocType for HMS-specific logic

HMS OPD

  • Token board with live queue display (/token-board)

  • Appointment hooks: auto-token assignment, branch linkage

  • OPD throughput tracking

HMS Orders

  • Clinical Order (service requisition): Lab / Radiology / Nursing / Procedure / Medication types

  • Encounter-driven order creation on Patient Encounter submit

  • Order status lifecycle: Unbilled β†’ Billed β†’ Resulted

HMS Billing

  • GST-compliant healthcare billing β€” per-line GST treatment (Exempt / 12% / 18%)

  • Room rent GST rule: exempt if ≀ β‚Ή5,000/day, 12% if > β‚Ή5,000

  • Sales Invoice hook applies correct Item Tax Template automatically

  • Doctor Settlement with TDS 194J/194C computation

    • Pulls gross fee from Clinical Orders over a period

    • On submit: creates Draft Journal Entry (Dr. Professional Fee Expense / Cr. TDS Payable / Cr. Accounts Payable)

  • Split-payer billing engine (see HMS Insurance)

HMS Audit

  • HMS Audit Event β€” append-only, tamper-evident event log

  • Permission query conditions restrict patient data to treating clinician + admin

  • Sensitive DocType access (Patient, Clinical Order, Sales Invoice) gated by role

HMS IPD (Inpatient)

  • Admission Request β†’ Admission β†’ Transfer β†’ Discharge lifecycle

  • ADT Event (immutable audit log for every bed movement)

  • Discharge Summary with LAMA / AOR / Expiry discharge types

  • Nightly billing accrual scheduler β€” auto-creates Clinical Orders for room rent + nursing charges

  • Bed Board UI (/bed-board) β€” real-time occupancy map

HMS Emergency

  • Emergency Visit with triage priority (P1 Resuscitation β†’ P5 Non-Urgent)

  • Triage Assessment (NEWS2 early-warning scoring, abbreviated consciousness scale)

  • Real-time critical alert broadcast via WebSocket

HMS Nursing

  • HMS Vital Signs with NEWS2 auto-scoring (HR, BP, SpOβ‚‚, RR, Temp, consciousness)

    • High-frequency ICU vitals stored as batched JSON β€” not one row per reading
  • Medication Administration Record (5-rights gate: patient / drug / dose / route / time)

  • Nursing Handover (SBAR format, shift-wise)

  • Nursing Assessment on admission

HMS Lab

  • Lab Sample with barcode, collection tracking, rejection workflow

  • Reference Range Item (child) β€” age/sex-stratified normal ranges per parameter

  • Delta check β€” flags abnormal change from previous result (configurable %)

  • Critical Result Alert β€” real-time notification, dual-acknowledgement, 2-hour escalation scheduler

  • Dual-validation gate for high-risk tests

  • Critical value flag on Lab Test

  • Lab Analyzer Adapter β€” port interface for ASTM/HL7 analyzer integration

HMS Radiology

  • Radiology Order with slot locking (prevents duplicate bookings)

  • Radiology Report with PACS UID, critical finding flag, real-time alert

  • Radiologist sign-off workflow

HMS Pharmacy

  • Pharmacy Dispensing with CDSS (Clinical Decision Support)

    • Allergy check against Patient.hms_drug_allergies

    • Drug–Drug Interaction check (Drug Interaction Rule master)

  • Stock integration β€” ERPNext Stock Entry on dispense

  • Pharmacy Return with stock reversal

  • Schedule H1 Register β€” immutable log for Schedule H1 drugs (append-only)

  • Narcotic Register β€” immutable log with running balance per drug batch

  • Near-expiry alert scheduler (30 / 60 / 90 day thresholds)

HMS Insurance

  • Insurance Provider / TPA master with tariff Price List linkage, document checklist, TDS settings

  • Insurance Policy per patient (Private / Corporate / PMJAY / State Scheme / ECHS / CGHS)

  • Service Package master with payer-specific rates (for PMJAY package billing)

  • Pre-Authorisation β€” full query loop (Draft β†’ Submitted β†’ Queried β†’ Approved / Rejected)

    • Emergency flag: treatment never blocked on pending auth
  • Insurance Claim with NHCX payload stub (Phase 5 live transmission)

  • Split-payer billing engine (split_billing.generate_split_invoices)

    • Produces two invoices from one episode’s Clinical Orders:

      1. Payer invoice at scheme tariff (or package price for PMJAY)

      2. Patient invoice for co-pay + non-covered + above-limit

    • Tariff resolution: scheme rate β†’ corporate rate β†’ standard

    • GST applied per-line (standard Sales Invoice hook)

HMS OT (Operation Theatre)

  • OT Booking with surgical team assignment

  • WHO Surgical Safety Checklist (15 items, auto-populated on booking)

    • Sign-In + Time-Out phases must be fully checked before status changes to β€œIn-Progress”
  • Theatre double-booking prevention β€” SQL overlap check on theatre + time window

  • Surgery Record

    • Operative notes, findings, blood loss, complications

    • Implant/consumable tracking β†’ automatic ERPNext Stock Entry on submit

    • Billable Clinical Orders created per implant line

  • Anaesthesia Record β€” ASA grade, technique, drug log, recovery notes

HMS ICU (Intensive Care)

  • ICU Observation Chart linked to Inpatient Record

  • Batched vitals storage β€” high-frequency readings stored as JSON arrays in child rows (push_vital_batch API) β€” prevents table explosion at 1-minute intervals

  • Fluid balance: Fluid In / Fluid Out β†’ I/O Balance (auto-computed)

  • Ventilator settings, active infusions tracking

  • ICU billing uses standard nightly accrual at ICU bed-category rate

HMS Blood Bank

  • Blood Donor registration with ABO/Rh, deferral management (auto-expiry on temp deferral)

  • Blood Donation β†’ component preparation β†’ Blood Inventory creation (on submit)

  • Blood Inventory with daily expiry scheduler (marks Expired automatically)

  • Cross Match with result recording

  • Blood Issue β€” ABO/Rh compatibility hard gate

    • compatibility.is_abo_rh_compatible() enforces: ABO + Rh rules

    • Incompatible issue is blocked at validate β€” no bypass

    • On submit: inventory status updated to Issued

  • Transfusion Record with reaction monitoring (None / Mild / Moderate / Severe)

    • Reaction notes mandatory if severity > None

HMS Quality

  • Incident Report (patient safety events)

    • Types: Medication Error / Fall / HAI / Equipment Failure / Near-miss / Sentinel Event

    • Severity 1–6 scale (Near-miss β†’ Death)

    • CAPA Actions child table (action / responsible / due date / status)

    • Restricted visibility flag β€” only HMS Admin + Quality Officer can list

  • Infection Control Surveillance β€” HAI tracking

    • Types: CLABSI / CAUTI / VAP / SSI / MRSA / C.diff

    • Device-days, culture result, isolation precautions

    • Feeds Quality Indicator auto-computation

  • Quality Indicator (NABH/NABL structured data)

    • Queryable by period for accreditation submission

    • Auto-computation methods:

      • Auto-TAT β€” average Lab Test TAT (hours) from DB

      • Auto-Mortality β€” discharge mortality rate (%)

      • Auto-Infection β€” HAI rate per 1,000 patient-days

    • Daily scheduler refreshes all auto-computed indicators


Department-wise User Accounts

Department Email Role Password
Administration admin.rohit@apollo.hms HMS Admin Hospital@2026
Administration reception.meera@apollo.hms HMS Receptionist Hospital@2026
Billing & Finance billing.arvind@apollo.hms HMS Billing Hospital@2026
Emergency & Casualty dr.patel@apollo.hms HMS Doctor Hospital@2026
Emergency & Casualty nurse.rita@apollo.hms HMS Nurse Hospital@2026
Outpatient Department dr.kumar@apollo.hms HMS Doctor Hospital@2026
Outpatient Department dr.gupta@apollo.hms HMS Doctor Hospital@2026
Inpatient Wards dr.verma@apollo.hms HMS Doctor Hospital@2026
Inpatient Wards nurse.sunita@apollo.hms HMS Nurse Hospital@2026
Inpatient Wards nurse.priya@apollo.hms HMS Nurse Hospital@2026
Operation Theatre dr.kapoor@apollo.hms HMS Doctor Hospital@2026
Operation Theatre dr.nair@apollo.hms HMS Doctor Hospital@2026
Operation Theatre nurse.kavitha@apollo.hms HMS Nurse Hospital@2026
Intensive Care Unit dr.mehta@apollo.hms HMS Doctor Hospital@2026
Intensive Care Unit nurse.deepa@apollo.hms HMS Nurse Hospital@2026
Clinical Laboratory lab.rajan@apollo.hms HMS Lab Tech Hospital@2026
Clinical Laboratory lab.anitha@apollo.hms HMS Lab Tech Hospital@2026
Radiology & Imaging dr.iyer@apollo.hms HMS Radiologist Hospital@2026
Pharmacy pharma.ramesh@apollo.hms HMS Pharmacist Hospital@2026
Pharmacy pharma.lakshmi@apollo.hms HMS Pharmacist Hospital@2026
Blood Bank bb.suresh@apollo.hms HMS Blood Bank Hospital@2026
Quality & NABH quality.pooja@apollo.hms HMS Quality Officer Hospital@2026

Role Permissions Summary

Role Create Read Write Submit Modules
HMS Admin All All All All All
HMS Doctor Yes Yes Yes Yes OPD, IPD, Orders, Lab, Radiology, OT, ICU
HMS Nurse Yes Yes Yes No IPD, Emergency, Nursing, ICU
HMS Receptionist Yes Yes Yes No Registration, OPD
HMS Billing Yes Read Yes Yes Billing, Insurance
HMS Lab Tech Yes Yes Yes Yes Lab
HMS Radiologist Yes Yes Yes Yes Radiology
HMS Pharmacist Yes Yes Yes Yes Pharmacy
HMS Blood Bank Yes Yes Yes Yes Blood Bank
HMS Quality Officer Yes Yes Yes No Quality

Architecture

hospital_management/
β”œβ”€β”€ hms_setup/          Hospital, Hospital Branch masters
β”œβ”€β”€ hms_registration/   Patient + ABHA + MRN override
β”œβ”€β”€ hms_opd/            Token board, Appointment hooks
β”œβ”€β”€ hms_orders/         Clinical Order lifecycle
β”œβ”€β”€ hms_billing/        GST invoice hook, Doctor Settlement + TDS JE
β”œβ”€β”€ hms_audit/          Append-only audit log, permission queries
β”œβ”€β”€ hms_ipd/            ADT, Discharge Summary, nightly accrual
β”œβ”€β”€ hms_emergency/      Emergency Visit, Triage (NEWS2)
β”œβ”€β”€ hms_nursing/        Vital Signs (NEWS2), MAR (5-rights), Handover
β”œβ”€β”€ hms_lab/            Sample, Critical Alert, delta-check, analyzer adapter
β”œβ”€β”€ hms_radiology/      Radiology Order/Report, PACS stub
β”œβ”€β”€ hms_pharmacy/       Dispensing (CDSS), Narcotic/H1 registers, returns
β”œβ”€β”€ hms_insurance/      Provider, Policy, Pre-Auth, Claim, split_billing.py
β”œβ”€β”€ hms_ot/             OT Booking (WHO checklist), Surgery Record, Anaesthesia
β”œβ”€β”€ hms_icu/            ICU Observation Chart, batched vitals API
β”œβ”€β”€ hms_blood_bank/     Donorβ†’Donationβ†’Inventoryβ†’CrossMatchβ†’Issueβ†’Transfusion
└── hms_quality/        Incident Report (CAPA), Infection Surveillance, QI

1 Like