Back to Home

Hospital Management System

A comprehensive hospital management system designed to digitize and streamline the daily operations of hospitals and clinics. Built as a Turborepo monorepo, the platform serves four distinct user roles through dedicated Next.js frontends backed by a unified NestJS API. The system covers the full patient care workflow — from reception desk appointment booking and doctor consultations with digital prescription writing, to pharmacy dispensing, billing, and inventory management. Each role (Admin, Doctor, Receptionist, Pharmacist) gets a tailored interface with role-specific capabilities. On the backend, a NestJS API with JWT-based multi-tenant authentication ensures that each hospital's data is isolated by a hospitalId embedded in the JWT payload. The MongoDB + Prisma ORM layer handles complex relationships between patients, appointments, prescriptions, medicine stocks, batches, and financial transactions. The doctor module features a rich prescription system with templated sections (diagnosis, symptoms, lab recommendations, exercise plans, things to do/avoid), medicine mode-of-action notes, and follow-up tracking. The dispensary module manages stock levels, batch tracking with expiry alerts, patient billing, and medicine returns. The inventory module provides full batch history, purchase tracking, and return management. The receptionist module handles appointment scheduling, patient registration, and follow-up appointment lookups.

Tech Stack

TypeScriptNestJSNext.js 16React 19Prisma ORMMongoDBTurborepoZustandAnt DesignJWTAxiosReact To Print

Key Features

  • Multi-tenant architecture with hospital-scoped data isolation
  • Role-based dashboards for Admin, Doctor, Receptionist, and Pharmacist
  • Digital prescription writing with templated sections, medicine mode-of-action, and follow-up scheduling
  • Appointment booking & management (walk-in, online, WhatsApp) with status tracking
  • Pharmacy inventory management with stock levels, batch tracking, expiry alerts, and low-stock thresholds
  • Patient billing with invoice generation, payment modes, and medicine returns
  • Full transaction history (income, expense, refund) across appointments and medicine sales
  • Prescription templating with reusable text templates (diagnosis, symptoms, lab tests, exercises)
  • Comprehensive patient medical history with per-prescription details
  • Batch purchase management with supplier tracking, MRP, discounts, and expiry monitoring