An intelligent health reporting system designed for HackArizona 2026. This platform leverages professional health reporting and historical CDC datasets to identify emerging health anomalies and risk profiles in real-time.
This project provides a bridge between individual user health reporting and macro-level CDC data. By cross-referencing recent professional diagnoses with historical trends, the system identifies statistical anomalies that could indicate localized outbreaks or health trends.
- User Reporting: Securely captures professionally diagnosed illnesses from the past month.
- Anomaly Detection: Uses AI services to compare current reporting rates against baseline CDC data.
- Risk Profiling: Generates dynamic risk scores and visual trends for specific regions/ZIP codes.
- Framework: React 18 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS + shadcn/ui
- State Management: Custom hooks & local state logic
- Testing: Vitest
- Language: Python 3.11
- Framework: Flask
- Database: SQLite (SQLAlchemy)
- AI/Analysis: Custom Anomaly & AI Explanation Services
- Containerization: Docker & Docker Compose
The anomaly engine uses a four-step composite scoring model that combines local report trends with CDC FluView baseline data to generate a risk score between 0 and 100.
Compares report volume this week against last week. If last week had zero reports, the system returns a maximum signal of 999%.
Measures how statistically unusual the current spike is, anchored to the CDC FluView standard deviation for the matching epiweek.
| Condition | Classification | Signal |
|---|---|---|
| Last week = 0, this week > 0 | Accelerating | 75.0 |
| Ratio > 1.5 | Accelerating | (ratio − 1) × 100 |
| Ratio > 1.05 | Increasing | (ratio − 1) × 100 |
| Ratio ≥ 0.95 | Stable | 0 |
| Ratio < 0.95 | Declining | 0 |
Where:
pct_signal = min(100, pct_change / 3)z_signal = min(100, |z| × 25)cluster_signal = min(100, this_week × 5)
Z-score carries the highest weight (35%) as it is the most statistically grounded signal. Percent change follows at 25%, with trend direction and cluster size each contributing 20%.
| Score | Label |
|---|---|
| 0 – 25 | 🟢 Normal |
| 26 – 50 | 🟡 Emerging Anomaly |
| 51 – 75 | 🟠 Significant Anomaly |
| 76 – 100 | 🔴 Possible Outbreak |
HackArizona2026/
├── backend/ # Flask API, AI Services, & SQLite DB
│ ├── models/ # Database schemas (SQLAlchemy)
│ ├── routes/ # API Endpoints (Reports, Anomalies, Health)
│ ├── services/ # Core logic: AI Explanation & Anomaly Detection
│ └── data/ # Seed data and historical CDC records
├── frontend/ # React + Vite application
│ ├── src/components/ # High-level UI (RiskScoreBar, TrendBadge, etc.)
│ ├── src/pages/ # Dashboard and ZipDetail views
│ └── src/lib/ # API wrappers and utility functions
└── docker-compose.yml # Orchestration for full-stack deployment