RotaCC¶
Medical Rota Management System for GP and Primary Care practices.
RotaCC automates the scheduling and management of doctor shifts in primary care practices. It uses a deficit-based allocation algorithm to ensure fair workload distribution across clinicians. The system handles the full lifecycle of rota management — from automated generation through to leave management, shift swaps, and reporting.
Built with Django and designed for clinical teams, RotaCC generates legally compliant rotas while giving administrators the tools to handle the real-world complexity of medical scheduling.
Who is it for?¶
| Role | What they do |
|---|---|
| Clinicians (doctors) | View their rota, request leave, swap shifts, track leave balances and duty stats |
| Rota Administrators | Generate rotas, approve leave and swaps, manage clinicians, run reports, make manual adjustments |
| Developers | Extend and maintain the system via its Django app architecture and REST API |
Key Features¶
Rota Generation
- 6-phase automated algorithm: salaried fixed days, alternate weeks, deficit-based partner allocation, duty assignment, WTE weight tuning, final validation
- Deficit-based allocation ensures fair workload distribution across partners
- 6-week fixed period (no automatic changes) with flexible period beyond for auto-rebalancing
Leave Management
- Annual leave, study leave, planned sick, and coroners leave types
- Quota tracking with pro-rata entitlement and carry-over adjustments
- Admin approval workflow
Shift Management
- Clinician-initiated shift swaps with admin approval
- Locum booking for any clinician
- Manual adjustments with full audit trail
Scheduling Rules
- Nation-specific bank holiday handling with post-holiday duty requirements
- Supports salaried, partner, locum, FY Doctor, and ST Doctor clinician types
- ICS calendar feed for personal calendar subscription
Monitoring and Reporting
- 8 admin reports: duty fairness, Monday balance, remaining leave, staffing overview, partner WTE, partner WTE availability, partner WTE availability chart, weekly availability
- Real-time alert system for staffing issues
- Complete audit trail for all entity changes
Notifications
- Email alerts for shift changes within the 6-week window
- Multi-provider support: SMTP, Mailgun, SendGrid, Postmark, Resend
Technology Stack¶
| Layer | Technology |
|---|---|
| Backend | Django 5.2, PostgreSQL, Redis, Celery |
| Frontend | Django Templates, Tailwind CSS, Alpine.js, HTMX |
| Admin | Django Unfold with medical theme |
| API | Django REST Framework (v1 and v2) |
| Auth | django-allauth with email verification |
| Deployment | Docker Compose, Gunicorn |
| Testing | pytest, factory-boy, pytest-xdist |
| Package manager | uv |
Documentation Sections¶
- Getting Started — Set up and run locally
- Architecture — System design and application structure
- User Guide — For clinicians using the system
- Admin Guide — For rota administrators
- Technical Reference — For developers extending the system
- Operations — Deployment, backups, and maintenance