Gamification Smartphone Application for Leg Physical Therapy

The need to treat illnesses or deterioration of the legs caused by accidents, rheumatism, muscular weakness, paralysis or bone diseases has increased. Paraplegic patients need physical therapy to mitigate their condition. This study developed a gamification smartphone application for leg physical therapy. The application was implemented for patients using Android Operating System smartphones. The smartphone was attached to the walking support equipment. The accelerometer sensor of the smartphone was utilized to measure distance, time, and number of steps. The application acquired data from the sensor, and processed and stored the data in a server, to enable assessment of critical conditions. Moreover, this system would report the evaluation of physical therapy on a weekly basis. Alerts of physiotherapy treatment could be set in this application. The advantages of the application include increasing the patient’s motivation for the therapy, performed by themselves at home, and the results could be used for planning treatments by a physician. Keywords—Gamification, Leg physical therapy, Walking Application, Motivation.


Introduction
Recent statistics of the Department of Highways, Ministry of Transport, indicate 878,888 people in year 2017 suffering injuries, and the annual numbers tend to increase in Thailand [1]. The prevalence of leg injuries has also increased. Illness and deterioration of the legs can be caused by rheumatism, muscular weakness, or bone diseases, and these have also increased. Physical therapy treatment of legs has become an important challenge. Patients with leg problems are encouraged to have physical therapy to recover as well as possible after injuries. This requires significant resources allocated from nurses and physiotherapists providing healthcare. They need to provide plans for mobility assistance. In fact, the number of physiotherapists in Thailand is currently considered insufficient. The patients need to be able to walk independently, especially in their home environments.
Various assistive technologies and devices have been developed to help medical professionals, including products for assisted living. Exoskeletons have been used in various fields of medical care. For instance, Ganesan et al. [2] developed a system for stroke paralyzed patients or, to be more specific, for neurological and musculoskeletal disease patients. In a recent study, the support machine named space walker for cerebrovascular patients, using an exoskeleton, has been demonstrated in Thailand by Sitlaothaworn and Rungroungdouyboon [3]. Using a robotic orthosis for training walking capabilities was improved by Colombo et al. [4]. Previous studies have presented hardware and actively assisted training. However, the devices have been expensive not suitable for at home therapy. Also lack of motivation and boredom of the therapy activities have been observed. Kinect technology was used from sitting to standing and walking therapy for post-stroke patients [5]. However, the prior systems have not sent reminders to physiotherapy patients several times per day. In addition, the walker for visually impaired (VI) proposed by Chaccour & Darazi [6] was suitable both indoors and outdoors for elderly people. The walker proved effectiveness in terms of stability, safety and support for walking [7]. This study focused on the 4 wheeled medical walker, which facilitates walking practice.
Gamification means the use of game design principles in non-game contexts, as proposed by Deterding [8]. The concept of gamification includes accumulating scores, levels, giving rewards, badges, and learning goal achievement. Gamification is popular in active learning type education [9] [10]. Many studies have reported on gamification applied in healthcare to increase enthusiasm, enjoyment and motivation [11] [12] [13] [14] [15]. Increased physical activity and empowerment of patients have been demonstrated as benefits of gamification [16]. Gamification is considered a motivational tool guiding patients to beneficial behaviors, as regards their health, with rewards for exercising. Moreover, Alahäivälä and Oinas-Kukkonen [17] used gamification to develop supporting behavioral changes in healthcare applications. A gamification based application was invented by Valerii [18] for patients to play games several times. The gamification approach was chosen for use in this current study.
Current smartphone technologies are widely used to support self-care. Smartphones provide sensors/devices and cameras that could be applied to develop applications that help patients. Ueda and Araujo [19] and Nowshin et al. [20] proposed a smartphone application for visually impaired patients, using many sensors. Several studies have developed applications to assist people with limitations in their health. This current study developed a solution to assist the patients with leg physical therapy, based on a smartphone application. The advantages of this application include self-care service, improving health outcomes, and reducing the healthcare burden, such as employing nurses to take care of the patients at home. It allows people to maintain independence and is affordable and convenient. Methods and Materials 2.1 Design of the system Fig. 1. An overview of the system Our framework in this study included a medical walker, smartphone, and a server for storing and tracking records of the patient's progress (See Figure 1). The walker was used to provide balance and stability [6]; these are easily available, simple and inexpensive. As for the smartphone, OPPO R9s Plus with Android 7.0 was used in this study. The software application was implemented in Java programming language. The walker was connected to the application through the camera service of the smartphone. The smartphone's built-in autofocus camera was used to scan the QR (quick response) code on the walker. The generated QR code held the walker ID and patient ID. The smartphone was attached to the walker equipment when the patient practiced walking. The measurement of walking distances, time, and number of steps were easily obtained from acceleration data provided by sensors in the smartphone. The application acquired data from the sensors, and processed and stored the data in the server to allow identifying critical conditions. These data could be used to evaluate a person's progress. A database was designed and implemented using PHP. The system can be used at home, inside buildings and outdoors by using a GSM modem.
The gamification approach was applied to increase the patient's interest in the behavior incentive. The application design was based on competitiveness. The number of steps was collected to calculate the patient's score result. The calculation in this study was based on a small number of steps as suggested by Thorup et al [21] and Hoeger et al. [22]. There were four levels as follows: When the patient passed each game level, a trophy would be awarded to the patient. In addition, this system would report a summary of physical therapy on a weekly basis to the user, by using android graph plotting library.

Results and Discussion
The proposed application had five major modules as shown in Figure 2. The first module was the registration. The patients were required to first register to the system using e-mail and password. Once the registration was confirmed, the user profile was created (See Figure 3). The user profile included name, gender, age and user's photo. If e-mail and password of patients were incorrect, the system would not allow the user to log in. The second module was for connecting the application with the walker. The walker ID and patient ID could be linked by scanning the QR code on the walker as shown in Figure 4. QR codes are commonly used in education, social media and business [23] and they are totally free. The walker ID and patient ID from the QR code need to be identical for each patient in the application. Otherwise, the system would not correctly record the data in the tracking component.  The third module provided alerts of physiotherapy treatment via smartphone to the patient as scheduled (See Figure 5). This application allows patients to set scheduled times. Then, the application stores the settings into a database for alerting. The alerts for physiotherapy treatment are in the forms of voice calls and notifications to the android phone.

Fig. 5. Alerts of treatment
The fourth module is the tracking component. The patient attached his/her smartphone to the walker and used the walker in walking activities ( Figure 6). The smartphone's built-in sensors/devices, such as autofocus camera and accelerometer, are used by the application. The data generated reflects the patient's activities during the play. Once the treatments were completed and the status of physiotherapy treatment was traced and recorded, the patient would be awarded. The gamification approach has become popular, and it was applied to increase the patient's motivation by rewards and scores, to gain success in the treatment. The achievement of higher score than previous sessions was the goal in this study. In Figure 6, the patient's score level was 2 (the number of steps was 21). The outcomes of this study were measured in terms of the gain of independence and improvement of the quality of life, following a prior study [6]. This study expected that gamification design features would motivate the patients to use the application. Gamification has been earlier applied in healthcare by Sardi et al. [12]. The evaluation report of physical therapy is displayed by the last module. For example, the patient's progress at level 1 is illustrated in Figure 7; this indicates poor physical activity. Therefore, the patient needed to practice more, as much as possible, to get better results. This system recorded the patient's movements, so it could identify the patients who did not walk. The progress monitoring of a patient could be used for planning and evaluation of the treatment.
A pilot survey was conducted by a group of test users. A total of 10 participants were involved in this survey. Questions were asked on the ease of use, design, attractiveness of appearance, motivation of usage and total satisfaction. In such evaluation of the system application, the total satisfaction was reached a good level (mean = 4.40). The results of this survey are summarized in Figure 8.

Conclusion
In this paper, a gamification application implemented on a smartphone has been presented. The system could be used to track the progress of mobility treatments in real life. The application could simply be installed and run on smartphones that the patients currently own and use. Smartphone technologies offer great potential benefits in healthcare, and they can be used anywhere and anytime. The advantages of this application could be seen in terms of its low cost of implementation, usefulness, and utilization. This might partly address the problem of shortage of medical professionals. In addition, this application could increase the motivation of patients to exercise their legs. The application was developed for Android mobile platform. A limitation of this application is that it must be run on Android 6.0 or above. Also, the application currently supports a limited selection of rewards. In future work, augmented reality (AR) could be investigated. Also the physiotherapist module might be moved to operate in a smartphone. In addition, experimental validation of the approach on patients in hospitals remains as a future challenge.

5
ests are statistical modeling in healthcare, information technology, predictive analytics and classroom action research.
Siwipa Pruitikanee is a lecturer in the Faculty of Science and Industrial Technology at Prince of Songkla University, Surat Thani Campus. Her interested research is information technology, especially health and hospital information system. Supattra Puttinaovarat is a PhD lecturer in the Faculty of Science and Industrial Technology at Prince of Songkla University, Surat Thani Campus. Her research interest includes geographic information system, remote sensing, machine learning and information technology.
Yanin Tubtiang is an undergraduate student of information technology in the Faculty of Science and Industrial Technology at Prince of Songkla University, Surat Thani Campus.
Pattarakorn Chankeaw is an undergraduate student of information technology in the Faculty of Science and Industrial Technology at Prince of Songkla University, Surat Thani Campus.