Citation: Alharbi, E.; Cherif, A.; Nadeem, F. Adaptive Smart eHealth Framework for Personalized Asthma Attack Prediction and Safe Route Recommendation. Smart Cities 2023, 6, 2910–2931. https://doi.org/ 10.3390/smartcities6050130 Academic Editors: Phivos Mylonas, Katia Lida Kermanidis and Manolis Maragoudakis Received: 1 September 2023 Revised: 16 October 2023 Accepted: 18 October 2023 Published: 20 October 2023 Copyright: © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). smart cities Article Adaptive Smart eHealth Framework for Personalized Asthma Attack Prediction and Safe Route Recommendation Eman Alharbi 1,2,3, * , Asma Cherif 3,4 and Farrukh Nadeem 1 1 Department of Information Systems, Faculty of Computing and Information Technology, King Abdulaziz University, Jeddah 21589, Saudi Arabia; fabdullatif@kau.edu.sa 2 Department of Information System, College of Computers and Information Systems, Umm Al-Qura University, Makkah 21955, Saudi Arabia 3 Center of Excellence in Smart Environment Research, King Abdulaziz University, Jeddah 21589, Saudi Arabia; acherif@kau.edu.sa 4 Department of Information Technology, Faculty of Computing and Information Technology, King Abdulaziz University, Jeddah 21589, Saudi Arabia * Correspondence: ealharbi0125@stu.kau.edu.sa Abstract: Recently, there has been growing interest in using smart eHealth systems to manage asthma. However, limitations still exist in providing smart services and accurate predictions tailored to individual patients’ needs. This study aims to develop an adaptive ubiquitous computing framework that leverages different bio-signals and spatial data to provide personalized asthma attack prediction and safe route recommendations. We proposed a smart eHealth framework consisting of multiple layers that employ telemonitoring application, environmental sensors, and advanced machine- learning algorithms to deliver smart services to the user. The proposed smart eHealth system predicts asthma attacks and uses spatial data to provide a safe route that drives the patient away from any asthma trigger. Additionally, the framework incorporates an adaptation layer that continuously updates the system based on real-time environmental data and daily bio-signals reported by the user. The developed telemonitoring application collected a dataset containing 665 records used to train the prediction models. The testing result demonstrates a remarkable 98% accuracy in predicting asthma attacks with a recall of 96%. The eHealth system was tested online by ten asthma patients, and its accuracy achieved 94% of accuracy and a recall of 95.2% in generating safe routes for asthma patients, ensuring a safer and asthma-trigger-free experience. The test shows that 89% of patients were satisfied with the safer recommended route than their usual one. This research contributes to enhancing the capabilities of smart healthcare systems in managing asthma and improving patient outcomes. The adaptive feature of the proposed eHealth system ensures that the predictions and recommendations remain relevant and personalized to the current conditions and needs of the individual. Keywords: smart healthcare; asthma attack; user context; route context; safe route; air quality index; heatmap visualization 1. Introduction The healthcare industry has undergone significant changes in recent years due to the substantial increase in intelligent services. Electronic healthcare systems (eHealth) represent the promising future for healthcare by offering new and innovative ways to employ technology to enhance healthcare [1]. The aim is to improve the effectiveness and efficiency of the healthcare industry while providing better, more value-added, and cost- effective healthcare services to patients. In response to the COVID-19 pandemic, research has recently focused on automating healthcare systems, particularly for allergy and immunology diseases. Such systems enable patients to receive care from the comfort of their homes. Several intelligent healthcare Smart Cities 2023, 6, 2910–2931. https://doi.org/10.3390/smartcities6050130 https://www.mdpi.com/journal/smartcities