50 shipped patient scenarios, grouped into 30 categories. This is how appointments work when something goes wrong — not a table list.
Design around patient problems first: what can go wrong at this step, and what should Saathora do? Then convert the answer into Business Rule → Status → Database → API → Permission → Notification → UI → Audit → Test. Do not design only around database tables. Never auto-shift appointment_time. Never leave the patient at a dead end.
Business Rule→Status→Database→API→Permission→Notification→UI→Audit→Test
1
Normal booking
shipped
What can go wrong: The patient cannot find a doctor, pick a real slot, or tell request from confirmed.
What Saathora does: Keep appointment_time as the official schedule. Disease → specialization → doctor → hospital → slot → payment → pending → staff confirm. Early arrivals wait in the published order. A Saathora Agent can book the same saathora visit by phone (pay at hospital in v1).
Scenario 1Scenario 6Scenario 20Scenario 34
Statuspending, then confirmed
Databaseappointments.appointment_time, slot_lock, status
APIpublic.doctor-slots, book schedule/patient/pay
PermissionGuests book; auth:patient only at Razorpay pay
NotificationRequest received; then confirmed
UIBooking steps + After you book
AuditCreated and status history
TestBooking and confirmation feature tests
2
Doctor delay
shipped
What can go wrong: The 10:00 AM slot arrives but the doctor is running late. The patient thinks the booking is broken.
What Saathora does: Show scheduled time, delay minutes, and estimated consultation. Continue Waiting / Reschedule / Cancel. Do not rewrite appointment_time.
What can go wrong: A hospital emergency or 108 situation is treated like a normal booking.
What Saathora does: Clinic emergency blocks the board like surgery. Symptom routing sends true emergencies to Emergency Guidance (108), not the calendar.
PermissionPublic guidance; staff set clinic emergency
NotificationDoctor attending an emergency
UIEmergency Guidance page; live card reason
Auditclinic status + care pathway
TestClinicQueueTest emergency; care pathway tests
5
Doctor unavailable
shipped
What can go wrong: The calendar is empty or says Appointment unavailable. The patient stops.
What Saathora does: Print Dr. {name} is unavailable today. Suggest similar doctors. Offer Find Another Doctor / Hospital, Choose Another Date, Contact Hospital. Never show only an error.
What can go wrong: Traffic or a late arrival is treated as an instant no-show.
What Saathora does: Late arrival: Join Current Queue or Request Reschedule. I'm running late notifies the desk and extends auto no-show. Do not auto-shift appointment_time.
What can go wrong: Completed visits can still be moved, or delay patients cannot move.
What Saathora does: Reschedule pending, or confirmed only while the live clinic is delayed/blocking. Choose Another Date from recovery. Time changes only when the patient picks a new slot.
What can go wrong: Two patients or two assistants take the same seat.
What Saathora does: Occupancy is doctor+date+time+seat. Database unique slot_lock. Second request: Selected time slot is no longer available. Please choose another slot.
Scenario 16Scenario 17
Statusone winner pending
Databaseunique doctor/date/slot_lock/seat
APIbook() inside lock
Permissionany booker; first write wins
Notificationonly the saved booking
UIchoose another slot
Auditone slot_lock row
TestSlotDoubleBookingTest
16
Multiple hospitals
shipped
What can go wrong: The doctor is treated as one queue across campuses, or the patient is sent to a sister branch.
What Saathora does: Each hospital is one campus. Never silently change appointment.hospital_id. Live queue is doctor + hospital + session.
What can go wrong: Chest pain is booked like a routine ortho slot.
What Saathora does: Emergency Guidance is 108 and hospital emergency phones, not the booking calendar. Copy must not diagnose.
Scenario 21
Statuscare_pathway emergency vs normal
Databaseappointments.care_pathway
APIPOST frontend.care.pathway
PermissionPublic GET guidance
Notificationnone for 108 page
UIEmergency Guidance separate from calendar
Auditcare_pathway stored on urgent bookings
Testcare pathway feature tests
23
Follow-up
shipped
What can go wrong: The visit ends and there is no next step. Tests have no home on the appointment.
What Saathora does: Consultation completed → Prescription → Tests → Follow-up date → Book follow-up. Ordered tests stay read-only for patients.
Scenario 36Scenario 37
Statuscompleted then follow-up booking pending
Databaseappointment_follow_ups; test orders; follow_up_from_appointment_id
APIbook-again?follow_up=1; doctor orders tests
PermissionPatient books follow-up; doctor orders tests
Notificationfollow-up recommendation
UIx-visit-follow-up, x-visit-ordered-tests
Auditfollow-up row
TestAppointmentFollowUpTest
24
Second opinion
shipped
What can go wrong: Doctor B is nested under appointment A and 500s, or anyone can browse PHI.
What Saathora does: Current condition → Doctor A → Second opinion → Doctor B. withoutScopedBindings. Eligibility in the controller.
Scenario 38
Statusnew pending booking for Doctor B
Databasesecond_opinion_from_appointment_id
APIsecond-opinion/{doctor:slug}
PermissionOwning patient; :can-discover only on patient portal
Notificationsecond-opinion booking
UIx-visit-second-opinion
Auditlink to original visit
TestAppointmentSecondOpinionTest
25
Hospital/doctor alternatives
shipped
What can go wrong: No slots today is a dead end. Ranking is a fake JS number.
What Saathora does: No slots today + next available + other doctors + nearby hospitals. Similar doctors when unavailable. Compare and directory ranking stay on GET /doctors and /hospitals/compare.
What can go wrong: Cancel deletes a paid visit, or refund is assumed when Razorpay is not called.
What Saathora does: Paid cancel → refund_pending / refund_requested. Staff Mark refunded. Do not auto-call Razorpay on clinic cancel.
Scenario 24
Statuspayment refund_pending then refunded
Databasepayments.payment_status
APIpatient cancel; admin mark refunded
PermissionOwning patient request; staff complete
Notificationrefund pending / refunded
UICancel / request refund
Auditpayment status history
TestPatientCancellationWorkflowTest
28
Reviews
shipped
What can go wrong: Anyone can review a hospital from a public form.
What Saathora does: Completed appointment → Eligible for review. Verified Patient Review vs General Review. Public POST needs appointment_no + owning email.
Scenario 41
Statuscompleted then reviewed
Databasereviews tied to appointment
APIportal review; public.review with appointment_no
PermissionOwning patient or owning email; not hospital_id alone
Notificationnone required
UIx-visit-review
Auditreview row + kind badge
TestAppointmentReviewTest
29
Audit/history
shipped
What can go wrong: Staff argue from the current status enum. Offline patients have no pass.
What Saathora does: Attendance trail of eight steps. Dispute pack. Inline QR + booking reference. Notification history. Do not rely only on appointments.status.
Scenario 35Scenario 43
Statusoverlay history beside pending/confirmed/completed/cancelled