app/(site)/work/hospital-xray-management-system/page.tsxln 001
← WORK / SPECIMEN ARCHIVE
Hospital X-Ray Management System
A role-based web platform that automates X-ray report dispatch — from upload to doctor verdict to hospital delivery.
ReactTypeScriptNode.jsPostgreSQLPrismaJWTDockerGitHub Actions2025SHIPPED
THE PROBLEM

Managing X-ray reports in hospitals is a manual, error-prone process. Reports get lost between departments, doctors receive unclear assignments, and hospital staff have no visibility into report status. There was no centralized system to track a report's journey from patient upload to final doctor diagnosis — causing delays in treatment and poor accountability across roles.

KEY FEATURES
  • 01Role-based access control for Hospital Staff, Admin, and Doctor
  • 02Staff can upload patient X-ray images and documents (JPG, PNG, PDF)
  • 03Admin dashboard to assign reports to specific doctors
  • 04Doctor panel with image viewer (zoom, pan, rotate) for report review
  • 05Rich text editor for writing medical verdict and prescription
  • 06One-click report dispatch back to hospital dashboard
  • 07Real-time report status tracking: New → Assigned → In Review → Dispatched
  • 08Audit logging for all critical actions with timestamps
CHALLENGES

Implementing strict Role-Based Access Control across three distinct user types required careful JWT middleware design to prevent privilege escalation. Handling medical image files (JPG, PNG) with a smooth in-browser viewer — supporting zoom, pan, and rotate — without any native dependencies was a key frontend challenge. Ensuring data integrity during report status transitions (New → Assigned → Dispatched) required database-level transactions via Prisma to prevent race conditions when multiple admins work simultaneously.

ARCHITECTURE

React + TypeScript frontend with three separate panel views (Hospital, Admin, Doctor) communicating via RESTful APIs over HTTPS. Node.js + TypeScript backend with Prisma ORM on PostgreSQL handles all business logic and RBAC enforcement. JWT tokens secure every API route. The entire stack is containerized with Docker and deployed via GitHub Actions CI/CD pipeline for consistent, repeatable releases.