CareGap-AI: Patient Risk & Care Gap Analytics
Inspiration
Modern healthcare generates massive amounts of patient data, yet clinicians often struggle to identify high-risk patients early or detect missed care opportunities.
We wanted to build a system that could:
- Predict patient health risk using clinical and follow-up data
- Highlight care gaps like missed visits or abnormal lab values
- Provide explainable insights for clinicians to act on
This inspired CareGap-AI, a dashboard that combines machine learning, analytics, and interactive visualizations to make patient care smarter and proactive.
What We Learned
During this project, we learned:
- Healthcare data simulation – Generating realistic patient records for testing without compromising privacy.
- Machine learning for risk prediction – Using features like age, lab values, chronic conditions, and follow-up behavior.
- Explainable AI – Implementing Feature Importance to highlight which factors influence risk scores.
- Full-stack development – Integrating Flask backend, HTML/CSS/JS frontend, and Chart.js visualizations.
- Deployment – Hosting the dashboard live on Render for accessibility.
How We Built It
Data Generation – Created synthetic patient data using Python (
generate_realistic_data.py) with fields like Age, HbA1c, Cholesterol, Follow-up status, and Outcome.Machine Learning Model – Trained a RandomForestClassifier to predict risk scores and risk levels. Saved the model with
joblib.Backend (Flask) –
- Routes for serving the dashboard
- API endpoints for existing patient data and new patient predictions
- Integrated Feature Importance JSON
- Routes for serving the dashboard
Frontend (HTML/CSS/JS) –
- Dashboard with tiles/cards for risk summary
- Interactive charts using Chart.js
- Patient selection, table, and “Try Your Own Data” popup
- Color-coded risk levels: Low, Medium, High
- Care Gap warnings:
- Dashboard with tiles/cards for risk summary
Deployment – Hosted live on Render with dynamic port binding (
0.0.0.0), fully accessible from any device.
Challenges Faced
- Synthetic data realism – Balancing realistic lab values with meaningful risk patterns
- Feature Importance for new patients – Had to show global model importance while maintaining clinical interpretability
- Frontend interactivity – Ensuring both existing patient selection and new patient simulations update all charts and tables dynamically
- Deployment issues – Flask binds to
127.0.0.1by default, which required changing to0.0.0.0for Render
Impact
CareGap-AI helps clinicians:
- Identify high-risk patients before disease progression
- Detect care gaps like missed follow-ups or abnormal labs
- Visualize patient journeys for better decision-making
- Explain predictions using feature importance
“Early detection saves lives.”
CareGap-AI demonstrates how data-driven AI, combined with responsible design, can make healthcare smarter, safer, and proactive.
Log in or sign up for Devpost to join the conversation.