Architecture & Workflow

How AdmitGuard Works

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

The Inference Pipeline

Step-by-step execution for patient risk scoring.

1

Data Validation & Preprocessing

Incoming patient records are strictly validated via Pydantic schemas. Missing values are imputed, and categorical variables are encoded using the identical leakage-safe pipelines used during model training.

2

Readmission Risk Modeling

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

3

Claim Amount Estimation

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

4

Explainability Layer

SHAP (SHapley Additive exPlanations) values are computed to identify exactly which patient features (e.g., elevated A1C, number of diagnoses) drove the specific risk score.

5

Report Generation

The insights are bundled into an immutable, professional PDF report stored securely and accessible only to authorized analysts.

Deployment Architecture

Frontend (Next.js)

Deployed on Vercel. Handles UI rendering, Google OAuth state, and responsive data visualizations via Tailwind CSS.

Backend (FastAPI)

Deployed on Render/Railway. Manages RBAC, API versioning, input validation, and executes the Joblib ML artifacts.

Database (PostgreSQL)

Managed relational store containing user profiles, batch job states, prediction history, and tamper-evident audit logs.