Accepted for/Published in: Journal of Medical Internet Research
Date Submitted: Jan 26, 2021
Date Accepted: Apr 17, 2021
Date Submitted to PubMed: Apr 21, 2021
Warning: This is an author submission that is not peer-reviewed or edited. Preprints - unless they show as "accepted" - should not be relied on to guide clinical practice or health-related behavior and should not be reported in news media as established information.
Medical Specialty Recommendations by an Artificial Intelligence Chatbot on a Smartphone: Development and Deployment
ABSTRACT
Background:
The current coronavirus disease 2019 (COVID-19) pandemic limits daily activities, even contact between patients and primary care providers. This makes it more difficult to provide adequate primary care services, which include connecting patients to an appropriate medical specialist. A smartphone-compatible AI chatbot that classifies patients’ symptoms and recommends the appropriate medical specialty could provide a valuable solution.
Objective:
In order to establish a contactless method of recommending the appropriate medical specialty, this study aims to construct a deep learning-based natural language processing (NLP) pipeline and to develop an artificial intelligence (AI) chatbot that can be used on a smartphone.
Methods:
We collected 118,008 sentences containing information on symptoms with labels (medical specialty), conducted data cleansing, and finally constructed a pipeline of 51,134 sentences for this study. Several deep learning models, including four different Long Short-Term Memory (LSTM) models with or without attention and with or without a pretrained FastText embedding layer as well as Bidirectional Encoder Representations from Transformers (BERT) for NLP, were trained and validated using a randomly selected test dataset. The performance of the models was evaluated by the precision, recall, F1 score and area under the receiver operating characteristic curve (AUC). An AI chatbot was also designed to make it easy for patients to use this recommendation system. We used an open-source framework called Alpha to develop our AI chatbot. This takes the form of a web application with a frontend chat interface capable of conversing in text and a backend cloud-based server application to handle data collection, process the data with a deep learning model, and offer the medical specialty recommendation in a responsive web which is compatible with both desktops and smartphones.
Results:
The BERT model yielded the best performance, with an AUC of 0.964 and F1 score of 0.768, followed by LSTM with embedding vectors, with an AUC of 0.965 and F1 score of 0.739. Considering the limitations of computing resources and the wide availability of smartphones, the LSTM model with embedding vectors trained on our dataset was adopted for our AI chatbot service. We also deployed an Alpha version of the AI chatbot to be executed on both desktops and smartphones.
Conclusions:
With the increasing need for telemedicine during the current COVID-19 pandemic, an AI chatbot based on a deep learning-based NLP model that can recommend a medical specialty to patients using their smartphones would be exceedingly useful. The chatbot allows patients to quickly and contactlessly identify the proper medical specialist based on their symptoms, and so may support both patients and primary care providers.
Citation
The author of this paper has made a PDF available, but requires the user to login, or create an account.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.