# Decision Support Software for Forecasting Patient's Length of Stay
## 3 Research Methodology
### Two-Level Classifier  
In the sequel, we introduce our proposed two-level classification scheme for the prediction of hospitalized patients' LoS. It is worth mentioning, that two-level classification schemes are heuristic pattern recognition tools that are anticipated to yield better classification accuracy than single-level ones at the expense of a certain complication of the classification structure [20; 21; 22; 23]. To the best of our knowledge, in the literature there has not been proposed any similar approach for the prediction of LoS while all proposed prediction models are single-level classifiers based on several classification algorithms (see [13; 14; 15; 16; 17]).  
On the first level of our classification scheme, we use a classifier to distinguish the patients which are likely to stay in hospital between \"1-2\" days \"3-5\" days or \"5+\" days. In the rest of this work, we refer to this classifier as A-level classifier. In case the verdict (or prediction) of the A-level classifier is \"1-2\" days or \"3-5\" days, we use a second-level classifier to conduct a more specialized decision. More specifically, in case the prediction is \"1-2\" days, we use a classifier to distinguish between \"1\" and \"2\" days. This classifier is referred as B\({}_{1}\)-level classifier. Similarly, in case the prediction is \"3-5\" days, we use a classifier to distinguish between \"3\", \"4\" and \"5\" days, which is referred as B\({}_{2}\)-level classifier. An overview of our two-level classification scheme is depicted in Figure 2.  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Attribute** & **Values** \\ \hline Gender & male, female \\ Age & 65–74, 75–84, \textgreater{}85 \\ Insurance type & IKA, OGA, TAYT, NAT, private, uninsured, indigent, other, \\ \hline Residence altitude & 0–100, 100–300, \textgreater{}300 (m). \\ Residence urbanity & urban, semi-urban, rural. \\ Residence distance from hospital & 0–15, 15–30, 30–45, \textgreater{}45 (km) \\ Residence medical cover type & hospital, regional clinic, rural clinic. \\ \hline Patient’s day of admission & Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday. \\ Patient’s month of admission & January, February, March, April, May, June, July, August, September, October, November, December. \\ ICD-10 diagnosis code & A00–B99, C00–D48, D50–D89, E00–E90, F00–F99, G00–G99, H00–H59, H60–H95, I60–H95, I00–I99, J00–J99, K00–K93, L00–L99, M00–M99, N00–N99, Q00–Q99, R00–R99, S00–T98, V01–Y98, Z00–Z99, other. \\ Ward of nursing & cardiology, general surgery, orthopedics, internal medicine. \\ Number of admissions in a ward & \(1,2,\ldots,100\). \\ \hline Class & _“1”, “2”, “3”, “4”, “5”, “5+”_ \\ \hline \hline \end{tabular}
\end{table}
Table 1: Attributes description.  
Figure 1: Class distribution showing the imbalance of the dataset.  
It should be noted that the rationale behind the selection of the LoS classes to model the stages of a patient's hospitalization lies in clinical and management criteria (see [19; 24]). More specifically, the first category (1-2 days) includes acute care patients that only stay in hospital for a short period of time; the second category (3-5 days) includes patients who undergo a short period of rehabilitation or recovering from routine surgery; while the third category (5+ days) refers to the patients who are hospitalized for a long period of time due to more complicated health problems.