1. Introduction
Diabetes is a major health issue, affecting 463 million people worldwide, and is expected to increase to 700 million by 2045 [
1]. Patients with type 2 diabetes require a complex self-management of different aspects of their lives (e.g., exercise, diet, medication, or blood glucose control) [
2,
3]. The relationship between diabetes and depression has been widely studied [
4,
5] and it has been demonstrated that there exists a highly possible bidirectional relationship between them [
6]. Depression is a common disease that affects more than 268 million people worldwide [
7]. Patients with depression have mood fluctuations that affect their daily lives. These patients have problems in handling challenges at work, with family, or at school. This serious health disease, characterized by persistent sadness, is more frequent in patients with chronic diseases in general, and diabetes in particular [
8], and is associated with poor medication adherence in patients with comorbidities [
9].
The use of text messages to improve medication adherence is not new. Yasmin et al. [
10] found that using mobile short message systems and/or voice calls improves patients’ adherence. The habits of people in relation to technology have changed dramatically during the last decade. Messaging platforms are now essential for people’s interaction and new mHealth platforms aimed at improving patients’ lives must be aware and take advantage of this fact. The combination of messaging platforms and virtual assistants provides a new scenario in healthcare to align eHealth tools and services to patients and physicians. Moreover, messaging platforms have become a widespread communication channel and the use of cloud technologies with their high computational and storage capacity allows them to deploy virtual assistants with more advanced techniques, such as artificial intelligence and other computationally heavy algorithms.
Virtual assistants are widely used in mHealth scenarios to offer help and advice to patients. Nevertheless, most current virtual assistants are app-based, such as eMMA [
11], which manages patient medication through a chatbot focused on increasing medication adherence. However, the development of virtual assistants, which use messaging platforms is rapidly increasing. MamaBot [
12] uses Telegram to provide support to mothers, pregnant women, and families with young children. Custom-RXBot [
13] is a chatbot developed to help with personalized prescriptions for dermatology through Slack. Roborto [
14] uses Telegram to inform healthcare providers about patients’ conditions and improvements, and tries to improve patients’ medication adherence. Roca et al. [
15] proposed a virtual assistant prototype, which uses Signal, to provide medication management. However, the usage of our proposed virtual assistant prototype has yet to be evaluated to determine whether it improves patients’ adherence and reduces medical appointments. This study intends to do precisely that.
Earlier studies have tested artificial conversational agents in relation to different diseases, such as cancer, chronic pain, or coronary heart disease [
16,
17,
18]. Some of these studies examined the use of virtual assistants to improve adherence in patients with breast cancer, coronary artery disease, and other chronic diseases [
19,
20,
21]. Several studies have suggested that mobile phone text messaging interventions could have considerable potential to improve medication adherence in patients with chronic disease [
22]. Studies focused on patients with type 2 diabetes mellitus using mobile applications showed that there was a moderate effect on glycemic control, with an overall difference in the mean HbA1c of −0.40% [
23]. Most of these apps are focused on measuring blood-glucose using external devices in combination with a smartphone or a web-based interface. Previous depression studies have focused on providing patients with a therapeutic resource through conversational agents [
24,
25]. Sarda et al. [
26] studied the relationship between smartphone-sensing parameters and symptoms of depression in patients with depression and diabetes. Bogner et al. [
27] improved the medication adherence of patients with type 2 diabetes and depression using the medication event monitoring system (MEMS). To the best of the authors’ knowledge, no studies have been carried out related to improving adherence using virtual assistants in combination with messaging platforms for comorbid patients with type 2 diabetes mellitus and depressive disorder.
To fill this knowledge gap, this study focuses on a virtual assistant for patients with type 2 diabetes mellitus and depressive disorder, with the aim of improving medication adherence through medication reminders. The study examined medical variables (the level of glycosylated hemoglobin (HbA1c), the patient health questionnaire (PHQ-9), the medication adherence, and the number of medical appointments), as well as the acceptance and real use of the virtual assistant to validate our approach.
2. Materials and Methods
2.1. Virtual Assistant
The technical aspects and the internal architecture of the virtual assistant used in this study are based in the work described by Roca et al. [
28]. The virtual assistant is developed using a microservice architecture, storing all the medical data in accordance with the Health Level 7 Fast Healthcare Interoperability Resources (FHIR) clinical standard. All communications and data storage are secure and private, following the General Data Protection Regulation (GDPR). User conversation (patient to virtual assistant and vice versa) is defined using Artificial Intelligence Markup Language (AIML). Examples of the user to virtual assistant conversations along with the user interface for interaction are illustrated in
Figure 1 and are self-explanatory by simply reading the users’ interactions. The way the patient interacts with the virtual assistant is very simple: the virtual assistant offers some choices to the patient and the patient indicates his/her selection either by writing the number that identifies the choice (numeric-based message) or by typing the text of the choice (text-based message). As described by Roca et al. [
15], the most secure messaging platform to use in this study is Signal [
29]. The choice was driven by its security characteristics: end-to-end encryption and central servers’ privacy.
The functionalities developed for this medication adherence study were discussed and designed in collaboration with the nurses from the primary healthcare center Las Fuentes Norte in Zaragoza, Spain, who were in charge of the recruited patients. These functionalities are described in
Table 1. The first meetings with the nurses were about what they think will be useful to have in a virtual assistant based on their professional experience monitoring patients. After showing them the prototype, a few more meetings were held in order to improve the chatbot conversation and to obtain the final version of the virtual assistant. The two main functionalities included are “medication option”, where patients can add medication and medication reminders, and “appointment option”, where patients can add an appointment with their healthcare professionals and configure appointment notifications. Medication reminders are sent a maximum of three times per programmed intake. If the patient does not respond to the reminder, another reminder is scheduled with a delay of 10 min. If the patient has not answered after three reminders, the virtual assistant stops reminding the patient and marks the intake as unanswered. Nevertheless, the virtual assistant includes a way for the patient to indicate that despite not answering the reminders, the medication was taken. This is a very useful safeguard because it could be a common situation for the patient not to hear the reminders (thus not answering on time), but taking the medication nevertheless. Thus, as we can observe in
Figure 1c,e, the patient can inform the virtual assistant that the medication was taken by two options: either by answering the reminders or by telling the virtual assistant using the medication options menu. In addition, the virtual assistant shows the weather forecast every morning, gives a summary of the adherence every week, and sends links to tutorials on YouTube that explain how to use the virtual assistant. It was included an initial tutorial where the basic usage of the virtual assistant was explained.
2.2. Initial Setup
We designed and implemented a nine-month pilot study with patients with comorbid type 2 diabetes mellitus and depressive disorder to test a virtual assistant developed to improve medication adherence. Participants received detailed information about the study, the procedure, the virtual assistant and their privacy and anonymity. A document containing all the information and contact details of the research team was given to the participants. Once they acknowledged that they had understood the information, a written and signed informed consent was obtained from all the participants of the study (patients and healthcare professionals). When the participants interacted with the virtual assistant for the very first time, they needed to confirm that they had signed the written consent to participate in this study.
The research team explained to the nurses how to use and configure the virtual assistant. The nurses then explained and configured the virtual assistant for their patients during their medical appointments. The initial configuration consisted of assistance in downloading the Signal app, explaining the first interaction with the virtual assistant, the registration of the patient in the platform, and the configuration of the medication and the reminder functions.
2.3. Participants
Eligible participants were patients with type 2 diabetes and depressive disorder who were 18 years old or older. The reference code of the diseases listed in the International Classification of Primary Care (2nd Edition) are T90 (type 2 diabetes) and P76 (depressive disorder). The participants in the experiment were recruited from the primary healthcare center Las Fuentes Norte in Zaragoza, Spain. Potential patients were recruited by the nurses working in the primary healthcare center. They were asked in their regular visits to the healthcare center to confirm their availability and willingness to participate. The experimental research design was a pre/post design, i.e., a comparison of outcomes in the same group of patients before and after the planned intervention of the virtual assistant.
The inclusion criteria of the patients were the following:
Patients must have regular appointments with the nurses.
Patients need to take medication every day.
Patients have poor medication adherence. Poor adherence is measured with the level of the medication possession ratio (MPR). MPR is the division between the number of drug units prescribed for a specific period divided by the number of days [
30]. The MPR value is capped at 100%. A presence/absence of medication adherence is calculated with a binary variable. When the MPR value is below 80%, the medication adherence is considered as absence [
31].
Patients can read and understand Spanish.
Patients have the ability to write a message in a messaging platform.
Patients need to have a smartphone with Android or iOS, and they need to have access to the internet in their smartphones.
Excluded from the study were subjects with cognitive, visual, or physical impairments that would interfere with the use of the virtual assistant.
The inclusion criteria of the healthcare professionals were the following:
Healthcare professionals have a clinical interview experience.
Healthcare professionals receive regular visits from patients with type 2 diabetes and depressive disorder.
Healthcare professionals can read and understand Spanish.
Healthcare professionals have the ability to write a message in a messaging platform.
Healthcare professionals need to have a smartphone with Android or iOS, and they need to have access to the Internet in their smartphones.
Excluded from the study were subjects with cognitive, visual, or physical impairments that would interfere with the use of the virtual assistant.
2.4. Medical Outcomes Measures
The medical effectiveness of the virtual assistant was measured by the level of glycosylated hemoglobin (HbA1c) in patients, which gives the mean level of blood glucose for the previous three months. The information provided by HbA1c allows the progression of the patients in the management of their diabetes to be evaluated. The higher the HbA1c values, the higher the risk of having complications related to diabetes. HbA1c measurements were obtained from a blood test done in a laboratory. The depression was measured using the patient health questionnaire (PHQ-9) [
32], which monitors the severity of depression and the response to a medical treatment. Higher values in the PHQ-9 score indicate more severe depressive symptoms. The medication adherence was evaluated using the MPR value, with 80% as the threshold. The impact on healthcare resources was evaluated with the number of medical appointments per month for each patient. All the medical outcomes measurements were obtained at baseline and after 9 months.
2.5. Use Outcomes Measures
The patients’ use and acceptance of the virtual assistant were measured as follows: (a) the use of the virtual assistant was measured by the number of interactions every day. The type of interaction was studied in order to ascertain which kind of interaction the patients prefer (numeric or text-based interaction). (b) The use of tools was measured with the number of functionalities used every day. (c) The use of reminders was measured by the number of reminders answered. (d) The acceptance was measured by the number of patients that did not uninstall Signal. (e) The usefulness or otherwise of the assistant was measured by the number of times the patient was not understood by the virtual assistant. All use outcome measurements were taken 9 months after the start of the study.
2.6. Participant Interviews
Two sets of interviews were conducted during the study. The first interviews were conducted to obtain the patients’ opinions after three months of interaction. The second interviews were held to obtain the results and the final opinion of the participants.
In the first set of interviews, patients were asked for their opinions three months after the outset of the study. The interviews were designed to obtain the general impressions of the patients as well as to identify any issues and the suggestions for the improvement of the virtual assistant. An important objective was to gather ideas for the content of the YouTube tutorials to help patients in the use of the virtual assistant. These guided interviews took place in the primary healthcare center during the appointments of the patients with the nurses involved in the study.
The second set of interviews were conducted at the end of the study in order to obtain information about the HbA1c values, the PHQ-9 scores, the number of medical appointments and the opinion of the participants. During these post-study interviews, patients and healthcare professionals were asked their overall opinions about the study. The answers with multiple options for the patients were weighted with the following scale: always (5), almost always (4), sometimes (3), rarely (2), and never (1). The answers with multiple options for the healthcare professionals were weighted with the following scale: all the patients (5), almost all the patients (4), some patients (3), almost no patient (2) no patient (1). The patient questionnaire was focused on obtaining the differences in medication intake before and after the use of the virtual assistant, and the usefulness of the virtual assistant in their lives. This questionnaire was completed via telephone calls made by the nurses involved in the study. The healthcare professionals’ questionnaire included a question about their perception of the medication intake improvement of their patients. Interviews with healthcare professionals were self-administered.
The intermediate and post-study interview questions are provided in Multimedia Appendices
Appendix A and
Appendix B.
2.7. Ethical Aspects
The study protocol was approved and registered by the Comité de Ética de la Investigación de la Comunidad Autónoma de Aragón (CEICA) [
33] on 13 March 2019 (minutes nº 05/2019). The CEICA committee acts in accordance with the Declaration of Helsinki (last modified in 2013) and with the Good Clinical Practice (GCP) standard. The study complied with both national data protection law LO 03/2018 [
34] and European GDPR [
35], providing the required measures of privacy and users’ rights.
2.8. Statistical Analysis
In order to describe continuous variables, mean and standard deviation (SD) were calculated, and to describe categorical variables, frequency and percentage were used. To compare the outcomes before and after the usage of the virtual assistant, the McNemar’s test was estimated for dichotomous variables (MPR score) and the Wilcoxon signed-rank test for continuous variables (HbA1c values, PHQ-9 score, medical appointments per month and post-study interview). Variables measured before and after were considered significantly different when the
p-value was less than 0.05. All statistical analyses were conducted using R software, version 4.0.1 [
36].
5. Conclusions
This research provided an overall perspective of how virtual assistants can affect patients’ medication adherence, and the improvements and limitations that arose while using the virtual assistant under study. The findings of the study suggest that the use of virtual assistants can be useful and effective for improving patient medication adherence (patients answered 74.4% of the reminders received, the HbA1c mean improved 0.3%, and the PHQ-9 mean improved 4.6). The mean of the medical appointments per month decreased by 0.7 appointments per month, which supports the potential use of virtual assistants for reducing associated healthcare resources. Furthermore, our findings suggest that virtual assistants can provide a tool for healthcare professionals to help patients improve their adherence by configuring the medication themselves, or checking if the medication is correctly configured. Because of the flexibility of the chatbot architecture, the virtual assistant can easily be used for other chronic diseases, such as psoriasis and cancer, among others, and it will be studied in future works.