Views
No views yet
1# 1. Install dependencies
2pip install -r requirements.txt
3
4# 2. Train the model (run once)
5python -m ml.train_model
6
7# Terminal A — Start Flask API
8python -m backend.app
9
10# Terminal B — Run IoT simulator
11python -m simulator.simulate --patient_id 1 --count 60 --anomaly_rate 0.2
12
13# Terminal C — Launch Streamlit dashboard
14streamlit run dashboard/app.pyIoT Sensor → Kalman Filter → Edge ML → Multi-Signal Fusion → Tiered Alert
↓
SQLite (offline buffer)
↓
Sync to cloud on reconnect| Level | Trigger | Action |
|---|---|---|
| 0 | No anomaly | — |
| 1 | Mild (score>0.4) | Local buzzer |
| 2 | Moderate (≥2 signals) | SMS via GSM / 2G |
| 3 | Critical (score>0.85 or 3+ signals) | Push notification |
| Method | Path | Description |
|---|---|---|
| GET | /api/patients | List all patients |
| POST | /api/patient | Register new patient |
| POST | /api/vitals | Ingest sensor reading |
| GET | /api/vitals/<id> | Get vitals history |
| GET | /api/alerts/<id> | Get anomaly alerts only |
| GET | /api/baseline/<id> | Get adaptive baseline |
health_id field on every patient for Ayushman Bharat integration