A Streamlit web application for generating fair, conflict‑free physician schedules for Yarmouth Regional Hospital Department of Internal Medicine.
- Fairness‑based scheduling with weighted scoring and historical balancing
- Multiple service coverage (ICU, IM, Hospitalist, Dialysis, CV Clinic, Stress Tests, ECG)
- Blair‑type rotation rules for ICU coverage
- Conflict detection for vacations, missing coverage, and rule violations
- Excel export with color‑coded schedules and fairness reports
- Google Sheets integration for loading previous schedule counts
- Holiday calculation for Nova Scotia statutory holidays
- Authentication to restrict access to authorized personnel
-
Install dependencies:
pip install streamlit pandas openpyxl
-
Run the app:
streamlit run scheduler_app.py
-
Log in using the credentials set up in your environment (see AUTHENTICATION.md).
-
Configure doctors, services, vacations, and rotation rules.
-
Generate schedules and export to Excel.
The app now includes a login screen. Before deploying, set up secure credentials. See AUTHENTICATION.md for detailed instructions.
- Push this repository to GitHub.
- Connect the repo to Streamlit Community Cloud.
- Add your credentials as Secrets.
Set environment variables SCHEDULER_USERNAME and SCHEDULER_PASSWORD before starting the Streamlit server.
scheduler_app.py– Main application (87 KB, includes scheduling engine and UI)requirements.txt– Python dependenciesAUTHENTICATION.md– Authentication setup guidescheduler_app_backup.py– Original version without authentication (backup)
The scheduler uses a weighted fairness algorithm that considers:
- Number of previous assignments per service
- Weekend and night penalties
- Consecutive day limits
- Doctor vacations and service qualifications
- Blair‑rule ICU weeks
- Historical balancing across years
For issues or feature requests, contact the developer.
Built for Yarmouth Regional Hospital Department of Internal Medicine.