How Slot Search Works
How Hospital OS finds available appointment slots — the step-by-step process and every setting that affects results.
How Slot Search Works
Before anyone can book an appointment at your hospital, they need to find an available time. That is what slot search does. Whether a patient is browsing your online portal or a receptionist is checking the schedule on behalf of a walk-in, the system runs through the same process to answer one question: when is the next available appointment?
Think of it like looking through a doctor's appointment diary, except the system checks every relevant doctor across every centre your hospital operates, all at once. It considers working hours, scheduled breaks, existing bookings, reserved walk-in slots, and pricing rules to present a clean list of open times with prices attached.
This page walks you through how the search works step by step, what information each result includes, and every setting you can change to control what patients see when they search.
Before You Begin
Slot search will not return any results until three things are in place. First, you need at least one centre with its working hours configured. Second, you need at least one doctor with an availability schedule set for that centre. Third, the doctor must have at least one service mapped to them. If any of these are missing, the search comes back empty.
If you have not completed these steps yet, start with Setting Up Centres, then Availability Calendar, and finally Services & Categories. Once all three are done, slot search starts working automatically.
What Happens Behind the Scenes
When someone searches for available appointments, the system goes through seven steps. Each step narrows down the possibilities until only genuinely available slots remain. Understanding these steps helps you troubleshoot when a doctor's slots do not appear as expected.
Step 1: Find matching doctors.
The system starts by looking at what the patient needs. If they selected a specific doctor, only that doctor is considered. If they just picked a service and a centre, the system finds every doctor at that centre who offers that service. Imagine a patient calling your reception and saying "I need a general consultation at your MG Road branch." The system would pull up every doctor at that branch who is mapped to the General Consultation service.
Step 2: Check each doctor's schedule.
For every matching doctor, the system reads their availability rules. These are the Schedule, Block, and Override rules you set up in the Availability Calendar. Schedules define the weekly pattern ("Dr. Patel works Monday through Friday, 9 AM to 5 PM"). Blocks remove days or hours ("Dr. Patel is on leave December 25th"). Overrides add one-time exceptions ("Dr. Patel will work this Saturday from 10 AM to 2 PM"). The system layers these together for each date in the search range.
Step 3: Trim to centre working hours.
A doctor can never have appointments outside the centre's operating hours. If Dr. Patel's personal schedule says 8 AM to 6 PM but the MG Road branch opens at 9 AM and closes at 5 PM, the system trims the available window to 9 AM to 5 PM. This happens automatically. You do not need to keep the doctor's schedule perfectly aligned with the centre's hours. Just set each one independently and the system takes the overlap.
Step 4: Generate individual time slots.
The available time window is now divided into individual appointment slots. This is where slot duration, buffer time, and patient type matter. If the slot granularity is set to 15 minutes with a 5-minute buffer, the system creates slots at 9:00, 9:20, 9:40, 10:00, and so on. For a new patient who needs 10 extra minutes, the system accounts for a 25-minute appointment and adjusts accordingly.
Step 5: Remove already-booked slots.
Any time slot that is already taken gets removed. This includes confirmed appointments, draft bookings where someone is in the middle of paying, and appointments waiting for approval. All of these occupy a slot. If a slot has a capacity of 1 (the default for individual consultations) and one person has booked it, it disappears from the results. If the capacity is higher, like 10 for a group vaccination session, the slot stays visible until all 10 spots are filled.
Step 6: Apply walk-in reservation.
If you have configured walk-in reservation for a doctor or centre, a portion of remaining slots are hidden from online search results. These reserved slots are still visible at the front desk. For example, if you reserve 20 percent for walk-ins and a doctor has 20 available slots, online patients see 16 while the front desk sees all 20. This ensures that patients who show up in person always have a chance of getting seen, even on a busy day.
Step 7: Attach pricing.
Finally, the system looks up the correct price for each slot. It checks for a doctor-specific price first, then a centre-specific price, then falls back to the default service price. Tax is added, and the payment type (full, token, advance, or free) is determined from the pricing record. Each slot in the results now has a complete price tag.
What Each Result Includes
When the search is complete, each available slot is presented with everything the patient or receptionist needs to make a decision. Here is what you see for each result:
The doctor's name and centre tell you who and where. The date and time tell you when. The duration tells you how long the appointment will last, in minutes. The price shows the total cost including tax, displayed in Rupees. The payment type indicates whether the patient needs to pay the full amount upfront, a token amount, an advance percentage, or nothing at all. Finally, the available capacity shows how many spots are still open at that time, which matters for group sessions.
No results?
Settings That Control What Appears
Hospital OS gives you fine-grained control over how slot search behaves. Every setting below can be changed in Appointment Settings, and many of them can also be overridden at the centre or doctor level through Config Hierarchy. Here is what each one does and why you might want to change it.
Timing and Duration
These settings determine how time slots are carved out of a doctor's available hours.
Slot Granularity controls the interval at which slots are created. The default is 15 minutes, which means the system generates slots at 9:00, 9:15, 9:30, and so on. If your hospital prefers longer appointment blocks, set this to 30 minutes. Keep in mind that this is the base interval. The actual slot length also depends on the service duration and any extra time for the patient type.
Buffer Between Slots adds a gap between consecutive appointments. The default is 5 minutes, giving the doctor a moment to update notes and prepare for the next patient. In a busy outpatient clinic where doctors see patients back-to-back, you might keep this at 5 or even reduce it to 0. For specialists who review reports between patients, 10 or 15 minutes is more appropriate. The buffer is not visible to patients. They just see the appointment start times spaced further apart.
Patient Type Extra Time adds minutes to the slot for new, existing, or follow-up patients. Imagine a general consultation that normally takes 15 minutes. A new patient who needs their full medical history recorded might need 25 minutes, so you set "Extra Time for New Patient" to 10. A follow-up patient who just needs a quick check might be fine with 15 minutes, so you leave the follow-up extra time at 0. Because new patient slots are longer, fewer of them fit in the doctor's day. This is intentional. It prevents the common problem of new patients running over time and delaying everyone after them.
Search Range and Results
These settings control how far into the future patients can look and how many options they see.
Default Search Range sets how many days of results appear by default. The standard is 7 days (one week). When a patient searches without specifying dates, they see the upcoming week. If your hospital has high demand and patients often need to book further out, increase this to 14 or 30 days.
Maximum Search Range is the upper limit. Even if someone manually enters a date range, the system caps it at this value. The default is 90 days (about three months). Set this lower if you only finalize schedules a month in advance, to avoid showing dates where availability is not yet confirmed.
Maximum Results limits how many slot options come back in one search. The default is 100. For a focused experience, especially on a mobile patient portal, you might reduce this to 20 or 30 so the list is not overwhelming.
Sort Order determines how results are arranged. "Earliest" puts the soonest available slot first. This is the default and works well for most hospitals. "Cheapest" sorts by price, which is useful if you have multiple doctors offering the same service at different price points and want patients to see the most affordable option first.
Show Fully Booked controls whether the search results include slots that have no remaining capacity. By default this is off, so patients only see times they can actually book. Turn it on if you want patients to see demand. Seeing a "fully booked" indicator can encourage patients to book earlier or try a different day.
Advance Booking Rules
These settings control when patients are allowed to book relative to the appointment time.
Minimum Advance Booking sets the earliest a patient can book before the appointment time. The default is 1 hour, meaning a patient can book a 3 PM appointment as late as 2 PM. If your hospital needs time to prepare for each patient, set this higher. A 24-hour minimum means patients must book at least a day in advance.
Maximum Advance Booking sets how far into the future patients can book. The default is 90 days. This prevents patients from booking appointments months out when you have not finalized doctor schedules that far ahead.
Same-Day Booking is a simple on/off switch. When enabled (the default), patients can book an appointment for today. When disabled, the earliest available date is always tomorrow. Some hospitals disable this because they need at least a day to prepare rooms, arrange lab equipment, or review the patient's history.
Same-Day Cutoff works alongside Same-Day Booking. It sets how many hours before closing the system stops accepting same-day bookings. The default is 2 hours. If your centre closes at 6 PM, same-day bookings stop at 4 PM. This prevents the situation where a patient books at 5:55 PM for a slot at 5:30 PM that has already passed.
Capacity and Walk-in Reservation
These settings control how many patients can book the same time slot and how slots are reserved for walk-in patients.
Default Slot Capacity determines how many patients can book the exact same time with the same doctor. For individual consultations, this is 1. One patient per slot, no sharing. For group sessions like health education classes or vaccination drives, you might set this to 10 or 20, allowing multiple people to book the same time.
Overbooking allows booking beyond the normal capacity. In a busy clinic, slight overbooking can be acceptable. If you set overbooking percentage to 10, a doctor with 20 daily slots can take up to 22 patients. This accounts for the reality that some patients will not show up or will cancel last minute. Use this cautiously. Too much overbooking leads to long wait times and unhappy patients.
Walk-in Reservation is one of the most important settings for hospitals that serve both scheduled and walk-in patients. It hides a portion of slots from online booking, keeping them available only at the front desk. There are two strategies:
With the Percentage strategy, you set a percentage of the doctor's total slots to reserve. "Reserve 20%" means that if a doctor has 20 slots in a day, 4 are hidden from online search. The front desk can still book all 20. This scales naturally as you add or remove doctor hours.
With the Fixed Count strategy, you set an exact number. "Reserve 5 slots" means exactly 5 are hidden, regardless of the total. This gives you a guaranteed floor of walk-in availability, whether the doctor has 10 or 40 total slots.
The Online Only setting (enabled by default) ensures that this reservation only affects online bookings. The front desk always sees all available slots and can book walk-in patients into any open time.
Walk-in slots are not wasted
Narrowing Your Search
When searching for slots, you can use filters to narrow the results. Some filters are required and some are optional.
You must always specify a service, a patient type (new, existing, or follow-up), and a date range. The service determines which doctors are eligible and what duration and price apply. The patient type affects the slot length because new patients may get extra time. The date range tells the system which days to check.
Optionally, you can filter by centre (to see only one hospital branch), doctor (to see only one specific doctor), department (to narrow by specialty area), or preferred time of day (morning, afternoon, or evening). The more filters you apply, the fewer results you get, but the more relevant they are.
For example, a patient might search for "General Consultation, new patient, next 7 days, at the MG Road branch, morning only." The system would return morning slots for every doctor at that branch who offers general consultations, sorted by earliest available.
Settings can differ by location and doctor

What Happens Next
Once you have found the right slot, the next step is to book it. The system will hold the slot for you while you complete payment. See Booking an Appointment for the complete booking process.
Related Pages
- Booking an Appointment — the next step after finding a slot
- Appointment Settings — all the settings referenced on this page
- Availability Calendar — how doctor schedules are configured
- Config Hierarchy — why the same setting can have different values at different levels
- Services & Categories — how services and doctor mappings work
Last updated on