# An Intelligent Healthcare System for Residential Aged Care during the COVID-19 Pandemic
## 3 The Proposed Method
The third proposed method is a resting and moving (RM) approach. ShEP are at an increased risk for falls during daily activities because they move all the time, and CF's location tracking status has been shown to be insufficient for their protection. As previously described, the major concern using CF is its requirement for the elderly person to report their preference or location status and its lack of context about whether the elderly person is walking or running, which is important information for fall detection. Therefore, a new method that can detect whether they are resting or moving is necessary. In the RM approach, it is important for a real-time response to fall detection, so the instant speed (distance divided by instant time (m/s)) of the approach is used for measurement. We can use time sensors to measure instant time and GPS for the distance. As for transition speeds, they are 1 m/s, 2 m/s, and 3.5 m/s, corresponding to walking, running, or driving [34; 38]. It indicates walking when the speed is less than 2 and greater than 1; a speed of less than 3.5 and greater than 2 represents running. If it is greater than 3.5, the RM changes to driving status. The RM algorithm is presented below (Algorithm 3). The first step of the algorithm initializes the instant speed dataset values with R programming. The second step is to set up the logic functions based on the previous research dataset. The final step is to output the categories, such as the walking, running, and driving statuses, in order to enable the dynamic overall detection of the RM approach for measuring whether an individual is moving or not. ```
1. Initialization of parameters: Dataset2 < mam1.mapInputPort (1) # class: data.frame n <- nrow (dataset2) Categories <- c ()
2. Set up logic functions: for (i in 1:n){ instant speed <- dataset2 (i,1] if (instant speed >= 0 & instant speed < 1) is 1 = Staying if (instant speed >= 1 & instant speed < 2) is 1 = Walking if (instant speed >= 2 & instant speed < 3.5) is 1 = Running if (instant speed >= 3.5) is 1 = Driving Categories <- c (Categories, is 1)]
3. Compute the resting and moving (RM): data.set <- cbind (dataset2, Categories) mam1.mapOutputPort (\"data.set\");
```  
**Algorithm 3** Resting and Moving (RM) Approach  
The proposed system architecture (Figure 1) defines the process for obtaining context awareness, including context interpretation and logical computing. To increase the accuracy, personalization, and learning orientation of healthcare systems, this study not only investigates the existing studies on fall detection to try to determine all possible context factors, but also uses artificial intelligence (AI) technologies to increase the performance of healthcare systems. With those context factors added, we developed a system called the Intelligent Healthcare Agent System (IHAS). A large variety of ShEP context information is retrieved via physical sensors, and it must be properly represented with a structured and interchangeable format. The adaptive service is activated only when ShEP are not available, and unexpected results regarding context awareness are sent back to cloud storage for further learning adjustments in order to improve the system's response times. In this way, the proposed method can respond to real-time fall detection immediately after complex logical computing, which is of the highest importance. The proposed system architecture, IHAS, can differentiate between indoor and outdoor environments by using tools such as mobile light sensors to detect the availability and intensity of lights (i.e., their illuminance). According to the rule of the Illuminating Engineering Society of North America (IES), which is the recognized technical authority on illumination and defines standard levels of lights based on the lux unit of lighting [39], the value of illuminance should be transformed into understandable information. For example, if the value of illuminance is greater than 1000 lux, one can infer that the elderly person is outside.