Resumen: Chatbots are able to provide support to patients suffering from very different conditions. Patients with chronic diseases or comorbidities could benefit the most from chatbots which can keep track of their condition, provide specific information, encourage adherence to medication, etc. To perform these functions, chatbots need a suitable underlying software architecture. In this paper, we introduce a chatbot architecture for chronic patient support grounded on three pillars: scalability by means of microservices, standard data sharing models through HL7 FHIR and standard conversation modeling using AIML. We also propose an innovative automation mechanism to convert FHIR resources into AIML files, thus facilitating the interaction and data gathering of medical and personal information that ends up in patient health records. To align the way people interact with each other using messaging platforms with the chatbot architecture, we propose these very same channels for the chatbot-patient interaction, paying special attention to security and privacy issues. Finally, we present a monitored-data study performed in different chronic diseases, and we present a prototype implementation tailored for one specific chronic disease, psoriasis, showing how this new architecture allows the change, the addition or the improvement of different parts of the chatbot in a dynamic and flexible way, providing a substantial improvement in the development of chatbots used as virtual assistants for chronic patients. Idioma: Inglés DOI: 10.1016/j.jbi.2019.103305 Año: 2020 Publicado en: Journal of Biomedical Informatics 102 (2020), 103305 1-9 ISSN: 1532-0464 Factor impacto JCR: 6.317 (2020) Categ. JCR: MEDICAL INFORMATICS rank: 3 / 30 = 0.1 (2020) - Q1 - T1 Categ. JCR: COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS rank: 13 / 112 = 0.116 (2020) - Q1 - T1 Factor impacto SCIMAGO: 1.056 - Health Informatics (Q1) - Computer Science Applications (Q1)