Paper—Mobile Applications for Diabetes Self-Care and Approach to Machine Learning Mobile Applications for Diabetes Self-Care and Approach to Machine Learning

Diabetes is a silent disease, the number of people who suffer from it increases daily, it is unfortunate that many young people develop this condition and do not know that they suffer from it. So much so that this disease is the fifth cause of death in Panama. Using software technologies applied to areas such as health every day is increasing. Scientific research in health areas, as well as the development of new technologies that involve smartphones and sensors, is making health self-care possible. Currently, interest in mobile health (mHealth) applications for disease self-care is growing. The innovation of technological tools associated with artificial intelligence is increasing every day. Among its most radical trends is machine learning, whose function is to develop techniques that allow computers to learn. This learning occurs through the data that can be provided to the algorithms responsible for categorizing. Therefore, this research aims to analyze mobile applications specifically those focused on diabetes, to propose an emerging systematic model of medical care for self-management of patients with diabetes and, finally, achieve a reliable data set with Panamanian patient data to apply machine-learning models and see how much we can help Panamanian doctors. Keywords—Diabetes, machine learning, mHealth, artificial intelligence, mobile applications, self-care of health.


Introduction
Diabetes is a chronic disease that appears when the pancreas does not produce enough insulin or when the body does not effectively use the insulin [1], it produces. Insulin is a hormone that regulates blood sugar. The effect of uncontrolled diabetes is hyperglycemia (increased blood sugar), which over time severely damages many organs and systems, especially nerves and blood vessels.
According to the World Health Organization (WHO), in 2014, 8.5% of adults (18 years or older) had diabetes. In 2015, 1.6 million people died as a direct result of diabetes and high blood glucose levels were the cause of another 2.2 million deaths in 2012 [2].
Data from the Comptroller General of the Republic of Panama reveal that about 1,300 people with diabetes die each year. Of these, 702 are women and the rest, 598, men. Reports from the Ministry of Health reveals that around 9.5% of the Panamanian population suffers from diabetes, which indicates that there are young patients between 20 and 40 years who have already developed diabetes.
Periodic medical review, exercise, healthy eating and self-care are vital strategies to cope with this disease so that the patient has a good quality of life. Self-management [3] or self-care of this chronic disease is essential and current technological devices seem to be useful enough for patients who deal with it [4].
The convergence of several areas of knowledge has led to the design and implementation of computer systems implemented in devices such as tablets, mobile phones, wireless networks, sensors connected to the body and other devices that allow monitoring of various factors such as medication intake, blood pressure and blood glucose, among others [5].
The use of these information technology solutions applied to health is increasing and there are many user-focused applications, these applications are known as mobile health or mHealth [6].
The main objective of these applications is that through any smart device you can download, install and use, with the advantage that most of them are free. In addition, mHealth applications have useful tools for health care and for a better quality of life, such as controlling the heart rate, consulting the vaccination schedule, taking control of chronic diseases such as diabetes.
It is estimated that by 2020, 6.1 billion people, or approximately 70% of the world's population, will use smartphones, and at least 50% of smartphone users will use healthrelated devices mobile applications [7].
The acquisition of reliable information is very important for our investigations, which is why the mobile application will be a source of data that we will then use for creating models that support and help the Panamanian diabetic patient for better disease management based on the innovative field of artificial intelligence (AI) [8].
AI is a branch of computer science in charge of studying computer models capable of carrying out activities of human beings based on two of its primary characteristics: reasoning and behavior. An important part of AI is machine learning [9], which aims to develop techniques that allow computers to learn. More specifically, it is about creating programs capable of generalizing behaviors based on information provided in the form of examples.
In this paper we present a proposal for the development of a mobile application, based on the self-care of Panamanian patients with diabetes, to improve their quality of life. In it, we perform an in-depth analysis of the most important features of mobile applications for diabetes. In addition to having a set of real and reliable data of Panamanian patients to use this information as a source to create intelligent models based on machine learning. http://www.i-joe.org 2 Background

Diabetes in Panama
The main causes of death today in Panama are largely due to chronic degenerative diseases; following this order: cancer, cardiovascular diseases, diabetes. The WHO estimates that 46% of global diseases are due to chronic diseases [10]. Below in Table 1, we can show a statistic of deaths in Panama from diabetes annually We consider it important in our country that patients with diabetes perform self-care in order to promote their own health and well-being. Self-care is an extensive concept that includes activities related to the prevention and treatment of chronic diseases, rehabilitation and health.
Adequate and active patient self-care can positively improve the prognosis. Reports have indicated that knowledge of a disease and efficacy are the main factors that can improve the self-care of these patients [11].
Studies have revealed low levels of knowledge among diabetic patients and neglect of self-care in these patients, which increases the assistance to medical centers and the tendency to increase diabetic patients in our country [12].
Based on the classification criteria outlined above, it has been determined in this investigation to perform the analysis of the functionalities or characteristics of the selected applications in a more detailed way then in table 1 each one is presented.

Mobile technology in Panama
Sources from the Ministry of Economy and Finance of Panama (MEF), in the Population and Housing Census of 2010, it was determined that 84% of Panamanian households have at least one mobile phone. Even in indigenous regions, where the cultural aspect is very typical of each ethnic group, there is a great demand for mobile phone services [13]. With these high percentages, the strong dependence of Panamanian homes on mobile technology remained. On average, 84 out of 100 households or 8 out of 10 had a smartphone. Taking advantage of technologies can be a strategy to improve the patient's commitment to diabetes self-care.
Mobile technology in daily clinical practice is an interesting synergy, the smartphones offered every day in the market are more powerful, and they can accelerate the integration of health applications for patient self-care [14].
These applications have the potential to become valuable tools in the management of a chronic disease including diabetes. The applications could help patients to control their diet and the use of medications, facilitate communication with their doctor.
The most popular smartphone operating system is Android, which has 44% of the market share and 39 million devices in use. More than 275,000 applications are available for the Android operating system and every year there are millions of downloads.
With the large amount of data generated by this application with invaluable features such as validity and reliability will give us input to a multitude of activities, especially data analysis using innovative techniques such as machine learning.

Data analytics
Over the years, AI has evolved to the point of presenting different machine learning methodologies applied to innumerable areas in everyday life; including health areas.
Our application will be a source of numerous heterogeneous data that yield a large amount of information related to Panamanian diabetic patients. This information, well analyzed, is very useful for healthcare professionals. Recently, using AI techniques, innovative technological solutions for medical care have been developed [15].
On many occasions, engaging in a controversy over whether these medical AI solutions in the near future will replace health professionals. We believe that machines will not replace medical professionals in the near future, but AI can definitely help doctors make better clinical decisions or even replace human judgment in certain functional areas of medical care [16].
Machine learning is a branch of AI that is dedicated to the study of those agents or software programs that learn or evolve based on their experience, to perform a given task better and better. Machine learning has been practiced for some years, and with good results, in the social sciences, marketing, finance and applied sciences. In medicine it has barely been used, partly for cultural and philosophical reasons why it is assumed that a computer will never be as capable as a doctor to evaluate will a disease much less predict a diagnosis. Also, for the rejection of some doctors to feel questioned, supervised or advised by a machine or an engineer.
The main objective of machine learning is the development of theories, techniques and algorithms that allow a system to modify its behavior through inductive inference. This inference is based on the observation of data that represent incomplete information about a statistical process or phenomenon [17].
ML is a meeting point for different disciplines: statistics, AI, programming, mathematics and optimization, among others [18].
For machine learning there are 4 different ways of learning: through supervised learning, unsupervised learning, semi-supervised learning or reinforcement learning.
In the particular case of the first 3 types of algorithms they differ in the a priori knowledge that is had in each one. The two extremes are supervised, where there is a priori knowledge of the data, and the unsupervised, characterized by the lack of prior knowledge.

Related Work
The development of mobile applications began as soon as the smart phone models were released and the first virtual stores such as Google Play Store appeared. Since then, thousands of applications we see in the market, many of them are related to health issues. For example [14], worked to develop an application that helps patients with diabetes and mentions that mobile health-oriented platforms offer potential to address many of the needs of Patients and an increasing number of research indicate a trend towards the development of mobile self-management applications to support patients with diabetes.
The investigation of [19] it is stated that eHealth tools have provided the opportunity to facilitate the loading, collection and sending of patient data. Additionally, the convergence and interoperability of smartphones have allowed a new paradigm in the selfmanagement of diabetes, with which there is a better control of this disease.
In [20] this research was based on examine and explore the motivational factors of users to use and choose app stores, which we find interesting because we can study and know the trends of current users on existing applications in the Google Play Store.
In his study [21] they found that the barriers most frequently reported by patients when using mobile applications for self-care were lack of knowledge, lack of understanding of the care plan, impotence and frustration among others. They also propose identification strategies in the development and implementation of realistic self-management applications and the importance of collaborative alliances between patients and professionals.
More recently, the research of [3] conducted a systematic review of diabetes applications and whether these have helped patients with diabetes to self-manage their condition from a practical perspective. With the results, deficiencies could be identified and helped to improve several usability factors and integration of diabetes self-care applications in the daily routine of patients.
This work focuses on obtaining a mobile application that helps the patient with Panamanian diabetes to achieve better control of the disease through self-care to improve their quality of life.

Materials and Methods
The methodology involved in this research is simple, search strategies were first evaluated, selection criteria were established, applications were classified, and applications were selected.

Search strategy
An observational descriptive study was conducted in January 2019. For this investigation, we based the search in the online store for Android mobile applications; this review was therefore carried out using Google Play Store. We use search terms related to diabetes to detect all relevant applications [22].

Application classification
For the research that we have developed, a classification of applications has been established based on the specific objective to which they are oriented within the management of diabetes. Below we detail each classification around the selection of applications: Self-care: Applications are typified here that, in a simple way, allow adequate selfmanagement of health for patients with diabetes and that in turn manage to improve communication between the doctor and the patient [23].
Drug database: In diabetes therapy, patients take more than one medication at a time and possibly other medications to treat coexisting conditions. Many of the drug combinations have the potential to interact and this may affect patient safety or treatment effectiveness.

Knowledge of diabetes:
It is necessary to have access to that information that allows the patient to achieve a vast knowledge, to be aware of its treatment and the self-management of the disease.
Applications for doctors: Applications in this category are those that can provide and provide vital information to the doctor to make a decision as to a patient, for example reports and statistics. This information will allow the latter to carry out the monitoring and monitoring of patients with diabetes.
Forums/ blogs: In this category are all those applications that allow interaction between people with diabetes, with the aim of sharing information and experiences.

Selected applications
This section shows a comparative analysis of mobile applications aimed at the control and management of diabetes. The applications studied are summarized in table 2.
The app's "MiGlycemia" with you is the most popular application with 1,000,000 downloads and 3,024 opinions. On the other hand, the application with the highest ranking was "Dieta para Diabeticos" and "Diario de la diabetes" with a score of 4.6. All these analyzed applications have a rating of 4 to 5 in rating. Based on the classification criteria outlined above, it has been determined in this investigation to perform the analysis of the functionalities or characteristics of the selected applications in a more detailed way then in table 3 each one is presented. Table 3. Functionalities of the app's.

Functionality Description 1 Food database
Includes a way to record the amount of carbohydrates the patient consumes daily.

Glucose level
The patient's blood glucose levels can be recorded daily.

Medication intake
Sends reminders of the medication that the patient should take according to the doctor's prescription.

Store and process data
You can store information such as the patient's weight and the physical activities he performs.

Sending reports
The application can issue reports to the doctor or the person in charge of treating the patient. 6 Synchronization with devices The application can synchronize data with other devices, such as a glucometer.

Visit reminder
Allows the patient to receive reminders about the scheduled appointments to the specialist.

Access to materials
Access to medical journals or informational material on diabetes.

Social networks
A connection to social networks is established for patients with diabetes.

Health tips
Ability of the application to provide advice.

Analysis results
The features and functionalities provided by the most popular applications in the Android virtual store, and the main advantages are shown below in table 4 together with the results of the analysis of the functionalities of each selected application.

Fig. 1. Applications Analysis
As we compare the applications, we observe that none of them satisfactorily covers the functionalities established as evaluation parameters. We believe that this is due to the proliferation of applications and the non-determination of parameters for placement in the virtual store. Most of the applications coincide in the glucose level register and in the health councils, which is not entirely reprehensible since they are important functionalities; however, they fail to quantify even 50% of what is established as characteristics.
The application that offers more features is "Social Diabetes" with seven, followed by "Glucosio and MiGlysemia" with a total of (4). On the contrary, there are very poor applications regarding the distribution of functionalities, which is decisive for us that the application to be proposed has and complies with a considerable number of these characteristics so that the patient feels comfortable and achieves the objective of our proposal that is to maintain the empowerment of the patient on the knowledge of diabetes as much as possible.

Proposed system
Performing the analysis of mobile applications presented above, has allowed us to see closely and know the features and functionalities offered by the analyzed applications. This analysis has also served to establish a proposed model for diabetes selfmanagement and that includes processes and data relevant to the diabetes disease selfmanagement process. As we have mentioned the primary objective that we wish to achieve with this research is to propose the bases of a custom application, focused on the user not being limited, that they also feel the power to seek information or interact with the application and that it provide the knowledge necessary to cope with the disease they face. In Figure 1 we show a scheme of the proposed application.

Fig. 2. Proposed application
As we can see the application will be fed, from various devices, where the patient will have the opportunity to send, glucose level, physical activity data performed or data such as weight. This shipment is suggested daily for a prolonged period in order to obtain reliable and measurable statistics.
In turn, this data is received through the mobile application, which will store this data in its database (or in an external database). With these data, different processes can be carried out, from the calculation of the blood glucose level to find trends in sugar levels. Provide access to the food database to provide information on a wide range of foods. The application may provide the patient with access to a series of articles written by people who have had the actual experience with diabetes so that it is also an educational grade application. As well as providing statistics and graphs, that allow the patient to have an overview of their status.
Proposed solution: The following describes the activities involved in the proposed solution for the implementation of the application.
Analysis and design: The characteristics and functionalities of different diabetesrelated applications have been analyzed. We interview some patients and we collect extra information that will help make important decisions regarding the development of the application. Requirements are obtained and classified. We have evaluated the best features of the new application. As for the design, we think of a solution through schemes or diagrams evaluating the best development alternatives and the functionalities indicated above, we take into account technical, social and user-friendly elements of the application.
Development: Taking into account the analysis performed, the application is coded taking into account what was outlined in the previous stages. Android Studio [24] has been used, as it is an official integrated development environment for the Android platform. We are developing a prototype of the application, whose name is DiabApp and figure 2 shows how the main screen of the application will be. Architectural patterns are used to integrate the main parts of the application or system and how messages and data flow through the system. The use of them greatly encourages our application to be easy to maintain and update over time. We propose the traditional design pattern [25], Model, View and Controller (MVC) , which is a software architecture pattern responsible for separating the business logic from the user interface into three distinct components.

Fig. 3. Main Screen -DiabApp
Tests: We verify the operation of the application in different scenarios that is to say different devices, simulating the scenario and emulating the mobile device, exploring all the utilities and functions of the application, entering different data, including erroneous, to measure the functionality and level of software robustness. Throughout our research, we have had continuous contact with different elderly patients, hearing from them their suggestions to transform them into strategies and develop a mobile application that is efficient and meets expectations. One of the central questions of our research is: Will Panamanian society specifically older adults embrace the idea of a mHealth culture. If so, what features should our application have for diabetic patients and why?
In addition, how effective should the application we want to develop be?
Distribution: Once the tests and the debugging of the application are finished and validating that all the requirements have been fulfilled, it is released. In this case, we propose the first-time release in the Goolgle Play Store, the application may be designed for that Android environment.

Results
Definitely, a strategy should be created that aims to generate new regulatory policies and appropriate methodologies in the use of health technologies for the self-care of patients with possible chronic diseases such as diabetes.
What we are looking for is that our application be an integral solution for this problem, thus ensuring greater effectiveness and effectiveness in the treatment of diabetes. Our mHealth proposal is the daily use of the application to help the patient and that he feels committed and well connected. In Panama, it is not common to use these technological tools, especially among elderly patients or older adults who cram health institutions, sometimes just to ask how a medication should be taken. That is why we believe that our application has to contribute significantly to the treatment and control of diabetes.
Studies carried out in other countries show that reporting information in real time is beneficial given the potential of communication provided by the application, both patients and doctors can be aware of its evolution, promoting communication, sharing it or for taking decisions. Here are some benefits of our implementation: • Automatic transfer of blood glucose data: While it is true that some applications have this feature, our application will do so automatically from the monitor to the mobile phone. Mainly, this tool will be used to process large and complex data and provide feedback related to, for example, insulin dose, carbohydrate intake and healthy behavior. This tool will support decisions and, being located on the patient's mobile, the doctor can transfer the data directly to the electronic medical record (EMR) and provide diagnoses and comments to the patient.
If the patient enters data related to carbohydrate intake, physical activities, and blood glucose level. An algorithm that analyzes the data and provides insulin dose suggestions can be developed.
We must emphasize that our focus is the elderly patient, which is why the mobile application must be simple and efficient, without overwhelming or being extremely sophisticated. The appropriate language for a user of this type.
It is important that health professionals and authorities accept alliances with the private sector and universities to incorporate research and development i+D. Since this alliance would be profitable to be exploited in the creation and management of new technologies.
We also propose that our application with the indicated security be a source of innovation and can be used in predictive models using AI, since we could see that in the analyzed applications there is a lack of "intelligence" with these technologies we can make use of previously acquired knowledge and generate models that allow better monitoring, based on the study of the data collected.
All this is aimed at achieving a better quality of life for Panamanians. By reducing the number of people who contract this chronic disease every year, causing a positive impact on each individual, family and the Panamanian state.

Discussion
In general, the analysis made to various applications offered by the virtual store today indicates that applications developed for mobile phones can be viable and efficient tools for the self-care of diabetes disease. Mobile applications with widely used and preferred compared to Web-based systems or systems that we have on the computer due to the advantages of simplicity that this device represents either for use, mobility and transfer from one site to another.
The analysis has also pointed out the importance of diabetes self-care applications and usefulness to patients, as well as to health providers, since their use promotes better health habits and has good results, such as following a Healthy diet, increased physical activities and increased blood glucose tests.
For the reason we have begun the development of an application that is in general, simple, friendly and powerful terms for the user in such a way that it can be empowered with the resources it provides for the self-care of the disease.

Conclusion
Although the Central American region is in development, Panama has an important technological and communications infrastructure that allows developing innovative solutions for the population in such a way that we advance and adapt new services based on mobile devices, as well as the Internet and other services.
There is also a great demand for public health services and the number of patients at different levels of hospital care is growing rapidly, especially those with chronic diabetes diseases.
The use of health, electronic health and mobile health technologies can play an important role in the country's health strategies.
A strategy must be definitively established to regulate and propose appropriate methodologies for the use of technologies for the health of Panamanian citizens, taking care of the patient's privacy.