This study aims to investigate the effective environmental factors of hospital rooms in patients' recovery through data mining techniques. Previous studies have shown the positive effect of the interior environment of the hospitals on patients' recovery. The methods of these studies were mainly based on the evidence and patients' perception while hospital environments are associated with a large amount of data that make them an appropriate case for data mining studies. But data mining studies in hospitals mainly focused on medical and management purposes rather than evaluating the interior environment condition. We analyzed the hospital information system data of a hospital using Python programming language and some of its libraries. Preprocessing and eliminating the outliers, labeling and clustering of diseases, data visualization and analysis, final evaluation, and concluding were done using the knowledge discovery in databases process. Pearson coefficient value for rooms' area was .5 and, respectively, for the distance from the ward entrance and nursing station were .75 and .70. The χ2 values for the variables of room types, location, and occupation were 24.62, 18.98, and 21.53, respectively, and for the beds' location was 0.12. The results confirmed the correlation of the length of stay with the room types, location, and occupation, distance from the nursing station and ward entrance and also showed a moderate correlation with the rooms' area. However, no evidence was found about the relationship between the beds' location in rooms and patients' length of hospital stay.