Hero Screenshot
Healthcare Platform • Role-Based Management System • Backend Engineering
A comprehensive role-based healthcare management platform designed to streamline hospital operations, patient care, and administrative workflows.
The Hospital Management System was built to digitize and simplify hospital workflows by connecting patients, doctors, pharmacists, receptionists, laboratory staff, accountants, and administrators within one secure platform. It centralizes healthcare operations while maintaining strict role separation and secure access to sensitive patient information.
Many healthcare facilities still rely on fragmented systems or manual record keeping, making communication and patient management inefficient. This project replaces those silos with a cohesive backend system that orchestrates complex medical workflows — from appointment scheduling to prescription fulfillment — under a unified architecture.
Paper files and disjointed digital records lead to errors, delays, and incomplete histories.
Doctors, labs, pharmacies, and billing operate in silos, causing miscommunication and redundant work.
Manual booking creates overlaps and long patient wait times.
Paper prescriptions and lab request forms slow down critical care pathways.
Separate billing systems lead to errors and delayed payments.
Without proper access controls, sensitive data is exposed, and staff boundaries blur.
A single source of truth for patient demographics, history, visits, and treatment plans.
Conflict detection, doctor availability, and automated reminders reduce no-shows.
Digital prescriptions flow directly from doctor to pharmacist, with validation and audit trails.
Lab orders are linked to patient records, results uploaded securely, and doctors notified.
Charges generated from services and medications, with payment tracking and receipt generation.
Each user role sees only relevant modules, data, and actions — enforced by backend permissions.
Full system control, user management, configuration, and audit logs.
Patient consultations, prescriptions, lab requests, and medical history.
Appointment booking, prescription viewing, lab results, and billing.
Patient registration, appointment scheduling, and front-desk workflows.
Prescription fulfillment, inventory management, and dispensing records.
Receive lab orders, upload results, and manage sample tracking.
Generate invoices, track payments, and manage financial reports.
Assist doctors, record vitals, and manage ward activities.
Capture demographics, insurance info, and medical history with validation.
Comprehensive patient history including visits, diagnoses, and attachments.
Digital prescriptions with drug interaction checks and pharmacy workflow.
Order tests, track samples, and upload results linked to patient records.
Automated charge calculation, payment tracking, and printable receipts.
Secure JWT-based login with role assignment and profile management.
Permissions are enforced at the model and view level using Django's permission system extended with custom roles. Each endpoint verifies the user's role before allowing access to patient data, prescriptions, or billing records. This ensures data isolation and compliance with healthcare privacy principles.
JSON Web Tokens (JWT) handle stateless authentication across the REST API. Refresh tokens allow seamless session extension. Authorization checks are layered: first at the middleware level (is the user authenticated?), then at the view level (does the role permit this action?).
The schema is normalized to avoid redundancy: patients, doctors, appointments, prescriptions, lab results, and billing are separate but linked through foreign keys. This allows independent modification of each domain while maintaining referential integrity.
Django REST Framework provides a clean API layer. Business logic is encapsulated in a service layer rather than views, keeping endpoints thin and promoting reusability. For example, the appointment booking service checks doctor availability, patient conflicts, and schedules — all within a single atomic transaction.
Complex multi-step processes (e.g., doctor creates prescription → pharmacist dispenses → billing generates invoice) are modeled as state machines. Status fields track progress, and Celery tasks handle asynchronous actions like email notifications or report generation.
Input validation is performed at multiple levels: serializer validation, model constraints, and database-level checks. Sensitive data (passwords, tokens) are hashed. Audit logging records critical actions for traceability. Cross-role data exposure is prevented by filtering querysets based on user role.
Entity relationships across patients, staff, and workflows
JWT issuance, role verification, and session management
Registration → appointment → consultation → billing
Doctor → pharmacist → dispensing → billing integration
Order → sample collection → result upload → doctor notification
REST endpoints organized by domain and role
Django & DRF for rapid development with built-in admin, ORM, and authentication. Celery for async tasks like report generation. Redis as message broker.
Bootstrap for responsive UI components, HTML/CSS/JavaScript for interactivity. The frontend consumes REST APIs with role-based views.
PostgreSQL for relational integrity, complex queries, and transactional workflows. Indexed for performance on high-traffic tables.
JWT tokens with refresh rotation, password hashing, CSRF protection, and role-based permission classes. Audit logs for sensitive actions.
Docker containerization for consistent development and deployment. Nginx + Gunicorn for serving the application.
Git for version control, pytest for testing, Swagger for API documentation, and Django Debug Toolbar for profiling.
Designing a permission system that is both granular and maintainable required careful abstraction. I used Django's built-in groups and permissions augmented with custom checks to avoid repetitive conditionals in views.
Every API endpoint was audited for role bypass vulnerabilities. The service layer enforces ownership checks so a patient can only view their own records, even if they guess a URL.
Prescription and lab workflows span multiple roles. I modeled these as stateful processes with clear status transitions, ensuring that actions occur only in valid states.
As features grew, the codebase risked becoming unwieldy. I applied service-layer pattern and kept views thin, which made the system easier to test and extend.
Connect with existing Electronic Health Record systems for wider adoption.
Automated notifications for appointments, prescriptions, and lab results.
Integrated telemedicine feature for remote doctor-patient interactions.
Direct billing to insurers with claim submission and verification.
Advanced data visualization for hospital management and decision support.
React Native app for patients and staff to access the system on the go.
This Hospital Management System demonstrates my ability to build enterprise-grade software involving multiple stakeholders, complex workflows, secure authentication, and a maintainable backend architecture. It was designed not as a theoretical exercise, but as a practical solution to genuine operational challenges in healthcare environments.
Developing this system deepened my understanding of designing for organizations where reliability, security, and scalability are non-negotiable. The experience reinforced that great software engineering is about making complex systems feel simple to the people who use them every day.
I'm passionate about building backend systems that solve meaningful real‑world problems while maintaining clean architecture and an excellent user experience.