# PISIoT: A Machine Learning and IoT-Based Smart Health Platform for Overweight and Obesity Control
## Materials and Methods
### PISIoT: Architecture and Functionality
#### 3.2.5 Presentation Layer  
PISIoT provides a mobile application that allows patients to interact with the platform. Figure 4a shows the main interface where the calories consumed, calories burned, heart rate, steps, and minutes of activity variables can be viewed. Additionally, it has a menu to access the patient profile, the types of synchronized devices or the option to add a new one, an option to view the biomedical variables  
Figure 3: General workflow implemented in PISIoT. monitored, recommendations, and IoT-based services. Figure 4b shows the recommendations generated for each of the biomedical variables (heart rate, sleep, calories burned, minutes of physical activity, and weight). Additionally, Figure 5a shows a graph displaying the correlation of the biomedical variables (heart rate, sleep, calories burned, weight, and minutes of physical activity) with other variables collected by the wearable device and the smart device (steps, floors, and water consumed). Additionally, a button is displayed to enter the patient's medical service. Figure 5b shows the medical services available (clinical analysis, nutritionist, cardiologist, and general doctor). Thanks to the use of IoT technologies and machine learning techniques, PISIoT allows patients to visualize in an easy, user-friendly way and in real time their biomedical variables and classification, together with medical recommendations for weight loss or control. Additionally, the mobile application also provides a set of user interfaces that allow patients to view and request available medical services in the IoT, such as clinical analysis services or nutritionist, cardiologist or general practitioner services. Figure 4: Main mobile user interfaces of PISIoT: (**a**) index; (**b**) recommendations. Figure 5: Main mobile user interfaces of PISIoT: (**a**) monitoring; (**b**) IoT-based medical services. In addition, patients can be monitored by a trusted doctor and a relative they link to their profile. Case Study: Prevention of Myocardial Infarction in Elderly Patients with Obesity by Monitoring Biomedical Variables  
In this section, we present a case study to validate the contribution of PISIoT to weight control or loss in elderly patients with obesity, who are more prone to myocardial infarction. The case study focused on monitoring biomedical variables in obese elderly patients with a view to weight loss, thus reducing the likelihood of myocardial infarction. The scenario is as follows:  
* Elderly people with obesity need to know the number of calories ingested, calories burned, sleep, heart rate, the amount of water consumed, daily steps, and necessary physical activity to achieve gradual weight loss without health complications, helping to avoid myocardial infarction. According to the WHO [60], cardiovascular diseases (CVDs) are disorders of the heart and blood vessels and include coronary heart disease, cerebrovascular disease, rheumatic heart disease, myocardial infarction, and other conditions. Individuals at risk of CVD have exhibited raised blood pressure, glucose, and lipids, as well as overweight and obesity. Identifying those at highest risk of CVDs and ensuring they receive appropriate treatment can prevent premature deaths, yet CVDs continue to cause many deaths worldwide. Figure 6 shows the scenario of elderly people with obesity who exhibit symptoms associated with myocardial infarction or have already had a myocardial infarction and who need to lose weight. The biomedical variables (heart rate, sleep, calories burned, weight, and minutes of physical activity) and other variables (steps, floors, calories consumed, distance traveled, water consumed, and exercise) are collected through a wearable device and a smart scale, which are linked to and synchronized with a smartphone. Through the smartphone linked to each patient, the wearable device and smart scale send the collected data to the corresponding provider.