AI-powered hospital overload early warning system for Mediterranean emergency resilience
During emergencies (earthquakes, floods, conflicts, epidemics), Mediterranean hospitals face cascading overload due to:
- Lack of predictive system-level visibility
- ER inflow spikes & ICU saturation
- Supply depletion & ambulance misrouting
- Delayed inter-hospital coordination
CrisisLoad AI is a system-level predictive risk engine that:
- Predicts hospital overload probability 24–48 hours ahead
- Uses ML (Gradient Boosting) trained on synthetic crisis data
- Provides Gemini AI-powered crisis analysis & recommendations
- Monitors 15 hospitals across Lebanon, Palestine, Türkiye, Italy, and Spain
- Simulates 5 crisis scenarios: Earthquake, Flood, Conflict, Epidemic, Heatwave
- Recommends alternative hospitals when a facility is overloaded
| Challenge Requirement | How CrisisLoad AI Addresses It |
|---|---|
| AI solutions | Gradient Boosting ML model (ROC-AUC: 1.0) + Gemini AI crisis analysis |
| Reinforce health system resilience | Predicts hospital overload 24–48 hours before it happens |
| During emergencies | 5 crisis scenarios: earthquake, flood, conflict, epidemic, heatwave |
| Mediterranean focus (Lebanon, Palestine, Türkiye, Italy, Spain) | 15 hospitals across all 5 target countries |
| Unstable infrastructure | Lightweight stack (SQLite, no heavy cloud deps), works offline-capable |
| Delays in coordination | Cross-border visibility — all hospitals on one dashboard with alternative recommendations |
| Lack of timely information | Real-time prediction engine with Gemini AI-powered early warning system |
| Feature | Description |
|---|---|
| 🏥 Alternative Hospital Recommendations | When a hospital is overloaded, shows nearby alternatives sorted by same-country priority, with distance (km), available beds, and ICU capacity |
| 🌍 Country Filter | Users choose their country (Lebanon, Palestine, Türkiye, Italy, Spain) to see only relevant hospitals — summary stats update dynamically |
| 🌓 Light / Dark Mode | Toggle in the navbar top-right, persists user preference in localStorage |
| ⚡ Crisis Scenario Simulator | Simulate 5 emergency types and watch hospital risk levels spike in real-time |
| 🤖 Gemini AI Analysis | On-demand AI crisis intelligence with situation assessment, critical factors, recommendations, and 48h forecast |
| 📈 72h Metrics Timeline | Interactive Recharts time-series with 7 toggleable hospital metrics |
| User | Role |
|---|---|
| Ministry of Health Officials | National-level visibility across hospitals during crises |
| Emergency Coordination Units | Ambulance routing, resource deployment, inter-hospital transfers |
| Hospital Administrators | Prepare for incoming patient surges |
| Cross-border Health Response Teams | Mediterranean coordination (the MEDAIGENCY angle) |
cd backend
pip install -r requirements.txt
python train_model.py # Train ML model (~10 seconds)
python -m uvicorn main:app --reload # Start API server on port 8000cd frontend
npm install
npm run dev # Start dev server on port 5173Visit http://localhost:5173 in your browser.
CrisisLoad AI
├── backend/ # FastAPI + SQLite + ML
│ ├── main.py # 9 API endpoints
│ ├── data_generator.py # Synthetic crisis data
│ ├── train_model.py # ML model training
│ ├── ml_engine.py # Prediction engine
│ ├── database.py # SQLite database layer
│ ├── gemini_service.py # Gemini AI integration
│ └── models/ # Saved ML models
└── frontend/ # React + Vite
└── src/
├── components/ # Dashboard, Map, Charts, etc.
└── api/ # Backend API client
| Endpoint | Method | Description |
|---|---|---|
/api/hospitals |
GET | All hospitals with predictions (supports ?country= filter) |
/api/hospitals/{id} |
GET | Hospital detail |
/api/hospitals/{id}/alternatives |
GET | Alternative hospitals sorted by risk & distance |
/api/predict |
POST | Custom metrics prediction |
/api/predict/all |
GET | Predict all hospitals |
/api/simulate |
POST | Crisis scenario simulation |
/api/metrics/history/{id} |
GET | 72h metric history |
/api/gemini/analyze |
POST | AI crisis analysis |
/api/system/info |
GET | System status |
| Metric | Score |
|---|---|
| ROC-AUC | 1.0000 |
| Precision | 0.9976 |
| Recall | 0.9928 |
| F1 Score | 0.9952 |
Designed for:
- 🇱🇧 Lebanon — Infrastructure fragility
- 🇵🇸 Palestine — Conflict surge
- 🇹🇷 Türkiye — Seismic activity
- 🇮🇹 Italy — Flood risk
- 🇪🇸 Spain — Heatwave stress
- No real patient-level data used
- System-level aggregated metrics only
- GDPR-aligned data minimization
Built for the MEDAIGENCY initiative under the Interreg NEXT MED Programme