AI-powered disease outbreak prediction and health monitoring system for Indian cities.
The Smart Public Health Warning System is a comprehensive DBMS + Machine Learning project that monitors public health data across Indian cities and predicts potential disease outbreaks using historical patterns, seasonal trends, and environmental factors.
β Phase 1 & 2 (DBMS)
- Comprehensive relational database with 8 tables
- Real-time health data dashboard
- Environmental monitoring integration
- Interactive SQL query interface
- Hospital capacity tracking
- Health alert management
β Phase 3 (Machine Learning)
- AI-powered outbreak prediction
- Seasonal pattern recognition
- Environmental correlation analysis
- City-wide risk assessment
- Disease-specific forecasting
- Realistic probability calculations
SmartHealthWarningSystem/
βββ app_phase3.py # Main Flask application with ML
βββ ml_predictor.py # ML prediction module
βββ templates/ # HTML templates
β βββ dashboard.html # Main dashboard
β βββ predictions.html # ML predictions interface
β βββ query.html # SQL query interface
βββ Data Files (CSV):
β βββ cities.csv # 20 Indian cities
β βββ hospitals.csv # 150 hospitals
β βββ diseases.csv # 15 diseases
β βββ symptoms.csv # 51 symptoms
β βββ disease_symptoms.csv # Disease-symptom mappings
β βββ patient_reports.csv # 2,500 patient cases
β βββ environmental_data.csv # 1,500 environmental readings
β βββ alerts.csv # 400 health alerts
βββ health_warning_system.db # SQLite database (auto-generated)
- Python 3.8 or higher
- pip (Python package manager)
- VS Code (recommended)
# 1. Navigate to project folder
cd SmartHealthWarningSystem
# 2. Create virtual environment
python -m venv health_env
# 3. Activate virtual environment
# Windows:
health_env\Scripts\activate
# Mac/Linux:
source health_env/bin/activate
# 4. Install required packages
pip install flask pandas numpy
# 5. Run the application
python app_phase3.py
# 6. Open browser
# Dashboard: http://localhost:5000
# ML Predictions: http://localhost:5000/predictions
# SQL Queries: http://localhost:5000/query- cities - Master list of Indian cities
- hospitals - Healthcare facilities
- diseases - Disease catalog
- symptoms - Medical symptoms
- disease_symptoms - Disease-symptom mappings (junction table)
- patient_reports - Patient case records (main fact table)
- environmental_data - Air quality, water quality, temperature, etc.
- alerts - Health warnings and notifications
- Cities β (One-to-Many) β Hospitals, Patient Reports, Environmental Data, Alerts
- Diseases β (Many-to-Many) β Symptoms (via disease_symptoms)
- Diseases β (One-to-Many) β Patient Reports
- Hospitals β (One-to-Many) β Patient Reports
Our ML model predicts outbreak probability using:
-
Historical Pattern Analysis
- Last 6 months of case data
- Average case counts
- Recent trends
-
Seasonal Factors
- Monsoon diseases (Jun-Sep): Dengue, Malaria, Typhoid
- Winter diseases (Nov-Feb): H1N1, Pneumonia, TB
- Summer diseases (Mar-May): Chickenpox, Measles
-
Environmental Correlation
- Air Quality Index (AQI) β Respiratory diseases
- Water Quality Index (WQI) β Waterborne diseases
- Temperature β Vector-borne diseases
-
Risk Classification
- Low Risk: Probability 0-40%
- Medium Risk: Probability 40-60%
- High Risk: Probability 60-80%
- Critical Risk: Probability 80-100%
The model is designed to provide realistic predictions:
- Not every disease triggers an outbreak warning
- Accounts for off-season patterns (reduced risk)
- Considers environmental factors
- Includes random variation (Β±20%)
- Based on actual historical data patterns
- Disease Outbreak Summary: Current outbreak patterns
- Environmental Risk: Cities with poor air/water quality
- Hospital Capacity: Bed utilization rates
- Active Alerts: Current health warnings
- City Risk Overview: Overall risk level for all cities
- Detailed Predictions: Top disease risks per city
- Probability Scores: Likelihood of outbreak
- Predicted Case Counts: Expected number of cases
- Reasoning: Why the prediction was made
- Execute custom SELECT queries
- Sample queries included
- Export results as CSV
- Learn database structure
City: Mumbai
Top Disease: Dengue
Risk Level: High
Probability: 72%
Predicted Cases: 45
Reasoning: Peak season for this disease; Environmental conditions favor disease spread
Solution:
del health_warning_system.db
python app_phase3.pySolution:
health_env\Scripts\activate
pip install flask pandas numpySolution: Change port in app_phase3.py:
app.run(debug=True, host='0.0.0.0', port=5001)- Database normalization (1NF, 2NF, 3NF)
- Foreign key constraints
- Complex SQL queries (JOINs, aggregates, subqueries)
- Indexing for performance
- Views for data abstraction
- Transaction management
- Time series analysis
- Feature engineering
- Seasonal pattern recognition
- Environmental correlation
- Risk classification
- Predictive modeling
Main Flask application that:
- Initializes database
- Imports CSV data
- Serves web interface
- Provides API endpoints
- Integrates ML predictions
Machine learning module that:
- Analyzes historical patterns
- Calculates seasonal factors
- Correlates environmental data
- Predicts outbreak risk
- Provides reasoning for predictions
ML predictions interface that:
- Displays city risk overview
- Shows detailed disease predictions
- Visualizes probability scores
- Explains prediction reasoning
- Real-time data integration via APIs
- Geographic visualization with maps
- Mobile app for field workers
- Email/SMS alert notifications
- Advanced ML models (LSTM, Random Forest)
- User authentication and role management
- Data export and reporting features
Project: Smart Public Health Warning System Phase: Phase 3 (Complete with ML) Team: Health Sentinel Course: DBMS Project
This project is created for educational purposes as part of DBMS coursework.
- Historical disease data patterns based on actual Indian epidemiological studies
- Environmental data thresholds from WHO and CPCB guidelines
- Machine learning approach inspired by public health forecasting systems
For issues or questions:
- Check troubleshooting section above
- Verify all CSV files are present
- Ensure virtual environment is activated
- Check console output for error messages
Project Status: β Complete and Production Ready
Last Updated: November 19, 2025