How saranshvaidya0/icu_early_warning_system_presentation works
This repository combines an ICU early-warning web application with an offline MIMIC-III research and model-evaluation pipeline. In the web workflow, clinicians use the dashboard or predictor; the frontend sends requests and receives live telemetry from the FastAPI backend, which manages patient state, computes risk and alerts, and exposes analytics. The research workflow prepares time-series data, trains recurrent and XGBoost models, and visualizes evaluation results. Web-app components are supported by sampled source and README; research connections rely on the SOURCE INDEX and README, so unsampled details are not inferred.
Main entry points: client.ts API client · App.tsx Web app routes · main.py FastAPI routes · main_preprocessing.py Time-series preprocessing
Components 27
Clinical web app
- Web app routes
frontend/src/App.tsx - Live ICU state
frontend/src/hooks/useLiveICU.ts - Command dashboard
frontend/src/pages/DashboardPage.tsx - Patient deep-dive
frontend/src/pages/PatientDetailPage.tsx - Clinical predictor
frontend/src/pages/PredictPage.tsx - Model benchmarks
frontend/src/pages/AnalyticsPage.tsx - API client
frontend/src/api/client.ts - ICU data types
frontend/src/types/icu.ts
Monitoring and prediction
- FastAPI routes
backend/main.py - API schemas
backend/schemas.py - Patient simulator
backend/services/simulator.py - Risk prediction
backend/services/predictor.py - Benchmark analytics
backend/services/analytics.py
Research data preparation
- Time-series preprocessing
src/preprocessing/main_preprocessing.py - Record collection
src/preprocessing/collect_records.py - Binning and imputation
src/preprocessing/bin_and_impute.py - RNN preprocessing
src/preprocessing/rnn_preprocessing.py - XGBoost preprocessing
src/preprocessing/xgboost_preprocessing.py
Modeling and evaluation
- LSTM and GRU models
src/models/rnn.py - RNN training
src/train_rnn.py - XGBoost training
src/train_xgboost.py - RNN experiments
src/experiments/rnn_experiments.py - XGBoost experiments
src/experiments/xgboost_experiments.py - Evaluation plots
src/visualization/plots.py - Visualization utilities
src/visualization/util.py
Other components
- Clinical user
- MIMIC-III data
Connections 31
- Clinical user → Web app routes: uses
- Web app routes → Live ICU state: loads state
frontend/src/App.tsx - Web app routes → Command dashboard: routes to
frontend/src/App.tsx - Web app routes → Patient deep-dive: routes to
frontend/src/App.tsx - Web app routes → Clinical predictor: routes to
frontend/src/App.tsx - Web app routes → Model benchmarks: routes to
frontend/src/App.tsx - Live ICU state → API client: fetches data
frontend/src/hooks/useLiveICU.ts - Command dashboard → API client: requests data
frontend/src/pages/DashboardPage.tsx - Patient deep-dive → API client: requests data
frontend/src/pages/PatientDetailPage.tsx - Clinical predictor → API client: submits vitals
frontend/src/pages/PredictPage.tsx - Model benchmarks → API client: requests benchmarks
frontend/src/pages/AnalyticsPage.tsx - API client → FastAPI routes: calls HTTP API
frontend/src/api/client.ts - Live ICU state → FastAPI routes: receives telemetry
- FastAPI routes → Patient simulator: serves patient state
backend/main.py - FastAPI routes → Risk prediction: runs prediction
backend/main.py - FastAPI routes → Benchmark analytics: loads benchmarks
backend/main.py - FastAPI routes → API schemas: validates payloads
backend/main.py - Patient simulator → Risk prediction: computes risk
backend/services/simulator.py - Patient simulator → API schemas: builds responses
backend/services/simulator.py - API client → ICU data types: uses types
frontend/src/api/client.ts - MIMIC-III data → Time-series preprocessing: supplies ICU data
- Time-series preprocessing → Record collection: uses collection
src/preprocessing/main_preprocessing.py - Time-series preprocessing → Binning and imputation: uses transforms
src/preprocessing/main_preprocessing.py - RNN preprocessing → Time-series preprocessing: uses processed data
src/preprocessing/rnn_preprocessing.py - XGBoost training → XGBoost preprocessing: uses features
src/train_xgboost.py - RNN training → RNN preprocessing: loads sequences
src/train_rnn.py - RNN experiments → RNN training: runs training
src/experiments/rnn_experiments.py - RNN experiments → LSTM and GRU models: uses models
src/experiments/rnn_experiments.py - XGBoost experiments → XGBoost training: runs training
src/experiments/xgboost_experiments.py - XGBoost experiments → Evaluation plots: uses plots
src/experiments/xgboost_experiments.py - Evaluation plots → Visualization utilities: uses utilities
src/visualization/plots.py