Architecture

How AdmitGuard Works

A transparent look into the machine learning pipeline, data flow, and deployment architecture powering the analytics engine.

The Inference Pipeline

1

Data Validation

Incoming patient records are strictly validated via Pydantic schemas. Missing values are imputed, and categorical variables are encoded using leakage-safe pipelines.

2

Readmission Modeling

A Logistic Regression model evaluates the patient's vitals, lab results, and encounter history to output a probability of 30-day readmission.

3

Claim Estimation

An independent Random Forest Regressor estimates potential insurance claim amounts based on demographic and historical features.

4

Explainability

SHAP values are computed to identify exactly which patient features drove the specific risk score.

Deployment Architecture

Frontend

Next.js on Vercel

Handles UI rendering, state, and responsive data visualizations via Tailwind CSS.

Backend

FastAPI on Render

Manages API versioning, input validation, and executes the Joblib ML artifacts.

Models

Scikit-Learn Joblib

Pre-trained on historical CSV dumps, serialized, and loaded into backend memory.