1. Intelligent Automated OT Scheduler

Team: Team Omega
Hackathon: Frostbyte Hackathon 2026
Category / Theme: Healthcare & BioTech / Artificial Intelligence & Machine Learning / Business & Management Tools


1.1 Project Summary

Intelligent Automated Operation Theater (OT) Scheduler is a working AI-powered operating theatre scheduling prototype that helps hospitals plan surgeries more accurately and respond to disruptions in real time. The system combines a machine learning model for patient-specific surgery duration prediction with a constraint-based optimization engine that schedules operating rooms, surgeons, and critical equipment together. A live Streamlit command center visualizes the schedule and supports instant re-optimization when emergencies, delays, or resource conflicts occur.

This project was built specifically for Frostbyte Hackathon 2026. All original system design, implementation, scheduling logic, integration, and application workflow were created for this hackathon. External datasets, libraries, and frameworks used in the project are clearly cited below.


1.2 Quick Links

Deployed app: https://intelligent-automated-ot-scheduler-iwr6ngpjfcwnsndffu4go8.streamlit.app/

Code Repository:https://github.com/HTCSUYOGJARE/Intelligent-Automated-OT-Scheduler

Demo Video:https://vimeo.com/1173612401?share=copy&fl=sv&fe=ci

Project Presentation Deck: https://drive.google.com/file/d/1aHlkthi7gUh1bNWEdM0jdHdXPRTAkQu-/view?usp=sharing

2. Problem and Motivation

2.1 Problem Statement

Operating theatre scheduling is one of the most complex coordination challenges in healthcare. Hospitals must align:

  • patient case requirements
  • surgeon availability
  • operating room capacity
  • anesthesia type
  • specialized equipment
  • turnover and cleaning buffers
  • emergency interruptions
  • overtime limits

In many hospitals, these decisions are still based on manual rules and static average surgery times. That leads to cascading delays, idle rooms, staff overtime, postponed surgeries, and poor utilization of expensive clinical infrastructure.

Our project addresses this problem with an adaptive, AI-driven scheduling system that moves hospitals from fixed-time planning to predictive and self-healing scheduling.

2.2 Inspiration

We were inspired by the real operational impact of surgical delays and cancellations caused by resource mismatch, inaccurate estimates, and rigid schedules. We wanted to build something that is not just technically impressive, but also meaningful in a real healthcare setting.

2.3 Goal

Our goal was to build a working prototype that:

  • predicts surgery durations more intelligently
  • coordinates multiple hospital resources together
  • minimizes delays, conflicts, and overtime
  • improves OT utilization
  • remains practical enough to demonstrate as a usable product

3. Solution Overview

3.1 What Makes This Project Different

Traditional OT planning treats schedules as static. Our system treats scheduling as a dynamic decision problem.

3.1.1 Predictive Intelligence

Instead of assigning one average duration per surgery type, the system predicts a more realistic surgery duration using patient and procedure features.

3.1.2 Prescriptive Optimization

Once predicted durations are available, the scheduler uses a constraint solver to allocate surgeries across rooms, surgeons, and equipment while respecting operational constraints.

3.1.3 Self-Healing Rescheduling

If a surgery overruns, an emergency case arrives, or a resource becomes unavailable, the system can recalculate the remaining schedule instead of forcing staff to manually rebuild the day.

3.1.4 Digital Twin Interface

A Streamlit dashboard acts as a command center for visualizing schedules, identifying bottlenecks, and triggering updated plans.


3.2 Solution Architecture

The system is organized into four connected layers:

3.2.1 Ingestion Layer

This layer reads patient manifests and hospital resource configurations, cleans the input data, and prepares it for downstream intelligence and scheduling steps.

3.2.2 Intelligence Layer

An ML model predicts patient-specific surgery duration based on clinical and procedural attributes. This replaces unreliable static averages with individualized estimates.

3.2.3 Optimization Engine

A constraint programming solver generates a feasible and efficient schedule by assigning surgeries to available rooms and time slots while respecting surgeon, equipment, and time constraints.

3.2.4 Command Center

A Streamlit interface visualizes the schedule, supports simulation, and enables instant re-optimization when the schedule changes during the day.


3.3 Key Features

  • AI-based surgery duration prediction
  • Multi-resource operating theatre scheduling
  • Room, surgeon, and equipment coordination
  • Turnover-time-aware planning
  • Risk-aware prioritization support
  • Emergency-aware rescheduling
  • Streamlit dashboard for schedule visualization
  • Working prototype with live demo deployment

3.4 Why XGBoost + OR-Tools

This project is intentionally built as a hybrid intelligence system:

  • XGBoost answers: How long is this surgery likely to take for this patient?
  • OR-Tools answers: Given all rooms, staff, equipment, and timing constraints, what is the best feasible schedule?

This combination makes the system more practical than using only a prediction model or only a static scheduler.


3.5 Workflow

  1. Load hospital configuration and current patient manifest
  2. Preprocess patient data
  3. Predict surgery durations using the trained ML model
  4. Build scheduling constraints for rooms, surgeons, and equipment
  5. Run the CP-SAT solver to generate a feasible optimized OT schedule
  6. Visualize the schedule in the Streamlit dashboard
  7. Trigger re-optimization when a disruption occurs

4. Technical Design

4.1 Technical Architecture

4.1.1 Intelligence Layer

The machine learning component predicts surgery duration using structured patient and surgery data. This helps reduce the large error introduced by using a single average duration for all patients in a category.

4.1.2 Scheduling Layer

The optimization engine formulates OT scheduling as a constrained allocation problem. It ensures that:

  • one surgery is assigned to one room at one time
  • rooms do not overlap
  • surgeons are not double-booked
  • shared equipment is not over-allocated
  • turnover buffers are preserved
  • emergency and high-priority cases can be accommodated

4.1.3 Front-End / Command Center

The Streamlit application acts as a digital twin for the OT floor. It provides:

  • a user-friendly control surface
  • schedule visualization
  • execution flow for scheduling and rescheduling
  • faster understanding of operational bottlenecks

4.2 Mathematical / Optimization Perspective

At a high level, the optimization engine minimizes a weighted combination of:

  • total completion time
  • priority-related scheduling cost
  • overtime
  • idle room gaps

Subject to operational constraints such as:

  • room non-overlap
  • surgery precedence and timing feasibility
  • turnover time between consecutive cases
  • surgeon availability
  • equipment capacity
  • end-of-shift limits
  • re-optimization consistency for already completed or active tasks

This turns OT scheduling into a formal decision problem instead of a manual spreadsheet exercise.


5. Data, Tools, and Implementation

5.1 Dataset Used

5.1.1 Training Dataset for the ML Model

We trained the duration prediction component using the following external dataset:

5.1.2 Training Data Details

The uploaded training data used in this project contains fields such as:

  • PatientID
  • Age
  • Gender
  • BMI
  • SurgeryType
  • SurgeryDuration
  • AnesthesiaType
  • PreoperativeNotes
  • PostoperativeNotes
  • PainLevel
  • Complications
  • Outcome

These fields were used to support feature engineering and duration prediction experiments for the intelligence layer.

5.1.3 Runtime / Scheduling Input

The prototype also uses day-of-operation patient manifest data to generate schedules for current cases. The runtime input includes fields such as:

  • PatientID
  • Age
  • Gender
  • BMI
  • SurgeryType
  • AnesthesiaType
  • Has_Comorbidity
  • ASA_Score
  • Surgeon
  • Needs_CArm
  • Needs_Robot

This runtime data is used by the scheduling engine to simulate real OT planning scenarios.


5.2 How We Built It

5.2.1 Data Handling

We used Pandas for loading, cleaning, transforming, and preparing structured clinical and operational data.

5.2.2 Machine Learning

We used XGBoost for surgery duration prediction because it performs strongly on structured tabular data and is well suited to clinical-style feature sets. We also used Scikit-learn utilities for preprocessing and model workflow support.

5.2.3 Class Imbalance / Data Preparation

As part of the model development workflow described in our project, we also used SMOTE-NC to improve learning from mixed-type tabular data during training.

5.2.4 Optimization

We used Google OR-Tools (CP-SAT) to solve the scheduling problem under multiple real-world constraints.

5.2.5 Visualization and Interface

We built the application interface using Streamlit and used Plotly Express for schedule and Gantt-style visualizations.

5.2.6 Model Persistence

We used Joblib to save and load trained model artifacts.


5.3 Tools, Frameworks, and Libraries Used

5.3.1 Core Stack

  • Python — primary programming language
  • Streamlit — app layer and command center UI
  • Pandas — data ingestion and preprocessing
  • XGBoost — ML regressor for duration prediction
  • Scikit-learn — preprocessing and ML utilities
  • Google OR-Tools (CP-SAT) — scheduling and optimization engine
  • Plotly Express — schedule and chart visualization
  • Joblib — model artifact serialization
  • imbalanced-learn (SMOTE-NC) — oversampling for mixed categorical/numerical training data

5.3.2 Project Components

  • app.py — main application entry point
  • scheduler_engine.py — optimization and scheduling logic
  • simulation_manager.py — patient/resource simulation support
  • hospital_config.py — hospital and resource configuration
  • patients_today.csv — operational input manifest
  • requirements.txt — dependency management

6. Usage and Execution

6.1 How to Run the Project

6.1.1 Clone the Repository

git clone https://github.com/HTCSUYOGJARE/Intelligent-Automated-OT-Scheduler
cd intelligent_automated_ot_scheduler

6.1.2 Create and Activate a Virtual Environment

python -m venv venv

On macOS / Linux

source venv/bin/activate

On Windows

venv\Scripts\activate

6.1.3 Install Dependencies

pip install -r requirements.txt

6.1.4 Run the Application

streamlit run app.py

6.1.5 Open the App

After the app starts, open the local URL shown in the terminal, or use the hosted demo link above.


6.2 Expected Output

The application generates and visualizes:

  • scheduled surgery sequence
  • OT room assignment
  • surgeon allocation
  • equipment-aware planning
  • schedule timing and utilization
  • updated plans after simulated disruptions

7. Challenges, Learnings, and Impact

7.1 Challenges We Faced

7.1.1 Real-World Uncertainty

Surgery scheduling is inherently uncertain. Case duration varies by patient condition, procedure type, and complexity.

7.1.2 NP-Hard Scheduling Complexity

As rooms, surgeons, and equipment grow, the scheduling search space becomes extremely large. Designing a fast and useful optimization layer was one of the central challenges.

7.1.3 Bridging AI and Operations

A prediction model alone is not enough. We had to connect ML outputs to a downstream optimization pipeline that could actually make operational decisions.

7.1.4 Building for Re-Optimization

The system needed to behave like a practical OT command center, not just a one-time batch scheduler.


7.2 What We Learned

  • prediction quality directly affects operational planning quality
  • tabular ML can be highly effective for healthcare operations problems
  • constraint programming is powerful for resource coordination problems
  • real impact comes from combining prediction, optimization, and usability
  • good hackathon projects solve a real pain point with a demoable product

7.3 Impact

7.3.1 Operational Impact

  • better OT utilization
  • fewer scheduling conflicts
  • less idle time
  • improved coordination between rooms, staff, and equipment

7.3.2 Financial Impact

  • reduced overtime cost
  • fewer avoidable delays
  • better usage of expensive OT resources

7.3.3 Clinical / Workflow Impact

  • better prioritization support
  • more stable schedules
  • improved responsiveness during disruptions
  • better planning visibility for hospital teams

7.4 Future Improvements

  • add richer clinical features for duration prediction
  • support emergency insertion policies explicitly
  • add surgeon specialization constraints
  • add room-specific compatibility rules
  • include uncertainty-aware confidence ranges
  • support multi-day hospital planning
  • export schedules as reports for hospital administration

8. Submission

8.1 Requirement Checklist

Included in This Submission

  • Project title and summary — included in this README
  • Technical documentation / README — included in this README
  • Code repository link — included above
  • Demo video or presentation — placeholder included; links can be added manually
  • Datasets, tools, and libraries used — documented above
  • Original work statement — included below
  • External citations and references — included below

8.2 Originality Statement

This project was created specifically for NextDev Hackathon as an original working prototype. Any external components used in this project are limited to open datasets, development libraries, and frameworks, all of which are cited below. The core idea, architecture, scheduling workflow, integration, interface, and implementation were developed by our team for this hackathon.


8.3 External Libraries and References

8.3.1 Dataset

  1. Kaggle Dataset — Personalized Anesthesia Management Dataset
    Link: https://www.kaggle.com/datasets/programmer3/personalized-anesthesia-management-dataset

8.3.2 Libraries / Frameworks

  1. Python
    https://www.python.org/

  2. Streamlit
    https://streamlit.io/

  3. Pandas
    https://pandas.pydata.org/

  4. XGBoost
    https://xgboost.readthedocs.io/

  5. Scikit-learn
    https://scikit-learn.org/

  6. Google OR-Tools
    https://developers.google.com/optimization

  7. Plotly Express / Plotly
    https://plotly.com/python/

  8. Joblib
    https://joblib.readthedocs.io/

  9. imbalanced-learn (SMOTE-NC)
    https://imbalanced-learn.org/


Built With

Share this project:

Updates