Psychiatric Hospital Management System
Healthcare Workflow Automation.
“Automated patient lifecycle, pharmacy inventory, and accounts tracking under strict HIPAA-aligned access controls.”
Replace with high-res UI dashboard screenshot, mockup, or banner (Recommended 1920x1080)
Mission-Critical Healthcare Workflow Automation
Psychiatric care facilities require specialized record management that standard clinic software cannot accommodate. We engineered a full-stack hospital management platform automating patient admission lifecycles, inpatient/outpatient management, real-time pharmacy inventory tracking, and billing.
Project at a Glance
A full-stack hospital management platform automating patient lifecycle management, pharmacy operations, and accounts tracking under strict medical access controls.
Healthcare Clinical Operations & Pharmacy Inventory
Psychiatric Inpatient & Outpatient Hospital
Q2 - Q4
Seamless synchronization between nursing stations, pharmacy dispensers, and hospital accounting.
The Problem
The hospital operated with paper records and disconnected desktop spreadsheets. Nursing stations had no real-time visibility into pharmacy inventory, leading to medication delays, and patient billing records frequently drifted from clinical charts.
Delayed medication administration due to manual paper prescription validation.
Zero real-time inventory tracking for controlled psychiatric pharmaceuticals.
Medical privacy risks: Clinical psychotherapy session notes accessible to general administrative staff.
Inpatient bed management managed on whiteboards resulting in room allocation bottlenecks.
Goals
Technical Goals
- Synchronized IPD/OPD patient records accessible across nursing stations.
- Real-time pharmacy inventory depletion upon doctor prescription signoff.
- Strict medical confidentiality boundaries with encrypted clinical notes.
- Unified billing module aggregating bed charges, consult fees, and medication tallies.
Business Goals
- Eliminate prescription dispensing delays in psychiatric inpatient wards.
- Maintain 100% auditability for controlled substance inventory.
- Improve patient transition speed from emergency intake to ward admission.
My Role
Lead Healthcare Architect
Core Responsibilities
- Architected clinical workflow state machines for patient intake, ward transfer, and discharge.
- Engineered pharmacy stock replenishment and batch-expiry tracking algorithms.
- Designed role-based medical access boundaries complying with patient confidentiality standards.
- Integrated accounts ledger connecting nursing orders to invoice line items.
Primary Focus Areas
Solution
A unified clinical operating system engineered with Django and PostgreSQL. The application separates workflows into IPD (Inpatient), OPD (Outpatient), Pharmacy, and Accounts while maintaining an immutable synchronized patient ledger.
Intake-to-Discharge State Engine
Automated clinical status progression tracking bed occupancy, physician assignments, and rounds notes.
Controlled Pharmacy Dispenser
Real-time stock deduction with batch expiration warnings and strict pharmacist signoff requirements.
Confidentiality Firewalls
Psychiatric therapy logs and sensitive clinical evaluations are encrypted and accessible only to certified practitioners.
Architecture & Data Flow
Decoupled clinical modules communicating through a centralized PostgreSQL transactional core with immutable audit logging.
Intake & Triage
Django Forms / Tailwind UIPatient reception records initial vitals and assigns inpatient bed or outpatient queue.
Doctor Consultation & Orders
Encrypted PostgreSQL ColumnsAttending psychiatrist enters diagnosis, treatment plan, and e-prescriptions.
Pharmacy Dispatch
Django ORM / Atomic TransactionsPharmacy terminal validates e-prescription, deducts inventory, and prints dosage labels.
Automated Billing & Ledger
PostgreSQL Ledger TablesBed occupancy hours, consult fees, and medications consolidate into real-time invoice ledger.
Core Features
Inpatient Bed & Ward Manager
Visual ward gridVisual bed occupancy map displaying current patient status, attending nurse, and expected discharge date.
Controlled Pharmacy Dispensary
Atomic inventory updatesAutomatic stock depletion, batch expiration alerts, and restricted prescription fulfillment tracking.
Encrypted Psychiatric Case Notes
Privacy-first clinical recordsMulti-layered medical records ensuring sensitive psychotherapy insights are never exposed to billing staff.
Consolidated Hospital Accounts
Automated billing auditReal-time invoice calculation across nursing care, room fees, lab tests, and dispensed medications.
Engineering Decisions
ACID Atomic Transactions for Pharmacy vs Asynchronous Queues
Why: Pharmaceutical inventory cannot risk negative stock or race conditions when multiple nursing stations request medication simultaneously.
Challenges
Concurrent Pharmacy Deductions: Simultaneous prescription orders causing race conditions on stock quantities.
Implemented database row-level locking (select_for_update) inside atomic transaction blocks.
Zero inventory discrepancy across tens of thousands of medication dispatches.
Implementation Timeline
Intake Mapping & DB Schema
- Patient lifecycle states
- PostgreSQL database models
- Role definition
IPD/OPD & E-Prescription Portal
- Bed management map
- Doctor consult interface
- Prescription orders
Inventory & Billing Integration
- Stock tracking engine
- Consolidated invoice ledger
- Batch expiry notifications
Staff Training & Cutover
- Hospital staff onboarding
- Data migration from legacy ledgers
- Go-live support
Results & Metrics
Decrease in pharmacy prescription fulfillment and patient wait times.
Zero discrepancies in controlled pharmaceutical inventory audits.
Total isolation of sensitive psychotherapy records from unauthorized staff.
Screenshots
Drop high-resolution interface screenshot here (Recommended 1920x1080)
Inpatient Ward Bed Occupancy Grid
Visual bed management interface displaying real-time patient status and attending physician.
Drop high-resolution interface screenshot here (Recommended 1920x1080)
Pharmacy Stock Depletion & Expiry Alert Terminal
Automated inventory management interface tracking batch numbers and expiration dates.
Demo Video
Hospital System Demo: 2-minute video demonstrating patient intake, doctor e-prescription entry, and atomic pharmacy deduction.
Add iframe or video src in lib/case-studies-data.ts
Demonstration Highlights:
Lessons Learned
In healthcare environments, system adoption hinges on simplifying data entry for busy nurses and doctors; every extra click reduces compliance.
Atomic database locking is indispensable when handling medication stocks.
Tech Stack
Backend & Framework
Database & Security
Frontend
Business Impact
The system transformed hospital operations from error-prone paper charts into a synchronized, transparent digital healthcare facility.