Scaling medical scheduling: A multi-role SaaS platform engineered with Python and Django
How we built a highly reliable, GDPR-compliant scheduling engine that orchestrates dynamic calendars for patients, doctors, operators, and insurers.
The starting point
Building a robust SaaS platform for healthcare scheduling means tackling immense logistical complexity under strict security and privacy guardrails. The platform required a seamless architecture capable of serving multiple user roles—patients booking immediate care, doctors managing complex shift patterns, medical centre operators orchestrating clinics, and insurance providers validating coverage—all in real time.
To support high concurrent traffic without bottlenecking the database, the system needed a highly optimised approach to data management and calendar calculation. Furthermore, operating in the digital health space demanded absolute compliance with EU data protection regulations, requiring automated, bulletproof procedures to handle sensitive personal and medical data safely.
What we did
Extreme Consulting stepped in as a long-term technology partner, deploying a lean, highly specialised team led by Hristo Trendafilov as Tech Lead and Maria Mihova, who managed the Front End. We selected a high-performance stack built on Python, Django, and Django REST Framework, utilising MySQL for stable transaction processing and Bootstrap for a clean, responsive interface. For robust identity management and role-based access, we integrated Keycloak, extended user profiles via Django Allauth, and implemented secure social OAuth sign-ins.
Our "beyond consulting" philosophy guided our approach to the core scheduling engine. Instead of relying on a typical database-heavy architecture where every slot is statically pre-calculated and stored—a design that quickly slows down under enterprise load—we designed and implemented a dynamic calculation engine based on recurrence rules. This allowed the system to calculate availability on the fly, easily accommodating complex recurring schedules and sudden shift exceptions.
To ensure a lightning-fast user experience, we built custom caching operations and asynchronous event triggers using Redis and Celery. This decoupled slow, external processes—such as dispatching SMS notifications and automated authentication codes via Link Mobility and Twilio—from the main application thread.
On the compliance side, we went beyond simple data deletion. We designed automated, irreversible data anonymisation pipelines that completely purge patient identity files upon account removal to comply with strict GDPR standards, while safely preserving non-personal statistical data for business reporting. To guarantee the continuous reliability of these workflows, our team established an extensive browser testing suite using Selenium.
The outcome
Since launching our partnership in 2021, our dedicated team has successfully developed, scaled, and maintained a highly reliable SaaS ecosystem:
Conflict-Free Dynamic Scheduling: Implementing rules eliminated scheduling conflicts entirely and dramatically reduced database load, allowing the system to process hundreds of real-time calendar updates simultaneously.
Automated GDPR Compliance: Built-in anonymisation protocols ensure secure, one-click user data removal, completely protecting the platform from legal and regulatory risks.
Defect-Free Deployment: The Selenium browser testing framework automatically validates critical booking paths before every release, ensuring zero service interruptions for active clinics.
"Extreme Consulting has acted as a true strategic partner. Their decision to utilise recurrence rules for our scheduling engine saved us months of custom development and gave us a database architecture ready to scale globally."
— Detelin Krastev, Co-founder & General Manager of Global System Solutions
Technologies and team
Technologies: Python, Django, Django REST Framework, MySQL, Celery, Redis, Keycloak, Bootstrap, Docker Containers, Selenium, Link Mobility, Twilio, Google Maps.
Team: 1 Tech Lead, 1 Front-end Developer (Ongoing engagement since 2021)