The length of hospital stay (LOS) is a significant indicator of the quality of patient care, hospital efficiency, and operational resilience. Considering the importance of LOS in hospital resource management, this research aims to improve the accuracy of LOS prediction using hyperparameter optimization (HPO). Expert physicians and related studies were reviewed to determine the variables affecting LOS. The electronic medical records of 200 patients in the department of internal medicine of a hospital in Iran were collected randomly. As the performance of machine learning (ML) models can vary based on the characteristics of the features, several models were applied and evaluated in this study. In particular, k‐nearest neighbors (KNN), multivariate regression, decision tree (DT), random forest (RF), artificial neural network (ANN), and XGBoost have been evaluated and improved. The genetic algorithm (GA) was applied to optimize the tree‐based models. In addition, the dummy coding technique, sometimes called the One‐Hot encoding, was used to encode categorical features to increase prediction accuracy. Compared with other algorithms, the XGBoost model optimized by GA (XGB_GA) achieved higher accuracy and better prediction performance. The mean and median of absolute errors in the test dataset for this model were 1.54 and 1.14 days, respectively. In other words, the XGB_GA model reduced the mean absolute error by 37%, which is beneficial in the reliable design of a clinical decision support system.
The COVID-19 epidemic has spread across the world within months and creates multiple challenges for healthcare providers. Patients with cardiovascular disease represent a vulnerable population when suffering from COVID-19. Most hospitals have been facing difficulties in the treatment of COVID-19 patients, and there is a need to minimise patient flow time so that staff health is less endangered, and more patients can be treated. This article shows how to use simulation techniques to prepare hospitals for a virus outbreak. The initial simulation of the current processes of the heart clinic first identified the bottlenecks. It confirmed that the current workflow is not optimal for COVID-19 patients; therefore, to reduce waiting time, three optimisation scenarios are proposed. In the best situation, the discrete-event simulation of the second scenario led to a 62.3% reduction in patient waiting time. This is one of the few studies that show how hospitals can use workflow modelling using timed coloured Petri nets to manage healthcare systems in practice. This technique would be valuable in these challenging times as the health of staff, and other patients are at risk from the nosocomial transmission.