Abstract
Accurate staff scheduling is crucial in overcoming the problem of mismatch between staffing ratios and demand for health services which can impede smooth patient flow. Patient flow is an important process towards provision of improved quality of service and also improved utilization of hospital resources. However, extensive waiting times remains a key source of dissatisfaction with the quality of health care service among patients. With rarely scheduled hospital visits, the in-balance between hospital staffing and health service demand remains a constant challenge in Sub-Saharan Africa. Accurate workload predictions help anticipate financial needs and also aids in strategic planning for the health facility. Using a local health facility for a case study, we investigate problems faced by hospital management in staff scheduling. We apply queuing theory techniques to assess and evaluate the relationship between staffing ratios and waiting times at the facility. Specifically, using patient flow data for a rural clinic in Malawi, we model queue parameters and also approximate recommended staffing ratios to achieve steady state leading to reduced waiting times and consequently, improved service delivery at the clinic.
Significance for public health.
This study has shown that queueing theory can be used to discover hidden crucial queue parameters that can guide hospital managers to make informed decision on staffing ratios for improved patient flow leading to a better experience for both staff and patients. Specifically, the study shows that i) there is need to regularly evaluate patient hospital visits patterns since the findings would help hospital administrators to apply dynamic staff allocation strategies tailored to patients flow patterns leading to optimized use of the limited staff; ii) the requirements for the provision of quality health services across the country and the related staff who go with these services varies depending, among other things the utilisation patterns of health services. Hence it is important that the allocation and utilization of medical staff (which are limited) takes into consideration these variations within a country and not solely depending on population or institutional size.
Key words: Patient queue, patient waiting time, patient flow, staff scheduling, single server multiple phase model
Introduction
Healthcare service provision depends on a complicated array of political, social, epidemiological, demographic and economic factors. The requirements for health care services and associated medical staff across a given country varies depending on variations in mortality, age, sex, and population density; education and wealth; patient visits patterns; terrain; and the ease of access to these services. Hence, it is important that the allocation and utilization of medical staff takes into consideration these variations within a country and not solely depend on population or institutional size.1 Failure to consider these variations may result not only in under or over-provision of healthcare staff, but may also lead to inappropriate allocation of different cadres of staff. Already, there is an outcry among the populace concerning the decline in quality of healthcare services especially in national healthcare facilities.2 The timely and efficient movement of materials, information and patients, positively impacts the satisfaction of both staff and patients and consequently improves the revenue of a healthcare facility.3
In many African countries, unlike in the developed world, hospital visits by patients are rarely scheduled which makes it difficult to project daily demand for the services. Consequently, the mismatch between hospital staffing ratios and healthcare service demand remains a constant challenge. The efficient allocation and utilization of the limited healthcare staff requires knowledge of patient flow patterns. This knowledge can be generated through modeling of the arrival process of the unscheduled patients over the various intervals of the day and also seasons.4,5 The consequences of the in-balance between staffing ratios and service demand among others includes; disgruntled medical staffs, excessive patient waiting times, and incomplete preventive service delivery. The extended waiting times may cause dissatisfaction among the patients which might manifest in the form of patients leaving the healthcare facility before the exam is complete6 or may be forced to use personal connections with hospital staff and doctors to bypass the queues.7-9 The major steps that a patient goes through to get medical care are summarized in Figure 1.
To ensure that patients get timely serviced at the facility, matching staffing ratios to patient demand is key.10 This requires sophisticated approaches to study patient flow behaviours to help hospital managers schedule staff according to the expected demand. Furthermore, knowledge of workload allows management anticipate the financial needs and in strategic planning for the healthcare facilities. Queuing theory can be used as a tool to understand various aspects in healthcare such as; appointment systems, utilization analysis, waiting time and others.11-14
There exists a dearth of research on assessing patient flow through the health clinics and also identifying various bottlenecks in the clinic structure both in Malawi and various Sub-Saharan Africa countries. These time-motion studies have uncovered both deficiencies and barriers to patient flow, e.g., poor record keeping and poor allocation of health provider time.12,15,16 Like many other low-income countries, Malawi faces a severe shortage of health workers, a consequence of the low output at the medical teaching institutions due to limited number of medical/health schools and brain drain. The impacts of these problems are well documented as pointed out above. The focus of this work is to demonstrate how queuing theory can be used to tackle the problem of a mismatch between staffing ratios and demand for healthcare by optimizing the use of the available staff. To our knowledge, this is the first time that such a study is being carried out in Malawi. This study makes use of secondary data available from Jafry et al.16
Design and methods
This research employs queuing theory to understand patient flow behaviour and how it relates to available human resources. This is because a healthcare system can be considered as a queue network consisting of various server types.11,12 The study uses secondary data that was primarily collected for a time-motion study at Ntaja health center.16 The data was collected using a standardized questionnaire and consists of information pertaining to the patientdoctor (or health worker) consultation time, the number of medical staff(s) that attended to each patient, and the total time spent at the center. As part of the same study, an exit survey was conducted with an aim of collecting demographic information and data on patient’s perception on quality of care during the visit to the health center. In terms of patients, the study identified two kinds of patients from the data namely; children who constituted 42.3% of the total patients and adults who constituted 57.7% of the patients surveyed. During the study period, all patients visiting the health center were invited to take part in the study. Upon receiving an informed consent, each participant was assigned a unique identification number. As regards the exit survey, all participants were interviewed about whether they sought care for themselves or someone else. Since children are escorted by an adult, the adult was responsible for responding to the interview. Table 1 is a summary of the relevant parameters extracted from the secondary data that have been used to develop and validate the model. Note that SD stands for standard deviation. From the table, the total average time spent by patients at the health center was 123 minutes (2-366 min), with variations observed between time spent by children and that spent by adults. Health worker contact time was 2.3 min for adults and 1.7 min for children. Furthermore, short patient waiting times are associated with higher perceptions of quality of service. Hence, this study is very important since matching demand for healthcare service and staffing rations can lead to short access times. Since adults and children queue on different queues and are attended by different physicians, the two queues can be considered to be independent. Note that, although the registration might be carried by the same registration officer, however, in this work, the queues consider are those in the waiting room, which are queues of patients waiting to be attended by the physician. The two service times are treated independently and are used to drive two queueing models governing the two independent queues.
Figure 1.

Patient flow in the outpatient clinic.
Patient flow and queue theory
Patient flow involves systematic steps that patients go through from the time they arrive at a healthcare facility to the time they leave or get discharged. The process involves interaction of both patients’ behaviors and also medical activities.14 Patient flow is an important process towards provision of improved quality of service and also improved utilization of hospital resources.14 In this work we consider patient flow as a closed network in that, upon completion of a sequence of hospital activities, all arriving patients return to the beginning (or starting point). Hence, a closed patient flow network is capable of reaching steady state after a considerable period of time.
In practice, it is unrealistic to expect 100% utilization of a healthcare system. Hence, for improved health outcomes, healthcare facility managers strive to keep the total waiting and capacity costs to a minimum. One way through which waiting and capacity costs can be kept to a minimum is by matching staffing ratios to patient demand for healthcare services i.e., ensuring that patients arrival rates and service rates must be stable. To evaluate the utilization of a healthcare system, it is important to consider such aspects as: average number of patients and average time the patients wait in the queue, the capacity utilization, costs of a given level of capacity and the probability for an arriving patient to wait for service (computed using other relevant variables). These elements make the application of queuing theory to study patient queue behavior a natural approach. A queuing model is characterized by:14
Number of servers (in this case servers means physicians): associated with each server is its capacity. Experience and exposure can have an impact on the capacity of a particular physician. In turn the capacity of a server directly influences the capacity of the queue system.
Population source: in this work we consider an infinite population source, whereby patient arrivals are unrestricted hence at any time the system’s capacity can be exceeded.
Arrival patterns: patient arrival patterns are not uniform. As such a system may be overloaded (temporarily) due to the variability in both the arrival and service patterns.
Service patterns: patients have varying nature of sickness such that the times for treatment are also varied.
Queue discipline: in this paper we assume that the patients are treated on the First-Come-First-Serve (FIFO) policy.
A queue can be modeled by using the extended Kendall’s notation, A/B/C/D/E/F where A: is arrival time distribution, B: the service time distribution, C: the number of servers, D: capacity of the system (i.e., the number of customers in the system), E: the calling population and F: the queue discipline. The goal of this work is to demonstrate the application of queuing theory in determining the minimum number of physicians needed to achieve stable state of the healthcare delivery system. The input and output to our queuing model is the patient’s arrival and the patient’s discharge from the outpatient clinic respectively. It is important to note that, in Malawi, a rural health center is normally run by a medical assistant who sometimes is supported by other health workers, such as; registry clerks, nurse-midwives, attendants and health surveillance assistants. In the case of Ntaja health center, patients were first registered by the registry clerk, then proceeded to the medical assistant for consultation and diagnosis. Finally, patients were sent to the pharmacy for collection of prescribed medicine.
In this work we consider a single queue, multiple phase model depicted in Figure 2. To achieve the goal of estimating the number of servers, an M/M/c queuing model is considered. Note that, where M/M/c is used, then it is assumed that E and F are clearly defined. In our case, E is infinite and F is FIFO queue discipline. In this paper, A takes up a poisson arrival pattern and B an exponential service pattern. The Poisson arrival distribution allows us to compute the probability of arrivals over a given time period. We find these assumptions sensible since we are considering arrival of unscheduled patients in the outpatient clinic. Let:
Table 1.
A summary of relevant findings from the study in Jafry et al. BMC Res Notes 2016;9:363.16
| Characteristic | Waiting time mean (SD) | Contact time mean (SD) | Total time mean (SD) |
|---|---|---|---|
| Patient type | |||
| Adults | 108.4 (67.6) | 2.3 (6.0) | 110.7 (67.9) |
| Children | 133.2 (65.4) | 1.7 (4.3) | 134.9 (65.5) |
| Healthcare cadre | |||
| Registry clerk | 68.8 (55.3) | 0.6 (3.0) | 69.4 (55.3) |
| Hospital attendant | 34.7 (34.5) | 1.2 (6.0) | 35.9 (34.6) |
| Medical attendant | 59.9 (52.7) | 1.1 (3.7) | 61.0 (52.8) |
| Pharmacy attendant | 13.5 (20.7) | 0.4 (2.7) | 13.9 (20.7) |
| Time of day | |||
| 06:00-08:00 | 156.6 (58.1) | 1.8 (5.3) | 158.4 (58.3) |
| 08:00-10:00 | 133.4 (61.7) | 2.0 (3.9) | 135.4 (61.8) |
| 10:00-12:00 | 73.4 (50.8) | 1.5 (2.0) | 74.9 (51.0) |
| 12:00-14:00 | 65.6 (35.3) | 1.8 (4.3) | 67.4 (35.6) |
| 14:00-16:00 | 52.7 (26.7) | 2.0 (5.0) | 54.7 (27.5) |
| Patient satisfaction | |||
| Excellent | 92 (71.0) | 1.9 (2.5) | 93.9 (71.3) |
| Very good | 110.2 (66.1) | 1.7 (5.1) | 111.9 (66.2) |
| Good | 122.0 (68.7) | 1.8 (4.3) | 123.8 (68.8) |
| Poor | 129.0 (63.1) | 1.8 (5.0) | 130.8 (63.3) |
| Very poor | 121.0 | 2.6 (4.0) | 123.6 (76.2) |
| (eq. 1) |
where λ is the patient arrival rate, μ is the patient service rate and c is the number of servers. We further define; ρ as the system utilization,
as the service time, P0 as the probability of having zero units (or patients) in the system and Pθ
as the probability of having θ patients in the system. Hence, for an optimized process, we wish to find the probability P0, i.e. the probability that an arriving patient queues for treatment. This means the probability that all the servers are busy. The relations below are applied to aid the calculation of the target probabilities:
| (eq. 2) |
| (eq. 3) |
Considering that the basic property,
is satisfied, then it is possible to calculate Pθ
and all Pi
for any number of patients i. Note that, a queue will only exist if θ ≥ c (i.e. when the number of patients arriving is greater that the number of physicians). Hence, unless the number of arrivals surpasses that of servers, there is no need for optimization. Here, the aim of optimizing is to reduce the patient waiting time. However, the use of the model may vary depending on the problem at hand.
Figure 2.

Single queue-multiple phases model environment depiction.
Figure 3.

Average arrival of adult patients at Ntaja health center over 1 week in 2016.
Results
As summarised in Table 1, our analysis of the secondary data revealed that the data was collected over a one-week period starting from 6am and ending at 4 pm daily. Furthermore, we noted that a total of 1189 patients were registered during this period at Ntaja Health Center with 503 of these being children and 686 being adults. Hence, taking 10 h to equal a day, the calculated hourly (60 min) arrival rate of adult patients and children is 10 and 14 patients, respectively. Figure 3 and Figure 4 display the hourly patient flow over the five days of the survey. Using this information, below we drive two queuing models characterizing the movement of adult and also children patients in the system. These models are important in that they can inform management on the expected demand for service, making it possible for advance planning and resource scheduling.
The adult patients queue model
Let σi be the weekly average arrival of patients during the time interval [ti–1, ti], with t0 = 0 means the zero hour, i.e. 6am in this case. Considering the limited amount of the data set, we consider the interval [ti–1, ti] as the interval of hours of the day over which the clinic is operational. Let Pθh,i denote the number of patients that arrived over an hour h in the interval [ti–1, ti]. Therefore, the average number of patients arriving/hour is given by:
| (eq. 4) |
where d is the day of the week and h is the number of hours of the day (i.e. working hours of the day). Hence, the average number of patients that arrived over the interval [ti–1, ti] can be obtained from:
| (eq. 5) |
Hence the average adult patients’ arrival will be given by:
| (eq. 6) |
From Figure 3 we get λad
= 1, i.e., adult patients arrive at a rate of 1 patient/minute and joins a queue. From the data we get a weekly service rate of: μad
= 0.4 for adult patients. Recall that for a system to be in steady state the relationship
must be satisfied, where c is number of servers i.e., medical personnel. Hence, using above results we generate the Table 2.
The queuing model M/M/3, can be used to understand the various characteristics of the queue. Below we derive the probability that the queue is empty i.e., that no adult patient is in the OPD.
The probability that the queue is empty can be expressed as:
![]() |
(eq. 7) |
For n=3 we get
![]() |
(eq. 8) |
Table 2.
Ratio of patients to servers to achieve steady state.
| λad | 1 | 3 | 5 |
| c | 3 | 7 | 12 |
Figure 4.

Average arrival of children patients at Ntaja health center over 1 week in 2016.
![]() |
(eq. 9) |
After substituting the sum of the geometric series (since the series is convergent) we get:
![]() |
(eq. 10) |
Which reduces to:
![]() |
(eq. 11) |
Hence, the probability that there is no patient in the queue is: P0ad = 0.039225.
The above computed parameters for the adult patient’s M/M/3 queueing model, including arrival rate and service rate were utilized to generate other steady state probabilities that were used to plot the steady state distribution curve for the adult patient’s queue shown in Figure 5.
The children patients queue model
The same parameters as in the adult patient’s queue analysis are adopted. Our focus in this section is calculation of: λch, μch, and n. From the data we get: λch = 1, μch = 0.6 and c = 2.
Following similar approach as above, the probability of that the children’s’ queue is empty is: P0ch = 0.08026.
Discussion
In this study, a queueing theory model approach is applied to discover hidden crucial queue parameters at Ntaja health center, a rural outpatient clinic in Malawi. Secondary data is used to validate the queuing models. Two queuing models have been driven, an M/M/3 model for adult patients and an M/M/2 model for children. This means that, to achieve steady state (i.e., that an arriving adult patient will not queue), the number of servers (i.e., medical assistant) needed is . Whilst for children, the needed number of servers is 2. The computed arrival rate for adult patients is found to be λad = 1 with corresponding service rate of μad = 0.4. Since we considered a multi-server scenario, the health center utilization rate for the period is: ρad = = 0.8333. This means the server was busy 83% of the time. Similarly, other queue parameters such as; average queue length, average number of patients in the system, average waiting time of an arriving patient in the system, they all can be expressed in terms of arrival rate and service rate. Hence, the computed queueing parameters in this work are important in guiding managers to make informed decisions on staffing ratios for improved patient flow. This is crucial, since in clinical environments, any changes made in the system need to lead to improved experience for the patient. Similar computations can equally be made for the children queue.
Although similar works on the application of queuing theory in healthcare exists, however, most of these works focus on the application of queuing theory in the emergency department. In 2015, Hajnal and Zsuzsanna17 applied queuing theory to study the general performance of an emergency department located in the Mures County, Romania. Haghighinejad et al.18 applied queuing theory to determine patient numbers waiting for emergency services and how it related to waiting times for an Iranian emergency department. The work by Ameh et al.8 is similar to this work as it demonstrates the application of queuing theory in an outpatient clinic. However, a few contrasts exist; e.g., Ameh et al. uses primary data collected from a tertiary hospital whilst the results reported in this work are driven form secondary data for a rural outpatient clinic.8 Furthermore, the above referred works specifically focus on either resource utilization or patient waiting time and how it impacts patient’s perception of quality of care. The work reported herein has shown how queuing theory can be used to match a clinic’s staffing ratio and demand for healthcare service.
Figure 5.

Steady state probabilities distribution curve for the adult queue at Ntaja health center.
As indirectly alluded to above, this study has limitations. Two of these limitations include: i) the use of secondary data, which may not reflect the current status of the study environment, and ii) the data covered a short period of time, hence, may not have captured the system behavior which may vary with weather, seasons and other variables in the environment. Despite these limits however, the modelling approach in this research shows that given data, it is possible to carry out experiments on different patient flow management policies.
Conclusions
This work has demonstrated how queuing theory as a tool can be used to analyze and understand queue related parameters at healthcare facilities. Managers of healthcare facilities can use queuing theory to plan scheduling of medical staff. Proper staffing is key to reducing lengthy waiting times consequently leading to improved quality of healthcare service delivery. Our future work will consider a large-scale analysis such as multiple phase queues which can be applied to central hospitals.
Funding Statement
Funding: this work did not receive any external funding.
References
- 1.Alexopoulos C, Goldsman D, Fontanesi J, et al. Modeling patient arrivals in community clinics. Omega 2008;36:33-43. [Google Scholar]
- 2.Maphumulo WT, Bhengu BR. Challenges of quality improvement in the healthcare of South Africa post-apartheid: A critical review. Curationis 2019;42:e1-e9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Dennis A, David WR, Joy A, Edward K. Reducing patient waiting times in rwandan hospital outpatient services. Management Sciences for Health (MSH), Kigali, 2019. [Google Scholar]
- 4.Chu H, Westbrook R, Njue-Marendes S, et al. The psychology of the wait time experience – what clinics can do to manage the waiting experience for patients: a longitudinal, qualitative study. BMC Health Serv Res 2019;19:459. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Altema J, Bien-Aime K, Roger M, Blaise W. Causes of long wait time in health consultation services and strategies to reduce them: an observational study in rural Haiti. The Lancet Global Health. 2020;8:S33. [Google Scholar]
- 6.Creemers S, Lambrecht M. Modeling a healthcare system as a queueing network: The case of a Belgian hospital. SSRN 2007:1-54. Available from: https://ssrn.com/abstract=1093618 [Google Scholar]
- 7.Alenany E, El-Baz M. Modelling a hospital as a queueing network analysis for improving performance. World Academy of Science, Engineering and Technology, International Journal of Industrial and Manufacturing Engineering 2017;11:1181-7. [Google Scholar]
- 8.Ameh N, Oyefabi M, Sabo B. Application of queuing theory to patient satisfaction at a tertiary hospital in Nigeria. Nigerian Med J 2013;54:64. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Mayhew L, Smith D. Using queuing theory to analyse the government’s 4-h completion time target in accident and emergency departments. Health Care Manag Sci 2007;11:11-21. [DOI] [PubMed] [Google Scholar]
- 10.Véricourt F, Jennings O. Nurse staffing in medical units: A queuing perspective. Operations Research. 2011;59:1320-31. [Google Scholar]
- 11.Lantz B, Rosén P. Using queuing models to estimate system capacity. Prod Plann Control 2017;28:1037-46. [Google Scholar]
- 12.Wanyenze R Wagner G Alamo S et al.. Evaluation of the efficiency of patient flow at three HIV clinics in Uganda. AIDS Patient Care STDS 2010;24:441-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Colebunders R, Bukenya T, Pakker N, et al. Assessment of the patient flow at the infectious diseases institute out-patient clinic, Kampala, Uganda. AIDS Care 2007;19:149-151. [DOI] [PubMed] [Google Scholar]
- 14.Chong M, Wang M, Lai X, et al. Patient flow evaluation with system dynamic model in an emergency department: Data analytics on daily hospital records. Proceedings of the 2015 IEEE International Congress on Big Data: New York; 2015. p. 320-3. [Google Scholar]
- 15.Berry J. Hospital utilization and characteristics of patients experiencing recurrent readmissions within children's hospitals. JAMA 2011;305:682. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Jafry M, Jenny A, Lubinga S, et al. Examination of patient flow in a rural health center in Malawi. BMC Res Notes 2016;9:363. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Hajnal V, Zsuzsanna KS. Application of queuing model to patient flow in emergency department. Case study. Proc Econ Financ 2015;32:479-87. [Google Scholar]
- 18.Haghighinejad HA, Kharazmi E, Hatam N, et al. Using queuing theory and simulation modelling to reduce waiting times in an Iranian Emergency Department. Int J Community Based Nurs Midwifery 2016;4:11-26. [PMC free article] [PubMed] [Google Scholar]





