Project case study

Intelligent Healthcare Management System

An AI-powered clinic platform that automates patient intake and uses a trained machine learning model to triage and prioritise the doctor's queue in real time based on clinical vitals and symptoms.

Hospital system screenshot
React + ViteFrontend
Express + FastAPIAPI Gateway · AI Service
Random ForestML Model
3-tier microservicesArchitecture
Overview

What is IHMS?

IHMS is an AI-powered healthcare portal built on a 3-tier microservice architecture. The receptionist logs a patient's vitals and chief complaint through the React UI. The Express.js API gateway intercepts the intake payload, pauses the database transaction, and makes a secure HTTP call to a Python FastAPI inference engine. The AI model calculates a triage priority — Critical, Urgent, or Stable — and Express appends that score to the patient record before saving it.

The doctor's dashboard then automatically reorders itself, pushing Critical patients to the top of the queue. The doctor examines the patient, logs a diagnosis and treatment plan, and discharges them from the active queue.

The AI model was trained on the real-world KTAS (Korean Triage and Acuity Scale) clinical dataset using a Scikit-Learn RandomForestClassifier with TF-IDF vectorisation for unstructured symptom text.

System roles

Two roles, two flows

Receptionist
  • Register patients and log vitals (age, temp, heart rate, BP, pain level)
  • Enter unstructured chief complaint text — fed directly to the AI model
  • View and search all registered patients
Doctor
  • Dynamic queue auto-sorted by AI triage priority (Critical → Urgent → Stable)
  • Examine patients, log diagnosis and treatment plan
  • Discharge patients from the active queue
Features

What it does

AI triage engine
A trained RandomForestClassifier (100 decision trees) scores each patient as Critical, Urgent, or Stable based on vitals and symptom text.
NLP symptom processing
TF-IDF vectorisation converts unstructured chief complaint text (e.g. "severe chest pain radiating to left arm") into quantifiable features for the model.
Dynamic priority queue
The doctor's dashboard auto-reorders on every load, pushing Critical patients to the top so the most urgent cases are never buried.
Microservice architecture
Express.js acts as an API gateway, pausing the DB transaction to call the FastAPI inference engine before persisting the AI score alongside the patient record.
Secure authentication
JWT authorisation and bcrypt password hashing protect both roles, with separate dashboards and restricted route access per role.
Data imputation
A SimpleImputer (median strategy) handles missing vitals gracefully — unrecorded blood pressure won't crash the inference engine.
Tech stack

Built with

Frontend
ReactViteBootstrap
API Gateway
Express.jsNode.js
AI Microservice
PythonFastAPIUvicorn
Machine learning
Scikit-LearnPandasJoblib
Database
PostgreSQL
Security
JWTbcryptCORS
Try it out

Test the live demo

The AI inference engine is hosted on Render's free tier. If it has been inactive, it may take 30–60 seconds to cold start. Before testing the triage feature, open the link below in a separate tab to wake the model up first, then come back and log in.

Wake up the AI service → https://ihms-ai-service.onrender.com/docs

Screenshots

App walkthrough

Receptionist dashboard
Receptionist dashboard
Add patient modal
Register patient & log vitals
Patient list
Patient list
Patient list
Log vitals form
Doctor dashboard
Doctor's homepage
Doctor dashboard
Triage of patients based on AI scores
Challenges

What I worked through

Orchestrating the microservice call mid-transaction Solved
The Express API needed to pause the PostgreSQL write, call the FastAPI inference engine over HTTP, wait for the triage score, then append it to the record before committing. Getting the async flow right — including error handling if the AI service is unavailable — required careful promise chaining and fallback logic.
Handling missing vitals without crashing the model Solved
Real patient data is messy — not every vital is always recorded. Rather than rejecting incomplete intake forms, the ML pipeline uses a SimpleImputer with a median strategy to fill gaps, so the inference engine always receives a complete feature vector.
Vectorising unstructured symptom text for the model Solved
The chief complaint field is free text — the model can't consume raw strings. Implementing TF-IDF vectorisation as part of the inference pipeline converts the symptom description into a numeric feature matrix that the RandomForestClassifier can process alongside the structured vitals.
MovieWatch All projects