Universidade do Minho Escola de Engenharia Departamento de Informática Sandro Emanuel Machado Cruz Chatbot Assistant For Diabetic Patients October, 2021
Universidade do Minho Escola de Engenharia Departamento de Informática Sandro Emanuel Machado Cruz Chatbot Assistant For Diabetic Patients Master’s Dissertation Master’s in Informatics Engineering Work supervised by Rui Manuel Ribeiro de Castro Mendes Sílvia da Silva Rêgo October, 2021
COPYRIGHT AND TERMS OF USE OF THIS WORK BY A THIRD PARTY This is academic work that can be used by third parties as long as internationally accepted rules and good practices regarding copyright and related rights are respected. Accordingly, this work may be used under the license provided below. If the user needs permission to make use of the work under conditions not provided for in the indicated licensing, they should contact the author through the RepositóriUM of Universidade do Minho. License granted to the users of this work Creative Commons Atribuição-NãoComercial-CompartilhaIgual 4.0 Internacional CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0/deed.pt
STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the Universidade do Minho. , (Location) (Date) (Sandro Emanuel Machado Cruz) 8 de outubro de 2021 Braga Assinado por : Sandro Emanuel Machado Cruz Num. de Identificação: 15337369 Data: 2021.10.08 11:07:28+01'00'
Acknowledgements During the writing of this dissertation, I got a lot of help and follow-up that contributed to a better quality of work. Because of these contributions I feel I have to thank everyone as best I can. I would first like to thank my supervisor, Professor Rui Mendes, who constantly accompanied me and was always available to answer various questions I had throughout this work. I would like to thank my colleagues from my internship at Associação Fraunhofer Portugal Research for their wonderful collaboration. In particular, I would like to highlight my supervisor at Associação Fraunhofer Portugal Research, Sílvia Rêgo. Sílvia, I want to thank you for your unconditional support. You helped me in the context of answering questions in the research area and on the methodology of the work, as well as how I could improve it. Your insightful feedback improved my thinking and brought my work to a higher level. Afterwards, I would like to thank the participants in the research for all the data they provided me and obligatorily contributed to the conclusion of the dissertation. I would also like to thank my colleagues who have accompanied me throughout my academic life and will accompany me for a lifetime. They helped me a lot in terms of providing me with knowledge of concepts that I had never discussed. They also provided me with happy distractions so that I could clear my mind and motivated me a lot to be able to complete this dissertation In addition, I would like to thank my parents who always motivated me not to give up and pursue my dreams. To my family members for their wise advice and their availability to help me. I also want to thank my dear girlfriend, Bárbara Ribeiro, who was always present, encouraging me and always being my main source of inspiration for dedication and resilience. Through your help I managed to complete something that I definitely couldn’t do on my own. Thank you very much. iii
Abstract Nowadays, with the existence of several chronic health conditions, Diabetes Mellitus (DM) being one of the main ones, there is a great burden that patients must have in order to be able to take care of themselves. Thus, in addition to seeking to resolve their needs by obtaining information from health professionals, they increasingly seek information and advices in forums, communities and groups. The use of dialogue systems has become essential in people’s lives. The development of conversational agents is still an unresolved research problem that poses many challenges in the Artificial Intelligence (AI) community. This work aims to build an AI chatbot that is based on the principles and techniques of AI directed to Natural Language Processing (NLP) and Deep Learning to help people newly diagnosed with DM in the self management of the disease. A literature search of DM education and information for people newly diagnosed with DM was conducted. Additionally, the main topics in which patients ask for support were retrieved from a search of several online support groups of DM, as well as questionnaires with 8 patients and interviews with 3 health professionals. The application were developed through the back-end side in Python and the front-end side in React Native and its communication was made through WebSockets. Furthermore, an interaction and interface design are developed in this work using Human-Centered Design (HCD) methodology. For that purpose, iterative usability test sessions were conducted with 12 users using Think Aloud methods and the System Usability Scale (SUS). The chatbot developed is Information Retrieval (IR) type and answered questions asked by users in a human-like way. The result of the usability tests of the final version of the application was satisfactory (with aSystem Usability Scale (SUS) score of 88) and users found the application quite intuitive and robust. Further studies should concentrate on customizing the chatbot to each user by collecting information from prior interactions and verifying the impact of using this chatbot for newly diagnosed Portuguese users with DM. Keywords: DM; Chatbot; AI; Deep Learning; NLP;HCD; iv
Resumo Atualmente, com a existência de várias condições crónicas de saúde sendo uma das principais a Diabetes Mellitus (DM), há um grande fardo que os pacientes devem ter para poderem cuidar de si mesmos. Assim, para além dos pacientes buscarem procurar resolver as suas necessidades por meio da obtenção de informações junto aos profissionais de saúde, cada vez mais buscam informações e conselhos em fóruns, comunidades e grupos. O uso de sistemas de diálogo tornou-se essencial na vida das pessoas. O desenvolvimento de agentes conversacionais é ainda um problema de pesquisa não resolvido que apresenta muitos desafios na comunidade da Inteligência Artificial (IA). Este trabalho visa construir um IA chatbot que é baseado nos princípios e técnicas de Inteligência Artificial (IA) direcionado a Processamento de Linguagem Natural (PLN) e Aprendizagem Profunda para ajudar pessoas recém-diagnosticadas com DM no autocuidado desta doença. Neste trabalho, foi acompanhada uma pesquisa bibliográfica sobre a educação e informações da DM para pessoas recém-diagnosticadas com DM. Além disso, foram abordados em vários grupos de apoio online relacionados com a DM os principais tópicos que os pacientes pedem apoio, a utilização de um questionário com 8 pacientes e entrevistas com 3 profissionais de saúde. A aplicação foi desenvolvida através do back-end em Python e front-end em React Native e a sua comunicação foi feita através de WebSockets. Foi também desenvolvido um design de interação e interface através da metodologia Human- Centered Design (HCD). Para tal, foram realizadas sessões de testes iterativos de usabilidade com 12 participantes seguindo os métodos Think Aloud e System Usability Scale (SUS). O chatbot desenvolvido é do tipo Information Retrieval (IR) e responde às perguntas feitas pelos utilizadores de forma humana. O resultado dos testes de usabilidade da versão final da aplicação foram satisfatórios (SUS de 88) e os utilizadores acharam a aplicação bastante intuitiva e robusta. Os estudos futuros devem concentrar-se na personalização do chatbot para cada utilizador, com a coleção de informações e de interações anteriores e na verificação do impacto da utilização deste chatbot para utilizadores portugueses recém-diagnosticados com DM. Palavras-chave: DM; Chatbot; IA; Aprendizagem Profunda; PLN;HCD; v
Contents List of Figures x List of Tables xii Acronyms xiii 1 Introduction 1 1.1 Problem statement ................................. 2 1.2 Motivation ..................................... 3 1.3 Aims ........................................ 3 1.4 Document outline .................................. 4 2 State of Art 5 2.1 Chatbot overview .................................. 5 2.2 A brief history of chatbots .............................. 6 2.3 Chatbots in medicine ................................ 7 2.3.1 Florence .................................. 8 2.3.2 Safedrugbot ................................ 8 2.3.3 GYANT ................................... 9 2.3.4 CancerChatbot ............................... 9 2.3.5 Buoy Health ................................ 10 2.3.6 Aurora ................................... 11 2.3.7 AVA .................................... 11 2.3.8 Chatbots for patients with DM ....................... 12 2.4 Patient-Centered Care ................................ 14 2.4.1 Automated Care .............................. 15 2.4.2 Intelligent, Empathetic and Supportive Care ................. 15 2.5 User Experience .................................. 16 2.5.1 User Interface ............................... 16 2.5.2 User Experience in healthcare chatbots ................... 17 2.5.3 Usability Testing .............................. 18 vi
CONTENTS 2.6 Chatbot Approaches ................................ 18 2.6.1 Rule-based chatbots ............................ 18 2.6.2 Data-driven chatbots ............................ 18 2.7 Applications and Techniques of NLP ......................... 19 2.7.1 Natural Language Understanding ...................... 19 2.7.2 Natural Language Generation ........................ 20 2.7.3 Text Preprocessing Techniques ....................... 20 2.8 Deep Learning ................................... 22 2.8.1 Artificial Neural Network .......................... 23 2.8.2 Feed-Forward Neural Network ........................ 24 2.9 Case Study of Diabetes Mellitus ........................... 26 2.9.1 Impact ................................... 26 2.9.2 Prevalence in Portugal ........................... 27 2.9.3 Types of Diabetes Mellitus ......................... 28 2.9.4 Nutrition .................................. 29 2.9.5 Complications ............................... 32 2.9.6 Information Availability ........................... 34 3 Implementation 37 3.1 Application Content ................................. 37 3.1.1 Online Communities ............................ 38 3.1.2 Interviews ................................. 39 3.2 Application Development .............................. 43 3.2.1 Chatbot adopted .............................. 43 3.2.2 Application Requirements .......................... 43 3.2.3 System Architecture ............................ 45 3.2.4 Decision Making .............................. 46 3.2.5 System Modeling .............................. 48 3.2.6 Implementation of the application ...................... 49 3.3 Human-Centered Design .............................. 57 3.3.1 Usability Tests ............................... 57 3.3.2 Analysis of results ............................. 61 3.3.3 Application Improvements ......................... 67 3.3.4 Usability Measurement ........................... 77 4 Conclusion 81 4.1 Discussion ..................................... 81 4.2 Conclusions and Future Work ............................ 83 vii
ACRONYMS I-CVI Content Validity Index per item IA Inteligência Artificial IBM International Business Machines IE Information Extraction IP Internet Protocol IPv4 Internet Protocol version 4 IPv6 Internet Protocol version 6 IR Information Retrieval ISO International Organization for Standardization JSON JavaScript Object Notation ML Machine Learning MLF Multi-layer feed-forward MLPs Multi-Layer Perceptrons NIHR National Institute for Health Research NLG Natural Language Generation NLP Natural Language Processing NLTK Natural Language Toolkit NLU Natural Language Understanding NoSQL Not Only Structured Query Language OCDE Organização para a Cooperação e Desenvolvimento Económico PE Processing Elements PLN Processamento de Linguagem Natural POS Part of Speech RDP Remote Desktop Protocol ReLU Rectified Linear Unit REST Representational State Transfer S-CVI Content Validity Index by scale level SGD Stochastic Gradient Descent xiv
ACRONYMS SPD Sociedade Portuguesa de Diabetologia SUS System Usability Scale TCP Transmission Control Protocol UA Universal Agreement UI User Interface UML Unified Modeling Language USA United States of America UX User Experience VR Virtual Reality xv
Chapter 1 Introduction The adoption of information technology in the healthcare system has increased dramatically in the past decade. Until 2009, the United States of America (USA) healthcare system largely relied on paper medical records, which limited patient’s ability to share information efficiently with other care providers and made health outcomes research difficult [1]. Actually, Electronic Health Records (EHR) are a vital part of Healthcare Information Technology (HIT) and can contain a patient’s medical history, diagnoses, medications, treatment plans, immunization dates, allergies, radiology images, and laboratory and test results; allow access to evidence-based tools that providers can use to make decisions about a patient’s care; automate and streamline provider workflow [1]. The future of healthcare lies in working hand-in-hand with technology and healthcare workers have to embrace emerging healthcare technologies in order to stay relevant in the coming years [2]. This technology could help transform unsustainable healthcare systems into sustainable ones, equalize the relationship between medical professionals and patients, provide cheaper, faster and more effective solutions for diseases [2]. Potential improvements in population health include some applications on mobile devices that can help patients manage their mental state or fight mental disorders, empower patients to actively participate in their health care by taking advantage, encourage patients to lead a healthy lifestyle and help patients learn to take care of their health responsibly [3]. The ubiquity of mobile health technology is so pervasive that one could argue that mobile health is more impactful than health technology that is immobile. This is especially true in areas that are under served due to logistical considerations [3]. AI is the key for researching on this type of business because the use of NLP and Deep Learning techniques. NLP has the capability to capture unstructured data, analyze the grammatical structure, determine the meaning of the information and summarize the information [4]. As a result, NLP techniques can reduce cost and extract the relevant information. Hence, this computing field is being increasingly explored to provide a less complex way to solve these challenges. Deep learning provides the ability to 1
CHAPTER 1. INTRODUCTION analyze data at exceptional speeds without compromising on accuracy [4]. Futhermore, in business, chatbots have become so common because they reduce service costs and can handle many customers simultaneously. They offer users comfortable and efficient assistance when communicating with them and provide them with more engaging answers, directly responding to their problems [4]. This chapter presents the problem statement and motivation for the realization of the dissertation, the challenges proposed and the objectives that must be met. Furthermore, a description of the document structure is displayed. 1.1 Problem statement Diabetes Mellitus is a common condition that affects the way one’s body uses food to obtain energy [5]. Treatment and management strategies include medication (and in some cases the use of insulin), diet and exercise [5]. When a patient is diagnosed with DM, he/she has many information and abilities to learn, such as blood sugar testing, medication management, meal planning, and how to balance exercise and rest so that blood sugar level remains under control. Additionally, patients should adopt some self-care behaviors, for example, foot care, stress management, and monitor blood pressure and cholesterol [6]. About 422 million people worldwide have DM, the majority living in low-and middle-income countries, and 1.6 million deaths are directly attributed to DM each year [7]. Both the number of cases and the prevalence of DM have been steadily increasing over the past few decades [7]. Age is a major risk factor for DM. Continued monitoring of the prevalence of type 1 and type 2 DM among adults is particularly important because both have increased substantially over time among children and adolescents [7]. Over the past decade, there has been a substantial increase in the use of social media in healthcare [8]. A variety of studies have established that patients appreciate social media mainly for informational and emotional support. When seeking advice online about health concerns, forums dedicated to medical themes are increasingly becoming an appreciated source of information for many patients [8]. These forums are typically hosted by non-profit organizations that serve or advocate for people with DM or their families [8]. Examples include Associação Protectora dos Diabéticos de Portugal (APDP) and Sociedade Portuguesa de Diabetologia (SPD) [9,10]. Common features include discussion threads, chat boards, links to recent research, advocacy opportunities, surveys and polls, calendars of online and in-person events, and photo albums documenting DM-related activities and community events [11]. Theoretically, in some instances, chatbots may be better suited to help patient needs than a human physician because they have no biological gender, age, or race and elicit no bias toward patient demographics. Chatbots do not get tired, fatigued, or sick, and they do not need to sleep [12]. They are cost-effective to operate and can run 24 hours a day, which is especially useful for patients who may have medical concerns outside of their doctor’s operating hours [12]. Chatbots can also communicate in multiple different languages to better suit the needs of individual patients [12]. 2
CHAPTER 1. INTRODUCTION 1.2 Motivation Besides patient education is provided by healthcare professionals, such as medical doctors, nurses and nutritionists, the patient still needs to integrate all those treatments and lifestyle rules in their daily living, which is very challenging [13]. Many patients look for advice from other patients or caregivers of patients who have had the disease for a long time. They usually use the internet to contact other patients, through internet blogs and forums [13]. These are positive facilitators of DM management. However, blogs and forums members are not available anytime [13]. The growing number of healthcare chatbots, partly due to the democratization of chatbot development, motivates a closer look at how the systems address aspects concerning user experience, adoption and trust in automation, and healthcare provision [14]. Chatbot applications can provide immediate support to the user in natural language [14]. These applications present standardized information with the advantage of being customized to each patient, as Machine Learning (ML) enable chats to learn from prior interactions with the user, creating personalized advice [14]. People who are diagnosed with DM in the next few years are on the Millenial Generation - people who were born in or after the 1980s and who entered the labour market in the 2000s [15]. With that being said, there is a research that aimed to analyse the relationship between motives for using a chatbot and satisfaction with chatbot characteristics in the Portuguese Millennial population [15]. The majority of the respondents (54%) reported having already had experienced interaction with a chatbot [15]. The curiosity about this topic is present and research indicates it might be increasing [16]. There are three new dimensions that can be used to capture motives for using a chatbot: convenience, exploring and social [16]. The reason to use chatbots for convenience purposes thereby displays the highest value [16]. This dissertation consists in the design and development of a chatbot application for patients with DM, applying natural language and deep learning techniques. The design of the chatbot will be informed by user-centered research. 1.3 Aims The main work that is made with the Associação Fraunhofer is aligned with the design and development of a chatbot application for patients newly diagnosed with DM, applying NLP and ML techniques. The design of the chatbot will be informed by user-centred research. That being said, the main goals for this dissertation are: 1. Development of a model for the creation of a chatbot. 2. Development of a mobile application with the approached concepts. 3. Test and analyze the application. 3
CHAPTER 1. INTRODUCTION 1.4 Document outline This document is organised in four chapters. The first chapter presents a brief contextualization on the motivation for this study, identifying the objectives that are intended to be achieved and the main challenges to be addressed. The second chapter describes the state of the art with regards to the concepts that are related to the main objective of this case study, where they are addressed as the main techniques for carrying out the work and its problems. The third chapter explores the full details on the scope of this dissertation work, characterization of the problem, its challenges and the development plan. The fourth chapter describes some studies already developed. 4
Chapter 2 State of Art 2.1 Chatbot overview Over the last few years, along with the attractiveness of instant messaging, chatbots and pedagogical agents have motivated educators to integrate messaging tools in teaching and learning [17]. Chatbots are computer programs designed to carry on a dialogue with people, assisting them via text messages, applications, or instant messaging [17]. Therefore, the definition of a chatbot adopted for this dissertation is a computer program communicating by text in a humanly manner and who provides services to human users in order to accomplish a well-defined goal [17]. Essentially, instead of having a conversation with a person, the user talks with a bot that’s powered by basic rules or AI [18]. Chatbots are already widely used to support, expedite, and improve processes in other industries, and now, the technology is gaining traction in health care, where it is helping patients and providers perform myriad tasks [18]. Developments in AI enhance the abilities of chatbots to mimic human agents in conversation. However, human–chatbot communication has notice able differences in the content and quality in comparison to the human–human discussion [4]. The duration of a human–chatbot conversation is long. People often use concise language with poor vocabulary or even lousy language. The crucial difference among chatbots and humans is the perception of empathy, as chatbots are less capable of conversational understanding than humans are [4]. However, progress is being made, and chatbots are gradually becoming more fully aware of their interlocutor’s feelings. The common problem is that the subjective human perception makes people consider disclosed chatbots less informed and emotionally intelligent [4]. The major growth factors of the use of chatbots in healthcare include the rising urge for help patients in order to reduce risks and improve significant health concerns and growing demand for improving data usability to enhance patient care [19]. The following graphic exhibits the prediction of the evolution on chatbots investment. By it, it is possible to verify that in a near future the investment though chatbots will 5
CHAPTER 2. STATE OF ART increase in various areas as Healthcare, E-commmerce and Banking Financial Services and Insurance (Figure 2.1) [19]. Figure 2.1: Prediction of the evolution of chatbots investment in healthcare and other areas. [19] In order to be able to make an appropriate and deeper study, the chatbots that were created over time and the many types that exist will be addressed. After choosing the most suitable type of chatbot, it is essential to consider the use of NLP and Deep Learning. After studying the essential components for the development of the mobile application, the study of its content will be addressed, as it is intended for newly diagnosed patients with DM. After linking all these studies, the application development will be well planned. 2.2 A brief history of chatbots In 1950, Alan Turing wondered if a computer program could talk to a group of people without realizing that their interlocutor was artificial [4]. This question, named Turing test, is considered by many to be the generative idea of chatbots. A chatbot is an AI program that simulates interactive human conversation by using key pre-calculated user phrases and auditory or text-based signals [4]. The first chatbot created was named ELIZA which marked a significant development in both the machine intelligence and human–computer interaction [4]. ELIZA operates by recognizing key words or phrases from the input to reproduce a response using those keywords from pre-programmed responses [4]. The next advancement involved the use of NLP and it was developed the project ALICE in 1995 by Richard Wallace. The production of ALICE allowed for more sophisticated conversation and it was revolutionary, though, for being open-source. Developers could use Artificial Intelligence Markup Language (AIML) to create their own chatbots powered by ALICE [4]. 6
CHAPTER 2. STATE OF ART In the last years, the development of chatbots evolved with the creation of smart personal voice assistants such as Apple Siri,International Business Machines (IBM) Watson,Google Assistant,Microsoft Cortana and Amazon Alexa [4]. They connect to the internet and, in contrast to their predecessors, they create quickly meaningful responses [4]. As shown in this brief summary of the field of conversational agents, a lot of progress has been made since the early days of NLP. 2.3 Chatbots in medicine Nowadays, medical chatbots reduce healthcare professional’s workload by reducing hospital visits, reducing unnecessary treatments and procedures, and decreasing hospital admissions and readmissions as treatment compliance and knowledge about their symptoms improve [20]. For patients, this comes with a lot of benefits. Furthermore, hospitals and private clinics use medical Chatbots to triage and clerk patients even before they come into the consulting room [20]. These bots ask relevant questions about the patient’s symptoms, with automated responses that aim to produce a sufficient history for the doctor [20]. Patients will not get in touch with physicians or nurses or any medical professional with every one of their health questions but will turn to chatbots first [20]. If the little medical helper cannot comfortably respond to the raised issues, it will transfer the case to a real-life doctor [20]. Chatbots may play a beneficial role in healthcare. However, this work has developed significantly on that research with the primary finding from this study indicating that, with greater experience, mental healthcare professionals have greater belief in the use of chatbots to better manage their client’s own mental health [20]. The truth is chatbots cannot replace a doctor’s expertise, neither can they take over patient care. However, combining the best of both worlds improves the efficiency of patient care delivery, simplifying and fast-tracking care without compromising quality [21]. Furthermore, chatbots can be used as virtual assistants helping their users by playing many different roles, for example as symptom checkers, medication reminders or personal data gatherers [22]. Physicians agree with the idea that chatbots can help in most of the automatic simple tasks in healthcare scenarios [22]. Chatbots are the perfect tools to make possible this turn around, being aligned with chronic patients’ needs, interacting with them in the same way that patients communicate with their friends and relatives through their favorite messaging platforms [22]. The majority of existing applications focus on only a few needs of a patient with DM (e.g., nutrition guidance or glucose monitoring), and few focus on addressing the behavioral or psychological barriers to successful disease management [23]. Consequently, there is an evidence that showed promise in using mobile phones to help people with DM manage their condition effectively [24]. Although healthcare was not the first sector in which experiments with chatbots have been carried out, since the beginning of 2018 we have seen the emergence of and experimentation with many different use cases in this field [23]. The chatbots thus try to handle several needs, such as personalized medical 7
CHAPTER 2. STATE OF ART follow-up, communication and transmission of test results, dissemination of information, or even advice to patients or preliminary diagnosis. Below are some examples of chatbots that contribute to medicine [23]. 2.3.1 Florence Florence (Figure 2.2) reminds users to take their medication or birth control pills, motivates them to be adherent with their regimens, and is also able to present medicine specific information [25]. This application keeps track of patient health and helps him to reach his goals. There are additional features such as the explanation about a certain disease or finds a special location for the patient, like a doctor or a pharmacy [25]. Figure 2.2: Florence Application. 2.3.2 Safedrugbot SafedrugBot (Figure 2.3) is a chatbot messaging service that offers assistant-like support via the Telegram messaging application to the health professionals for example, doctors who need appropriate information about the use of drugs during breastfeeding [26]. SafedrugBot offers readily accessible drug information guides for health professionals who work with pregnant and breastfeeding women, it is a virtual assistant that can perform a variety of task. This application can perform different types of searches to find important informations on active ingredient or brand name drugs [26]. 8
CHAPTER 2. STATE OF ART an emotional, mental, spiritual, social, and financial perspective [37]. AI has the potential to both reduce physician burnout and improve the patient experience. The primary goal and benefit of patient-centered care is to improve individual health outcomes, not just population health outcomes, although population outcomes may also improve [38]. To preserve this ideal of patient-centred care, AI systems should be built in a way that allows for value-plurality, meaning the possibility that different patients might hold different values and have different priorities related to their care [38]. In this way, the ethical ideal of shared decision-making can be maintained and not be replaced by another form of paternalism, one practised not by doctors, but by AI algorithms [38]. 2.4.1 Automated Care At the moment, patients find themselves relying on a digital-first approach to healthcare — an arrangement that, at first, might not involve a human on the other end of the exchange [39]. It is not realistic to expect every patient to be on board with digital-care solutions beyond their current use. Having multiple points of entry for care —chatbots, telehealth visits, in-person consultations — provides patients with the valuable choice of how they want to receive it, ultimately boosting their confidence in and loyalty to their care provider [39]. AI-powered chatbots work well beyond helping frightened patients assess their symptoms and determine next steps. The technology has the ability to recommend treatments and schedule visits, among other things [39]. 2.4.2 Intelligent, Empathetic and Supportive Care Chatbots provide instant conversational responses and make connecting simple for patients. And when implemented properly, they can help care providers to surpass patient expectations and improve patient outcomes [39]. However, AI solutions sometimes lack the most important quality to good care delivery: a human touch [39]. However, Characteristic dimensions like Emotion or Personality do not seem to have any relevance to Portuguese Millennials. Instead the sample group valued Efficiency related Characteristics as important [16]. Despite all the potential benefits, like any other technology enabled services, chatbots will help only if people use them and follow their advice. There three main factors that influences the use of chatbots in the matter of trust: • Competence: The application must have the knowledge and skills needed to answer the questions [40]. • Integrity: The application must do what it says it will do [40]. • Benevolence: The application must have the patient’s best interests in mind, and not be guided by ulterior motives [40]. 15
CHAPTER 2. STATE OF ART The underlying trust factors of competence, integrity, and benevolence play important roles in the use of technology, and technology providing recommendations in particular [40]. Ability and integrity are typically more important for instrumental outcomes associated with transactions (such as purchasing) because users are most concerned with whether the technology will work as intended to complete the transaction [40]. Affect and other perceptual outcomes (such as satisfaction) are often influenced more by benevolence as these are based more on relationship aspects of technology use [40]. In healthcare, chatbots are deemed most helpful when the chatbot’s ability, patient compliance, integrity and benevolence match that of a human agent. 2.5 User Experience User Experience (UX) has become an important aspect of interactive system evaluations in the last two decades [41]. According to International Organization for Standardization (ISO),User Experience (UX) is a person’s perceptions and responses resulting from the use and/or anticipated use of a product, system or service [41]. UX is important because it tries to fulfill the user’s needs. It aims to provide positive experiences that keep a user loyal to the product or brand. It’s important to note that the UX encompasses much more than how a user feels about a product or service [41]. It incorporates a strategic understanding of the product’s business model and the processes clients use [41]. It also consists of understanding the broader context in which users interact and engage [41]. A successful UX design creates solutions that meet the needs of the client, users and ultimately works within the bounds of the technological platforms [41]. 2.5.1 User Interface There is substantial interest and engagement concerning conversational users’ interfaces for customer service [42]. Given the relative importance of customer service in users everyday lives, a broad uptake of chatbots for this purpose may be important in advancing users’ overall acceptance of conversational user interfaces in general [42]. However, attaining a broad uptake of chatbots for customer service will depend on whether customers perceive these as valuable and useful [42]. Chatbots for customer service will only enjoy sustained relevance and interest if they generate good user experience and represent value propositions that motivate users to engage in repeated interactions [42]. While the UX is not as visible to the user, the interface design is the first thing they will see, immediately influencing their perception of an application [43]. It is the responsibility of the User Interface (UI) Designer to enhance the brand within the interface. UI Design ultimately helps guide users through the interface using visual aids [43]. For a greater UI, it is needed to consider the following aspects: 16
CHAPTER 2. STATE OF ART • Clarity: The interface avoids confusion and ambiguity by making everything clear through language and visuals. Mobile applications with good UI usually do not need extensive onboarding to show the user how the application works [43]. • Familiarity: Many users like to see familiar features, buttons, or call-to-action. Familiarity includes commons symbols, icons, or colors, to convey a message such as red to exit or delete. Even if someone uses an interface for the first time, certain elements can be familiar [43]. • Responsiveness: This includes speed as an excellent user interface should not lag or feel slow. Providing feedback when a screen is loading will also enhance the UI by keeping the user informed on what is happening, for example, informing them of purchase confirmation or data processing [43]. • Consistency: Keeping your interface consistent across your application is important because it allows users to recognize usage patterns. Once your users learn how certain parts of the interface work, they can apply this knowledge to new areas and features [43]. • Aesthetics: While it is not necessary to make a UI attractive for it to function correctly, making something look attractive will make the application more enjoyable [43]. 2.5.2 User Experience in healthcare chatbots In general, there is a general lack of familiarity and understanding of health chatbots [44]. Quality, trustworthiness and accuracy of the health information provided by chatbots are the main aspects that people care. The use of chatbots is very accessible if it is targeted to minor health concerns that would not require a physical examination [44]. They must be perceived as a convenient tool that could facilitate the seeking of health information online. Thus, if free at the point of access, chatbots were seen as time-saving and useful platforms for triaging users to appropriate healthcare services [44]. To encourage people to adopt and use medical chatbots, both content quality and expertise of the chatbots should be first considered in the development process [44]. From the perspective of utilitarian and hedonic value, content quality has strongly positive effects on perceived usefulness and enjoyment, both of which influence users’ usage intention [44]. Perceived expertise of the medical chatbots can increase the users’ trust in the chatbots, which in turn affects their continuance intention to use the service agents [44]. In addition to the effort to improve a chatbot’s content quality and expertise, it is also important to iteratively evaluate its usability and UX, both in the development process and after the completion of its development [44]. It is necessary to study user-centred and theory-based approaches addressing patients’ concerns and optimising UX in order to achieve the best uptake and utilisation [45]. Patients’ perspectives, motivation and capabilities need to be taken into account when developing and assessing the effectiveness of health chatbots [45]. 17
CHAPTER 2. STATE OF ART 2.5.3 Usability Testing Usability evaluation is one way of ensuring that interactive systems are adapted to the users, their tasks and that there are no negative outcomes of their usage [46]. Usability evaluation is a fundamental step in the user centered design process of any interactive system be it a software, a web site or any information and communication technology or service [46]. The goal of a usability evaluation is to assess the degree to which a system is effective, efficient, and favors positive attitudes and responses from the intended users [46]. Think Aloud method Thinking Aloud is a method that requires subjects to talk aloud while solving a problem or performing a task [47]. This method traditionally had applications in psychological and educational research on cognitive processes, but also for the knowledge acquisition in the context of building knowledge based on computer systems [47]. In many cases the Think Aloud method is a unique source of information on cognitive processes: it generates direct data on the ongoing thought processes during task performance [47]. Thus, the Think Aloud method is a very direct method to gain insight in the way humans solve problems [47]. 2.6 Chatbot Approaches There are two main chatbot building architectures: rule-based approches and data-driven approaches [48]. The rule-based systems were exploited earlier and they rely on pattern-action rules. On the other side, the data-driven relies on large conversations corpora [48]. 2.6.1 Rule-based chatbots Rule-based chatbots are designed to answer questions based on prefixed rules. During the dialogue, the bot follows specific rules to chat with the user [48]. Rule-based chatbots are very popular in today’s market as they are easy to build and performing for simple tasks. However, performing complex tasks requires writing many rules which can be time consuming [48]. Despite their simplicity, the first proposed rule-based chatbots in history are impressing. Basically, with rule-based chatbots hand-crafted rules are used to produce answers or even questions [48]. 2.6.2 Data-driven chatbots Data-driven chatbots are the newest approaches and the most used ones [48]. The availability of text datasets, in general, and conversational datasets, in particular, allowed to apply data-driven approaches to text [48]. Data-driven approaches use existing human-human or bot-human conversations and/or narrative documents to create the bot utterances. In order to leverage the existing conversational data, one can use whether Information Retrieval (IR) or Machine Learning (ML) [48]. 18
CHAPTER 2. STATE OF ART 2.6.2.1 IR based chatbots Information retrieval chatbot models work as a search engine where the query is the user turn and the search result is the chatbot answer [48]. With the pairs dataset and question, the IR based conversational model will look in the dataset for the best matches. It is widely used in the industry to make goal-oriented chatbots where the chatbot can be customized on the tone and flow in order to drive the customers with the best experience [48]. The IR chatbots use techniques like keywords matching, ML or deep learning to identify the most appropriate response [48]. Regardless of the technique, these chatbots provide only predefined responses and do not generate new output [48]. 2.6.2.2 ML based chatbots The problem of generating human-like conversations has been modeled, lately, as the problem of mapping a human turn to a machine turn which is the target to be predicted [48]. Most recent works focused on applying deep learning models but each of these formulates the problem in a particular way and uses a different set of features. Most used ML models are sequence to sequence learning and reinforcement learning [48]. 2.7 Applications and Techniques of NLP NLP has recently gained much attention for representing and analysing human language computationally [49]. This came into existence to ease the user’s work and to satisfy the wish to communicate with the computer in natural language [49]. Since all the users may not be well-versed in machine specific language, NLP caters those users who do not have enough time to learn new languages or get perfection in it [49]. This field is related with different theories and techniques that deal with the problem of natural language of communicating with the computers [49]. Ambiguity is one of the major problems of natural language which is usually faced in syntactic level as well as it has sub task as lexical and morphology which are concerned with the study of words and word formation [49]. Each of these levels can produce ambiguities that can be solved by the knowledge of the complete sentence [49]. The goal of NLP is to accommodate one or more specialities of an algorithm or system. The metric of NLP assess on an algorithmic system allows for the integration of language understanding and language generation [49]. 2.7.1 Natural Language Understanding ANatural Language Understanding (NLU) system is a machine that produces an action as the result of an input sentence (speech or text). There are examples of systems that are able of modeling and learning the relationship between the input sentence and the action in a direct way [50]. 19
CHAPTER 2. STATE OF ART NLU is post-processing because starts to reveal to the computer the true meanings of text and not just surface understanding [50]. However, NLU is a huge problem and an ongoing research area because the ability of computers to recognize and process human language at human-like accuracy has an enormous possibility [50]. Computers could finally stand in for low paid customer service agents, capable of understanding human speech and its intent [50]. The biggest draw for NLU is a computer’s ability to interact with humans unsupervised [50]. The algorithms classify speech into a structured ontology, but AI takes over to organize the intent behind the words [50]. This method of deep learning allows computers to learn context and create rules based on more substantial amounts of input through training [50]. 2.7.2 Natural Language Generation Natural Language Generation (NLG) is the subfield of AI and computational linguistics that focuses on computer systems that can produce understandable texts in human languages [51]. Typically starting from some non-linguistic representation of information as input, NLG use knowledge about language and the application domain to automatically produce documents, reports, explanations, help messages, and other kinds of texts [51]. As a research area, NLG brings a unique perspective on fundamental issues in AI, cognitive science and human-computer interaction [51]. These include questions such as how linguistic and domain knowledge should be represented and reasoned with, what it means for a text to be well written, and how information is best communicated between machine and human [51]. 2.7.3 Text Preprocessing Techniques There are a lot of many processes involved in the pipeline of NLP. At the syntactic level, statements are segmented into words, punctuation (i.e. tokens) and each token is assigned with its label in the form of noun, verb, adjective, adverb and so on (Part of Speech (POS) Tagging) [52]. On the semantic level, each word is analyzed to get the meaningful representation of the sentence. Hence, the basic task of NLP is to process the unstructured text and to produce a representation of its meaning [52]. Information Extraction (IE) refers to the use of computational methods to identify relevant pieces of information in documents generated for human use and convert this information into a representation suitable for computer based storage, processing and retrieval [52]. Next, it is presented the architecture for the preprocessing of the messages (Figure 2.12). Firstly, the user sends a message that will be divided into sentences through sentence segmentation. Then, each sentence will be divided into words through tokenization. After tokenization, one of two processes will be used to obtain the canonical word: lemmatization or stemming. Finally, a model called Bag of Words (BOW) is implemented in order to prepare the using of ML techniques. 20
CHAPTER 2. STATE OF ART Figure 2.12: Pipeline Architecture for a Preprocessing System. 2.7.3.1 Sentence Segmentation Sentence Segmentation is the problem of dividing a string of written language into its component sentences. Fortunately, this process is not that complex. The sentences can be split whenever it is seen a punctuation mark [52]. 2.7.3.2 Tokenization Tokenization is the problem of dividing a sentence (string) of written language into its component words. Generally, the better resolution for this type of data is dividing the word whenever it is seen a space [52]. For grammatical reasons, documents can contain different forms of a word or related words with a similar meaning. In order to solve these problems, it can be used two processes: lemmatization or stemming [52]. The main goal for these processes is to to reduce inflectional forms and sometimes derivationally related forms of a word to a common base form [52]. Lemmatization Lemmatization usually refers to doing things properly with the use of a vocabulary and morphological analysis of words, normally aiming to remove inflectional endings only and to return the base or canonical form of a word, which is known as lemma [53]. 21
CHAPTER 2. STATE OF ART The utilization of this process can be very useful for a better accuracy. However, in some cases, its use is not recommended because it is very consuming. Most of lemmatization algorithms are slow, with a computation overhead [53]. Stemming Stemming refers to a crude heuristic process that chops off the ends of words in the hope of achieving this goal correctly most of the time, and often includes the removal of derivational affixes [53]. Unlike lemmatization, a stemmer is easier to implement and usually runs fast [53]. Addictionally, the reduced accuracy may not matter for some applications. The bad side of its use is that the algorithms do not actually know the meaning of the word in the language it belongs to [53]. 2.7.3.3 Bag of Words Humans can understand the language easily in a fraction of seconds. But, machines cannot understand the language [54]. For that, it will be needed to convert the text into a numerical form that is easily understandable by the machine. Most of the ML and statistical model work with numeric data hence. So, it is important to convert all the texts into numbers [54]. For that it is used the Bag of Words (BOW) which acts as a baseline model and thus can be treated as a basic model to test the results and know more about the data that is being fed to a model [54]. After that, one can proceed further with deep learning approaches. This process is often referred to as vectorization. With all this, a BOW also turns out to play well when the data is small and domain specific [54]. The result is a numerical vector which can be utilized as inputs in the various ML algorithms to classify documents into topics, to be used in chatbots or for many other ML applications where text is the initial input [54]. Although this is a simple model, it has proven to be effective in various scenarios [54]. 2.8 Deep Learning Deep learning is a type of ML that trains a computer to perform human-like tasks, such as recognizing speech, identifying images or making predictions [55]. Instead of organizing data to run through predefined equations, deep learning sets up basic parameters about the data and trains the computer to learn on its own by recognizing patterns using many layers of processing [55]. In recent years, Deep Learning has garnered tremendous success in a variety of application domains [56]. Learning is a procedure consisting of estimating the model parameters so that the learned model (algorithm) can perform a specific task [56]. Different methods have been proposed based on different categories of learning, including supervised, semi-supervised, and unsupervised learning [56]: • Supervised learning is a learning technique that uses labeled data [56]. In the case of supervised Deep Learning approaches, the environment has a set of inputs and corresponding outputs (𝑥𝑡,𝑦𝑡)∼𝜌[56]. For example, if for input 𝑥𝑡, the intelligent agent predicts ˆ𝑦𝑡=𝑓(𝑥𝑡), the agent 22
CHAPTER 2. STATE OF ART will receive a loss value 𝑙(𝑦𝑡,ˆ𝑦𝑡). The agent will then iteratively modify the network parameters for a better approximation of the desired outputs [56]. After successful training, the agent will be able to get the correct answers to questions from the environment; • Semi-supervised learning is learning that occurs based on partially labeled datasets [56]. • Unsupervised learning systems are ones that can without the presence of data labels. In this case, the agent learns the internal representation or important features to discover unknown relationships or structure within the input data. Often clustering, dimensionality reduction, and generative techniques are considered as unsupervised learning approaches [56]. This new field of ML has been growing rapidly and has been applied to most traditional application domains, as well as some new areas that present more opportunities [57]. Experimental results show state of the art performance using Deep Learning when compared to traditional ML approaches in multiple fields [57]. 2.8.1 Artificial Neural Network An Artificial Neural Network (ANN) is a biologically inspired computational model formed from hundreds of single units, artificial neurons, connected with coefficients (weights) which constitute the neural structure [58]. They are also known as Processing Elements (PE) as they process information. Each PE has weighted inputs, transfer function and one output [58]. PE is essentially an equation which balance inputs and outputs. ANN is also called connectionist model as the connection weights represent the memory of the system [58]. Artificial networks comparable to a human brain in complexity are thus still far beyond the creative capacity of the human brain [59]. The human brain is much more complex and, unfortunately, many of its intellectual functions are still not well known. ANNs are capable of processing extensive amounts of data, however, and making predictions that are sometimes surprisingly accurate [59]. ANN Supervised Learning Supervised learning is the most common technique in the classification problems, since the goal is often to get the machine to learn a classification system that it is created [59]. Most commonly, supervised learning leaves the probability for input undefined, such as an input where the expected output is known. This process provides dataset consisting of features and labels [59]. The main task is to construct an estimator that is able to predict the label of an object given by the set of features as inputs along with the correct outputs, and it learns by comparing its actual output with corrected outputs to find errors [59]. It then modifies the model accordingly. The model that is created is not needed as long as the inputs are available, but if some of the input values are missing, it’s not possible to infer anything about the outputs [59]. 23
CHAPTER 2. STATE OF ART This category is the most common technique for training neural networks and decision trees [59]. Both of these depend on the information given by the pre-determined classification. Also, this learning is used in applications where historical data predicts likely future events [59]. In context of neural networks, that means that the desired output is known and adjusting of weight coefficients is done in such way, that the calculated and desired outputs are as close as possible [59]. Back propagation, illustrated in Figure 2.13, is the most widely used method for neural network training because it is the easiest to implement and to understand and it works reasonably well for most linear and nonlinear problems [59]. Figure 2.13: ANN Supervised Learning process. [60] 2.8.2 Feed-Forward Neural Network Feed-forward networks are among the simplest deep learning models for text representation [61]. Yet, they have achieved high accuracy on many text classification benchmarks. These models view a text as a BOW. For each word, they learn a vector representation using an embedding model, take the vector sum or average of the embeddings as the representation of the text, pass it through one or more feed-forward layers, known as Multi-Layer Perceptrons (MLPs) or Multi-layer feed-forward (MLF), and then perform classification on the final layer’s representation using a classifier [61]. AMLF neural network consists of neurons, that are ordered into layers [61]. The first layer is called the input layer, the last layer is called the output layer, and the layers between are hidden layers [61]. For the formal description of the neurons it is usually used the mapping function 𝛾, that assigns for each neuron a subset (𝛾(𝑖) ⊆ 𝑉for each neuron 𝑖) which consists of all ancestors of the given neuron [61]. So, it is possible to get all predecessors with the inverse mapping function (𝛾(𝑖)−1⊆𝑉). Each neuron in a particular layer is connected with all neurons in the next layer [61]. The connection between the 𝑖th and 𝑗th neuron is characterized by the weight coefficient 𝜔𝑖,𝑗 and the neuron by the threshold coefficient 𝜃𝑖 or 𝜃𝑗[61]. The weight coefficient reflects the degree of importance of the given connection in the neural network. The output value of the 𝑖th neuron 𝑥𝑖is determined by the following equations [61]: 24
CHAPTER 2. STATE OF ART Healthy Balanced Diet An important part of managing DM is to eat a healthy balanced diet [9]. Cooking from scratch gives the control over what the patient eats. The concept of healthy eating is abstract and, at the moment with the dietary patterns that may be constituted, there is no healthy diet that can be considered for a person with DM because there is no recommended diet [9]. There will be adequate food for each person, and this food has to minimally guarantee the satisfaction of nutrients with a greater or lesser amount of carbohydrates and protein that the minimum needs are met [9]. So, the following items presented (Table 2.3) are the meals recommended by APDP and the same amount must be taken every day. Table 2.3: Recommended food recipes. [9] Soups Cream of red cabbage, Gazpacho soup, Vegetable soup, Cream of peas with coriander, Coriander soup, Pumpkin soup with watercress, Green soup with cauliflower and carrot, Pumpkin cream with mint, Beet soup Fishes Stuffed tomatoes, Fish pudding, Sardine pate, Fillets in the oven, Horse mackerel in escabeche, Baked cod, Hake with spinach, Hake in a pot, Hake fillets with vegetables and potatoes punching Salads Tomato-rich salad, Fresh lettuce salad, Tropical fruit salad, Peas with poached eggs, Country lunch, Arugula and lettuce salad, Mimosa lentils, Stuffed courgettes, Summer salad, Cold grain salad Pastas/Rice Special pasta, Rice pudding with tuna, Spiral pasta with roasted vegetables, Spaghetti with monkfish, Cotovelinhos with alinho, Special bean rice Meats Chicken with tomatoes and peppers, Roastturkey leg with orange sauce, Turkey breast in the pan, Turkey crown with tomato sauce, Rabbit in garlic vineyard, Rabbit to saloia, Turkey breast stuffed with cabbage and bread, Stewed rabbit, Pork loin with milk and plums Desserts Fruit with lemon and cinnamon, Tropical fruit salad, Apple with yoghurt and walnut crumb, Fruit salad, Mango mousse, Cream milk, Golden slices, Farophyas, Blackberries with yoghurt 31
CHAPTER 2. STATE OF ART 2.9.5 Complications The management of DM in a primary care setting in Portugal can and should be improved, since 9.8% of patients are not treated and 48.3% are not controlled [68]. DM has a considerable clinical impact due to its strong association with the complications that a patient may have [68]. Below the most worrying complications are addressed (Table 2.4). Some complications are related to the others so, some of that do not need a proper explanation because they are on the same group. Table 2.4: List of complications. Group Complications Microvascular 1) Retinopathy 2) Nephropathy 3) Neuropathy Macrovascular 3) Coronary Heart Disease 4) Brain Disease 5) Lower Limb Arterial Disease 6) High Blood Pressure Neuro, macro and microvascular 8) Diabetic Foot Others 10) Sexual Dysfunction 11) Infections 2.9.5.1 Retinopathy Retinopathy is an ophthalmological manifestation of DM and one of the main causes of vision loss worldwide. The frequency of retinopathy depends on the years of DM duration [9]. After 20 years of evolution, more than 90% of people with type 1 DM and more than 60% of people with type 2 DM develop retinopathy. Poor metabolic control (blood glucose) is also a risk factor for the onset of retinopathy [9]. There are other risk factors such as blood pressure, dyslipidemia, smoking and DM duration [69]. 2.9.5.2 Nephropathy The nephron is the functional unit of the kidney [9]. There are millions of nephron and each one works in the filtration of the blood and in the formation of the urine [9]. When, over the years, arteries are subjected to elevated blood glucose levels, they start to be damaged, this damage is even more serious if high blood pressure coexists [9]. In more serious situations, nephropathy can culminate in renal failure, that is, the kidney is no longer able to perform its purification function and it is necessary to resort to hemodialysis for the blood to be purified [9]. It is extremely important to prevent this situation through effective glycemic control. The glomerular filtration rate should be evaluated annually in people with DM, it is a value that varies according to sex, age and body surface. Nephropathy is more common in type 1 and type 2 DM when it is poorly controlled [9]. 32
CHAPTER 2. STATE OF ART 2.9.5.3 Neuropathy Diabetic neuropathy is a nervous disorder caused by DM [9]. The onset of neuropathy can be so slow that in the early stages it may show no symptoms or signs but symptoms may vary according to the type of damage to the affected nerve fibers [9]. Patients may experience some symptoms, such as numbness or pain, especially in the extremities of the limbs, at the level of the legs and feet [9]. It can also cause changes in motor function and sensitivity. The extremities of the hands can also be reached, giving rise to changes similar to those of the feet [9]. The increase in blood glucose (hyperglycemia) is one of the most important causes of this complication, but there are other causes [9]. It is possible to prevent neuropathy or delay its development, thanks to a good control of DM, through a healthy lifestyle (food and physical activity, not smoking and avoiding alcoholic beverages) and complying with the appropriate pharmacological treatment [9]. 2.9.5.4 Coronary Heart Disease Cardiovascular risk factors such as obesity, hypertension and dyslipidemia are common in patients with DM, placing them at increased risk for cardiac events [70]. Therefore, targeting cardiovascular risk factors in patients with DM is critical to minimize the long-term cardiovascular complications of the disease [70]. DM generally confers twice the risk of vascular events, regardless of the risk factors, and the risk is also higher in women [70]. This risk is increased in those associated with long-standing DM and microvascular complications [70]. In cases of early onset of type 1 DM, between 1-10 years of age, there is a loss 17.7 years of life in women and 14.2 years in men [70]. In type 2 DM poor glycemic and renal complications were the main determinants of cardiovascular events. These results highlight the need for intensive control of risk factors in both groups [70]. 2.9.5.5 Brain Disease DM is associated with moderate cognitive deficits and neurophysiological and structural changes in the brain, a condition that may be referred to as diabetic encephalopathy [71]. DM increases the risk of dementia, particularly in the elderly. Due to the ageing of the western population,the prevalence of diabetes and the combination of DM and advanced age dementia is expected to increase considerably [71]. 2.9.5.6 High Blood Pressure Hypertension aggravates the problems in the smaller arteries (microangiopathy), especially diabetic nephropathy (damage to the kidney arteries), for which it is a major risk factor. High blood pressure is twice as common in people with DM and increases with age [9]. Hypertension already exists in about 40% of people when they are diagnosed with DM, which suggests a relationship between the obesity and insulin resistance leading to high blood pressure and it worsens glucose (sugar) intolerance [9]. In most cases there is no cause for high blood pressure, so it is called essential, this is particularly the case in type 2 DM [9]. 33
CHAPTER 2. STATE OF ART 2.9.5.7 Diabetic Foot Diabetic foot is one of the most frequent complications in DM and 25% of people with DM have conditions that increase the risk of diabetic foot [9]. This complication is responsible for the majority of amputations in Portugal. To avoid this complication it is important a good control of DM and foot care [9]. Additionally, patients with DM should have an annual foot evaluation with their doctor in which a low risk, medium risk or high risk rating will be assigned [9]. 2.9.6 Information Availability Over the past two decades, the internet has become a widely available source of information, as well as a key component in clinical informatics, a rapidly growing field aimed at exploring and updating the potential of information and communication technology to improve health outcomes [72]. One prominent example is the use of patient web portals that enable patients to access their health records, exchange emails with providers, complete administrative forms, receive appointment reminders, and manage medications [72]. The association between healthcare access barriers and online health information seeking suggests that when healthcare needs are not met, people may have a high demand for online health information [72]. Therefore, providing reliable health-related information online may help to meet the demand for such information, which is a potentially important self-care resource for those facing barriers to care access [72]. 2.9.6.1 Support in Portugal Currently, in Portugal, when a person needs help, he/she turns to the medical unit mainly to solve his/her problems [73]. Initially, a patient with DM has too many questions regarding the treatment and its conditions. In order to solve this problem, the patients are starting to use reliable consumer-level information on the internet when they face a daunting task [73]. An enormous quantity of content is dispersed among an ever-increasing number of websites [73]. Therefore, to help patients turn to reputable and trustworthy portals that provide information in the form of educational guides, to groups or forums where there are several people addressing the subject. Another not very reliable but quite common way is to do a search in a search engine for any doubt the patient may have. That being said, recent studies have raised concerns about the accuracy and organization of disease-specific information on the internet. APDP Associação Protectora dos Diabéticos de Portugal (APDP) is a Portuguese institution and the oldest DM association in the world having more than 15 thousand members. This institution maintains the flag of respect for people with DM and the defense of their autonomy and social integration. APDP works to improve the quality of life and well-being of people with DM, so that this disease does not constitute a barrier in their daily lives. The educational material available is divided into the various existing themes 34
CHAPTER 2. STATE OF ART about DM and this is where a person with DM can explore a lot of information to help in self-care related to DM. [9]. SPD Sociedade Portuguesa de Diabetologia (SPD) is a scientific society with a strong component in supporting research and dissemination of knowledge in the area of DM. It also has the role of disease advocacy with messages that reach the general population [10]. SPD is also responsible for the National Diabetes Observatory, for the quarterly periodical publication of a scientific journal, the Revista Portuguesa de Diabetes and for the annual holding of the Portuguese Diabetes Congress [10]. Diabetes 365º Diabetes 365º is a web platform dedicated to the dissemination of DM from three main angles: knowing, preventing and caring [74]. It has partnerships with magazines and websites specialized in health, such as those mentioned above, as well as the support of organizations for DM education and prevention, from Medical Associations, Patient Associations, Pharmaceutical Industry, among others [74]. Diab(r)etes Diab(r)etes is a group that was created on Facebook and emerged from the need for people with the same problems, in this case with a chronic disease such as DM, to share their experiences, help each other and learn from each other [75]. The main objectives of this group are to demystify DM, help people with DM who are in need and psychological support through the sharing of experiences, either online in the Facebook group, or through meetings that are promoted nationwide [75]. Diabet1cos Diabet1cos is another Facebook group that has similar objectives to the group mentioned above: sharing experiences in matters related to any type of DM, whether for the self or for family members of people with DM, a place to vent to those who understand the situation, to have someone who listens to the patient and gives him a word of comfort [76]. 2.9.6.2 Limitations Online health information presents some inherent difficulties and it is difficult to regulate, meaning quality control is a challenge, and, further, patients vary widely in their health information literacy [77]. Bad health information used in an improper way can be highly detrimental [77]. Patients might trust misleading 35
CHAPTER 2. STATE OF ART information or might make important health decisions based on sensationalized or emotionally charged stories that are not relevant to their health context [77]. Patients are often in a vulnerable position, and many are willing to accept information that provides a sense of hope and control [77]. Owing to a lack of technical knowledge, some patients are also unable to critically assess or might misinterpret health information [77]. These factors can lead to a false sense of knowledge and security, and potentially noncompliance if the patient adopts beliefs that conflict with appropriate medical practices [77]. 36
C h a p t e r 3 Implementation This chapter is intended to expose the decisions made in order to achieve the main objectives. Then the problems that arose during the preparation of the work will be exposed as well as the strategies to solve them. 3.1 Application Content In order to achieve one of the main goals of this work which is approaching the content to be introduced into the application, it was necessary to make a research about the application content that is related to the questions that individuals newly diagnosed with DM search. This research was performed into two ways: • The first way was achieved by search on Portuguese websites or guidelines that are reliable. Most of the guidelines presented are composed of relevant and important information for any individuals with DM who does not have much experience on a daily basis. Thus, much of the information can be systematized for the application due to the fact that they are responses of high need and that they are arranged in several easy-to-understand steps. In the context of this research, a study was also carried out where the main issues that people with DM had during an earlier phase were observed. • The second way was made through some interviews made to experienced healthcare professionals such as nutritionists and physicians where they clarified several doubts that patients newly diagnosed with DM often have, and in which they worry. The various responses obtained during the interviews were able to clarify several doubts that existed during the investigation of the first method. In addition to complementing these researches, it also served to obtain a new perspective of the patients with DM since the research is based on work made by specialists of the area. 37
CHAPTER 3. IMPLEMENTATION After a careful and more structured analysis of all the methods carried out to obtain the best possible content, a document (Appendix A) was completed that contained all the information regarding the pair of questions/answers that were available for the application. Bellow, all the methods that were approached will be discussed and explored. 3.1.1 Online Communities In order to be able to carry out a study in relation to a potential user of the application, it was possible to obtain various information about individuals with DM in groups that exist on Facebook. These groups are communities that contain people who understand and clarify various issues related to DM and others who are new to some subjects and have some doubts. Thus, the idea was to create a form (Appendix B) where people from these groups could annotate the questions they had when they were diagnosed with DM. Invitees were sent by a post on the group inviting them to complete the form, accessible via an embedded web link. A total of 8 people completed this form and all participants gave informed consent to complete it. Overall, the findings demonstrated that patients have varied questions and DM is a topic that contains tons of questions. Many of the questions corresponded to some that had already been implemented (the more general questions). Frequently Asked Questions • Can I eat sweets? / What can I eat? • What are carbohydrates and how can I count them? • What are ketones? • What is basal and rapid insulin? • What is the glycemic index? • Is diabetes curable? • Can I have diabetic children? • What are the risks of having high blood glucose? • Can I travel? • What physical exercise should I do? 38
CHAPTER 3. IMPLEMENTATION 3.1.2 Interviews 3.1.2.1 Nutritionist The nutritionist signed an informed consent prior to participating in the interview (Appendix C). He was asked about the questions that newly diagnosed patients with DM often have. The interview approached many questions that can be applied on the context of the application (Appendix D). So, in order to complement the application and meet what the user wants, it was necessary to assimilate the most important data. Firstly, the questions that most individuals newly diagnosed with DM ask are: • What foods are prohibited? • What foods can I eat? • What did I do wrong? The nutritionist also provided insights about the answer to those questions. For the first two questions it is appropriate to answer that there are no prohibited foods or foods that the patients with DM can eat. Instead, they should follow a dietary pattern that can be considered appropriate for people with DM or for anyone else who does not have DM. The point is that in people with DM it has to be personalized according to their needs which means that the patients with type 1 DM have to follow the intensive therapy through measuring the amount of foods that provide carbohydrates and consequently determine the amount of carbohydrates that they will eat; individuals with type 2 DM should generally ingest an identical amount every day due to the drugs that will be pre-calculated taking into account the methods used. One of the most common problem is that the body is not prepared to metabolize the amount of carbohydrates that the patient ingest. It is normal to have some foods that are not recommended but it is possible for the person to consume. The same is applied to some type of drinks. Regarding the last question, it is possible to say that individuals with DM in the first phase are very frightened because there will have to be a huge change in habits and behaviors from now on. This means that there is a radical change in the paradigm about what it was like to be normal because someone who had nothing will start insulin therapy that will have to be with several injections throughout the day, have a device for 24 hours that will have to do the monitoring of blood glucose, worrying about high/low blood sugar, and thinking what they are going to eat. Furthermore, issues faced by individuals with DM at job were also addressed. The employer and the conditions should allow the individuals with DM to have the opportunity to take care of themselves as long as they have the mechanisms for measuring blood glucose. As long as the job itself provides the conditions for the employees to treat their DM, it is possible to work at any job. Relatively to newly diagnosed pregnant women with gestational DM, the past is a very important factor and it is not just during pregnancy that women may have the risk of developing a type of DM: age of the woman, obesity before pregnancy, if during pregnancy the woman gains more weight, and if the woman 39
CHAPTER 3. IMPLEMENTATION has had another previous pregnancy are risk factors to consider as well. They should eat about at least 175g of carbohydrates per day. Gestational DM is a warning if in case the woman doesn’t care she may become a person with DM sooner than she would like. Lastly, the nutritionist provided a list of the best web pages that can have useful guidelines such as SPD,APDP,American Diabetes Association (ADA), and Academy of Nutrition and Dietetics. The table of food composition indicated is the Portuguese Food Composition Table of the Instituto Nacional Ricardo Jorge. 3.1.2.2 Individuals with Diabetes Mellitus The sessions that were held with people with DM addressed the content of the application. Before participating in this session, participants signed an informed consent (Appendix F). This step was very important because the main target audience is people newly diagnosed with DM and, with people who already have DM, it was possible to clarify some doubts such as what questions they had when they were diagnosed as well as review the content that was developed. These sessions were conducted through a semi-structured guide presented in the appendix G. Regarding the question ”Why do I have diabetes?”, initially it only addressed a target audience, which in this case would be people with type 2 DM. Through conversations with people who got DM it was possible to notice that the answer was still incomplete because it did not mention a reason for people with type 1 DM. Other corrections were pointed out in the way the questions are asked. With the help of individuals with DM, it was possible to clarify more correctly how they would do this issue. From the user’s point of view, it is an important way to customize content to make it easier to stay clear. Regarding the rest, in a way it was evaluated positively, and the patient with DM easily understood what the message of the answer to each question intended to convey. In the end, the participants indicated some questions that they had in the diabetes diagnosis phase that were not present in the content already presented. The questions that were pointed out to add included the most basic definitions of terms related to DM, such as the following questions: • What is insulin? • What are carbohydrates? • What is hyperglycemia? • What is hypoglycemia? 3.1.2.3 Doctors General practitioner doctors are typically the primary point of care for a DM–related health issues, so these participants were targeted for the evaluation of the content of the mobile application that will serve 40
CHAPTER 3. IMPLEMENTATION 3.2.4.4 Communication between front-end and back-end The main reason for choosing the type of communication is based on the application that is intended to be developed. Therefore, as the application will be a chatbot and there will be conversations in real time, the communication would have to be done with WebSockets and not by Representational State Transfer (REST). The best reasons are discussed below. •WebSocket is a low-level protocol based on the concept of socket and port, which are the underlying transport mechanism, whereas REST is based on Create, Read, Update and Delete (CRUD) operation [79]. •WebSocket approach is ideal for real-time scalable application, whereas REST is better suited for the scenario with lots of getting request [79]. •WebSocket is bi-directional in nature, i.e. both way operation from client to server and vice versa is possible, whereas REST follows a uni-directional approach [79]. •WebSocket works better, where the client-server communicates over the same Transmission Control Protocol (TCP) connection for the life of web socket connection whereas, for an Hypertext Transfer Protocol (HTTP) request, a new TCP connection is initiated [79]. •WebSocket communication allows the client and server to talk independently of each other, whereas with the REST-based approach, either client is talking to the client or the server is talking to the client at any given time [79]. 3.2.4.5 Bot response engine deployment For the deployment of bot response engine Python was used because it is more stable, flexible, and has many tools available. This programming language is the best fit for ML and AI-based projects, since it includes simplicity and consistency, access to great libraries and frameworks for AI and ML, flexibility, platform independence, and a wide community. These add to the overall popularity of the language. For preprocessing the data, Stanza, a Python NLP package was used. The choice of another package could be made, such as Natural Language Toolkit (NLTK). The adoption of Stanza is due to the language that will be used for preprocessing. The native language is Portuguese and, as NLTK is quite incomplete for this language, Stanza was chosen because it is a very recent and well updated package in relation to Portuguese. Since it is needed a scikit-learn type for building Neural Networks, Keras was used as part of a Tensor- Flow workflow that is completely Python-based framework and supports almost all the models of a neural network. Keras layers and models are fully compatible with pure-TensorFlow tensors, and as a result, Keras makes a great model definition add-on for TensorFlow. 47
CHAPTER 3. IMPLEMENTATION 3.2.5 System Modeling Before proceeding with the implementation of the application, it is necessary to develop a modeling of the system in order to understand how the application will be presented to the user experience. The key to modeling was to think about the type of user who will use the application. Due to the age group, it was crucial to create something that has an easy usability and flexibility. Along with the modeling, it was necessary to plan how the features can be arranged so that the user has a simple and accessible experience. Thus, a Unified Modeling Language (UML) activity diagram was implemented for capture the dynamic behavior of the system (execution and flow of the behavior of a system). This type of diagram consists of activities that are made up of actions that apply to behavioral modeling technology. Next, a diagram of this type will be presented, which consists of the activities and actions that the user can choose. 48
CHAPTER 3. IMPLEMENTATION Figure 3.2: UML activity diagram of the application. 3.2.6 Implementation of the application The main idea in implementing a chatbot application was to create a first version that was a local Graphical User Interface (GUI) (with terminal). In this way, it was possible to do several tests on the bot response engine in order to improve the bot. When the bot response engine was ready to use (with a few concepts of DM), it was necessary to proceed to the main GUI:Android and iOS smartphones. To accomplish that, it was created a second version that was a local running device or an emulator through Expo. At this stage, a lot of updates were made in relation to the front-end in order to make improvements in the quality and accessibility of the application for the user. Lastly, the final version was about to the deployment of the application through a Cloud. After that, the application was ready to use in order to make some tests. 49
CHAPTER 3. IMPLEMENTATION 3.2.6.1 Bot response engine The bot response engine was made based on the use of the Keras as a part of a TensorFlow’s library as it was said earlier and using the principles and concepts of ANN directed to Feed-Forward Neural Network. This is divided into two steps: the first one approaches the preprocessing and training of data; on the other hand, the second makes the prediction by loading the model created. As a final result, a limitation of the error was made in order to have an percentage of efficiency of the response on the bot side. The efficiency percentage refers to the degree of certainty that the bot has of an answer being set to 85%. In short, based on the training that was done, the responses that the bot is giving are based on a confidence of 85% of being able to respond, and if it is below it will indicate that he did not understand the content of the message that the user sent. Preprocessing data The first phase involves the processing of all data in order to be trained. NLP is used here to remove punctuation marks, use tokenization and make the lemmatization of the sentences. To achieve this, Stanza was used. Firstly, a total of 4 sets were defined: • Set of punctuation marks: This set contains the punctuation marks and it will remove all the punctuation on each sentence (question or answer). • Set of words: It will contain all words of all sentences after the proccess of lemmatization and the exclusion of punctuation. • Set of tags: The tags are intended to be the unique identifier for a given set of defined questions/answers. So, these tags will be added to this set. • Set of documents: This set will be a set of pairs where the first value is precisely the set of words and the second is the tag referenced to the set of words which means that each pair refers to each sentence (question or answer). In order to add some content to these sets, a JSON file with all the tags, questions and answers was created because it was more appropriate and simple to store and read content. Lastly, after the sets are complete they are serialized and saved into pickle files. Figure 3.3: Example of JSON file composition. 50
CHAPTER 3. IMPLEMENTATION Training data The second phase contains the conversion of all the sets approached above to a BOW and the creation of a proper model to be trained. Firstly, it was necessary to convert the text into a numerical form (vectorization) to create the model. For that it was created a BOW. In order to accomplish this, the set of all words was used. For each sentence (pattern) it was created an array with the size of the words set. This array is filled with 0’s or 1’s: if the a word on the sentence is equal to the word on the words set it is filled with 1, otherwise it is filled with 0. This process is made for all the sentences (questions/answers) that were created at the start. Then, it was created to lists called train_x and train_y:train_x list refers to the vectorized result for the model creation; train_y which is made up of numbers that serve as unique identifiers for each tag. The next step involves the creation of the model that will receive the two lists (train_x,train_y). The model has three layers: on the first one with 128 units, the input shape will be the length of train_x list and it is applied the Rectified Linear Unit (ReLU) activation function which means the element-wise maximum of 0 and the input tensor; the second one with 64 units will use again the ReLU activation; the third one with the size of the tags set as the unit number and it will use the softmax activation in order to be made the probability distribution. Between these layers, it is used a regulation layer which is called Denser Layer to prevent over fitting. Before creating the model, it was used the SGD. After create the model it is necessary to train itself, over a number of epochs that can be defined with any number. In this case it was used 300 epochs. Finally, the model is saved locally. Load model and predict The prediction will work based on the sentence/question that is given as input. In the first step, it is made the preprocessing of the data on the sentence with NLP: remove punctuation marks, use tokenization and make the lemmatization of itself. Then, it is used the words set that contains all words that were trained in order to verify if any word of the sentence given is on this set. After that, and based on this verification it is made the prediction with the model that was created and loaded. Then, it is analysed through the probability distribution which answers are above the threshold error that is 85%. Lastly, it is verified if there are any results: if there are results, it is created a list with the final results ordered by the best percentage. After the results are displayed, it is essential to get all the answers for the sentence/question that was given for the input. So, with the final results it is only needed to compare which tag is the same between the final results and the JSON file that contains all tags associated to all questions and answers. After that, and when the tag is found it is chosen a random answer of that and the final answer is presented for the user that asked the question. 3.2.6.2 Back-end Before the implementation it was needed to create a new database to store all the messages between the user and the bot. For that it was created a new cluster on MongoDB available for all Internet Protocol 51
CHAPTER 3. IMPLEMENTATION (IP) addresses which means that it was defined 0.0.0.0/0 where effectively specifies all networks. In this database there are two collections: the first one is called questions and stores all the questions that the user has sent when the bot failed to send a proper answer. This collection will help out through the adding of new sets of questions/answers; the second one is called users and contains the identifier of the user, name of the user and all the messages exchanged. The communication between back-end and bot response engine is made locally. The back-end will call directly in order to use it. Then it is created a method that will make the prediction for a certain message/question. In order to accomplish the communication through WebSockets between the backend and front-end it was used a Socket.IO integration for the Flask application. With Flask-SocketIO the server needs to register handlers for the events, similarly to how routes are handled by view functions. So, the server-side event handler is defined with the following events: •authentication: this is the authentication from the user. He/She only needs to give a name that will be registered on the collection users with a pre-defined message from the bot explaining the application. Then, it is sent the identifier that was created for the user by a socket emit. •chat message: this will handle the messages which means that it will receive the message from the user and then is made the prediction of the answer, the storage of the received message and the generated one on database, and the answer is sent back to the user by using a socket emit. •getname: the front-end needs to request the name of the user that is using the application. It is just made a query to find the name and then it is sent by a socket emit. •load messages: this will load all the messages exchanged between the user and the bot through a query to find the identifier of the user, get all messages and then the socket emit. •delete message: as the name says, this will delete a message through the identifier of the user and the identifier of the message. •add question: this is to add a question that the bot cannot answer. The user will have on the interface an option to make this type of questions that are stored on the collection questions. Basically it is made an insertion on this collection. In an initial phase, this implementation was developed for a local environment which means that the back-end was run locally to test communication via WebSockets with more accessibility. When the backend was complete, it was proceeded the placement into a cloud. As it was said before, the chosen one was EC2 with the creation of a virtual instance on Windows. The virtual instance created in the EC2 service uses an Amazon Machine Image (AMI) that is a template with a predefined software configuration. The actual configuration is defined for Microsoft Windows Server 2019 Base 64-bit. The instance type is a free version (t2.micro), which is thus limited: 1 Gigabyte (GB) of memory, 1 virtual Central Processing Unit 52
CHAPTER 3. IMPLEMENTATION (CPU), moderate network performance, it has Internet Protocol version 6 (IPv6) support and a storage with the volume size defined to 30 GB. After the creation of this instance, it was necessary to put the back-end to run globally, so that there are HTTP ports used to communicate with all smartphone devices that use the application. So, in order to accomplish that it was needed to define inbound rules on the security group rule. With these rules, it was possible to obtain a server connected to port 0.0.0.0:80 on the EC2 instance. Next, the inbound rules are presented (Table 3.1): Table 3.1: Inbound rules for the security group rule. IP version Type Protocol Port range Source IPv6 HTTPS TCP 443 ::/0 IPv4 RDP TCP 3389 0.0.0.0/0 IPv6 HTTP TCP 80 ::/0 IPv4 HTTP TCP 80 0.0.0.0/0 IPv4 HTTPS TCP 443 0.0.0.0/0 After the inbound rules are defined, the back-end server can be accessed via the public Internet Protocol version 4 (IPv4) address with the port number defined as 80. 3.2.6.3 Front-end The front-end implementation was always with the objective of following the mockups that were planned. Accompanied by many tests developed through the Expo, it was possible to make several improvements and identify what may or may not facilitate the user’s experience. Therefore, for the development of the front-end, a division of development was made: • A main screen for user authentication, where the user has to type their first and last name and verify the check boxes. • A second screen will provide chat with the bot accompanied by a menu and an option to close the application. Authentication screen In this screen is where the user puts his name, verifies terms and conditions, privacy policy and then submits these actions. So in order to accomplish this, firstly it was made input validation to force the user to follow the defined requirements. After verifying the input and the validation, there is a button that the user confirms his actions and completes the authentication. In this button it is made a call to the back-end via WebSockets with the name of the user. The back-end will generate an identifier for this name, and will send back to the front-end that receives and stores this information through SecureStore that provides a way to encrypt and securely store key–value pairs locally on the device. These key-value pairs are essential 53
CHAPTER 3. IMPLEMENTATION for the application to work: if there is a user identifier stored locally on the device the authentication is bypassed; with the user identifier it is possible to load all messages exchanged with the bot that are stored on database; when user wants to ask a question that the bot cannot answer, the identifier is essential as it is stored in the database so that a suitable answer can be added later. The Terms and Conditions or Private Policy screens were created simply being that for the time being they are in the form of prototypes (Figure 3.4). In order to create this screen, it was necessary to provide a way for the application to make transition between screens such as moving to Terms and Conditions or Private Policy. This was accomplished with the introduction of Stack Navigator. Figure 3.4: Authentication Screen. Chat interface screen This screen is where the user will be able to chat with the bot and clarify his/her doubts. If the bot is unable to answer a question, it will prompt the user to access the main menu and then go to the help screen in order to send the question if relevant. In addition to the help functionality, there are other sections such as the terms and conditions, the privacy policy, and an explanation of what the application is about. In a first phase, the main screen of the chat interface was developed with the aim of the user being able to communicate with the bot. The communication was all done through WebSockets. A loading screen will open, while two calls are made to the back-end: one to get the user name that is associated with the 54
CHAPTER 3. IMPLEMENTATION locally stored identifier and another to load all messages exchanged between the user and the bot. After the messages are loaded, the chat interface screen is presented to the user. The chat interface was developed using Gifted Chat, the most complete chat UI for React Native. The best approach for creating this screen was to use a Drawer Navigator, as it provides access to destinations and application functionality. Thus, in addition to the chat screen, it is possible for the user to access a help section in order to contribute to the development of this application with new questions and answers. •Chat On the chat, when the user sends or deletes messages communications are made. In order to send or delete a message, it is necessary to send the message object and then, make the necessary changes in the database. A message is an object (Figure 3.5) composed of the following attributes: (i) text: Message content. (ii) user: The user is characterized by his/her identifier, name and image. (iii) createdAt: Date and time that the message was sent on ISO format. (iv) _id: The identifier for the message that was sent. Figure 3.5: Message object composition. In case the user sends a message, he/she will automatically have to wait for a response from the bot, which will eventually answer through a communication from the back-end. On this screen (Figure 3.6), the user can also copy a message or, if he/she wants, he/she can close the application. Through the features of Gifted Chat it was possible to add features such as the status of the bot (whether it is writing or not) and the automatic scroll to the end of the conversation that contribute to a significant improvement in the usability of the application. 55
CHAPTER 3. IMPLEMENTATION Figure 3.6: Chat screen. •Help Section This section is very important for the application as it allows the user to send a new question that the bot cannot answer, as shown in Figure 3.7. If the bot is unable to answer a question from the user, it will send an automatic message asking the user to go to the help section and submit the question. Later the database will be updated and the data will be trained accordingly along with any new answers that may come. With the database updated, the user will receive a message with a bot response to that question. 56
CHAPTER 3. IMPLEMENTATION Table 3.2: Users’ information for the application usability test. Participant Age Gender Context Experience with chats (0-3) 1 53 Female Age group ≥40 2 2 57 Female Age group ≥40 3 3 44 Female Age group ≥40 2 4 49 Male Age group ≥40 3 5 59 Male Age group ≥40 1 6 43 Male Age group ≥40 3 7 42 Female Age group ≥40 3 8 47 Female Age group ≥40 3 9 41 Female Age group ≥40 3 10 38 Female Age group ≥40 3 11 23 Male Type 1 DM 3 12 22 Female Type 1 DM 3 3.3.2.1 Application Authentication In general, all participants were able to perform this task successfully and simply. The efficiency in which the task was performed ranged between 75% and 100%, with the majority performing the task with 100%. This iteration in the prototype is reflected, then, in a clear improvement in the overall time of the task and will serve as a reference for the next development cycles, as it will be possible to implement and 63
CHAPTER 3. IMPLEMENTATION test even more agile and efficient interactive components so that the user can understand how to proceed without having any doubt. Table 3.3: Final results for the task - Application Authentication. Participant Task Time (MM:SS) Errors Assistances Task Effectiveness (%) 1 00:38 1 2 75% 2 00:25 0 0 100% 3 00:15 0 0 100% 4 00:15 0 0 100% 5 00:30 1 1 75% 6 00:10 0 0 100% 7 00:12 0 0 100% 8 00:12 0 0 100% 9 00:10 0 0 100% 10 00:11 0 0 100% 11 00:13 0 0 100% 12 00:11 0 0 100% Average 00:17 0 ±0,25 0 ±0,25 100% ±0,25 Max 00:38 1 2 75% Min 00:10 0 0 100% 3.3.2.2 Exchange Messages Almost all participants performed this task successfully, and the average time was influenced by the speed of writing for each one and the response time by the bot. In this case, there was also an efficiency that varied between 75% and 100%. Only one person achieved this worst efficiency with the rest at the level of 100%. The error verified with a participant focused on the area where should be clicked in order to write a message. This was explicit in the interface but the participant was not able to find out. After an assistance it was easy to be noticed. The difficulty index was relatively nil, as all participants already recognized this type of interface from other chat applications. 64
CHAPTER 3. IMPLEMENTATION Table 3.4: Final results for the task - Exchange Messages. Participant Task Time (MM:SS) Errors Assistances Task Effectiveness (%) 1 02:03 1 1 75% 2 01:22 0 0 100% 3 00:50 0 0 100% 4 00:42 0 0 100% 5 01:20 0 0 100% 6 00:45 0 0 100% 7 00:41 0 0 100% 8 00:40 0 0 100% 9 00:46 0 0 100% 10 00:41 0 0 100% 11 00:48 0 0 100% 12 00:40 0 0 100% Average 01:10 0 ±0,25 0 ±0,25 100% ±0,25 Max 02:03 1 1 75% Min 00:40 0 0 100% 3.3.2.3 Access help section The efficiency of this task focused on 100%, that is, all participants performed the task successfully. All participants were able to access this screen without any difficulty and then were able to submit a question as they are already familiar with text boxes. The average time is considered to be close to one minute and this time may be subject to a longer delay when the participant addresses a longer question or takes longer to write. Some participants raised that, normally, in the upper left corner a generic menu is displayed. In this case, the icon displayed in this location is to access directly the help screen and not a menu that presents the various possible options. Therefore, it was one of the aspects that was found to be important and that would help to improve the presentation of the interface for the user. 65
CHAPTER 3. IMPLEMENTATION Table 3.5: Final results for the task - Access help section. Participant Task Time (MM:SS) Errors Assistances Task Effectiveness (%) 1 01:21 0 0 100% 2 01:19 0 0 100% 3 01:00 0 0 100% 4 00:54 0 0 100% 5 00:28 0 0 100% 6 00:25 0 0 100% 7 00:20 0 0 100% 8 00:21 0 0 100% 9 00:30 0 0 100% 10 00:23 0 0 100% 11 00:28 0 0 100% 12 00:32 0 0 100% Average 00:50 0 0 100% Max 01:21 0 0 100% Min 00:20 0 0 100% 3.3.2.4 Exit the application This task was carried out very easily by the participants with 100% efficiency. The outcome of this task was balanced as the participants used a lot a button presented in the upper right corner and also the back to back key on the navigation bar. The conclusion drawn is that both options can and should be present as they are used quite frequently by users. Table 3.6: Final results for the task - Exit the application. Participant Task Time (MM:SS) Errors Assistances Task Effectiveness (%) 1 00:05 0 0 100% 2 00:05 0 0 100% 3 00:05 0 0 100% 4 00:05 0 0 100% 5 00:08 0 0 100% 6 00:03 0 0 100% 7 00:03 0 0 100% 8 00:04 0 0 100% 9 00:03 0 0 100% 10 00:03 0 0 100% 11 00:05 0 0 100% 12 00:04 0 0 100% Average 00:04 0 0 100% Max 00:08 0 0 100% Min 00:03 0 0 100% 66
CHAPTER 3. IMPLEMENTATION 3.3.3 Application Improvements In order to improve the interface for a better interaction by users, several recommendations were given that addressed various aspects regarding most of the existing features. Regarding the display of information and, as this chatbot can reach a large part of people in the most adult age group, it was recommended to change the way of communication in the application. Previously, the user used an application that had a more informal language, treating the person always in the second person. With all the changes, it was opted for a formal language, as this application must be something seen as reliable and objective for the user. It was also recommended to use a font that is more understandable to the user. Usually, the font of the frequently used letter is Roboto. Therefore, reading is simpler and more accessible. Furthermore, according to the participants in the usability tests, one of the key aspects was the user’s comprehension of the message because messages were too long and it would be tough and tiring for the user to read. Thus, to make it more appealing and accessible, the information that is transmitted was shortened, e.g., in the greeting message and in other screens that display another type of content. 3.3.3.1 Requirements Regarding the application requirements some have been changed and others have been added. The changes focused on the changes that were made to the interface for the user to access. Functional 1. The user must authenticate himself/herself in the application using his/her first and last name. 2. In the main menu of the application the user will be able to have access to the following functionalities: a) Open the generic chat interface b) Ask a question that the bot was unable to answer (Help screen) c) Read terms and conditions d) Read privacy policy 3. The user can check the essential information of the application content in about screen such as the project scope and the application content with appropriate references. 3.3.3.2 System Modeling After changing the requirements, it is necessary to make a new modeling for the system in relation to the application. Due to new features the layout was changed in new aspects. Therefore, before proceeding to change the interface, it was necessary to lay out everything. 67
CHAPTER 3. IMPLEMENTATION Figure 3.9: UML activity diagram of the application - Final version. 3.3.3.3 Interface Authentication interface screen In the authentication interface, it was suggested to specify what the user would have to type in the text box. This was possible to verify because in several usability tests users asked what they had to type because it only indicated to write the name and therefore it was difficult to understand. The improvement consisted of precisely this same indication: a specification was added that the user’s first and last name must be written in the text box. With this, it was possible to avoid conflicts about what can be put there. An input validation is also carried out to verify if in fact two proper names are written. 68
CHAPTER 3. IMPLEMENTATION Figure 3.10: Authentication Screen. Chat interface screen In the chat interface, concerns were directed towards how the bot communicates with the user. The indication messages are now shorter, and communication with the user is formal and direct. The initial message that the bot sends has been modified in order to be more direct and where the user clearly understands what this application is for. It is a very important and essential message for those who do not know what this application is about. 69
CHAPTER 3. IMPLEMENTATION Figure 3.11: Chat initial message screen. One of the biggest innovations in terms of the interface itself was the change of the button that was positioned in the upper left corner that allowed the user to access the help screen section. Usually, users associate the upper left corner to access a menu and there were doubts about that. With the implementation of a menu, not only is it easier for the user to understand, but it also allows adding new sections for various functions. 70
CHAPTER 3. IMPLEMENTATION Figure 3.12: Chat Screen. In cases where the bot is unable to understand certain issues, it is much simpler to inform the user that they should go to the menu in the upper left corner and access the section called Help. Several users motivated the creation of this new feature. The menu was created by the concept of Modal Drawer that uses a scrim to block interaction with the rest of the application’s content. This drawer is elevated above most applications elements and do not affect the screen’s layout grid. With this Drawer Navigator functionality, the user can easily access the sections he/she wants, opening the menu and choosing the one he/she wants. 71
CHAPTER 3. IMPLEMENTATION Figure 3.13: Menu Drawer Navigator. The menu will allow the user to see other information about the application and the content provided. It is important to always have an approach to various topics and think about new perspectives for the future. New features can be added in this way, being easily upgradable in this menu. From the user’s point of view it is even simpler as it will be something more observable than if there were no such menu. At the moment, the menu has the following features: •Conversation: It allows the user to access the chat. •Help: On this screen, changes were also made in the form of communication to be more concise. Therefore, the user more quickly understands the purpose of this feature. 72
CHAPTER 3. IMPLEMENTATION Table 3.8: Participants’ opinions for SUS. Statement Strongly Disagree Somewhat Disagree Neutral Somewhat Agree Strongly Agree 1 - - P4 P1, P2, P3, P5 - 2 P3, P4 P1, P2, P5 - - - 3 - - - P2 P1, P3, P4, P5 4P3, P4, P5 P1, P2 - - - 5 - - - P1, P3, P5 P2, P4 6P2, P4, P5 P1, P3 - - - 7 - - - P1, P2, P5 P3, P4 8P1, P2, P3, P4, P5 - - - - 9 - - - P1, P2, P3, P4 P5 10 P1, P2, P3, P4 P5 - - - In general, all participants advised a future use of the application and gave a positive score regarding the usability of the application, with the worst score falling into the classification of good. In the next table 3.9, are the scores as well as the classifications given by each participant in order to evaluate the application. Table 3.9: Results of SUS. Participant SUS score Classification App Recommendation (0-10) 1 82.5 Good 7 2 85 Good 8 3 90 Excellent 9 4 95 Excellent 9 5 87.5 Good 9 The result of the SUS obtained is at the level of good, being the scale of average value 88 which means that the overall rating is between good and excellent. The average of the application’s future recommendation is situated at a rating of 8, which is a good perspective for people with DM to use. The fact that younger participants (under 40 years) more rigorously assessed the usability of the application is understandable since in theory, overall it can be said that what makes a good UX on chatbots 79
CHAPTER 3. IMPLEMENTATION is very similar to what makes a good conversation with another human being [82]. It may be the case that a productivity-oriented chatbot may benefit from a friendly or empathic appearance. 80
Chapter 4 Conclusion 4.1 Discussion The AI chatbot mobile application developed in this study supports people newly diagnosed with DM in the self-management of this chronic disease. In this scenario, the chatbot mechanism (back-end) was developed in Python and the interface (front-end) in React Native. The most common design method employed in developing chatbots is pattern matching for text understanding and response generation. This application uses precisely this method. The literature refers that one of the reasons for using this method is that pattern matching methods are more reliable in practice because they produce exact responses to well-defined queries, resulting in fewer mistakes [83]. Another reason for the possible lack of using ML methods could be the fact that ML–based approaches need to be trained using large amounts of domain-specific data, which might be scarce and difficult to access in the medical field [83]. In terms of data management, the type of database kept depends on the chatbot type and target functionality. As most chatbots developed for DM analyze the questions also from an emotional point of view and tries to respond appropriately where it recognizes fear or stress in the users’ words, it is concluded that these chatbots use context switching based users emotions usually kept in a user information database [83]. On the other hand, the chatbot that was developed in this work used a dialogue script database including all possible entries of conversational text responding to users since it did not address the previously mentioned aspects of emotion. The reason for not implementing emotions was precisely to overcome this limitation because as the application is recommended for newly diagnosed people and the average age of this diagnosis is 40 years old and over, it was something that was not thought of at first because these people only have care about ease of use and understanding. Most related chatbots for DM studies were developed in the context of a web application [32–35]. Another aspect is the fact that these chatbots do not have a help section implemented. If a user cannot get an answer to a question, the bot simply does not respond. One of the features that this chatbot has is precisely the introduction of a section so that those questions can 81
CHAPTER 4. CONCLUSION be placed in a database in order to improve the chabot’s response efficiency. Moreover, to our knowledge this study is the first to develop a chatbot for DM management using Portuguese language. Most of the developed chatbots uses English as the language of communication with the users [83]. So the chatbot that was developed in this work was developed in Portuguese and for mobile phones because they accompany people on a daily basis and so patients have disease support in the application anywhere and anytime in their native language that is Portuguese. Therefore, this work adds an important scientific contribution in providing real-time assistance to DM patients in Portugal. This work also addressed the usability of the application. In this study the AI chatbot was developed in an iterative way with participation of users, thus helped develop an application with which patients can interact easily and conveniently. So, from the obtained SUS value (88), it is possible to conclude that the application has a pleasant usability, with few aspects to improve as it is not yet in an excellent rating. The fact that the participants use chat applications made the process of using this chatbot application easier as they have a similar structure and may have influenced the results obtained for its usability. The results obtained show that people aged 40 or above were able to use the application quite efficiently. The value of SUS presents an average of 88, standing in the classification of good. In relation to people under 40 years of age, it was possible to obtain a more positive result where the SUS evaluation was classified as excellent (95). It can be seen then that people under 40 years of age feel completely comfortable using this application while people aged 40 or above usually face difficulties or are not used to using applications of this type and the score turns out to be reduced. Everyone has come to a consensus on one aspect that is in total disagreement with what they think the application is complicated to use. Furthermore, people aged under 40 used the application without any difficulty and always recommend new features so that the application is even better. People age 40 or above, on the other hand, only worry about using the application and always expect it to be something quite easy and accessible to use, otherwise they end up giving up using it. Literature suggests that users aged under 40 may be particularly sensitive to playful and emotionally engaging chatbots, whereas older users may be preoccupied with the efficiency and effectiveness of chatbots [84,85]. Results from usability tests show that the application is user-friendly, which means that in general users did the tests without having any major difficulties and thought that there would be no major problems, nor should there be any significant changes but only in terms of accessing the features. One of the most essential aspects is the reliability of the content. Users will not use chatbot if the content is irrelevant. Users need to fulfill a valued productivity goal, such as getting help or access to information on the fly [86]. Notably, the final tests addressed the part of the user being able to recommend the use of this application. The score regarding the perceived usefulness was high and it can be concluded that users with DM, found the contents of the application useful for people newly diagnosed with DM, based on the experiences and doubts they had at the onset of the disease, and therefore would recommend that newly diagnosed patients use this application. In general, the score given by users on ease of use indicates that users consider the application to provide answers in a fast, easy to use, accessible language, conversational tone that makes it user friendly. A study indicates that for chatbots to be successful in the studied user group, they must help users resolve a task or achieve a concrete goal in an effective and 82
CHAPTER 4. CONCLUSION efficient manner; in other words, they need to be easy, fast, and convenient [86]. The success of chatbots as personal assistants and health advisors exemplifies the need to design for productivity [82,86]. The chatbot developed in this work contains the basic characteristics of a chatbot but the parts of emotion towards the user are not worked. If an improvement was made in this aspect, perhaps the recommendation and the usability scale would be at a higher level. Another aspect to be improved is the chatbot’s responsiveness. A study refers that the participants’ responses suggested that they highly appreciated when chatbots helped them save time or made it easier and faster to obtain help or information [86]. Content evaluation was not addressed, but the content was developed with the help of health professionals and guidelines available. 4.2 Conclusions and Future Work Overall, this study suggests that the use of a chatbot application for a concept as global as DM is something that serves to innovate in the health area. In this case, people who have doubts, in addition to using platforms available online to clarify doubts, can use an application such as a chatbot that will clarify doubts at any time of the day without the need for a long wait for an answer. Currently, the chabots that exist to help people with DM exist only as web applications and people of an older age group would find it difficult to access. So, with an iOS/Android application, all they need to do is install it on the mobile device and it would be ready to use. Another important aspect is that other chatbots do not support the language in Portuguese which is something essential for people here in Portugal. This work addressed three different components: the content approach, the application development and a HCD study which valued the part of the user experience with the aspect of there being an improvement in the application. First, an initial study of the content was carried out using the guidelines provided online. Through interviews and surveys with health professionals and people with DM, it was possible to deepen the content. The application development followed the HCD methodology, where its usability was being improved to provide a pleasant UX. Further work is needed to determine what to improve to obtain better results in terms of the UX and a more careful analysis of the content through the evaluations of health professionals using predefined metrics. In view of the implementation of the chatbot, a study should be conducted to assess the feasibility of using the bot by newly diagnosed patients with DM to support self-management of the disease. Future users of this application will be able to enjoy an application that provides information and educational character whose content has already been discussed with health professionals. 83
Bibliography [1] HealthIT. 2021. url: https://www.healthit.gov. [2] T. M. Futurist. “10 Ways Technology Is Changing Healthcare.” In: (2021). url: https://medicalfuturist. com/ten-ways-technology-changing-healthcare/. [3] D. N. Gliklich R.E. Leavy M.B. Tools and Technologies for Registry Interoperability, Registries for Evaluating Patient Outcomes: A User’s Guide, 3rd Edition, Addendum 2. 2019. doi: 10.23970/ AHRQEPCREGISTRIES3ADDENDUM2. [4] L. Adamopoulou E.; Moussiades. Chatbots: History, technology, and applications. 2020. doi: 10. 1016/j.mlwa.2020.100006. [5] World Health Organization. 2021. url: https://www.who.int. [6] A. D. Association; “Classification and Diagnosis of Diabetes: Standards of Medical Care in Diabetes.” In: (2018). doi: 10.2337/dc18-S002. [7] B. S. Y. Xu G.; Liu. “Prevalence of diagnosed type 1 and type 2 diabetes among US adults in 2016 and 2017: population based study.” In: (2018). doi: 10.1136/bmj.k1497. [8] W. A. R. Rueger J.; Dolfsma. Perception of peer advice in online health communities: Access to lay expertise. 2021. doi: 10.1016/j.socscimed.2020.113117. [9] Portal da Diabetes - APDP. 2021. url: https://apdp.pt. [10] SPD - Sociedade Portuguesa de Diabetologia. 2021. url: https://spd.pt/. [11] K. H. J. Hilliard M.; Sparling. “The Emerging Diabetes Online Community.” In: (2015). doi: 10. 2174/1573399811666150421123448. [12] P. T. A. Palanica A.; Flaschner. “Physicians’ Perceptions of Chatbots in Health Care: Cross-Sectional Web-Based Survey.” In: (2019). doi: 10.2196/12887. [13] J. Rich E.; Lipson D.; Libersky. “Coordinating Care for Adults With Complex Care Needs in the Patient-Centered Medical Home: Challenges and Solutions.” In: (2012). url: https : / / pcmh . ahrq.gov/sites/default/files/attachments/coordinatingcare- foradults- with-complex-care-needs-white-paper.pdf. [14] M. C. F. Jovanovic M.; Baez. “Chatbots as Conversational Healthcare Services.” In: (2020). doi: 10.1109/MIC.2020.3037151. 84
BIBLIOGRAPHY [15] S. S. T. J. K. Pyoria P.; Ojala. “The Millennial Generation: A New Breed of Labour?” In: (2017). doi: 10.1177/2158244017697158. [16] T. Rieke. “The relationship between motives for using a Chatbot and satisfaction with Chatbot characteristics in the Portuguese Millennial population: an exploratory study.” In: (2018). url: https: //repositorio-aberto.up.pt/bitstream/10216/116509/2/296743.pdf. [17] P. Florian. “Design and implementation of a chatbot in the context of customer support.” In: (2018). url: https://matheo.uliege.be/handle/2268.2/4625. [18] M. Bates. Health Care Chatbots Are Here to Help. 2019. doi: 10.1109/MPULS.2019.2911816. [19] G. V. Research. Chatbot Market Size, Share Trends Analysis. 2017. url: https://www.grandviewresearch. com/industry-analysis/chatbot-market. [20] “The Top 12 Health Chatbots.” In: (2021). url: https://medicalfuturist.com/top- 12- health-chatbots/. [21] Medical Chatbots: The Future of the Healthcare Industry. 2020. url: https://topflightapps. com/ideas/chatbots-in-healthcare. [22] J. G. J. Roca S.; Sancho. “Microservice chatbot architecture for chronic patient support.” In: (2020). doi: 10.1016/j.jbi.2019.103305. [23] C. for Advanced Hindsight; “Chatbots for Diabetes Self-Management: Diabetes coaching at scale.” In: (2018). url: https://advancedhindsight.com/wpcontent/uploads/2018/02/ Chatbots-for-Diabetes-Self-Management.pdf. [24] C. Holtz B.; Lauckner. “Diabetes management via mobile phones: a systematic review.” In: (2021). doi: 10.1089/tmj.2011.0119. [25] Florence. 2021. url: https://florence.chat. [26] Safedrugbot. 2021. url: https://www.safeinbreastfeeding.com/safedrugbot-chatbot- medical-assistant/. [27] GYANT. 2021. url: https://www .safeinbreastfeeding. com/safedrugbot - chatbotmedical-assistant/. [28] CancerChatbot. 2021. url: https://www.facebook.com/CancerChatbot. [29] Aurora. 2021. url: http://auroratechai.com/pt/aurorapt/. [30] AVA. 2021. url: https://www.medis.pt/mais-medis/cancro/ja-chegou-a-assistente- virtual-de-apoio-ao-cancro/. [31] Novo Nordisk. 2021. url: https://www.novonordisk.com. [32] Sophia - Cornerstones4Care. 2021. url: https://www.cornerstones4care.com. [33] AIDA. 2021. url: https://www.h-farm.com/en/corporate/news/aida-chatbot. 85
BIBLIOGRAPHY [34] “Developing a chatbot to support young people with type 1 diabetes mellitus.” In: (2021). url: https://cypmedtech.nihr.ac.uk/portfolioitem/developing- a- chatbot- to- support-young-people-with-type-1-diabetes-mellitus/. [35] C. T. Team. “AI chatbot to help Chinese paitents improve knowledge for better self-management.” In: (2021). url: https : / / ciotechasia . com / ai - chat - bot - to - be - designed - for - chinese-diabetes-patients/. [36] Eddii - Manage diabetes with rewards and fun games. 2021. url: https://www.eddiihealth. com. [37] N. Catalyst. “What Is Patient-Centered Care?” In: (2017). url: https://catalyst.nejm.org/ doi/full/10.1056/CAT.17.0559. [38] A. Kerasidou. “Artificial intelligence and the ongoing need for empathy, compassion and trust in healthcare.” In: (2020). doi: 10.2471/BLT.19.237198. [39] J. Karl. ““Are You There, Chatbot?”: Automated Care Grows Up.” In: (2020). url: https : / / healthtechmagazine.net/article/2020/08/are-you-there-chatbot-automated- care-grows. [40] A. R. M. A. S. Dennis A.; Kim. “User reactions to COVID-19 screening chatbots from reputable providers.” In: (2020). doi: 10.1093/jamia/ocaa167. [41] L. C. E. Kocaballi A.; Laranjo. “Measuring User Experience in Conversational Interfaces: A Comparison of Six Questionnaires.” In: (2018). doi: 10.14236/ewic/HCI2018.21. [42] M. Folstad A.; Skjuve. “Chatbots for Customer Service: User Experience and Motivation.” In: (2019). url: https://core.ac.uk/download/pdf/270309851.pdf. [43] Mobile App Design Fundamentals: User Experience vs. User Interface. 2021. url: https : / / clearbridgemobile . com / mobile - app - design - fundamentals - user - experience - user-interface/. [44] H. P. J. Chung K.; Cho. “A Chatbot for Perinatal Women’s and Partners’ Obstetric and Mental Health Care: Development and Usability Evaluation Study.” In: (2021). doi: 10.2196/18607. [45] O. C. A. R. D. Nadarzynski T.; Miles. “Acceptability of artificial intelligence (AI)-led chatbot services in healthcare: A mixed-methods study.” In: (2019). doi: 10.1177/2055207619871808. [46] J. Bastien. “Usability testing: some current practices and research questions.” In: (). url: https: //arxiv.org/ftp/arxiv/papers/1009/1009.5918.pdf. [47] T. B. C. G. M. Jaspers M.; Steen. “The think aloud method: a guide to user interface design.” In: (2004). doi: 10.1016/j.ijmedinf.2004.08.003. [48] M. Mnasri. Recent advances in conversational NLP: Towards the standardization of Chatbot building. Clermont-Ferrand, France, 2019. 86
BIBLIOGRAPHY [49] A. K. K. S. S. Khurana D.; Koli. Natural Language Processing: State of The Art, Current Trends and Challenges. 2017. [50] E. Wallace. “Getting to Know Natural Language Understanding.” In: (2019). url: https://opendatascience. com/getting-to-know-natural-language-understanding. [51] E. Dale R.; Reiter. Building natural language generation systems. Cambridge University Press, U.K., 2000. [52] D. Daya W.; Dejing. “Ontology-based information extraction: An Introduction and a survey of current approaches.” In: (2010). doi: 10.1177/0165551509360123. [53] S. H. M. Christopher R. Prabhakar. Introduction to Information Retrieval. Cambridge University, 2008. url: https://nlp.stanford.edu/IR-book/html/htmledition/irbook.html. [54] D. Subramanian. “Introduction to Bag of Words model(BoW): Natural Language Processing.” In: (2020). url: https://indiaai.gov.in/article/introduction- to- bag- of- wordsmodel-bow-natural-language-processing. [55] SAS - Deep Learning. 2021. url: https://https://www.sas.com. [56] T. Y. C. Alom Z.; Taha. “A State-of-the-Art Survey on Deep Learning Theory and Architectures.” In: (2019). doi: 10.3390/electronics8030292. [57] R. Csáky. “Deep Learning Based Chatbot Models.” In: (2017). url: https://arxiv.org/pdf/ 1908.08835.pdf. [58] R. Agatonovic-Kustrin S.; Beresford. “Basic concepts of artificial neural network (ANN) modeling and its application in pharmaceutical research.” In: (2000). doi: 10.1016/S0731-7085(99)00272-1. [59] V. Nasteski. “An overview of the supervised machine learning methods.” In: (2017). doi: 10.20544/ HORIZONS.B.04.1.17.P05. [60] M. Senthilkumar. Colour Measurement. 2010, pp. 125–146. doi: 10.1533/9780857090195.1. 125. [61] V. P. J. Svozil D.; Kvasnicka. Introduction to multi-layer feed-forward neural networks. Prague, Czech Republic, 1997, pp. 43–62. doi: 10.1016/S0169-7439(97)00061-0. [62] H. Asadi B.; Jiang. “On Approximation Capabilities of ReLU Activation and Softmax Output Layer in Neural Networks.” In: (2020). url: https://arxiv.org/pdf/2002.04060v1.pdf. [63] C. S. J. F. M. R. L. P. E. F. J. Falcão I.; Pinto. “Estudo da prevalência da diabetes e das suas complicações numa coorte de diabéticos portugueses: Um estudo na rede médicos-sentinela.” In: (2008). doi: 10.32385/rpmgf.v24i6.10566. [64] O. para a Cooperação e Desenvolvimento Económico. Visão geral da saúde: Europa. 2020. [65] S. P. de Diabetologia. Relatório anual do observatório nacional da Diabetes - Edição de 2019. 2019. 87
BIBLIOGRAPHY [66] C. C. D. R. J. P. J. S. J. M. J. C. L. M. L. C. R. Sá A.; Oliveira. A Diabetes Mellitus em Portugal: Relevância da Terapêutica Farmacológica Adequada. 2016. doi: 10.25756/rpf.v8i1.93. [67] A. M. V. Forouhi N.; Misra. “Dietary and nutritional approaches for prevention and management of type 2 diabetes.” In: (2018). doi: 10.1136/bmj.k2234. [68] S. B. A. F. M. Dias N.; Martins. “Prevalence, management and control of diabetes mellitus and associated risk factors in primary health care in Portugal.” In: (2010). [69] A. Mandal. “Diabetic Retinopathy Risk Factors.” In: (2019). url: https://www.news-medical. net/health/Diabetic-Retinopathy-Risk-Factors.aspx. [70] S. E. de Cardiologia. “Recomendações de Bolso de 2019 da ESC.” In: (2020). url: https://spc. pt/wp-content/uploads/2020/07/Diabetes-Definitivo.pdf. [71] L. K. A. Biessels G.; Heide. “Ageing and diabetes: implications for brain function.” In: (2002). doi: 10.1016/S0014-2999(02)01486-3. [72] Y. J. K. Bhandari N.; Shi. “Seeking health information online: does limited healthcare access matter?” In: (2014). doi: 10.1136/amiajnl-2013-002350. [73] P. Kim M.; Ladenson. “Diabetes on the Internet: Resources for Patients.” In: (2002). doi: 10.1210/ jcem.87.8.9999. [74] Diabetes 365º. 2021. url: https://www.diabetes365.pt. [75] Diab(r)etes. 2021. url: https://www.facebook.com/groups/osdiabretes/. [76] Diabet1cos. 2021. url: https://www.facebook.com/groups/diabet1cos/. [77] T. Tonsaker. “Health information on the Internet.” In: (2014). url: https://www.ncbi.nlm.nih. gov/pmc/articles/PMC4020634/. [78] Glucagen®. 2021. url: https://www.hospitalvilafrancadexira.pt/storage/texts/ HVFX.INF.PED.006.Informacao_ao_Utente___Glucagen__0_.pdf. [79] P. Pedamkar. “WebSocket vs REST.” In: (2021). url: https://www.educba.com/websocketvs-rest/. [80] System Usability Scale (SUS). 2021. url: https : / / www . usability . gov / how - to - and - tools/methods/system-usability-scale.html. [81] R. N. J. Roque G.; Souza. Content validation and usability of a chatbot of guidelines for wound dressing. 2021. doi: 10.1016/j.ijmedinf.2021.104473. [82] R. Budiu. “The User Experience of Chatbots.” In: (2018). url: https://www.nngroup.com/ articles/chatbots/. [83] M. Safi Z.; Abd-Alrazaq A.; Khalifa. “Technical Aspects of Developing Chatbots for Medical Applications: Scoping Review.” In: (2020). doi: 10.2196/19127. 88
APPENDIX A. APPLICATION CONTENT A.1.7 Qual é o tratamento da diabetes tipo 2? R: O objetivo do tratamento da diabetes tipo 2 consiste em conseguir um ótimo controlo metabólico, para que possa ter uma vida com qualidade, evitando ou atrasando as complicações crónicas. Sendo assim, o tratamento deve ser contínuo (para toda a vida) acompanhado dos seguintes aspetos: 1. Uma alimentação equilibrada que ajuda a controlar os níveis de glicose no sangue e no peso. 2. O exercício físico, que reduz o problema da insulinorresistência, melhora a circulação, fortalece os músculos e articulações e contribui para a redução do peso. 3. A medicação através de comprimidos ou insulina, que é tomada regularmente ajudando a manter uma boa compensação. Atualmente, existem alternativas de medicação onde não é usada insulina: a medicação subcutânea. A.1.8 Como posso tratar do meu filho que tem diabetes? R: Deve seguir os seguintes passos: 1. Para um bom rendimento físico e intelectual, não deixe o seu filho sair de casa sem tomar o pequeno-almoço! 2. Inclua alimentos com hidratos de carbono em cada refeição. Aconselhe-se com um nutricionista sobre as quantidades adequadas. 3. Toda a família deve iniciar as refeições principais com sopa de legumes. Inclui também salada ou legumes no segundo prato. 4. Escolha carnes magras e insista no consumo regular de peixe! 5. Tem de garantir que o seu filho ingere diariamente 2 a 3 peças de fruta. 6. O leite e o iogurte devem fazer parte da alimentação. 7. Varie a forma de cozinhar, optando por métodos saudáveis: estufados, cozidos, grelhados e assados. Use preferencialmente o azeite, para temperar e confecionar, reduza o sal e evite caldos ou molhos industrializados! 8. Ao longo do dia e às refeições deve-se optar sempre pela água. 9. Não substitua as refeições com guloseimas ou alimentos desequilibrados, ricos em gorduras e açúcares! Estes tiram o apetite para outros alimentos mais saudáveis e podem levar ao aumento excessivo de peso. 95
APPENDIX A. APPLICATION CONTENT 10. Reserve guloseimas para dias especiais ou de festas e aconselhe-se com a sua unidade de saúde para saber como pode fazer as adaptações necessárias na alimentação e na insulina. 11. Lembre-se da higiene dentária após as refeições! A.1.9 Que exercício físico devo fazer? R: Primeiramente vou-lhe dar dicas para melhorar a adesão ao exercício físico: 1. Escolha uma atividade que possa e que goste de fazer. 2. Aumente gradualmente a duração e a intensidade das sessões 3. Escolha um local acessível para a sua prática. 4. É preferível praticar em grupo ou com amigos. 5. Estabeleça objetivos realistas. 6. Troque de vez em quando as atividades para evitar a saturação. 7. O apoio e incentivo de amigos e familiares é algo importante. Cuidados que deve ter: 1. Ingira água antes, durante e após a atividade. 2. Pratique exercício físico com roupa confortável e calçado adequado. Dicas para aumentar a prática de atividade física: 1. Vá a pé em vez de ir de carro/autocarro. 2. Em vez de utilizar elevadores ou escadas rolantes, utilize as escadas. 3. Registe o tempo e a intensidade da atividade física que realiza de forma a controlar o seu exercício semanal e conseguir no mínimo 150 minutos por semana. 4. Caminhe no mínimo 10 000 passos por dia, sempre contabilizados fora de casa. 5. Faça exercícios em casa quando o tempo atmosférico não o permitir. 96
APPENDIX A. APPLICATION CONTENT A.1.10 Quando posso viajar? R: Antes de fazer qualquer viagem deve saber a seguintes informações: 1. Duração da viagem. 2. Temperatura. 3. Condições de higiene do sítio a visitar. 4. Tipos de alimentos que vai encontrar. 5. Associações locais de pessoas com diabetes. 6. Avaliar o nível de cuidados de saúde no sítio a visitar. Documentação que deve levar: 1. Cartão em língua inglesa e do país a visitar a informar que tem diabetes e as atitudes a tomar em caso de hipoglicemia. 2. Se viajar dentro da Europa peça o Cartão Europeu de Saúde via online, num balcão de atendimento da Segurança Social ou numa loja ou espaço do cidadão. Caso queira fazer o pedido online necessita do seu número de beneficiário/a. Basta aceder a este website aqui =>https://eportugal.gov.pt/servicos/requerer- o-cartao-europeu-de-seguro-de-doenca-da-seguranca-social. Se precisar de ajuda pode ver um tutorial em vídeo aqui =>https://www.youtube.com/watch?v=s_purGfGC7Q. 3. Se fizer insulina, leve uma carta do médico em língua portuguesa e inglesa, informando que tem diabetes e que precisa de transportar insulina na bagagem de mão. Como pode organizar a bagagem: 1. Levar lanches (Bolachas, pão). 2. Aparelho de avaliação da glicemia e lancetas. Tiras de testes para determinação da glicemia (em caso de indicação médica tiras de cetonémia). 3. Duas embalagens de Glucagen (em caso de indicação médica). 4. O dobro da insulina/comprimidos necessários para o período da viagem. 5. Caneta suplente de insulina e seringas de insulina para o caso de extravio ou avaria das canetas. Atenção: Nunca leve o material da insulina no porão. 97
APPENDIX A. APPLICATION CONTENT A.1.11 Quais são as precauções antes de engravidar? R: É importante planear a gravidez. É necessário avaliar previamente as condições de saúde, atingir um bom controlo glicemico e mudar as terapêuticas que não sejam adequadas para a gravidez. Deve manter a contraceção até atingir o objetivo. Deve cuidar da alimentação da seguinte forma: 1. Distribua os alimentos para pelo menos seis refeições por dia. 2. Inclua alimentos ricos em fibras. 3. Diminua o consumo de gorduras saturadas. 4. Beba um litro e meio de água por dia. 5. Evite beber bebidas açúcaradas. 6. Diminua o consumo de sal e de alimentos salgados. Aconselhe-se junto de um médico. Eles enviam-lhe para uma consulta específica. A.1.12 O que é a gravidez gestacional? R: A gravidez gestacional é diagnosticada no período da gravidez quando a glicemia estiver a partir de determinados valores. No entanto, pode ter diabetes mellitus caso tenha valores muito altos e esteja no intervalo que está num espetro de valores definido. O facto de ter uma gravidez gestacional aumenta o risco de poder ter uma diabetes mellitus no futuro. As pessoas com diabetes que engravidam ou que contraem algum tipo de diabetes na gravidez vão sempre ser seguidas por consultas específicas com um endocrinologista. A.1.13 O que posso comer durante a gravidez? R: Devido ao ambiente hormonal existem algumas particularidades pois existem alturas do dia em que é mais complicado normalizar os níveis de glicemia. As comunidades científicas recomendam que uma pessoa com gravidez deve ingerir uma quantidade mínima de 175g de hidratos de carbono por dia. A.1.14 O meu filho pode ter diabetes? R: Não é garantido que o seu filho tenha diabetes. Caso tenha a diabetes tipo 1 a probabilidade é muito menor do que se tiver a diabetes tipo 2. Por isso deve planear sempre a gravidez com a sua unidade de saúde! A.1.15 Posso amamentar o bebé? R: Sim, pode. 98
APPENDIX A. APPLICATION CONTENT A.1.16 A minha gravidez é diferente do normal? R: A gravidez não é igual comparando a uma pessoa que não tem a diabetes. Por isso deve planear sempre. A.1.17 A diabetes é hereditária? R: Muitos estudos apontam que o fator da hereditariedade é mais frequente para as pessoas que têm diabetes tipo 2 sendo que os seus principais genes predisponentes ainda não foram identificados. Caso tenha a diabetes tipo 1 a probabilidade é muito menor do que se tiver a diabetes tipo 2. A.1.18 Tive diabetes por abusar nos doces? R: Caso tenha diabetes tipo 1, não teve diabetes por abusar nos doces. A diabetes tipo 1 é uma doença autoimune e não está relacionada com comportamentos ou alimentação incorreta. Isto deve-se às células beta do pâncreas que deixam de produzir insulina - hormona que regula o nível de glucose no sangue. Apesar de não se conhecer o processo na sua totalidade, sabe-se que é o próprio sistema imunitário que ataca e destrói as suas células beta pancreáticas, responsáveis pela produção de insulina. Caso tenha diabetes tipo 2, pode-se afirmar que não é o fato de comer especificamente açúcar ou doces que causa este tipo de diabetes, mas sim o fato de comer em excesso qualquer alimento que acabe fazendo com que o peso da pessoa aumente. E, além do excesso de peso, é preciso juntar outros fatores, como sedentarismo e a hereditariedade. A.1.19 A diabetes tem cura? R: A diabetes é uma doença crónica. Significa isto que, apesar de ser possível fazer o controlo e poderse viver livre de sintomas mais graves, não existe ainda aquilo que se pode designar por cura. Ainda assim, quer na diabetes tipo 1 quer na diabetes tipo 2, há várias investigações em curso com resultados promissores e, quem sabe, com descobertas passíveis de se aproximarem de uma tão ansiada cura. A.1.20 Posso comer doces? R: É normal existirem doces que são desaconselhados: açúcar, pastéis, bolachas doces, chocolates açucarados, gelatinas com açúcar, refrigerantes. Isto deve-se ao facto de possuirem uma alta quantidade de hidratos de carbono.No entanto, pode consumir pois não existem alimentos proibidos mas sim alimentos que não são recomendados. Como consequência quando ingere alimentos, tem que saber a quantidade de hidratos de carbono que eles fornecem. Aborde essa quantidade com a sua unidade de saúde. 99
APPENDIX A. APPLICATION CONTENT A.1.21 O que posso beber? R: Relativamente às bebidas alcoólicas: para alguém do sexo masculino como tem maior capacidade de metabolização de álcool é aconselhado duas porções por dia; no sexo feminino é aconselhada uma porção por dia. O excesso de álcool já não é bom para uma pessoa que não tenha diabetes. Com diabetes, a pessoa poderá ter efeitos secundários porque vai descontrolar a sua própria diabetes. O excesso de álcool gera um excesso de triglicerídeos e a glicose é usada para produzir estes triglicerídeos (potencialização de outra patologia). Relativamente ao outro tipo de bebidas deve ter sempre em conta a quantidade de hidratos de carbono. Por isso verifique sempre e aborde essa quantidade com a sua unidade de saúde. A.1.22 Vou ter de estar sempre a picar-me? R: Se tiver diabetes tipo 1, desde que ingira hidratos de carbono sim tem de forma a poder colocar a insulina e monitorar com frequência os valores da glicemia. Na diabetes tipo 2, normalmente, grande parte não necessita do tratamento intensivo e são utilizados fármacos como forma de tratamento. Atualmente, existem alternativas de medicação onde não é usada insulina: a medicação subcutânea. Informe-se melhor na sua unidade de saúde. A.1.23 O que posso comer? R: O padrão alimentar que deve seguir é o padrão da dieta mediterrânica: consumo reduzido de carnes vermelhas, consumo controlado de hidratos de carbono, utilização de leguminosos. O problema da alimentação é a quantidade de hidratos de carbono que se pode ingerir pois o organismo pode não estar preparado para metabolizar. Se esta quantidade for em demasia pode haver problemas como as glicemias estarem elevadas. Portanto, resumidamente: não existem alimentos proibidos mas sim alimentos que não são recomendados e que, como consequência, uma pessoa com diabetes ao ingeri-los tem que saber a quantidade de hidratos de carbono que eles fornecem. A.1.24 Que complicações posso ter?/Quais são as complicações da diabetes? R: Aproximadamente 40% das pessoas com diabetes vêm a ter complicações tardias da sua doença. Estas complicações evoluem de forma silenciosa e muitas vezes já estão instaladas quando são detetadas. De 100
APPENDIX A. APPLICATION CONTENT um modo geral as complicações existentes são: • Microvasculares: retinopatia, nefropatia e neuropatia. • Macrovasculares: doença coronária, doença cerebral, doença arterial dos membros inferiores e hipertensão arterial. • Neuro, macro e microvasculares: pé diabético. • Outras complicações: disfunção sexual, infeções. A.1.25 O que é o pé diabético? R: O pé diabético é uma das complicações mais frequentes na diabetes, sabe-se que 25% das pessoas com diabetes tem condições que aumentam o risco de pé diabético. Esta complicação é responsável pela maioria das amputações em Portugal. Para evitar esta complicação é importante não só um bom controlo da diabetes mas também uma série de cuidados com os pés: 1. Lave os pés todos os dias com água tépida. 2. Utilize gel ou sabonete com pH neutro. 3. Seque bem os pés, passando a toalha entre os dedos. 4. Passe vinagre de cidra/maçã nas unhas e na pele com algodão ou uma gaze. Com isto, vai prevenir o desenvolvimento de fungos e/ou bactérias. 5. Observe os seus pés regularmente para verificar se existe alguma ferida que não tenha visto. 6. As meias não devem ter costuras nem elásticos e devem ser de lã ou algodão. O seu calçado deve seguir os seguintes requisitos: 1. Deve possuir espaço para os dedos com cerca de 1 centímetro a mais para além do dedo mais comprido. 2. Deve ser alto e largo para não existir pressão na parte lateral dos dedos. 3. Se usar tacão este não deve ultrapassar os 2 a 4 centímetros. 4. A parte do calcanhar deve ser firme e o dorso alto. 5. Deve apertar com cordões ou fecho de velcro ajustável na zona do tornozelo. 101
APPENDIX A. APPLICATION CONTENT 6. Enquanto caminha o pé não deve deslizar dentro do sapato nem deve sentir nenhum ponto de pressão. 7. Se tiver risco médio ou alto, o sapato deve ser fundo e ter palmilha amovivel para a substituir por uma palmilha adaptada ao seu pé que evite pressão excessiva na planta do pé. Os problemas no pé são consequência dos efeitos de dois fatores: a aterosclerose (acumulação de placas de gordura e outras substâncias nas artérias) e a neuropatia (degeneração dos nervos). A.1.26 Que cuidados dever ter com o pé? Para evitar esta complicação é necessário prevenir com especiais cuidados e atenção com os seus pés: 1. Lave os pés todos os dias com água tépida. 2. Utilize gel ou sabonete com pH neutro. 3. Seque bem os pés, passando a toalha entre os dedos. 4. Passe vinagre de cidra/maçã nas unhas e na pele com algodão ou uma gaze. Com isto, vai prevenir o desenvolvimento de fungos e/ou bactérias. 5. Observe os seus pés regularmente para verificar se existe alguma ferida que não tenha visto. 6. As meias não devem ter costuras nem elásticos e devem ser de lã ou algodão. O seu calçado deve seguir os seguintes requisitos: 1. Deve possuir espaço para os dedos com cerca de 1 centímetro a mais para além do dedo mais comprido. 2. Deve ser alto e largo para não existir pressão na parte lateral dos dedos. 3. Se usar tacão este não deve ultrapassar os 2 a 4 centímetros. 4. A parte do calcanhar deve ser firme e o dorso alto. 5. Deve apertar com cordões ou fecho de velcro ajustável na zona do tornozelo. 6. Enquanto caminha o pé não deve deslizar dentro do sapato nem deve sentir nenhum ponto de pressão. 7. Se tiver risco médio ou alto, o sapato deve ser fundo e ter palmilha amovivel para a substituir por uma palmilha adaptada ao seu pé que evite pressão excessiva na planta do pé. 102
APPENDIX A. APPLICATION CONTENT A.1.27 O que é a nefropatia diabética? R: O nefrónio é a unidade funcional do rim, existem milhões de nefronios e cada um trabalha na filtração do sangue e na formação da urina. Quando, ao longo de anos, as artérias são sujeitas e níveis de glicemia elevados, elas começam a ficar danificadas, este dano é ainda mais grave se coexistir hipertensão arterial. É extremamente importante prevenir esta situação através de um controlo eficaz da glicemia. A taxa de filtração glomerular deve ser avaliada anualmente na pessoa com diabetes, é um valor que varia consoante o sexo, a idade e a superfície corporal. A.1.28 O que é a hipertensão arterial? R: A hipertensão arterial e a diabetes são doenças inter-relacionadas que, se não tratadas, aumentam o risco de doenças cardiovasculares (enfartes do miocárdio, acidentes vasculares cerebrais e doença dos membros inferiores). Esta complicação é duas vezes mais comum em pessoas com diabetes e aumenta com a idade. No momento do diagnóstico da diabetes, a hipertensão já existe em cerca de 40% das pessoas, o que sugere uma relação entre as duas: a obesidade e resistência à insulina levam à hipertensão arterial e esta agrava a intolerância à glicose (açúcar). Na maioria dos casos não se encontra uma causa para a hipertensão arterial, por isso, designa-se de essencial, isto acontece em particular na diabetes tipo 2. Nas pessoas com diabetes, hipertensão sistólica isolada (elevação apenas da pressão arterial máxima) é mais frequente que nas pessoas sem diabetes. Constitui, ao contrário do que se supunha anteriormente, um maior risco de complicações cardiovasculares, principalmente de acidente vascular cerebral (trombose ou hemorragia cerebral). A.1.29 O que é a disfunção sexual?/O que é a disfunção eréctil? R: No homem, a disfunção eréctil é a incapacidade persistente de atingir e manter uma ereção suficiente para realizar uma atividade sexual satisfatória. A diabetes, quer a tipo 1, quer a tipo 2 é a causa mais frequente de disfunção eréctil. Estas complicações só surgem, habitualmente após mais de 10 anos do diagnóstico e tem uma incidência de 30% a 50% nas pessoas com diabetes mal controladas, o risco aumenta exponencialmente quando existem outros fatores de risco como a hipertensão ou o tabagismo. O tratamento deve ser sempre discutido com a tua unidade médica e o tratamento mais adequado para uns casos pode não o ser para outros. 103
APPENDIX A. APPLICATION CONTENT A.1.30 O que é a retinopatia diabética? R: A retinopatia diabética é uma manifestação oftalmológica da diabetes e uma das principais causas de perda de visão a nível mundial. O aumento dos níveis de açúcar no sangue (glicemia) provocam alterações nos pequenos vasos sanguíneos da retina. Estes vasos alterados deixam sair líquido e sangue para a retina. Nesta doença não há habitualmente alterações da visão. Pode, portanto, evoluir para formas bastante avançadas sem provocar qualquer sintoma. A frequência da retinopatia depende dos anos de duração da diabetes. Após 20 anos de evolução, mais de 90% das pessoas com diabetes tipo 1 e mais de 60% das pessoas com diabetes tipo 2, desenvolvem retinopatia diabética. O mau controlo metabólico (glicemia e pressão arterial) constitui também um fator de risco para o aparecimento da retinopatia. Deve realizar anualmente um rastreio da retinopatia diabética. Se lhe forem diagnosticadas alterações, a sua unidade médica deve informar-lhe da regularidade com que deve ir à consulta. A.1.31 O que é a doença coronária? R: O sintoma mais frequente da presença de uma lesão ou obstrução das artérias coronárias é dor no peito. Os fatores de risco cardiovasculares como a obesidade, a hipertensão e a dislipidemia são comuns em pacientes com a diabetes. A.1.32 O que é a doença cerebral? R: A diabetes está associada a défices cognitivos moderados, a alterações neurofisiológicas e estruturais no cérebro: encefalopatia diabética. Sendo assim, a diabetes aumenta o risco de demência, particularmente em idosos. A.1.33 O que é a neuropatia diabética? R: A neuropatia diabética é um distúrbio nervoso causado pela diabetes. O início da neuropatia pode ser tão lento que nos estágios iniciais pode não apresentar sintomas ou sinais. Os sintomas podem variar de acordo com o tipo de dano dado às fibras nervosas afetadas. O aumento da glicemia (hiperglicemia) é uma das causas mais importantes desta complicação. É possível prevenir a neuropatia através de uma prática de um estilo de vida saudável (alimentação, atividade física, não fumar e evitar bebidas alcoólicas) e cumprindo o tratamento farmacológico adequado. 104
Appendix B Form for individuals with Diabetes 111
APPENDIX B. FORM FOR INDIVIDUALS WITH DIABETES (1) Tipo de diabetes: #Diabetes Tipo 1 #Diabetes Tipo 2 #Diabetes Gestacional #Outro (2) Questões que foram abordadas quando foi recém-diagnosticada/o com Diabetes Mellitus. (Caso possua, indique um conjunto de perguntas): 112
Appendix C Consent for content - Health professionals 113
www.fraunhofer.pt Rua Alfredo Allen 455/461 4200-135 Porto, PORTUGAL CONSENTIMENTO PARA PARTICIPAÇÃO EM INVESTIGAÇÃO ESTE DOCUMENTO É FEITO EM DUPLICADO: UM PARA O PARTICIPANTE E OUTRO PARA O INVESTIGADOR. 1 / 2 O estudo de investigação EduDiabCare - Design and development of an artificial intelligence chatbot for diabetes self-care education é um projeto de investigação da Associação Fraunhofer Portugal Research. No âmbito deste estudo, está a ser elaborada uma dissertação de mestrado da Universidade do Minho, com duração prevista de 6 meses. No estudo EduDiabCare pretendemos desenvolver um chatbot para apoio a pessoas com diabetes relativamente ao auto-cuidado, de forma a ajudá-las na gestão da sua doença. Para esta investigação necessitamos de avaliar as necessidades no dia-a-dia dos doentes recém-diagnosticados com diabetes. Propomos, por isso, a sua participação numa entrevista remota (por telefone ou através de uma plataforma, por exemplo Zoom ou Microsoft Teams). Na entrevista irão ser abordadas as diversas questões que os doentes eventualmente poderão ter, assim como as respetivas respostas, com uma duração total prevista de 45 minutos. Os dados sócio-demográficos referentes a si a recolher serão apenas profissão e n.º de anos de atividade profissional, de forma a caracterizar os participantes. A entrevista será gravada (som), para facilitar a posterior análise por investigadores da Associação Fraunhofer Portugal Research envolvidos neste estudo. A gravação será destruída no final deste estudo, nomeadamente após a publicação dos resultados. Os dados recolhidos são confidenciais e anonimizados. A Associação Fraunhofer Portugal Research tomará todas as medidas necessárias à salvaguarda e proteção dos dados recolhidos por forma a evitar que venham a ser acedidos por terceiros não autorizados. Os seus direitos no âmbito da proteção de dados serão sempre assegurados, tendo em consideração as normas específicas para o desenvolvimento da atividade de investigação. A sua participação é voluntária, podendo em qualquer altura cessá-la sem qualquer tipo de consequência. Também poderá pedir a retificação ou destruição da informação recolhida a qualquer momento. Para qualquer comunicação para este efeito, assim como informações adicionais, deverá enviar email ao Investigador Responsável abaixo identificado. Gostaríamos de contar com a sua participação. A participação não envolve qualquer prejuízo ou dano material e não haverá lugar a qualquer pagamento. A participação não terá custos para o participante. Agradecemos muito o seu contributo, fundamental para a nossa investigação! O participante: Declaro ter lido e compreendido este documento, bem como as informações verbais fornecidas e aceito participar nesta investigação. Permito a utilização dos dados que forneço de forma voluntária, confiando que apenas serão utilizados para esta investigação e com as garantias de confidencialidade e anonimato que me são dadas pelo investigador. Autorizo a comunicação de dados de forma anónima a outras entidades que estabeleçam parceria com a Associação Fraunhofer Portugal Research para fins académicos e de investigação científica. Nome do participante: __________________________________________________________________ Assinatura do participante: ______________________________________________________________ Data ___ / ___ / ______ APPENDIX C. CONSENT FOR CONTENT - HEALTH PROFESSIONALS 114
www.fraunhofer.pt Rua Alfredo Allen 455/461 4200-135 Porto, PORTUGAL CONSENTIMENTO PARA PARTICIPAÇÃO EM INVESTIGAÇÃO ESTE DOCUMENTO É FEITO EM DUPLICADO: UM PARA O PARTICIPANTE E OUTRO PARA O INVESTIGADOR. 2 / 2 Estudante: Nome: Sandro Cruz E-mail:
[email protected] Investigador responsável pelo projeto: Nome: Sílvia Rêgo Telefone: 220 430 347 E-mail:
[email protected] Assinatura:_________________________________________________________________________________ APPENDIX C. CONSENT FOR CONTENT - HEALTH PROFESSIONALS 115
Appendix D Interview Guide - Nutritionist 116
Nome do Estudo: EduDiabCare Olá, o meu nome é Sandro Cruz, sou estudante da Universidade do Minho e estou a fazer uma dissertação de mestrado em colaboração com a Associação Fraunhofer Portugal Research. Para poder avançar com o estudo, denominado EduDiabCare, gostaria que participasse numa entrevista. O objetivo da entrevista pretende avaliar as necessidades no dia-a-dia dos doentes recém-diagnosticados com diabetes. Nesta entrevista, serão abordadas as diversas questões que os doentes eventualmente poderão ter com as respetivas respostas, com uma duração total prevista de 45 minutos. Se concordar, o áudio da entrevista será gravado, para uma posterior análise. A participação não envolve qualquer prejuízo ou dano e não haverá lugar a qualquer pagamento nem terá custos. Os seus dados pessoais e a informação recolhida serão analisados pelos investigadores da Associação Fraunhofer Portugal Research e utilizados apenas para este estudo, não serão partilhados com ninguém fora do projeto e serão destruídos no final do estudo. Obrigado. Aceita participar neste estudo? Aceita que a entrevista seja gravada? Posso começar a gravar? Entrevistador: Bem, antes de mais queria agradecer por ter aceitado participar neste estudo. Como questão introdutória pretendia saber quais são as questões que grande parte das pessoas recém-diagnosticadas com diabetes costumam ter e as suas respostas. Sendo normal essas pessoas ficarem preocupadas, acho que é algo que devem procurar logo esclarecer. Entrevistado: .... Entrevistador: Em geral, todos os tipos de diabetes costumam envolver várias dúvidas ou existe algum tipo em que as pessoas não se sentem tão à vontade e necessitam mais ajuda? APPENDIX D. INTERVIEW GUIDE - NUTRITIONIST 117
Entrevistado: … Entrevistador: Existem vários casos em que os pais ficam bastante preocupados porque os seus filhos desenvolvem diabetes. As questões que possuem costumam ser diferentes? Queria saber se existe diferença no ponto de vista das pessoas que não têm esta doença ou que têm. Entrevistado: … Entrevistador: Que tipo de alimentação os diabéticos devem seguir? Existe alguma lista de receitas saudáveis? (Neste caso eu segui as receitas da APDP (Associação Protectora dos Diabéticos de Portugal). Entrevistado: … Entrevistador: Dentro do mesmo tema, quando um diabético vai a uma festa ou um convívio deve colocar muitas questões sobre o que não deve comer ou no que não pode abusar. Neste caso quais seriam? São comuns questões sobre o que fazer caso não tenha cumprido o regime alimentar recomendado? Entrevistado: … Entrevistador: Outra das dúvidas que tenho é relativamente ao exercício físico. Mais uma vez segui as guidelines da APDP. Existe algum plano de treino recomendado para quem está a começar? São necessários ajustes na alimentação do diabético antes e depois de praticar exercício físico? Entrevistado: … Entrevistador: Relativamente ao trabalho, verifiquei que existem algumas questões como em que pode influenciar a escolha do trabalho de um diabético pois existem algumas profissões que este não pode exercer e as suas principais condicionantes. Quais as recomendações? APPENDIX D. INTERVIEW GUIDE - NUTRITIONIST 118
Entrevistado: … Entrevistador: As grávidas recém-diagnosticadas com diabetes gestacional também devem possuir bastantes dúvidas já que nunca tiveram algo parecido. Qual a alimentação recomendada? E que questões costumam ter, sendo que existe aquele risco de poderem desenvolver a diabetes tipo 2 caso não cumpram em rigor as recomendações. Entrevistado: … Entrevistador: A COVID-19 e a diabetes são hoje duas pandemias que se cruzam, com consequente grande impacto para a saúde pública global. Estudos epidemiológicos mostram que a diabetes é a segunda comorbilidade mais associada à COVID-19. Visto isto, deve ser normal que as pessoas estejam bastante preocupadas relativamente a esta nova doença. Pretendia saber se existem questões ligadas à diabetes que as pessoas costumam fazer sobre a COVID-19. Entrevistado: … Entrevistador: Ao longo do tempo as pessoas vão ganhando mais experiência e cada vez têm menos dúvidas. Uma das questões que mais notei nestas pessoas foi a utilização do melhor aparelho de medição de glicemia bem como a sua precisão. É verdade? Entrevistado: … Entrevistador: Cheguei a ter uma conversa com o administrador do grupo Diab®etes- Portugal em que ele disse que o tipo de questões que os diabéticos costumam ter são relativas a um tratamento que é individualizado e que não permite uma questão de “se”, “então”. Para a aplicação que estou a desenvolver seria complicado pois é de carácter muito subjetivo, dado que a resposta depende sempre de fatores. Pretendia saber se só com as questões mais objetivas já poderia ajudar as pessoas recém-diagnosticadas de certa forma. APPENDIX D. INTERVIEW GUIDE - NUTRITIONIST 119
Entrevistado: … Entrevistador: Por fim, existe alguma página na web que me aconselha (além da APDP) e que possua boas guidelines? Entrevistado: … Entrevistador: Já pude esclarecer várias dúvidas que tinha. Espero que sejam as suficientes para desenvolver a aplicação de forma a ajudar as pessoas recémdiagnostadas. Mais uma vez queria agradecer por ter participado e respondido às várias questões que foram abordadas ao longo desta entrevista. Obrigado. APPENDIX D. INTERVIEW GUIDE - NUTRITIONIST 120
Appendix G Interview Guide - Individuals with Diabetes 127
Nome do Estudo: EduDiabCare Olá, o meu nome é Sandro Cruz, sou estudante da Universidade do Minho e estou a fazer uma dissertação de mestrado em colaboração com a Associação Fraunhofer Portugal Research. Para poder avançar com o estudo, denominado EduDiabCare, gostaria que participasse numa sessão. O objetivo da sessão pretende avaliar a usabilidade eo conteúdo da aplicação móvel que irá servir para atender as necessidades no dia-a-dia dos doentes recém-diagnosticados com diabetes. Na sessão irá ser abordada a utilização da aplicação bem como as diversas questões que o utilizador eventualmente poderá ter com o objetivo de poderem ser apontados os principais problemas e será feita uma discussão relativamente ao conteúdo pedagógico existente na aplicação como as questões e as respostas que são abordadas nesta, com uma duração total prevista de 30 minutos. Se concordar, toda a sessão será gravada (imagens de som e de vídeo e ecrã do telemóvel), para uma posterior análise. A participação não envolve qualquer prejuízo ou dano e não haverá lugar a qualquer pagamento nem terá custos. Os seus dados pessoais e a informação recolhida serão analisados pelos investigadores da Associação Fraunhofer Portugal Research e utilizados apenas para este estudo, não serão partilhados com ninguém fora do projeto e serão destruídos no final do estudo. Obrigado. Aceita participar neste estudo? Aceita que a sessão seja gravada? Posso começar a gravar? Entrevistador: Bem, antes de mais queria agradecer por ter aceitado participar neste estudo. Como questão introdutória pretendia saber quais foram as dúvidas que teve quando teve a diabetes pois é algo de facto importante para se relacionar com o conteúdo da aplicação. Entrevistado: .... APPENDIX G. INTERVIEW GUIDE - INDIVIDUALS WITH DIABETES 128
Entrevistador: Vamos proceder da seguinte forma: vou enviar-lhe um PDF que contém todas as questões e respostas relevantes existentes para poder fazer uma avaliação deste. Entrevistado: .... Entrevistador: O conteúdo que enviei considera adequado? Existem outras questões que deveriam ser colocadas? Entrevistado: .... Entrevistador: Teve estas dúvidas quando foi diagnosticado com a diabetes? Entrevistado: .... Entrevistador: Possui alguma observação extra relativamente à aplicação e o seu conteúdo? Entrevistado: .... Entrevistador: Já pude esclarecer várias dúvidas que tinha. Mais uma vez queria agradecer por ter participado e respondido às várias questões que foram abordadas ao longo desta sessão. Obrigado. APPENDIX G. INTERVIEW GUIDE - INDIVIDUALS WITH DIABETES 129
Appendix H Consent for usability tests 130
www.fraunhofer.pt Rua Alfredo Allen 455/461 4200-135 Porto, PORTUGAL CONSENTIMENTO PARA PARTICIPAÇÃO EM INVESTIGAÇÃO ESTE DOCUMENTO É FEITO EM DUPLICADO: UM PARA O PARTICIPANTE E OUTRO PARA O INVESTIGADOR. 1 / 2 O estudo de investigação EduDiabCare - Design and development of an artificial intelligence chatbot for diabetes self-care education é um projeto de investigação da Associação Fraunhofer Portugal Research. No âmbito deste estudo, está a ser elaborada uma dissertação de mestrado da Universidade do Minho, com duração prevista de 6 meses. No estudo EduDiabCare pretendemos desenvolver um chatbot para apoio a pessoas com diabetes relativamente ao auto-cuidado, de forma a ajudá-las na gestão da sua doença. Para esta investigação necessitamos de avaliar a usabilidade da aplicação móvel de forma a podermos fazer uma possível alteração de algumas funcionalidades para atender as necessidades dos utilizadores. Propomos, por isso, a sua participação numa sessão remota (através de uma plataforma, por exemplo Zoom ou Microsoft Teams) ou presencial. Na sessão irá ser abordada a utilização da aplicação bem como as diversas questões que o utilizador eventualmente poderá ter com o objetivo de poderem ser apontados os principais problemas, com uma duração total prevista de 20 minutos. Os dados sócio-demográficos referentes a si a recolher serão apenas o género e a idade, de forma a caracterizar os participantes. A avaliação de usabilidade será gravada, para facilitar a posterior análise por investigadores da Associação Fraunhofer Portugal Research envolvidos neste estudo. A gravação será de som e de imagem de vídeo das mãos e ecrã do telemóvel e será destruída no final deste estudo, nomeadamente após a publicação dos resultados. Os dados recolhidos são confidenciais e anonimizados. A Associação Fraunhofer Portugal Research tomará todas as medidas necessárias à salvaguarda e proteção dos dados recolhidos por forma a evitar que venham a ser acedidos por terceiros não autorizados. Os seus direitos no âmbito da proteção de dados serão sempre assegurados, tendo em consideração as normas específicas para o desenvolvimento da atividade de investigação. A sua participação é voluntária, podendo em qualquer altura cessá-la sem qualquer tipo de consequência. Também poderá pedir a retificação ou destruição da informação recolhida a qualquer momento. Para qualquer comunicação para este efeito, assim como informações adicionais, deverá enviar email ao Investigador Responsável abaixo identificado. A fim de garantir a segurança do participante, ser portador de pacemaker impede a participação neste estudo. Gostaríamos de contar com a sua participação. A participação não envolve qualquer prejuízo ou dano material e não haverá lugar a qualquer pagamento. A participação não terá custos para o participante. Agradecemos muito o seu contributo, fundamental para a nossa investigação! O participante: Declaro ter lido e compreendido este documento, bem como as informações verbais fornecidas e aceito participar nesta investigação. Permito a utilização dos dados que forneço de forma voluntária, confiando que apenas serão utilizados para esta investigação e com as garantias de confidencialidade e anonimato que me são dadas pelo investigador. Mais declaro não ser portador de pacemaker. Autorizo a comunicação de dados de forma anónima a outras entidades que estabeleçam parceria com a Associação Fraunhofer Portugal Research para fins académicos e de investigação científica. Nome do participante: __________________________________________________________________ APPENDIX H. CONSENT FOR USABILITY TESTS 131
www.fraunhofer.pt Rua Alfredo Allen 455/461 4200-135 Porto, PORTUGAL CONSENTIMENTO PARA PARTICIPAÇÃO EM INVESTIGAÇÃO ESTE DOCUMENTO É FEITO EM DUPLICADO: UM PARA O PARTICIPANTE E OUTRO PARA O INVESTIGADOR. 2 / 2 Assinatura do participante: ______________________________________________________________ Data ___ / ___ / ______ Estudante: Nome: Sandro Cruz E-mail:
[email protected] Investigador responsável pelo projeto: Nome: Sílvia Rêgo Telefone: 220 430 347 E-mail:
[email protected] Assinatura:_________________________________________________________________________________ APPENDIX H. CONSENT FOR USABILITY TESTS 132
Annex I Form for System Usability Scale 133
Número de participante: ____ System Usability Scale (SUS) A realização deste questionário padrão tem como função medir a usabilidade geral de um sistema. Selecione a resposta que melhor expressa como se sente sobre cada afirmação depois de utilizar a aplicação DiabCare – Assistente Virtual. Discordo Totalmente Discordo Neutro Concordo Concordo Totalmente 1. Acho que gostaria de utilizar esta ferramenta com frequência. 2. Achei a ferramenta desnecessariamente complicada. 3. Achei que a ferramenta era fácil de utilizar. 4. Acho que necessitaria do apoio de um técnico para poder utilizar este sistema. 5. Achei que as várias funções desta ferramenta estavam bem integradas. 6. Achei que havia muita inconsistência nesta ferramenta. 7. Imagino que a maioria das pessoas aprenderia a utilizar esta ferramenta muito rapidamente. 8. Achei a ferramenta muito complicada de utilizar. 9. Senti-me muito confiante ao utilizar a ferramenta. 10. Precisei de adquirir aprendizagens antes de começar a utilizar esta ferramenta. Qual é a probabilidade de recomendar esta aplicação para outras pessoas? (Rodeie a sua resposta) Não provável 0 1 2 3 4 5 6 7 8 9 10 Extremamente provável ANNEX I. FORM FOR SYSTEM USABILITY SCALE 134