Abstract:
In our country, the patient density of emergency departments, where hospitals provide emergency health services, is increasing day by day with the increasing population and increasing epidemic disease types. Looking at the complaints and doctor's comments of patients applying to emergency services; Only patients with urgent conditions do not apply to the emergency department. Patients who need to go to outpatient clinics for diagnosis and treatment are also admitted to emergency departments. All these situations increase the patient density and therefore crowding in emergency departments. It is not possible for all patients applying to emergency departments to receive emergency health care at the same time. While patients in critical condition should receive service immediately, patients whose condition is not life-threatening should be classified differently. For this reason, patients need to be prioritized and classified according to their health status. This classification is called triage in medical language. Triage practices in emergency departments are an integral part of hospital health services. The purpose of triage is the aim is to decide on triage areas and provide necessary guidance based on the health status of patients applying to the emergency department. In this way, the efficiency of emergency health care and the efficiency of the processes increase. At the same time, the resources of the hospital are used effectively; waiting and service times are shortened. Triage is also an important practice to determine the care priority of patients. It aims to have the right patient in the right place at the right time. Due to the high number of patients applying to the emergency department, many critically ill patients in the emergency department are at risk of experiencing poor health outcomes due to the delay in triage decisions. For this reason, it is very important to decide which patient should be seen first. Triage systems are used to decide on the order of treatment and determine urgency situations when a large number of patients apply. Inconsistent triage decisions or misclassifications lead to an increase in the occurrence and incidence of patient deaths. High triage accuracy leads to better quality emergency services. While there was only one standard used when the concept of triage emerged, the number of triage standards has constantly improved and increased over time. When we look around the world, it can be seen that there are different triage systems with three levels, four levels and five levels. In our country, there is a triage system divided into sections, including red, yellow and green main areas. The aim of the study is to train machine learning classification algorithms with real data from real life, create a triage area prediction model and hospitalization-discharge prediction model, and compare the performance of the classification algorithms used by taking into account the prediction results obtained after testing these models with test data. In addition, with the machine learning models obtained, it is aimed to be a solution light for real-life problems. In this study, data such as age, gender, vital signs, disease complaints, previous or current diseases, mode of arrival to the emergency department, Glasgow coma scales were used, and data were collected manually from patients who applied to the Emergency Medicine Clinic of Kartal Dr. Lütfü Kırdar City Hospital. In this study, we wanted to work with real triage data obtained from the emergency departments of hospitals in Turkey. For this purpose, the Emergency Medicine Clinic of Kartal Dr. Lütfü Kırdar City Hospital was contacted. Before starting the study, ethics committee approval was obtained from Sakarya University and head doctor approval was obtained from the hospital. The dataset includes patients older than 18 years of age admitted to hospital between January and April 2023. Cases directly related to pregnancy are not included in the dataset. The data collection period covers January-September 2023. In the study, 56 types of input information from a total of 3,000 patients were used and 2 different prediction studies were conducted. Firstly, the triage area classifications of the patients were predicted as green, yellow, red; and secondly, the hospitalization-discharge status, that is, whether the patients will be directly discharged or hospitalized after receiving health services, was predicted. These data collected for prediction studies were divided into two parts, 80% training data and 20% test data. With the training data, 12 trained models were obtained with machine learning classification algorithms. In the study, decision tree algorithm with gini and entropy criteria, linear support vector machine algorithm, nonlinear support vector machine algorithm with RBF-poly-sigmoid kernels, naive bayes algorithm, logistic regression algorithm, k-nearest neighbor algorithm with manhattan and minkowski distance, random forest algorithm with gini and entropy criteria were used. Confusion matrices were obtained by performing prediction studies with models trained with test data. Confusion matrices and performance measures of accuracy, precision, recall, F score and AUCROC values were calculated. Then, k-fold cross-validation was performed for both prediction studies. Cross-validated model building enables the development of machine learning applications that work with high accuracy or performance. Different cross-validation techniques make it possible to predict the performance of a model without compromising the test split, eliminating problems that can be caused by an unbalanced data split. In this way, classification processes provide more consistent results. All these results are firstly compared within their own prediction study and then the results obtained from the two prediction studies are evaluated together. As a result of the evaluations, in the triage area prediction study; The highest AUROC value of 97.79% was obtained with the decision tree-entropy algorithm, and the highest accuracy rate of 96% was obtained with the random forest and entropy algorithms. In triage area classification, the highest accuracy rate of 97.05% was obtained with the decision tree-gini algorithm through the k-fold cross-validation process. In the hospitalization-discharge prediction study; The highest AUROC value of 68.26% was obtained with the random forest-gini algorithm and the highest accuracy rate of 90.8% was obtained with the random forest-gini algorithms. In the classification of hospitalization-discharge status, the highest accuracy rate of 89.12% was obtained with the random forest-gini algorithm with k-fold cross-validation. It was observed that high performance rates could be achieved in triage area classification with the decision tree algorithm, and the highest values were obtained in hospitalization-discharge status prediction with the random forest-gini algorithm. As a result, if machine learning algorithms are used in the triage process, successful triages can be performed that can increase efficiency with high performance rates. By using machine learning algorithms in triage processes; it is predicted that better quality triage classification can be made, emergency service processes can be carried out more efficiently, hospital resources can be used more efficiently and planned, waiting times of patients can be reduced, and patient satisfaction can be increased. With the hospitalization prediction study, it is predicted that the doctors will know whether the patient who applies to the emergency service will be hospitalized or discharged before the patient is admitted to the emergency service, and according to this density, it is predicted that the planning of beds, medicines, health equipment, all the resources and doctors will be more accurate and more efficient.