Document Type : Original Article


Department of Industrial Engineering, Tarbiat Modares University, Tehran, IR Iran


Background: Length of stay is one of the most important indicators in assessing hospital performance. A shorter stay can reduce the costs per discharge and shift care from inpatient to less expensive post-acute settings. It can lead to a greater readmission rate, better resource management, and more efficient services.
Objective: This study aimed to identify the factors influencing length of hospital stay and predict length of stay in the general surgery department.
Methods: In this study, patient information was collected from 327 records in the surgery department of Shariati Hospital using data mining techniques to determine factors influencing length of stay and to predict length of stay using three algorithms, namely decision tree, Naïve Bayes, and k-nearest neighbor algorithms. The data was split into a training data set and a test data set, and a model was built for the training data. A confusion matrix was obtained to calculate accuracy.
Results: Four factors presented: surgery type (hemorrhoid), average number of visits per day, number of trials, and number of days of hospitalization before surgery; the most important of these factors was length of stay. The overall accuracy of the decision tree was 88.9% for the training data set.
Conclusions: This study determined that all three algorithms can predict length of stay, but the decision tree performs the best.


  1. Yaghoubi M, Karimi S, Ketabi S, Javadi M. Factors affecting patients' length of stay in Alzahra hospital based on hierarchical analysis technique. Health Inf Manage. 2011;8(3):326-34.
  2. Lim A, Tongkumchum P. Methods for analyzing hospital length of stay with application to inpatients dying in Southern Thailand. Glob J Health Sci. 2009;1(1):27. [DOI]
  3. Jack W. Principles of health economics for developing countries: World Bank Publications; 1999.
  4. Hachesu PR, Ahmadi M, Alizadeh S, Sadoughi F. Use of data mining techniques to determine and predict length of stay of cardiac patients. Healthc Inform Res. 2013;19(2):121-9. [DOI]
  5. Robinson GH, Davis LE, Leifer RP. Prediction of hospital length of stay. Health Serv Res. 1966;1(3):287.
  6. Arab M, Zarei A, Rahimi A, Rezaiean F, Akbari F. Analysis of factors affecting length of stay in public hospitals in Lorestan Province, Iran. Hakim Res J. 2010;12(4):27-32.
  7. Lobato LFdC, Ferreira PCA, Wick EC, Kiran RP, Remzi FH, Kalady MF, et al. Risk factors for prolonged length of stay after colorectal surgery. J Coloproctol. 2013;33(1):22-7. [DOI]
  8. Hosseni AF, Gohari MR. Application of multilevel model in determining the effective factors in the length of stay among appendectomy patients. Razi J Medl Sci. 2014;20(115):70-7.
  9. Huang JQ, Hooper PM, Marrie TJ. Factors associated with length of stay in hospital for suspected community-acquired pneumonia. Can Respir J. 2006;13(6):317. [DOI]
  10. Holland LL, Smith LL, Blick KE. Reducing laboratory turnaround time outliers can reduce emergency department patient length of stay. Am J Clin Pathol. 2005;124(5):672-4. [DOI]
  11. Xiao J, Douglas D, Lee AH, Vemuri SR. A Delphi evaluation of the factors influencing length of stay in Australian hospitals. Int J Health Plann Manage. 1997;12(3):207-18. [DOI]
  12. Bahrami N, Soleimani MA, Shraif Nia SH, Shaigan H, Masoodi R, Ranjbar H. Predicted duration of hospital stay and percentage of mortality in patients intensive care unit with APACHE IV. Urmia Med J. 2012;23(5):466-70.
  13. Rowan M, Ryan T, Hegarty F, O’Hare N. The use of artificial neural networks to stratify the length of stay of cardiac patients based on preoperative and initial postoperative factors. Artif Intell Med. 2007;40(3):211-21. [DOI]
  14. Li J-S, Tian Y, Liu Y-F, Shu T, Liang M-H. Applying a BP neural network model to predict the length of hospital stay.  Health Information Science: Springer; 2013. p. 18-29.
  15. Liu P, Lei L, Yin J, Zhang W, Naijun W, El-Darzi E. Healthcare data mining: predicting inpatient length of stay. 2006.
  16. Hagar Fady S, Taha E-ST, Mervat Mahmoud M. Applying Data Mining Technique for Predicting Incubator Length of Stay in Egypt and USA. Int J Comput Appl. 2013;71(8):21-8.
  17. Tanuja S, Acharya DU, Shailesh K. Comparison of different data mining techniques to predict hospital length of stay. J Pharm Biomed Sci. 2011;7(7).
  18. Gómez V, Abásolo JE. Using data mining to describe long hospital stays. Paradigma. 2009;3(1):1-10.
  19. Khalilinezhad M, Minaee Bidgoli B, editors. Clinical data mining. Proceeding of the 3rd Iran Data Mining Conference; 2010.
  20. Obenshain MK. Application of data mining techniques to healthcare data. Infect Control Hosp Epidemiol. 2004;25(08):690-5. [DOI]
  21. Liu P, El-Darzi E, Vasilakis C, Chountas P, Huang W, Lei L. Comparative analysis of data mining algorithms for predicting inpatient length of stay. PACIS 2004 Proceedings. 2004:86.
  22. Kaya E, Findik O, Babaoglu I, Arslan A. Effect of discretization method on the diagnosis of Parkinson’s disease. Int J Innov Comp Inf Control. 2011;7:4669-78.
  23. Bellazzi R, Zupan B. Predictive data mining in clinical medicine: current issues and guidelines. Int J Med Inform. 2008;77(2):81-97. [DOI]