AI-Enhanced Nurse Scheduler for HealthFlow - Egypt's Digital Health Infrastructure
# AI-Enhanced Nurse Scheduler for HealthFlow
A modern, AI-powered nurse scheduling system combining classical branch-and-price optimization with deep reinforcement learning, specifically designed for the Egyptian healthcare market.
## 🎯 Key Features
- **Hybrid Optimization**: Branch-and-price core with RL-enhanced decision making
- **Demand Forecasting**: LSTM-based patient flow prediction
- **Fatigue Prediction**: XGBoost models for nurse well-being
- **Preference Learning**: Personalized scheduling based on historical patterns
- **Arabic NLP Support**: Natural language preference processing
- **Federated Learning**: Multi-hospital collaboration without data sharing
- **Regulatory Compliance**: Egyptian labor law and Medical Syndicate requirements
## 🏗️ Architecture
```
ai_nurse_scheduler/
├── core/ # Core optimization engine
│ ├── models.py # Data models (Nurse, Shift, Schedule)
│ ├── constraints.py # Hard & soft constraints
│ ├── optimizer.py # Branch-and-price engine
│ └── rotation_builder.py # Rotation generation
├── ml/ # Machine learning components
│ ├── demand_forecaster.py # LSTM demand prediction
│ ├── fatigue_predictor.py # XGBoost fatigue models
│ ├── preference_learner.py # Random Forest preferences
│ ├── rl_agent.py # PPO branching agent
│ └── nlp_processor.py # Arabic NLP for preferences
├── api/ # REST API
│ ├── app.py # FastAPI application
│ ├── routes.py # API endpoints
│ └── schemas.py # Pydantic models
├── utils/ # Utilities
│ ├── egyptian_calendar.py # Ramadan, holidays
│ ├── visualization.py # Schedule visualization
│ └── metrics.py # Performance metrics
├── config/ # Configuration
│ ├── settings.py # Application settings
│ └── constraints_eg.yaml # Egyptian constraints
└── tests/ # U …