**1. Introduction**

The changes in the epidemiological gradient that has been observed in the last decades together with the digital transformation have affected different areas of health that, added to the trends toward health prevention, well-being promotion, and personalized medicine, are generating a change in health systems to move away from hospitals and bring services closer to people and their homes [1, 2]. This new perspective that seeks to integrate health systems around people, instead of diseases, has influenced different sectors such as education, infrastructure, communications, finance, economy, and work. Thus, this has been the object of interest for health applications of the technological advances achieved by new business and industrial

application models, around different spheres of hardware, software, connectivity, and services and new technologies such as artificial intelligence (AI) and Health 4.0 [3].

Within the technological developments associated with artificial intelligence and mobile communication systems applied to healthcare, chatbots represent a trend that is increasing in popularity as an efficient mechanism that promotes interactions between application users for different sectors, since it provides personalized information and allows interactions in time and a capacity to reach millions of people at the same time [4, 5]. From the patient's perspective, chatbot technologies as representation of natural language processing, along with deep learning and virtual reality, also referred as cognitive services, have been identified as healthcare drivers by their possibility for the creation of great impact applications on medical and preventive health services [2, 6].

An important segment of the technological advances in health in recent years has focused on the use of artificial intelligence, telemedicine, and automated monitoring of physiological signals for the benefit of patient-centered medicine under a vision of personalization and digital well-being, characterized by being preventive, personalized, predictive, and participatory [7]. This personalization of medicine has been promoted through health policies that seek to expand access to primary healthcare (PHC) as a performance indicator for healthcare systems, since it aligns public policy and service provision at the individual level through healthcare services and primary care and at the population level through public health [2, 8].

Chatbots, defined as artificial intelligence programmable to simulate processes of human conversation *via* auditory or textual methods, are referred to in the literature in various ways, such as conversational agents, embodied conversational agents (avatars), social robots, dialog systems, voice user interfaces, and voice assistants, all of which mimic human conversation using text and/or spoken language [3, 5, 9]. In the healthcare domain, chatbot applications have shown good results for performing repetitive tasks of low complexity, delivering personalized content that allows patients to gain greater insight into their health conditions, and have shown the ability to improve patient engagement in certain contexts [10]. So, different applications are observed in healthcare, ranging from mental health, assisted living, customer service, support in states of depression, substance abuse disorders, filling in clinical history, nutrition recommendations, diet, exercise, evaluation of respiratory symptoms, support in the administration, and supply of medications [2, 3, 11]. Many benefits in the field of healthcare are derived from the chatbots' capabilities to be continuously available with up-to-date information, hear and respond in natural language, being able to present information in local languages and dialects, reach millions of people at the same time, supporting environments where health professionals are scarce to off-load repetitive tasks that absorb the time of health professionals, as well as anonymity protection for sensitive health condition [12]. In fact, this technology is still considered in a state of initial development due to the implications derived from the technology such as medical dilemmas in its use such as the lack of empathy perceived by the users, the complexity in the interaction of patients' beliefs about diseases that impact the acceptability and the responsibility of chatbots, content quality, accuracy, sources used, patient safety, and diagnostic capacity, among others. From the quality of chatbots perspective, there are differences not only in the technology, interface, contents, and applications, but also in the methodology for measuring both quality and efficiency [13].

According to Refs. [14, 15], the chatbot applications have proved to be useful for public health functions to deal with the COVID pandemic, by encouraging the adoption of strategies of promotion, prevention, mass dissemination of information, reduction of misinformation as it was used by governments and by the World Health

#### *A State-of-the Art Survey on Chatbots Technology Developments and Applications in Primary… DOI: http://dx.doi.org/10.5772/intechopen.110847*

Organization (WHO) to prepare collective response actions. Despite the fact that there were more than 300,000 health applications available globally in 2017 that were available for download, the measurement tools and evaluation studies of the aspects surrounding the provision of health services through chatbots are still very small [13].

Besides, there are aspects that require further study and supervision for the correct use of chatbots in health-related environments, since chatbots use demographic data of patients that they collect through interactions and that may have legal and ethical complications. This could be the case when chatbots, which do not have the appropriate corpus and are not ethically framed and supervised under good practices by a health professional, may end up presenting risky responses for sensitive conditions such as the use of substances, the combination of medications, or mental health advice [2, 12, 16]. This is added to the fact that the chatbots' programming can behave like a black box with answers that are difficult to follow in its construction, presenting logical but not necessarily correct results [4, 7].

As suggested by Refs. [4, 7, 17], the developers of the substantive processes of the chatbots or the intelligence behind it may have trained said chatbots with incomplete information, with empty data, missing data, opaque imputation rules, or based on target populations that are not necessarily generalizable. Likewise, users of these systems can enter inaccurate information due to the inherent teleology of each person who uses it. For such reason, special consideration should be given to developing evaluation methods of different aspects related to chatbot training for health, not only to measure its usability or acceptability by the user. The ethical and clinical dimensions should be measured as well, which also implies expertise and clinical experience, since these will adapt the best response to the patient's clinical problems, according to their characteristics and needs and, of course, always ensuring their clinical safety [4, 18].

A small group of studies has been identified to measure dimensions associated with health. These present a wide variety of methodologies, sample widths, randomness, and population stratification samples to carry out the measurements with the purpose of evaluating these dimensions [10, 12]. Various use scenarios have been visualized where great benefits can be obtained for health systems in terms of efficiency, among which the capacity to process large volumes of patients stands out, where the risk of late diagnoses must be balanced with the use of resources [9, 19].

This chapter is organized as follows. We begin by reviewing the characteristics and features of chatbots, introducing generalities about primary healthcare in Section 2. The technology developments and application domains in healthcare are presented in Section 3, focusing on the primary healthcare public policy-oriented applications. A revision of benefits, challenges, and trade-offs for healthcare delivery and valuebased care models is presented in Section 4. Based on these discussions, some future directions are outlined in Section 5, and we give our general conclusion in Section 6.
