## 4 The Proposed Real-Time Monitoring System
### Proposed Encoding-Based Machine Learning Model
Thus, the proposed encoding-based model will forward this to Case#0. As can be found from Figure 5(b), the condition is false because the RS is not equal to 3 and also none of the two inputs of the first OR gate is true. Hence, because the condition is false, then the status stored at location 0 is read from LUT3, which is stable. Notice that LUT3 and LUT4 store two states of status for each condition. This is due to the status of a patient rarely being a combination of stable or unstable critical at the same time; instead the possible combinations are (stable or unstable non-critical) and (unstable non-critical or unstable critical). This is mainly attributed to the state transition of a patient's condition at any moment commonly moving from stable to unstable non-critical as it has to go through the state transition diagram, as illustrated in Figure 1, where the dashed line indicates the condition rarely happens. Person3: the calculated values are RS = 1 and VS = 12, and thus Case#12 is selected and is depicted in Figure 5(c). As can be seen, both comparisons must be true to drive the output condition to be true. Therefore, the condition is false and the status is classified according to the state stored in LUT3. From Figure 6, it can be noticed that the risk factor score has been involved in the processing of all case structures as a second factor. This is due to the fact that the medical information of a cardiac patient is correlated and dealing with it in a general processing method can lead to misclassifying the required medical therapy. Therefore, RS is encoded in all case statements to assist in breaking down the correlation, thereby increasing the correct prediction and thus improving the model's overall accuracy. \begin{table}
\begin{tabular}{c c c c} \hline \multicolumn{2}{c}{**Switch Case (VS)**} & \multicolumn{2}{c}{**Condition?**} \\
**Vital Score** & **Case \#** & **False (LUT3)** & **True (LUT4)** \\ \hline \hline
14 & Case 14 & Non-Critical (ER) & Critical (ICU) \\ \hline
15 & Case 15 & Non-Critical (ER) & Critical (ICU) \\ \hline
16,17 & Case 16,17 & Non-Critical (ER) & Critical (ICU) \\ \hline
18,19 & Case 18,19 & Non-Critical (ER) & Critical (ICU) \\ \hline
20 & Case 20 & Non-Critical (ER) & Critical (ICU) \\ \hline
21 & Case 21 & Non-Critical (ER) & Critical (ICU) \\ \hline
22 & Case 22 & Non-Critical (ER) & Critical (ICU) \\ \hline
23 & Case 23 & Non-Critical (ER) & Critical (ICU) \\ \hline
24 & Case 24 & Non-Critical (ER) & Critical (ICU) \\ \hline
25 & Case 25 & Non-Critical (ER) & Critical (ICU) \\ \hline
26 & Case 26 & Non-Critical (ER) & Critical (ICU) \\ \hline
27 & Case 27 & Non-Critical (ER) & Critical (ICU) \\ \hline
28 & Case 28 & Non-Critical (ER) & Critical (ICU) \\ \hline
29 & Case 29 & Non-Critical (ER) & Critical (ICU) \\ \hline
30 & Case 30 & Non-Critical (ER) & Critical (ICU) \\ \hline
31 & Case 31 & Non-Critical (ER) & Critical (ICU) \\ \hline \hline \end{tabular}
\end{table} 
Table 6: _Cont._Notice that the considered observations (patients 1,2, and 3) in the case study are new data samples and the proposed approach did not see these samples in the training and testing, which confirms the model's self-learning ability to provide correct predictions for unseen data samples. Consequently, the proposed model can help medical doctors to be more confident about the decisions they make to provide exact medical therapy for cardiac patients. As depicted in Figure 1, earlier precise decision-making would strongly assist in preventing further complications that might lead to mortality. Furthermore, the proposed monitoring system can be applied to deliver seamless cardiac patient observation. For example, the status of a patient may move from unstable non-critical to unstable critical, and therefore, quick medical therapy becomes urgent to return the patient's status to uncritical and then stable. Hence, approaches that deliver reliable and timely decision-making have been sought to accurately handle heart problems.