November 3, 2008 : The Queueing Theory for Medical Examinations
© 安岡喜晴 (JoyShine)
I have considered how long I should spend with each patient if a certain number of them are expected to arrive within an hour.
Suppose patients arrive and wait for a medical examination service provided by only one doctor, and after the medical examination is completed, the patient will leave the room.
Let x be the number of patient arrivals per hour, and let y be the average time for a medical examination service (minutes) per patient.
Then service using rate = (x * y) / 60.
The average total number of patients in the clinic = service using rate / (1 - service using rate) = ((x * y) / 60) / (1 - ((x * y) / 60)) = (x * y) / (60 - (x * y)) ( 0 < service using rate < 1 )
Since each patient takes "y" minutes to be examined, a newly arriving patient will wait for the patients already in the clinic to finish.
This means that the average wait time per patient is the number of patients multiplied by "y", which is "(x * y * y) / (60 - (x * y))". ( 0 < x * y < 60 )
Now, let's think about a situation where we should make an average waiting time for a patient within 1 minute.
Average waiting time per patient = (x * y * y) / (60 - (x * y)) = 1 <-> (x * y * y) / (60 - (x * y)) = 1 <-> (x * y * y) = (60 - (x * y)) <-> (x * y * y) + (x * y) - 60 = 0
This is a root of the function f(y) using the quadratic formula: y = (root((x * x) + (240 * x)) - x) / (2 * x)
If x is equal to 10, then y is equal to 2, and this means that 10 patients arrive per hour, and we should examine each of them within 2 minutes to make the patient's waiting time within 1 minute.
Then, to generalize this theory, let z be an average waiting time per patient.
Suppose we want to have an average waiting time for each patient within "z" minutes.
Then the above function should be (x * y * y) / (60 - (x * y)) = z <-> (x * y * y) = ((60 - (x * y)) * z) <-> (x * y * y) + ((x * z) * y) - (60 * z) = 0
<-> y = (square root((x * x * z * z) + (240 * x * z)) - (x * z)) / (2 * x)
For example: If we want the average waiting time for a patient to be 2 minutes, and we expect 20 patients per hour, then we should see each patient within 1.645 minutes
because y = (square root((20 * 20 * 2 * 2) + (240 * 20 * 2)) - (20 * 2)) / (2 * 20) <-> y = 1.645 (minutes)
<SUMMARY>
x : the estimated number of patient arrivals per hour
y : an average time that should be spent in a medical examination service (minutes) per patient
z : an estimated average waiting time for each patient
y = (square root((x * x * z * z) + (240 * x * z)) - (x * z)) / (2 * x)
I have named this formula "The Formula of XYZ". lol