MySQL Forums
Forum List  »  Stored Procedures

A stored procedure to create a queue system
Posted by: Rajesh Majji
Date: August 10, 2015 11:23PM

I have a queue system for a clinic where in table A I store the basic information
of the doctor
Doctor, day_of_week, start_time, end_time, maximum_patients , reserved queues
typically the doctor might have one morning slot and one evening slot

Queue # are reset every day, but carried on through a day. So if for morning session the maxmimum_patients are 10, and in the evening session the maximum sessions are 15, the queues are identified as 1 to 25 (10+15)

I store the queue booking in another table
Queue, doctor, patient.

There are 1-2 queues reserved for emergencies and are always fixed.

now I am working on a stored procedure which would list all the queue numbers
and identify if they are booked or available or reserved. I hate using cursors because of the unnecessary overload they create, but this what I end up doing. could there be a possible alternate?

Options: ReplyQuote


Subject
Views
Written By
Posted
A stored procedure to create a queue system
2722
August 10, 2015 11:23PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.