1. Introduction

Emergency Departments (EDs) are the busiest departments in a hospital and its main purpose is to provide timely emergency care to patients [1,2]. The highest attribute of emergency departments is their uninterrupted serviceability. Providing this service to a lacker in a short time and giving priority to very urgent one is essential. But people don't have any urgent cure may apply to emergency departments rarely. These applications cause patient overcrowding in many emergency departments. Thus waiting times and unsatisfaction levels of patients may increase, a general complex condition may occur in the ED [3]. Some indicators that emergency departments use to evaluate their operations and service quality are average waiting time, average LOS, ED productivity, resource utilization and layout efficiency [4,5]. Prolonged waiting times have been a major cause of ED overcrowding, that is a main reason of supply– demand mismatch [1]. Prolonged waiting times are constituted by the long waits in triage, delays in testing or obtaining test results, waiting for the physician, and shortage of nursing staff [6]. El-Sharo [7] reveals several reasons that cause to increase long waiting times in emergency departments. These reasons include the inefficient utilization of ED resources, miscommunication between ED staff to ensure the smoothness of flow of patients in or out of the emergency department, delays in admitting patients from the emergency department, inefficient resource allocation in the hospital, and other external factors, such as an increase in demand of patients due to a reduction in the number primary care physicians in the neighboring area of the emergency department. LOS is used to assess hospital ED costs and effectiveness and is made use of several methods to forecast [8]. Accurate forecasting of patient LOS enables ED management right resource allocation and efficient utilization of the department resources. In [9], it is emphasized that forecasting and determining LOS in hospitals can be very useful for hospital management, particularly for prioritizing health care policies and promoting health services, comprising the appropriate allocation of health care resources according to differences in patients’ LOS along with considering patients’ health status and socialdemographic features. Therefore, we aim to forecast patient LOS using Artificial Neural Network (ANN) within the input factors that are predictive such as patient age, sex, mode of arrival, treatment unit, medical tests and inspection in an emergency department.

2. Literature review

Limited number of studies related to the forecasting of LOS are available in the literature. The studies use various methods to forecast including such as ANNs, linear regression and logistic regression. Li et al. [8] propose a data mining approach based on Back- Propagation (BP) neural networks to construct a LOS prediction model. They analyze 921 cholecystitis patients data of a Chinese hospital treated between 2003 and 2007. The model constructed provides approximately 80% accuracy and reveal 5 LOS predictors: days before operation, wound grade, operation approach, charge type and number of admissions. Wrenn et al. [10] estimate patient's length of stay in the ED with an ANN. They develop an ANN using the software Stuttgart Neural Network Simulator using patient variables such as age, acuity level, coded ICD-9 chief complaint, language, order for a consult service, presence of at least one laboratory exam, and presence of at least one radiology exam. They also use operational variables

By the conclusion of the study they point out that ANNs have the potential to be a powerful tool for the analysis of complex medical system data like EDs. Xu et al. [1] use a data-driven method to identify variables correlated with the daily arrivals of the non-critical patients and model this association using ANNs. They compare the ANN modeling with the non linear least square regression (NLLSR) and multiple linear regression (MLR) in terms of mean average percentage error (MAPE). In this study, we apply a data mining approach ANN to forecast ED patient LOS. The constructed model can be used to provide insights to ED medical staff (doctors, nurses etc.) determining patient LOS. The study contributes to the literature with some aspects. First, it proposes an ANN-based forecast model considering new predictors such as mode of arrival, door-to-doctor time apart from similar studies in the literature. Second, it uses a real data of a leading university hospital ED in Turkey and the model performed in this ED is the first attempt in order to forecast LOS.

3. Material and method

In this section, the model data, ANNs as the modeling technique and constructed ANN model considering ED LOS forecasts are introduced in sub-sections, respectively.

3.1. Data

The data is obtained from a regional university hospital emergency department in eastern part of Turkey that serves approximately an average of 40.000 patients per year. We collect a total data of 1500 ED patients who were treated in the department in October and November, 2010. We provide the related data by the aid of hospital information management system, medical staff opinion and manual data collecting forms. The variables used for generating ANN model are categorical and numeric. The statistical results for numeric and categorical variable types are presented in Tables 1-2. “Number of tests” represents the number of tests that patients take during their hospitalization in the emergency department. Most of the patients take one test. “Doorto- doctor time” represents the time between registration and first treatment area by a doctor. It especially takes 4 minutes. “ED LOS” is our output variable (dependent variable). It is generally considered as the time that passes from the patient’s time of arrival at the emergency department until time of discharge or transfer to another department of the hospital. In Table 2, patient mode of arrival express the patient type of arrival at the emergency department. A patient who comes on foot, by his/her special car or on a stretcher refers to walk-in patient. A patient who moves into the ED via an ambulance vehicle (car, helicopter etc.) refers to ambulance patient. Treatment areas consist of five different areas where patients are sent by their acuity level.

Table 1. Statistical results of numeric variables.
Table 2. Statistical results of categorical variables.

While, critical patients are sent to the beds with monitors (monitor beds area), non-critical patients who have minor injuries, headache, stomach ache etc. are sent to Emergency-1 and Emergency-2 rooms. Patients who had an accident and had major injures are rapidly placed under observation in resuscitation area. Patients who have infectious diseases are placed in a room called emergency response room.

3.2. Artificial Neural Networks

Artificial Neural Networks (ANNs), which are generally called as “neural networks” or “neural nets”, attempt to reproduce the computational processes taking place in the central nervous system (CNS) by using a set of highly interconnected processing elements [1]. An ANN model, which is formed of n layers, presents a different number of computational elements that function like biological neurons and intensive connections between these computational elements among layers. The computational elements used in various ANN models are named as artificial neurons or process elements [12, 13]. The first layer which is called as the “input” layer and the last one which is called as the “output” layer are used to get information from inside and outside the network, respectively. The middle layers which are generally called as “hidden” layers are essential to the network in order to be able to convert certain input patterns into appropriate output patterns [1]. ANNs are applied to several practices such as forecasting. For ED operations, ANNs are frequently applied to forecast ED patient arrivals [1], ED LOS [8,10], ED patient admission process [7], etc [4].

3.3. Empirical Study

We prefer to use professional neural network-based software Alyuda Neurolntelligence®. We follow a study process including the steps as here: (1) data collection, (2) data preparation, (3) correlation analysis on the variables and (4) modelling by ANN. After the data entry to the software, the system randomly selects 68% of the data as training sets, 16% of the data as validation sets and 16% of the data as test sets. The software has an automatic architecture search module which selects [33-27-1] architecture for training (see Figure 1).

Figure 1.
figure 1

Selection of the best network.

This means that the system selects a single hidden layer as well as 27 hidden neurons. We make a correlation analysis before developing an alternative ANN model. The alternative model includes factors that have a strong correlation with the independent variable LOS. The correlation analysis is performed by Minitab® 17.1.0 with a significance level (α) of 0.05. We calculate the correlation coefficient for every variable (numeric and categorical) with LOS. The results are given in Table 3. We divide the significance into three correlation strengths as in [8]: strong (1-p>0.95), medium (0.90<1-p<0.95) and weak (1-p<0.90), where p is the test probability value.

Table 3. Correlation of all the variables.

4. Results and discussion

We use an initial learning rate of 0.1 and a momentum of 0.1. We try alternative values for both the learning rate and momentums of (0.1), (0.2), (0.4) and (0.6) along with various learning algorithms such as Quick Propagation, Quasi-Newton, Online-Back Propagation and Levenberg-Marquardt. We run all the models within a cycle of 500 iterations. We try 64 various models in total and obtain the best value with the lowest absolute error (Table 4). The scatter plot related to the target, output values of the ANN model and a comparison of actual and output values of the model have been acquired by means of the software (as shown in figure 2).

Table 4. The best network and parameters.
Figure 2.
figure 2figure 2

(a)Visualization of actual vs. output and (b) scatter plot of the ANN model.

To obtain an alternative ANN model, we exclude the variables that have little affects (variables with weak or medium correlation) on LOS. Therefore we run the new model with all the variables except gender, oncall physician, prothrombin time test and door-todoctor time. The performance of the new model is shown in Table 5. We could see that the accuracy of the models are nearly similar.

Table 5. The best network and parameters (alternative model).

5. Conclusion

This study presents an ED LOS forecasting model using ANNs. We benefit a collected data of 1500 ED patients and identify several variables. While some of them are categorical variables such as gender, mode of arrival, on-call physician, treatment area and taking some tests, the remaining are numerical variables such as number of tests and door-to-doctor time. In the study, we propose two ANN-based models by a base model that includes all variables and an alternative model that takes into consider all the variables except variables with weak or medium correlation on LOS. Each of the models did not give an ideal prediction accuracy that is generally expected to be better than 80% in forecasting. The reason of this is considered to be originated from the selection of insufficient or inaccurate input variables. For future directions, other forecasting techniques such as MLR, logistic regression and support vector machine (SVM) can be used and compared the current results.

6. Acknowledgement

We thank to Dr. Mustafa Yıldız, the head of the department of the emergency medicine at Fırat University Hospital. And we also owe doctors and nurses work by all three shifts a debt of gratitude for helps on getting access data.