Swasthyapath – Health Risk Analysis Web Application
Swasthyapath is a smart web-based health analysis tool designed to help individuals and clinicians assess risk levels for four major chronic diseases: Heart Disease, Diabetes, Hypertension, and Anemia. The system uses health checkup data uploaded in .csv or .docx formats and performs real-time risk prediction, health trend analysis, and generates personalized PDF reports.
Key Features Automatic Data Parsing – Supports .csv and .docx reports using custom extraction logic.
Risk Score Calculation – Computes custom risk scores based on key clinical features.
Machine Learning Predictions – Predicts risk levels using trained Random Forest classifiers.
Visual Trends – Graphs health trends across five consecutive checkups.
PDF Report Generation – Downloads a full health risk report after prediction.
User Authentication – Login, registration, and session-based access.
Fully Web-Based – Built with Flask (backend) and React (frontend).
Machine Learning Models Core model: Random Forest Classifier
Alternative models: XGBoost, KNN, SVM, Logistic Regression, Decision Tree
Each disease has a dedicated classifier trained on a 1000-point synthetic dataset generated using real-world references.
Risk levels are classified using threshold-based stratification.
| Disease | Accuracy | F1-Score | Highlights |
|---|---|---|---|
| Heart Disease | 97.0% | 0.92 | Balanced TPR across all risk levels |
| Diabetes | 95.3% | 0.94 | Excellent moderate/high detection |
| Hypertension | 93.3% | 0.91 | Strong high-risk classification |
| Anemia | 98.3% | 0.96 | Best for low & high-risk cases |