Abstract
The implementation of translational medicine is associated with considerable costs of equipment, staff competence, and doctor-patient (DP) and clinic-patient (CP) communication. The application of DP and CP systems evolved from e-mail letters to website assistance chat and smartphone apps in the context of the m-health paradigm. The rapid development of mobile messengers and chatbot systems has opened a new niche for DP and CP communication, providing a high population penetration rate with perfect capabilities for personalization. This article provides a model of chatbot system organization as well as programming tools for its implementation. The integration of machine conversation systems supplemented by natural spoken language together with m-health devices and mobile apps is a good solution for a variety of tasks in translational and outpatient medicine. The usage of chatbot systems as a communication device for the purposes of translational medicine is going to reduce costs and time on routine operations.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
In the past decade, a significant development of translational medicine systems has been observed. The role of translational medicine primarily involves identifying diseases “at early stages” [1] in order to prevent them from transforming into more complex cases. The implementation of translational medicine in the context of research is oftentimes connected with testing new hypotheses, understanding the mechanisms of the human body functions, and genesis of an illness.
The implementation of systems and services for the needs of translational medicine most often entails significant costs related to equipment, staff competence, and supporting systems of interaction with potential and actual patients in medical institutions.
A considerable share of costs is borne by medical institutions due to the interaction with patients for the following purposes: defining the patient by a doctor; making appointments with the doctor; consultations; and systematic screening of the health state and individual organism indicators. These interactions also refer to the procedures of outpatient medicine [2].
Solving this problem as well as implementing translational medicine in the economic framework of clinical practical work is possible through changing the technological platform for fulfilling the aforementioned business processes. The development of information technologies over the last decade, referred to as the new information technologies (NIT), has led to a boom in research and development in the field of digital business transformation [3].
Scrupulous attention is paid to the study of changes in a broad range of business processes within companies which are driven by the corresponding technological innovations. Solutions that boost the efficiency of customers’ interaction with the company are set aside as a separate type of drivers [4].
The issues of electronic CP interaction systems have been addressed in recent years in the context of e-mail interaction [5–7]. However, at the present stage, a growing rate of communication is performed through smartphones given their permeation in everyday life [8, p. 2]. At the moment, a large number of different sorts of interaction by means of mobile technology and smartphones is being engineered [9, 10] involving sending various data on tests performed by the patient themselves [11, 12] including translational medicine purposes [13, 14].
However, the number of people who use smartphones with mobile apps as the quickest way to interact with medical institutions tends to decrease due to insufficient RAM on smartphones and, as a consequence, these apps being deleted to optimize the memory space. The main problem with smartphone applications is their short-term lifetime on smartphones. In this light, it should be noted that messenger applications happen to be the most commonly used apps with a record-breaking data lifetime [15], for example, WhatsApp messenger has accumulated over 1 billion users [16].
According to experts, the time the average subscriber spends using those apps has greatly exceeded the total time the subscriber spends on conversation. The advantages are as follows: wide coverage, high readability, permanent online mode and synchronization [17, p. 398], and direct contact during conversation [18]; which allow delivering a message to the subscriber and waiting for their reaction, binding to the smartphone resulting in a flexible system of personalization and subscriber binding to the database. Therefore, the migration of the site services and mobile applications to messengers is a logical step to take.
One of the options for a possible migration of the site services and mobile applications is the use of chatbot systems. The chatbot technology is a “machine conversation system that communicates with the person by means of natural spoken language” [19, p. 489]. Dialog between human and machine has been discussed earlier in scientific publications [20, 21], the most well-known being MegaHAL [22], Converse [23], Elizabeth, and Alice [24]. The work of Victoria Rubin [25, p. 505–508] gives an overview of the use of chatbot systems in libraries with the description of the functions served by these systems, namely, educational, informational, assistive, and socially interactive.
There are a number of descriptions coming in for chatbot systems that enable CP interaction. The work of Marcel et al. [26, p. 158, 159] describes a chatbot system used for contactless communication with patients suffering from cystic fibrosis in order to control the progression of the condition and maintain strict compliance with all the prescriptions given by an attending physician. The authors confirmed that the proposed system increases the number of patients adhering to all the medical prescriptions, reducing the risk of infection transmission to patients and increasing the effect of the treatment. In the work by Crutzen et al. [27], the chatbot system promotes the healthy lifestyle concept among adolescents. The study showed the effectiveness of using a chatbot to communicate with adolescents on the subjects of sex, alcohol, and drugs. Adolescents communicate with a chatbot on a larger range of topics with the frequency and duration of contact going up. The results of the survey performed among 929 adolescents indicated that the advantages of the chatbotsystem are as follows: laconism, anonymity, ease of use, and speed.
Besides the examples of chatbot system implementation in traditional medicine practice, we have failed to find works mentioning the use of chatbot for translational medicine. The present article proposes a model of the chatbot system structure and software tools which allow its integration to a messenger for the goals and objectives of translational medicine and outpatient medicine. The model of chatbot system, earlier used for commercial projects development, was proposed by Textocat company.
2 Proposed Model of Chatbot System and Software Tools for its Implementation
Textocat company has developed a chatbot system that is considerably different from traditional chatbot systems based on a system of rules [28], using an electronic companion algorithm developed by Agostaro et al. [29, p. 381] as a counselor bot [30] and a data provider bot [31]. The chatbot system also uses the Telegram messenger, which became possible due to the development of Java Telegram bot API.
Figure 1 shows a diagram of the organization of the chatbot system in the Telegram messenger under development of Textocat company:
-
ChatbotActor is a core module that conducts user sessions, during which, depending on the internal state and incoming events; it implements behavior scenarios based on the behavior function and internal data. Actor module is formed using java and supplementary libraries: (1) Akka Java to organize the core of Actor system model [32], (2) ElasticSearch Java API for the interface of the program with the ElasticSearch index [33], and (3) Java Telegram bot API for the interface between the program and the Telegram messenger and the implementation of a user interface [34]. The Actor system is an actor space with each module being declared as a separate actor with respect to the idea of reactive programming patterns [35].
-
Client data includes a user database, user personalization, and internal data affecting the behavior of a particular scenario session. In certain scenarios, the application is supposed to record the information, obtained from the patient, into their profile. This option provides large opportunities for polling patients and potential patients for the tasks of outpatient medicine. At that, some scenarios implying polling can be used for translational medicine, for example, in order to collect information about the patient’s behavior and to further compare this information with the translational medicine data in prognostic models. For example, those can be polls on behavioral patterns [36], which can significantly broaden the arsenal of prognostic models in translational medicine.
-
Question/Answer Index is a search index, bot knowledge-base, which performs the function of search of responses to user’s questions together with the search engine. The question-reply index is formed using the processed real client-consultant dialogs. The system identifies clients’ needs through frequency of question appearance as well as the most relevant consultants’ reply. The question-reply chain is processed by MyStem provided by Yandex technology, a morphological analyzer of the Russian language that can filter out morphological ambiguity [37, 38]. Stop words are eliminated [39], and a bag of words is formed; after that, a question vector is formed by Word2vec algorithms, which is a group of related models used to produce word embeddings [40]. Each word is transformed into a vector and multiplied by the weight of the word IDF (Inverse Document Frequency). The vectors obtained are summed up, which allows further faster indexing and tracing of particular words and sentences.
-
Text data is a body of text documents based on which the bot knowledge-base is formed. The call center logs and question-answer database that covers frequently asked questions are expected to have over 10,000 dialogs from user session logs from a partner clinic. Generally, they are patients’ referrals to consultants on issues they seek an answer to, clarification of questions contexts and consultants’ answers, information on the clinic, and services and advice as to what expert to refer to.
The program modules are placed in a server (bot server, Fig 2). When bot server is started, Actor System is initialized together with the main modules of Telegram Handler, Session Manager, Bot Actor, Response Manager, Catalog Service, Question-Answer Service; after which, Telegram Handler is authorized in Telegram by means of a bot token and starts to await a message from Telegram. When a user initializes a dialog with the bot, Telegram Handler receives the messages and sends them to Session Manager which is responsible for holding the session with the user. Each session represents an initialization. Bot Actor implements behavior scenarios based on the behavior function and internal data, and then Bot Actor processes the received message and implements one of the behavior scenarios and redirects the data to form a message to the user in Response Manager which forms and sends a reply message from the chatbot to the user.
When there is an information request from the user, Bot Actor interfaces with Catalog Service that in turn interfaces with the database of the program and searches based on the document index.
When implementing scenarios of bot replies to the user’s questions, Bot Actor interfaces with Question-Answer Service which is responsible for interfacing with the question-reply index. The question of the user is also transformed into a vector, and a search as per the question-reply index is initiated based on the Cosine similarity of the request vector and the question vector.
3 Conclusion
The chatbot system structure presented in the paper contains the basic modules and tools for their implementation. The presented model of the chatbot system must provide an opportunity to develop CP and DP interaction at the level of outpatient medicine and, more than that, at the level of translational medicine. This became possible due to the variety of information gathering tools, e.g., configured rules and scenarios, digital questionnaires, and the collection of information through m-health applications which can be used here. The synthesis of the chatbot system with a data collection module (m-health data collection and questionnaire) can significantly expand the realm of possibilities for translational medicine in the following processes: (1) surveys—evaluation of the patient’s health condition through a list of questions and dynamic tracking of the patient’s condition (state of health, tests, and medication regimen adherence); (2) personal reminders/alerts—a reminder of the necessary procedures, adherence to the medicine regimen, doctor’s appointments, alerts about test results, or the need to visit a doctor; (3) chat with the doctor/consultant, remote communication between doctor and patient through chat, and initialization of patients’ referrals to a consultant; (4) appointments for consultation/medical procedures—making doctor and medical procedure appointments remotely through the chat interface; (5) m-health data collection from apps and customization. Patients will be able to undergo a number of diagnostic procedures remotely in the future given the rapid development of m-health systems and biomarkers in translational medicine; 6) the chatbot system can transmit the results of prognostic models to the patient on request, taking into account the parameters of their behavioral patterns (nutrition, physical activity, etc), for them to adjust their behavior to the preset target indicators.
Artificial intelligence elements underpinning the chatbot technology will automate a number of processes in translational and outpatient medicine, simplify interaction in routine operations, and provide instructions and relevant information to patients. Ideally, clinics will be able to continuously monitor the health state, behavior, opinion, and other information of patients. The gathered information will further be processed for outpatient routines at clinics as well as for identifying the parameters of deterministic models in translational medicine.
References
Montano, M. (2014). Translational biology in medicine. Elsevier.
Fiebach, N. H., Barker, L. R., Burton, J. R., & Zieve, P. D. (2007). Principles of ambulatory medicine. Lippincott Williams & Wilkins.
Westerman, G., Bonnet, D., & McAfee, A. (2014). The nine elements of digital transformation. MIT Sloan Manag Rev, 7.
Andal-Ancion, A., Cartwright, P., & Yip, G. S. (2003). The digital transformation of traditional business. MIT Sloan Manag Rev, 44(4), 34–41.
Gaster, B., Knight, C. L., Witt, D. E., Sheffield, J. V., Assefi, N. P., & Buchwald, D. (2003). Physicians’ use of and attitudes toward electronic mail for patient communication. J Gen Intern Med, 18(5), 385–389. doi:10.1046/j.1525-1497.2003.20627.x.
Ye, J., Rust, G., Fry-Johnson, Y., & Strothers, H. (2010). E-mail in patient-provider communication: a systematic review. Patient Educ Couns, 80(2), 266–273. doi:10.1016/j.pec.2009.09.038.
Spielberg, A. R. (1998). On call and online: sociohistorical, legal, and ethical implications of e-mail for the patient-physician relationship. JAMA, 280(15), 1353–1359. doi:10.1001/jama.280.15.1353.
Hu, D.-Y. (2016). Mass prevention and treatment: fundamental strategy for chronic disease control and prevention. Chronic Diseases and Translational Medicine. doi:10.1016/j.cdtm.2016.03.001.
Swan, M. (2009). Emerging patient-driven health care models: an examination of health social networks, consumer personalized medicine and quantified self-tracking. Int J Environ Res Public Health, 6(2), 492–525. doi:10.3390/ijerph6020492.
Bastawrous, A., & Armstrong, M. J. (2013). Mobile health use in low-and high-income countries: an overview of the peer-reviewed literature. J R Soc Med, 106(4), 130–142. doi:10.1177/0141076812472620.
Xu, X., Akay, A., Wei, H., Wang, S., Pingguan-Murphy, B., Erlandsson, B.-E., et al. (2015). Advances in smartphone-based point-of-care diagnostics. Proc IEEE, 103(2), 236–247. doi:10.1109/JPROC.2014.2378776.
Bates, M., & Zumla, A. (2015). Rapid infectious diseases diagnostics using smartphones. Annals of translational medicine, 3(15). doi:10.3978/j.issn.2305-5839.2015.07.07.
Carrara, S., Baj-Rossi, C., Ghoreishizadeh, S. S., Riario, S., Surrel, G., Stradolini, F., … Dehollain, C. (2015). Full system for translational studies of personalized medicine with free-moving mice. In Paper presented at the 2015 I.E. International Symposium on Circuits and Systems (ISCAS).
Gollamudi, S. S., Topol, E. J., & Wineinger, N. E. (2016). A framework for smartphone-enabled, patient-generated health data analysis. PeerJ Preprints, 4, e1911v1911. doi:10.7287/peerj.preprints.1911v1.
Tagliamonte, S. A., & Denis, D. (2008). Linguistic ruin? LOL! Instant messaging and teen language. American speech, 83(1), 3–34. doi:10.1215/00031283-2008-001.
Walton, N. (2014). Chat apps will disrupt global telecoms sector. The Oxford Analytica Daily Brief.
Baron, N. S. (2004). See you online gender issues in college student use of instant messaging. J Lang Soc Psychol, 23(4), 397–423. doi:10.1177/0261927X04269585.
Schiano, D. J., Chen, C. P., Isaacs, E., Ginsberg, J., Gretarsdottir, U., Huddleston, M. (2002). Teen use of messaging media. In Paper presented at the CHI’02 extended abstracts on Human factors in computing systems.
Shawar, B. A., & Atwell, E. S. (2005). Using corpora in machine-learning chatbot systems. International journal of corpus linguistics, 10(4), 489–516. doi:10.1075/ijcl.10.4.06sha.
Turing, A. M. (1950). Computing machinery and intelligence. Mind, 59(236), 433–460. doi:10.1007/978-1-4020-6710-5_3.
Person, N., Graesser, A. C., Group, T. R. (2002). Human or computer? Autotutor in a bystander turing test. In Paper presented at the International Conference on Intelligent Tutoring Systems.
Hutchens, J. L. (1996). How to pass the Turing test by cheating. School of Electrical, electronic and computer engineering research report TR97–05. Perth: University of Western Australia.
Batacharia, B., Levy, D., Catizone, R., Krotov, A., Wilks, Y. (1999). CONVERSE: a conversational companion Machine conversations (pp. 205–215). Springer.
Shawar, B. A., Atwell, E. (2002). A comparison between ALICE and Elizabeth chatbot systems.
Rubin, V. L., Chen, Y., & Thorimbert, L. M. (2010). Artificially intelligent conversational agents in libraries. Library Hi Tech, 28(4), 496–522. doi:10.1108/07378831011096196.
Marciel, K. K., Saiman, L., Quittell, L. M., Dawkins, K., & Quittner, A. L. (2010). Cell phone intervention to improve adherence: cystic fibrosis care team, patient, and parent perspectives. Pediatr Pulmonol, 45(2), 157–164. doi:10.1002/ppul.21164.
Crutzen, R., Peters, G.-J. Y., Portugal, S. D., Fisser, E. M., & Grolleman, J. J. (2011). An artificially intelligent chat agent that answers adolescents’ questions related to sex, drugs, and alcohol: an exploratory study. J Adolesc Health, 48(5), 514–519. doi:10.1016/j.jadohealth.2010.09.002.
Abraham, A. (2005). Rule-Based expert systems. Handbook of measuring system design.
Agostaro, F., Augello, A., Pilato, G., Vassallo, G., Gaglio, S. (2005). A conversational agent based on a conceptual interpretation of a data driven semantic space. In Paper presented at the Congress of the Italian Association for Artificial Intelligence.
Ghose, S., Barua, J. J. (2013). Toward the implementation of a topic specific dialogue based natural language chatbot as an undergraduate advisor. In Paper presented at the Informatics, Electronics & Vision (ICIEV), 2013 International Conference on.
Edoja, D. (2011). Method, system and program for data delivering using chatbot: Google Patents.
Akka Java documentation. http://akka.io/docs/
ElasticSearch Java API documentation. https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html
Java Telegram bot API documentation. https://github.com/rubenlagus/TelegramBots
Kuhn, R., Hanafee, B., Allen, J. (2014). Reactive design patterns: Manning publications.
Fan, A. Z., Li, Y., Elam-Evans, L. D., & Balluz, L. (2013). Drinking pattern and blood pressure among non-hypertensive current drinkers: findings from 1999 to 2004 National Health and Nutrition Examination Survey. Clin Epidemiol, 5, 21–27. doi:10.2147/clep.s12152.
MyStem documentation. https://tech.yandex.ru/mystem/
Segalovich, I. (2003). A fast morphological algorithm with unknown word guessing induced by a dictionary for a web search engine. In Paper presented at the MLMTA.
Wilbur, W. J., & Sirotkin, K. (1992). The automatic identification of stop words. J Inf Sci, 18(1), 45–55. doi:10.1177/016555159201800106.
Mikolov, T., Chen, K., Corrado, G., Dean, J. (2013). Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781.
Acknowledgements
The research described in this paper is supported by the Ministry of Education and Science of the Russian Federation, Project “5-100”.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Abashev, A., Grigoryev, R., Grigorian, K. et al. Programming Tools for Messenger-Based Chatbot System Organization: Implication for Outpatient and Translational Medicines. BioNanoSci. 7, 403–407 (2017). https://doi.org/10.1007/s12668-016-0376-9
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12668-016-0376-9