From Knoesis wiki
Jump to: navigation, search

ReaCTrack is the acronym for Personalized Adverse Reaction Conversational-based Tracker for Clinical Depression. This is an interdisciplinary project of applying conversational Artificial Intelligence (AI) for personalized healthcare. The objective of ReaCTrack is to monitor and keep track of personal well-being and depressive symptoms of patients diagnosed with mental health disorders, with the overall goal of delivering personalized and efficient behavioral or medical interventions. It is a spin-off project of Depression.

Motivation and Background

Clinical depression is a common mental illness worldwide. It is the leading cause of disability worldwide and is a major contributor to the overall global burden of disease1. In the United States, with over $40 billion has been spent each year on depression treatment [1]. Treatments for clinical depression include psychotherapy and antidepressant medication, but the effectiveness of treatment varies between different individuals [2]. As such, tailoring an effective treatment for depression patients is challenging even for experienced clinicians. The challenge is even complicated more by one of the persistent healthcare problems that are often associated with depression, medication nonadherence [3, 4, 5].

Medication adherence is defined as “the extent to which a patient acts in accordance with the prescribed interval, and dose of a dosing regimen” [6]. Medication nonadherence is one of the persistent healthcare problems and can (i) cause adverse health effects on patient’s health, potentially (ii) skew results of clinical therapy trials, and (iii) increase health resource consumption [7, 8]. According to American Medical Association (AMA), depression is one of the top 8 reasons for intentional medication nonadherence2. The odd of depressed patients do not adhere to medication schedule is 3 times greater compared with those non-depressed patients [4]. Lack of symptom, describing a condition where patients do not experience any improvement after taking medication while being a challenge for clinicians to deliver effective depression treatment, at the meantime also represents another reason of medication nonadherence2.

As if the problem is not complicated enough, medication side effects further complicate the situation. Side effects, commonly known as adverse drug reactions (ADRs), has been identified by The U.S. Food and Drug Administration (FDA) as one of the leading causes of death in the healthcare industry3 and identified by AMA as one of the top 8 reasons for medication nonadherence2. Thus, clinicians are strongly suggested to understand and recognize potential side effect, while educating patient with correct information to prevent any medication nonadherence and improve treatment outcome [9].

These four factors (depression, varying effectiveness of depression treatment, medication nonadherence and ADRs) intertwine in a complex relationship, mutually affect and exacerbate each other. It is important for clinicians to address these and deliver interventions in a timely manner.

Challenges and Opportunities

While there are existing efforts, they often address these issues in isolation. There is a variety of reminder and reporting apps in the market developed for monitoring medication adherence and detecting potential ADRs of new drugs, however, most of them are passive sensing and rely on patients’ willingness to input the data. Users often find this cumbersome and stop using such applications. In addition, traditional medical history relies on anecdotal accounts and memory between clinic visits.

Our work is first of a kind application that integrates all functionalities in one conversational-based agent (Chatbot) that supports engaging conversation with patients and active monitoring of patients’ well being and provides immediacy for healthcare practitioner. This application is in its early prototyping phase and hence, issues such as reliability, availability, quality, and continuity of the data and services are still being assessed and enhanced.


ReaCTrack is a conversational agent, designed to actively engage with patients with the format of brief conversation daily. During the conversation, ReaCTrack collects and analyzes the messages. Through different analysis using machine learning (ML) and natural language processing (NLP), ReaCTrack extracts relevant information that is crucial to address the following issues:

  1. Real-time monitoring of patients’ medication adherence and stores adherence record
  2. Tracks mood change of depressed patients
  3. Assesses medication effectiveness on a particular patient
  4. Detects potential ADRs of antidepressant drugs

Infrastructure Design

This section describes the high-level design of our chatbot architecture that is capable of combining different, yet complementary modules and technologies to support four functionalities and objectives described as follows.

ReaCTrack Infrastructure

Objective 1 is responsible for setting up an initial profile of the patient’s depression severity score. The agent will first ask the patient a set of Patient Health Questionnaire (PHQ-9) [10] to establish a premedication baseline score. The patient will then be asked for any prescribed medication and their schedules. This initial profile setup is necessary for our conversational agent to get to know the patient better and monitor him/her over the course of medication schedule.

Objective 2 is responsible for tracking medication adherence, personal well-being and mood changes over the course of prescribed medications. The patient is tracked/monitored for a duration based on prescribed antidepressant medications. ReaCTrack will pop up a daily chat notification to interactively converse with the patient with regards to his/her medication schedule, mental well-being, and mood changes. ReaCTrack allows dynamic engagement and continuous monitoring of patient for generating Patient-Generated Health Data (PGHD) to (i) track and illustrate mood changes over time, (ii) understand the effects of antidepressant medications, (iii) understand patient medication adherence, and (iv) devise personalized treatment for next medication cycle contrary to episodic clinic visits. The longer the ReaCTrack tracks the patient, the better it gets to know the patient.

Objective 3 is responsible for collecting and documenting ADRs and side-effects from antidepressant medications. If the patient expresses negative mood, ReaCTrack will ask for symptoms and verify the symptoms respective of the medications against a few knowledge sources such as Drug Abuse Ontology (DOA), Medical Dictionary for Regulatory Activities (MedDRA) [11], and primarily Side Effect Resource (SIDER) [12]. If the symptoms are not present in the knowledge sources, they will be recorded and flagged as potential user-reported ADRs.

Objective 4 is responsible for answering domain-specific questions with respect to depression, specifically the use and side-effects of antidepressant using semantic technologies. The patient is able to ask domain-specific questions regarding the use and side-effects of antidepressant drugs which are answered by ReaCTrack using the information available in various medical ontologies. This allows patients to be well-informed of the usage, potential complications, and side-effects of antidepressant drugs.

Implementation Architecture

This section describes the technical implementation of ReaCTrack.

ReaCTrack Architecture

ReaCTrack’s front-end interface is integrated with Facebook messenger due to its popularity among smartphone users and its user-friendliness. As for the back-end server, to comply with standards on secure data storage, ReaCTrack is hosted on a private server equipped with Secure Sockets Layer (SSL/TLS) technology that encrypts the data flow between front- and back-end using mutually authenticated encrypted channel with certificate exchange. The real-time data are also backup nightly.

In terms of dialogue processing, an incoming dialogue from the front-end interface will be captured and sent to Dialogflow, a developer platform provided by Google for Natural Language Processing (NLP) and machine learning task. (NPM library) is used to take care of the communication between Dialogflow and the ReaCTrack server. Dialogflow identifies the entities and captures the context of the conversation from the raw dialog text passed by ReaCTrack server.

Entities are essentially a pre-configured entity list (provided by Cornell University) that consists of drug names, their corresponding synonyms and side effects. Whereas, context is a set of conversation or fact around which conversation is going on, which is important to understand and drive a conversation. Capturing contexts and entities in the dialog are performed by Dialogflow, and this represents an essential step in determining user’s intent.

Intents are a group of common examples and logic that relate to a common goal from the user. It describes an idea of what the user is conversing about and determines the action to be triggered. The action triggered will then be fulfilled either by a Google Cloud function or a custom WebHook, which is a HTTP POST callback. In other words, our server is able to generate an appropriate conversation response to match the patient’s intent.

Knowledge Base

ReaCTrack also serves as an information dissemination tool and it allows patients to ask questions pertaining to their prescribed medication, its symptoms, and possible side effects. During the conversation, ReaCTrack will actively interact with patients, asking for any ADRs from their prescribed medication and capture those observations. We incorporated various medical ontologies or knowledge bases to supplement the need for these knowledge.

The knowledge regarding indication and side effects were collected from SIDER (Side Effect Resource). SIDER contains data on 1430 drugs, 5880 ADRs and 140,064 drug–ADR pairs. However, we extracted only the information for antidepressants, since the main focus of this work is clinical depression. The ADR terminologies in SIDER were encoded using MedDRA ontology. We retained the usage of this ontology, as MedDRA is also currently being used by FDA Adverse Event Reporting System (FAERS). This is to accommodate the possibility of integrating new feature, automated ADR reporting to FAERS in the future, so the reporting can be seamless without the need of standardizing ADR term. Collectively, these knowledge from (i) SIDER, (ii) MedDra, and (iii) DAO were used to construct the knowledge base needed to answer domain-specific questions about ADR and indication of drugs.


Demo Video


The application is currently under beta-testing and has yet to be submitted to Facebook for review and public release. Hence, the source code and GitHub page remained private as of now.



  1. Craft, Lynette L., and Frank M. Perna. "The benefits of exercise for the clinically depressed." Primary care companion to the Journal of clinical psychiatry 6.3 (2004): 104.
  2. Rothschild, Anthony J. "Challenges in the treatment of major depressive disorder with psychotic features." Schizophrenia bulletin 39.4 (2013): 787-796.
  3. Wang, Philip S., et al. "Noncompliance with antihypertensive medications." Journal of general internal medicine 17.7 (2002): 504-511.
  4. DiMatteo, M. Robin, Heidi S. Lepper, and Thomas W. Croghan. "Depression is a risk factor for noncompliance with medical treatment: meta-analysis of the effects of anxiety and depression on patient adherence." Archives of internal medicine 160.14 (2000): 2101-2107.
  5. Gonzalez, Jeffrey S., et al. "Depression and HIV/AIDS treatment nonadherence: a review and meta-analysis." Journal of acquired immune deficiency syndromes (1999) 58.2 (2011).
  6. Cramer, Joyce A., et al. "Medication compliance and persistence: terminology and definitions." Value in health 11.1 (2008): 44-47.
  7. Knight, Eric L., et al. "Predictors of uncontrolled hypertension in ambulatory patients." Hypertension 38.4 (2001): 809-814.
  8. Vlasnik, Jon J., Sherry L. Aliotta, and Bonnie DeLor. "Using Case Management Guidelines to enhance adherence to long-term therapy." The Case Manager 16.3 (2005): 83-85.
  9. Khawam, Elias A. Laurencic, G., and Malone, Donald A. Jr. "Side effects of antidepressants: an overview." Cleveland Clinic Journal of Medicine 73.4 (2006): 351.
  10. Kroenke, Kurt, Robert L Spitzer, and Janet B W Williams. “The PHQ-9: Validity of a Brief Depression Severity Measure.” Journal of General Internal Medicine 16.9 (2001): 606–613. PMC. Web. 19 Dec. 2017.
  11. Brown, Elliot G., Louise Wood, and Sue Wood. "The medical dictionary for regulatory activities (MedDRA)." Drug safety 20.2 (1999): 109-117.
  12. Kuhn, Michael, et al. "A side effect resource to capture phenotypic effects of drugs." Molecular systems biology 6.1 (2010): 343.