Rehabilitation and Home Health Monitoring Based-AI Scheduling Application for Coronary Artery Disease and Cardiovascular Patients

ABSTRACT


INTRODUCTION
The recent Severe Acute Respiratory Syndrome Coronavirus 2 (SARS-CoV-2) also known as the COVID 19 pandemic, has a major impact on to our society due to the threats to our health.In many ways, it has changed our lifestyle.The World Health Organization (WHO) had declared that the COVID-19 is a Public Health Emergency of International Concern (PHEIC) in January 2020 when the virus began to spread and transmit dramatically around the world [1].Wellmonitored and scheduled rehabilitation activities is necessary for post-COVID complications and comorbidities.Although most individuals with COVID-19 get way better within weeks of ailment, a few individuals still encounter severe post-COVID conditions and 'Silent Hypoxia'.Individuals commonly encounter distinctive combinations of post-COVID symptoms such as difficulty in breathing, critical heart palpitations, worst sleep quality, dizziness on standing, etc. [2].Silent hypoxia is a condition where patients have an extremely low oxygen level but do not show any symptoms of breathlessness.Hypoxemia, low blood oxygen level (SpO2) has become one of the predominant features interacting with COVID-19 which is caused by the deficiency in tissue oxygenation.Most of the COVID-19 patients suffering from moderate to severe hypoxemia were lacking compensatory mechanisms such as dyspnea or pure hypoventilation which generally originated and induced by the hypoxia.This phenomenon and experience are known as 'silent hypoxia' [3].A meta-analysis of studies on the presence of post-COVID symptoms was recently published.This systematic review and meta-analysis noticed and discovered that 80% of the SARS-CoV-2 infected patients experience one or more symptoms including dyspnea, fatigue, headache, attention disorder, hair loss, etc. [4].Another meta-analysis pooling and collecting the prevalence data of post-COVID symptoms in hospitalized and non-hospitalized post-COVID patients.The meta-analysis illustrates that both hospitalized and non-hospitalized patients experienced the most including dyspnea and fatigue.Continue with the rest prevalence symptoms including headache, sleep issues, chest pain, joint pain, palpitations, etc. [5,6].It is important to provide visibility of post-COVID complications health data to their trusted partner or family members, enabling emergency respiratory support, important alert, and real-time monitoring from partners.
Previously, one study showed the analysis of post-COVID syndrome patients with Cardio coronary artery disease exercise testing (CPET), an exercise test that measures individual exercise ability by referring to a VO2 (oxygen consumption test).Lower probability and chances of hitting the anaerobic threshold for post-COVID syndrome patients which results in less peak VO2 compared to the patients with a history of COVID-19 but not present with the post-COVID syndrome [7][8][9].Rehabilitation programs such as coronary artery disease rehabilitation and moderate exercises have proven to have significant improvements and recovery in post-COVID patients by improving the strength of respiratory function and reducing severe complications [10,11].Study shows that regular physical exercise can improve the aerobic power and indicators of coronary artery disease capacity for elderly and respiratory diseases patients in terms of blood oxygenation (SaO2), maximum oxygen consumption (VO2 max), and maximum walking distance (MWD) [12].
Nowadays, smart wearable technologies enable the interaction and derivation of individual health metrics including heart rate, blood oxygen saturation (SpO2), body temperature, individual physical conditions, etc.Most of the smart wearables are integrated with complex metrics analysis tools such as sleep conditions, stress level, and maximum rate of oxygen consumption (VO2 max) even with nutrition dietary analysis [13][14][15].Lim et al. [16] implemented a system with an edge AI reporting & flagging system mainly to check the visibility of a person to ensure the decrement of non-adherence rates during the past Covid-19 pandemic.The health parameters such as heart rate and SpO2 has been obtained by the developed smart wearable and sent to the centralized database for the authority for manual periodic checking propose.It is crucial to check periodically for all these vital signs, especially for the individual with post-COVID syndrome or the elderly that suffering from cardiovascular related diseases to prevent the unexpected condition from occurring.Hence, secure real-time health data sharing whenever during the rehabilitation workout or resting is necessary for them

REVIEW OF RECENT SYSTEM
Today, a multitude of health applications populate the market, each offering a range of features and functionalities.These applications cater to various aspects of health tracking, encompassing the monitoring of physical activity, nutrition, medical conditions, and access to health-related information.Unlike many others, this application is not exclusively tailored to the improvement protocol or include any artificial intelligent algorithm for coronary artery disease diseases; rather, it offers a versatile scheme suitable for all users.Below, a comparative analysis of similar and recent products available in the market is presented through a comparison matrix chart, depicted in Figure 1.The newly released Apple Health in iOS 15 promotes the ability and functionality of health data sharing with family and their loved ones.With the existing smart wearable line product from Apple, the Apple Watch, and the iPhone, users now have permission to view and share important health information including heart rate, detected falls, hours of sleep, or exercise minutes with friends and family with Apple data privacy control.The sharing users are able to follow the important changes in health data and get instant alerts and communication with the respective user.The Apple Health using an AI algorithm for the Electrocardiograms (ECG) to determine either the users have a sinus rhythm, Atrial Fibrillation or inconclusive beating pattern.Figure 2 shows the iOS 15 secure sharing feature in Apple Health.• Health Sharing: Provide capability and connection with your trusted partners or family members to share your important health data, activity data, mobility, and trends that obtain from the iPhone and Apple Watch.
• Walking Steadiness: Using iPhone built-in motion sensors and AI algorithms to analyse and assess the stability, balance, and coordination of the individual walking steadiness.
• AI Electrocardiograms (ECG): Using an AI algorithm to predict the heart beating pattern based on the electrocardiograms.

Product weaknesses:
• Limited Health Data Sharing Option: The health data option for alerting in family sharing is currently only available for High and Low Heart Rates, Irregular Rhythm, and Cardio Fitness.
• No Rehabilitation or Heath Data Analysis Feature that is specific for pulmonary or cardiovascular patients.

Fitbit: Health and fitness
Fitbit is one of the world's leading application manufacturers mainly on health and fitness.With the integration of the Fitbit Smartwatch and other fitness products, the app is able to track and manage various of health metrics including 24/7 Heart Rate Tracking, breathing rate, oxygen saturation (SpO2), skin temperature, heart rate variability, and resting heart rate.Fitbit: Health & Fitness provides an advanced sleep analysis including a sleep goal setting, sleep score, and graphs analysis that show time in light, deep and REM sleep.Fitbit is associated with the Fitbit Community and provides a dynamic social experience, sharing and discussing questions regarding fitness, nutrition, and wellness.The Fitness Community promotes step counts compared within your friend added to show your motivation and achievements.Figure 3 shows Fitbit: Health & Fitness.• Heath matrics analysis: Advance AI analysis and tracking of the health data including 24/7 Heart Rate Tracking, breathing rate, oxygen saturation (SpO2), skin temperature, heart rate variability, and resting heart rate from the Fitbit Smart wearable and fitness products.
• Fitbit Community: Stay connected with friends, join groups, and participate in fitness challenges to keep motivation and wellness discussion.

Product weaknesses:
• No emergency smart alerting based on abnormal health data in Fitbit Community.
• Fitbit Community sharing limited health data only: calorie intake, sleep, steps, basic heart rate, etc. while not including data analysis results for blood oxygen saturation (SpO2).

My mhealth
My mhealth is a complete solution for rehabilitation for patients who have long-term conditions including Asthma, Chronic obstructive coronary artery disease (COPD), diabetes, and heart disease.This application provides evidence-based and certified rehabilitation solutions for different illnesses as shown in Figure 4.The sub-solutions with various target patients including myAsthma (self-management for Asthma control), myCOPD (offer evidence-based inhaler video and online coronary artery disease rehabilitation courses), myDiabetes (comprehensive and user-friendly interface for monitoring blood glucose, HbA1C, and other risk factors to control severe Diabetes complications and myHeart (integrating with cardiac rehabilitation educational videos for patients and users).

Product weaknesses:
• Manually health data input for analysis: The health data is not obtained from any equipment or smart wearable devices technology will lead to inaccuracy or human error.
• No family sharing or grouping features for group monitoring and real-time alerting.
• No appropriate or Artificial Intelligence Scheduling system for rehabilitation courses.

SIGNIFICANCE OF STUDY
In this study, an AI cardiovascular fitness test has been developed utilizing data from the National Health and Nutrition Examination Survey (NHANES).The development includes the integration of scientific algorithms for both the 6minute walk test and treadmill test, sourced from guidelines provided by the Centers for Disease Control and Prevention (CDC).Additionally, a novel configuration for a home health monitoring and rehabilitation-based AI scheduling system is proposed namely ORCUS (Organize and Focus on Rehabilitation), specifically designed for long-COVID and coronary artery disease patients.Following a comprehensive review of existing systems, this study aims to address identified weaknesses and enhance functionalities.Particularly, the focus will be on augmenting the system's capabilities to support coronary artery disease (CAD) patients in returning to their normal levels of physical activity effectively.This study has relied on the CDC protocol, guidance from rehab therapist, cardiologist, and medical expertise to develop a robust medical-based application.The aim is to create a reliable platform that CAD patients can utilize safely, without encountering any adverse incidents, while also facilitating improvements in their condition.

METHODOLOGY
In order to accomplish our work and study objectives, we have well designed the rehabilitation process, which involves three distinct components: assessing the user's medical condition, implementing an AI cardiovascular fitness test, and analyzing the results to inform rehabilitation and improvement strategies.
The ORCUS application will assess the user's medical conditions by requesting demographic information such as gender, age, weight, height, and other parameters like medical conditions and physical activity level, as outlined in section 4.1.Users manually input these details into the ORCUS application.Following this, the application prompts the user to undergo a cardiovascular fitness test to gather heart rate data using the smart wearable.This data is then processed by a trained model to determine the user's physical activity fitness level and recommend an initial rehabilitation activity.Throughout the rehabilitation process, the system analyzes each performance and suggests an appropriate walking distance for subsequent activities.Users are motivated and experience psychological satisfaction as they work towards achieving the target distance and enhancing their fitness level.The comprehensive process flowchart for the ORCUS application is depicted in Figure 5.
The entire system consists of 2 parties involved, including the patients and the added partners.The system is proposed with a centralized approach, giving a full data interaction between these 2 parties.The system involves Bluetooth and Live Signal (Wi-Fi/Telco Data) to retrieve and transmit the data.The partners provide permission to control the tasks and data of the patients for more comprehensive interaction with the application.A No SQL Database (Firebase) is used as the main data processing medium for the application including the data interaction and Cloud Machine Learning processing.The system and the working principle of the interaction between the patients and added partners are shown in Figure 6.
This application was developed using the Android Studio as the main development platform.The design and interaction of data retrieval for the applications have been implemented with comprehensive techniques, including creating an updated recycler view section, push notification prompting to specific conditions, and data posting to the cloud host server (firebase) for data processing purpose.To enable the interaction of smart wearable with the smartphone, our work simulation devices must include Android devices.Figure 7 shows the application with its development platform.A custom trained model was performed to complete the AI Rehabilitation integration from cloud database (Firebase) to the edge devices (smartphone).A set of health data was obtained for custom model design and training.Various tests were conducted to observe and investigate the results accuracy and analysis.A Machine Learning Model that fit with our algorithm requirements were trained using TensorFlow and converted to TensorFlow lite format for Firebase Cloud Machine Learning.Lastly, a set of testing was conducted in the edge devices (smartphone) application by provide custom input (Health data).
To safeguard the privacy and security of users' health information, the system refrains from utilizing local databases stored on users' devices.Instead, it seamlessly integrates with a cloud database to store all collected health data.Prior to utilizing the app, users are prompted to grant permission for the collection of health data, specifically for AI prediction and processing purposes.

Assessing the user's medical condition
The proposed scientific rehabilitation application first will be obtaining several medical conditions to use for further process for both AI cardiovascular fitness test and rehabilitation.All the independent variable and dependent variable are measured using the correlation coefficient method to determine the strength of relationship between the variables.Table 1 shows the independent variables, or the variables measured (medical condition) will be obtained from the users.
The predicted oxygen uptake VO2 max is one of the crucial measurements to determine the exercise protocol for the initial cardiovascular fitness test as shown in Table 2. Figure 8 shows the flowchart for the process of obtaining the user's medical condition.The application will start obtaining all the parameters as stated above

•
Ever been told you have asthma.

•
Wheezing or whistling in chest -past year.

•
Coughing most days -over 3-month period

AI cardiovascular fitness test
After obtaining all the medical conditions from the users, the system continues with the AI cardiovascular fitness test.The cardiovascular fitness test comprises 5 stages including warming, stage 1, stage 2, recovery 1, and recovery 2 as shown in Figure 8. Traditionally cardiac disease treadmill test takes 10-12 minutes to complete the test, by combining the 6-minute walk and traditional treadmill test approach, the time taken variable has been fixed as 10 minutes for 5 stages test.The application has been implemented with smart wearable Health Kit to enable the application to utilize the health application programming interface (API) to obtain the health data such as heart rate and blood oxygen saturation in a certain time and save to user's database.A smart wearable is required in this stage to obtain the heart rate for every stages accurately.The heart rate will measure for every end of stages and store in the database as shown in Figure 9. Utilizing the trained model derived from the data collected in the National Health and Nutrition Examination Survey (NHANES), the system classifies the cardiovascular fitness test results into low, moderate, or high levels of intensity.This data encompasses various health data categories, including demographics (DEMO), body measures (BMX), blood pressure (BPX), medical conditions (MCQ), and physical activity (PAQ), obtained from NHANES questionnaires spanning different years.Preprocessing and merging of this data occur using STATA statistical software, filtering out independent and dependent variables as described in Section 4.1 Table 1.These variables are then utilized in the subsequent AI model-building process to determine suitable activity fitness levels for users.The heart rate data obtained from each stage of the cardiovascular fitness test is combined with these variables for model prediction.The model has undergone training using various machine learning algorithms to compare their accuracy and precision, enabling the selection of the most suitable AI model for determining user fitness levels.Figure 10 illustrates the results of the machine learning training conducted in Python.Subsequently, the model is packaged for the prediction process and deployed to the cloud platform using Python and Flask.
Upon to complete of the cardiovascular fitness test by the user, the smart wearable initiates the collection of heart rate data, which is then stored in the cloud, passing through the user's device.This storage serves the purpose of facilitating further data viewing and analysing improvements from the user's perspective.The data is subsequently collected from the cloud storage and processed for model prediction.Finally, the results are returned to the user and saved to the cloud.The overall process, spanning from data collection to model building and prediction, is outlined in Figure 11.
The model prediction result fall to two categories as shown in the Figure 12.If the decision falls in the low intensity, the system will recommend brisk walking for 10 minutes as the first rehabilitation for the user whereas if it falls in moderate intensity level, a 10-minute jogging is assigned for the user.The primary aim of this study is to facilitate the recovery of physical activity endurance for users affected by cardiovascular disease or COVID-19, to return them to normal levels.The proposed system will continuously provide rehabilitation activities for up to 2 months and a total of 56 activities.The endpoint selection for the system is priority based on the user's rating of perceived exertion (RPE) or the user's feedback, continuing with the improvement of oxygen uptake for current activity, and the achievement of the oxygen uptake by referring to the standard oxygen uptake for the specific age range, standard resting heart rate after the exercise, and achievement of target distance.Figure 13 shows the different scenarios for the next assignment selection or how the system changes the target distance of the rehabilitation.The system will manipulate the target distance to the most suitable level for the individual to conduct and let the user maximize their ability during the rehabilitation.The decisionmaking of the application is not only based on the user's rating of perceived exertion (RPE) as well on as the current oxygen uptake VO2 max by using the smart wearable to obtain a certain time point's heart rate value and calculate using the reference formula.During the data analysis stage, the current oxygen uptake is the most correlated to the cardiovascular fitness intensity.Hence, the manipulation of the target distance is more accurate by using current oxygen uptake as the primary variable.

RESULTS AND DISCUSSION
This section shows a detailed description and demonstration of the entire process involved in the development of the rehabilitation application for the AI Cardiovascular Fitness Test and the rehabilitation AI scheduling feature.The approach used to design and implement the application is discussed in detail to provide a clear understanding of the development process.The section also highlights the key features and functionalities of the application, including the AI-based cardiovascular fitness test and the rehabilitation scheduling feature, and the real-time partner monitoring feature.Overall, this section serves as a comprehensive guide to the development of the rehabilitation application and provides insights into the underlying technology and methodology used in the application's design and implementation.

Result for AI cardiovascular fitness test
To determine the user's cardiovascular fitness level, the rehabilitation application requires the user to undergo the Cardiovascular Fitness Test following a protocol that is determined by the system.The speed of the treadmill will vary during the test, and the system will manipulate the speed based on the individual's customized protocol.The interface for the Cardiovascular Fitness Test is shown in Figure 14.
The user will be required to walk or jog while the system monitors and records their heart rate using the smart wearable to assess their cardiovascular fitness level.The test results will be used to generate a personalized rehabilitation plan for the user, which includes recommendations for physical activity and exercise to improve their cardiovascular health.The use of the cardiovascular fitness test, CFT in the rehabilitation application ensures that the user's exercise program is tailored to their individual fitness level, thereby maximizing the effectiveness of the rehabilitation process.After the user completes the CFT, the data obtained from the test will be processed on the server side using a trained model.The model will analyze the user's vital signs, such as heart rate and blood pressure, and other data collected during the test to determine the user's cardiovascular fitness intensity level.Figure 15 displays the results of the cardiovascular fitness intensity level.

Rehabilitation AI scheduling
Once the CFT has been completed, the system generates a personalized rehabilitation workout activity that is designed specifically for the user based on their individual physical and cardiovascular fitness condition.This personalized workout activity is designed to help the user improve their fitness levels gradually and safely over time.As the user progresses through the rehabilitation program, the system continues to monitor their health parameters, such as heart rate and oxygen uptake, to assess their progress and adjust the next workout target distance accordingly.The system uses decision algorithms to make decisions about the next steps in the rehabilitation process, ensuring that the user receives a personalized and effective rehabilitation program.By constantly monitoring the user's progress and adjusting the workout plan based on their health parameters, the system can ensure that the user makes steady progress toward their rehabilitation goals while minimizing the risk of injury or relapse.
The rehabilitation activity flow, from the beginning of the activity to the end of the user's feedback, is illustrated in Figure 16 using a numbered indicator.Figures 17-18 depict how the system displays the outcome of each rehabilitation activity.By observing the percentage progress bar in the system, the user can have a clear understanding of their rehabilitation progress.
As more parameters are checked, it indicates that the rehabilitation process is effective and leads to improvement.This feature allows the user to track their progress easily and motivates them to continue their rehabilitation journey.The result preview allows the user to view the outcome of their rehabilitation activity which can be viewed just after the rehabilitation session completed every day.The patient is able to know their current status of VO2 max in real time through their smartphone on the ORCUS main page.Moreover, the results can be viewed.This can save time without waiting for the results in traditional method at hospital.Subgraph (a) of Figure 19 shows the rehabilitation result after end of the activity and Subgraph (b) of Figure 19 shows the ORCUS main page for the VO2 max trendline to observe the individual fitness improvement.This work also includes a live monitoring feature for patients and medical team such as doctor through ORCUS dashboard as shown in Figure 20.This feature allows real-time tracking of all patient's status for rehabilitation completion on each day.Normally, this dashboard can be assessed by medical practitioners such as nurses so that they can track which patient did not complete the rehab on certain days.The green button shows that the patient has done the rehab activity while the orange button for not completed.Moreover, more health parameters such as heart rate and total walking distance can be viewed and monitored for medical prognosis and observation purposes.
The ORCUS application has undergone further testing with a select group of patients diagnosed with coronary artery diseases such as Ischemic Heart Disease, unstable ANGINA, and NSTEMI for two months.Figure 21 displays the target heart rate achieved by a patient who completed a rehabilitation program over a specific period.As depicted in the graph, the heart rate consistently falls within the designated range, without exceeding maximum or minimum values.
Figure 22 showcases the total jogging/running distance covered by another patient throughout their rehabilitation sessions, as indicated by the date provided.Both results exhibit commendable performances concerning heart rate management and overall distance covered, suggesting a positive prognosis for rehabilitation assessment.The utilization of the ORCUS application demonstrates significant enhancements over time, particularly evident in the accurate assignment of suitable distances for each rehabilitation activity.

CONCLUSION
In conclusion, this study presents a comprehensive AIbased rehabilitation application for coronary artery disease complications and cardiovascular fitness.The system includes a personalized AI Cardiovascular Fitness Test, a rehabilitation workout tailored to the user's physical condition, and a live monitoring feature.In this study, the finding has demonstrated that the developed system is successful in enhancing the user's physical and cardiovascular fitness, as evidenced by the specific scientific health parameters recorded after each rehabilitation activity.This suggests that the system could be a useful tool for individuals that are seeking to improve their cardiovascular health and engage in regular physical activity.In general, the system can be considered as a useful and practical tool for individuals who wish to enhance their cardiovascular fitness, especially for those who have experienced a setback in their physical activity level due to COVID-19 or other critical medical illnesses.By providing personalized cardiovascular fitness tests and rehabilitation plans, the system can assist users in regaining their strength and improving their overall health, especially during times when access to traditional rehabilitation programs may be limited.Privacy concerns represent the primary challenge in this study.At present, all collected health data have been integrated from users into cloud storage to mitigate any risk of leakage or hacking on user-end devices.Further efforts are required, including cloud data encryption and mobile app security testing, to guarantee data protection post-production.This system also offers conveniences for partners and medical providers by simplifying daily tasks involved in manually monitoring patient progress and determining their current physical activity fitness level.In traditional rehabilitation approaches, patients often require frequent doctor consultations to assess their progress and determine appropriate levels of physical activity.However, with this system in place, both patients and medical providers can save money by streamlining these processes.Patients benefit from reduced medical expenses associated with fewer doctor visits and less dependence on expensive testing equipment.Likewise, medical providers can cut costs related to labor and the need for extensive physical assessments, eventually leading to more efficient and cost-effective patient care.

Figure 1 .
Figure 1.Comparison matrix chart for recent existing applications

Figure 2 .
Figure 2. iOS 15 secure sharing feature in Apple Health

Figure 4 .
Figure 4. iOS 15 secure sharing feature in Apple Health

Figure 12 .
Figure 12.Model prediction result to determine user's fitness level 4.3 Analyzing the results to inform rehabilitation and improvement strategies.

Figure 13 .
Figure 13.Next rehab target distance assignment protocol

Figure 20 .Figure 21 .Figure 22 .
Figure 20.ORCUS dashboard for rehabilitation monitoring [17,18]ly used as a noninvasive approach to evaluate cardiovascular fitness level or coronary artery disease.The 6-minute walk test is simple and widely used compared to the exercise stress test as the health variables measured and the way to conduct the test.The primary variables measured by the 6-minute walk test (6MWT) are the overall distance walked continued by the feedback visual analog scale by the patient himself and lastly the blood oxygen saturation (optional parameter)[17,18].The treadmill test or stress test requires more complex and detailed individual health information compared to the 6-minute walk test (6MWT).
. A 6-minute walk test (6MWT) and clinical treadmill test or stress test are

Table 2 .
Determination of exercise protocol Figure 8. Process of obtaining user's medical conditions