Abstract
Introduction
Pharmacovigilance (PV) has proven to detect post-marketing adverse drug events (ADE). Previous research used the natural language processing (NLP) tool to extract unstructured texts relevant to ADEs. However, texts without context reduce the efficiency of such algorithms. Our objective was to develop and validate an innovative NLP tool, aTarantula, using a context-aware machine-learning algorithm to detect existing ADEs from social media using an aggregated lexicon.
Method
aTarantula utilized FastText embeddings and an aggregated lexicon to extract contextual data from three patient forums (i.e., MedHelp, MedsChat, and PatientInfo) taking warfarin. The lexicon used warfarin package inserts and synonyms of warfarin ADEs from UMLS and FAERS databases. Data was stored on SQLite and then refined and manually checked by three clinical pharmacists for validation.
Results
Multiple organ systems where the most frequent ADE were reported at 1.50%, followed by CNS side effects at 1.19%. Lymphatic system ADEs were the least common side effect reported at 0.09%. The overall Spearman rank correlation coefficient between patient-reported data from the forums and FAERS was 0.19. As determined by pharmacist validation, aTarantula had a sensitivity of 84.2% and a specificity of 98%. Three clinical pharmacists manually validated our results. Finally, we created an aggregated lexicon for mining ADEs from social media.
Conclusion
We successfully developed aTarantula, a machine-learning algorithmn based on artificial intelligence to extract warfarin-related ADEs from online social discussion forums automatically. Our study shows that it is feasible to use aTarantula to detect ADEs. Future researchers can validate aTarantula on the diverse dataset.
This is a preview of subscription content, access via your institution.

Data Availability
The dataset will be available upon reasonable request to the corresponding author.
References
Bates DW, Cullen DJ, Laird N, Petersen LA, Small SD, Servi D, et al. Incidence of adverse drug events and potential adverse drug events. Implications for prevention. ADE Prevention Study Group. JAMA. 1995;274:29–34.
Koh H. U.S. Department of Health and Human Services, Office of Disease Prevention and Health Promotion, vol. 1. Washington, DC: National Action Plan for Adverse Drug Event Prevention; 2014. p. 22–4. https://health.gov/hcq/ade.asp.
Classen DC, Pestotnik SL, Evans RS, Lloyd JF, Burke JP. Adverse drug events in hospitalized patients. Excess length of stay, extra costs, and attributable mortality. JAMA. 1997;277:301–6.
Bourgeois FT, Shannon MW, Valim C, Mandl KD. Adverse drug events in the outpatient setting: an 11-year national analysis. Pharmacoepidemiol Drug Saf. 2010;19(2):901–10. https://doi.org/10.1002/pds.1984.
Sultana J, Cutroneo P, Trifirò G. Clinical and economic burden of adverse drug reactions. J Pharmacol Pharmacother. 2013;4:73. https://doi.org/10.4103/0976-500X.120957.
Lorimer S, Cox A, Langford NJ. A patient’s perspective: the impact of adverse drug reactions on patients and their views on reporting. J Clin Pharm Ther. 2012;37(3):148–52. https://doi.org/10.1111/j.1365-2710.2011.01258.x.
RodrÃguez-Monguió R, Otero MJ, Rovira J. Assessing the economic impact of adverse drug effects. PharmacoEconomics. 2003;21:623–50. https://doi.org/10.2165/00019053-200321090-00002.
Shehab N, Lovegrove MC, Geller AI, Rose KO, Weidle NJ, Budnitz DS. US emergency department visits for outpatient adverse drug events, 2013-2014. JAMA. 2016;316:2115–25. https://doi.org/10.1001/jama.2016.16201.
Sarker A, Ginn R, Nikfarjam A, O’Connor K, Smith K, Jayaraman S, et al. Utilizing social media data for pharmacovigilance: A review. J Biomed Inform. 2015;54(7):202–12. https://doi.org/10.1016/j.jbi.2015.02.004.
Takanashi F. WHO Pharmaceuticals Newsletter. Pharmacovigilance. 2022;1:42–3. https://www.who.int/publications/i/item/9789240042452.
Yang M, Kiang M, Shang W. Filtering big data from social media – Building an early warning system for adverse drug reactions. J Biomed Inform. 2015;54(9):230–40. https://doi.org/10.1016/j.jbi.2015.01.011.
Nikfarjam A, Sarker A, O’Connor K, Ginn R, Gonzalez G. Pharmacovigilance from social media: mining adverse drug reaction mentions using sequence labeling with word embedding cluster features. J Am Med Inform Assoc. 2015;22(11):671–81. https://doi.org/10.1093/jamia/ocu041.
Harpaz R, DuMouchel W, Shah NH, Madigan D, Ryan P, Friedman C. Novel data-mining methodologies for adverse drug event discovery and analysis. Clin Pharmacol Ther. 2012;91(3):1010–21. https://doi.org/10.1038/clpt.2012.50.
Freifeld CC, Brownstein JS, Menone CM, Bao W, Filice R, Kass-Hout T, et al. Digital drug safety surveillance: monitoring pharmaceutical products in twitter. Drug Saf. 2014;37(4):343–50. https://doi.org/10.1007/s40264-014-0155-x.
Karapetiantz P, Audeh B, Lillo-Le Louët A, Bousquet C. Signal detection for baclofen in web forums: a preliminary study. In MIE, Stud Health Technol Inform. 2018;247(12):421–5.
Leaman R, Wojtulewicz L, Sullivan R, Skariah A, Yang J, Gonzalez G. Towards internet-age pharmacovigilance: extracting adverse drug reactions from user posts in health-related social networks. In: Proceedings of the 2010 workshop on biomedical natural language processing, vol. 1. Uppsala: Association for Computational Linguistics; 2010. p. 117–25.
Roosan D, Wu Y, Tran M, Huang Y, Baskys A, Roosan MR. Opportunities to integrate nutrigenomics into clinical practice and patient counseling. Eur J Clin Nutr. 2022;20(3):1–9. https://doi.org/10.1038/s41430-022-01146-x.
Cocos A, Fiks AG, Masino AJ. Deep learning for pharmacovigilance: recurrent neural network architectures for labeling adverse drug reactions in Twitter posts. J Am Med Inform Assoc. 2017;24(2):813–21. https://doi.org/10.1093/jamia/ocw180.
Savova GK, Ogren PV, Duffy PH, Buntrock JD, Chute CG. Mayo clinic NLP system for patient smoking status identification. J Am Med Inform Assoc JAMIA. 2008;15(11):25–8. https://doi.org/10.1197/jamia.M2437.
Roosan D, Chok J, Baskys A, Roosan MR. PGxKnow: a pharmacogenomics educational HoloLens application of augmented reality and artificial intelligence. Pharmacogenomics. Mar 2022;23(4):235-245. https://doi.org/10.2217/pgs-2021-0120.
Sayer M, Duche A, Nguyen TJT, Le M, Patel K, Vu J, et al. Clinical implications of combinatorial pharmacogenomic tests based on cytochrome P450 variant selection. Front Genet. 2021;12(2):1628. https://doi.org/10.3389/fgene.2021.719671.
Li Y, Duche A, Sayer MR, Roosan D, Khalafalla FG, Ostrom RS, et al. SARS-CoV-2 early infection signature identified potential key infection mechanisms and drug targets. BMC Genomics. 2021;22(7):125. https://doi.org/10.1186/s12864-021-07433-4.
Roosan D, Hwang A, Roosan MR. Pharmacogenomics cascade testing (PhaCT): a novel approach for preemptive pharmacogenomics testing to optimize medication therapy. Pharmacogenomics J. 2021;21(3):1–7. https://doi.org/10.1038/s41397-020-00182-9.
Kim E, Baskys A, Law AV, Roosan MR, Li Y, Roosan D. Scoping review: the empowerment of Alzheimer’s Disease caregivers with mHealth applications. NPJ Digit Med. 2021;4(12):1–8. https://doi.org/10.1038/s41746-021-00506-4.
Kate K, Qato DM, Rachel K, Stafford RS, Caleb AG. National trends in oral anticoagulant use in the United States, 2007 to 2011. Circ Cardiovasc Qual Outcomes. 2012;5(9):615–21. https://doi.org/10.1161/CIRCOUTCOMES.112.967299.
Carlson B. Declaring war on warfarin misdosing. Biotechnol Healthc. 2008;5(3):54–5 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2706162/.
Mikolov T, Chen K, Corrado G, Dean J. Efficient estimation of word representations in vector space. Proc. 2013. Conference proceedings on 1st international conference on learning representations. 2013;1(3):1301-1305. http://arxiv.org/abs/1301.3781.
Pennington J, Socher R, Manning CD. Glove: global vectors for word representation. In: Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP). Doha, 2014;1(1):1532–1543. https://aclanthology.org/D14-1162.pdf.
Bonsall A. Symptom checker, health information and medicines guide: Patient Info Inc. Health Information You can trust. Available from: https://patient.info/. Accessed 23 Oct 2021.
Ask a Patient [Internet]. Drug reviews by patients. [updated July 2022, cited Nov 2021]. Available from: https://www.askapatient.com/. Accessed 23 Nov 2021.
Cafepharma [Internet]. Cafepharma today. [updated August 2022, cited October 2021]. Available from: http://www.cafepharma.com/. Accessed 20 Oct 2021.
Drug Buyers Guide [Internet]. Drug Buy Guide Forum. [updated August 2022, cited October 2021]. Available from: https://www.drugbuyersguide.net/index.php. Accessed 23 Oct 2021.
Drugs.com [Internet]. Prescription drug information, interactions & side effects. [updated August 2022, cited October 2021]. Available from: https://www.drugs.com/. Accessed 23 Oct 2021.
Drugs-Forum Home [Internet]. Addiction helps and harm reduction. [updated July 2022, cited October 2021]. Available from: https://drugs-forum.com/. Accessed 23 Oct 2021.
MedHelp.org [Internet]. Vital consumer service LLC. Health community, health information, medical questions, and medical apps. [updated August 2022, cited October 2021]. Available from: https://www.medhelp.org/. Accessed 23 Oct 2021.
MedsChat.com [Internet]. LimeLight Innovations LLC. Drugs forum, drug database, medication list. [updated August 2022, cited October 2021]. Available from: https://www.medschat.com. Accessed 21 Oct 2021.
PatientsLikeMe [Internet]. PatientsLikeMe.ALL LLC. Learn and grow together. [updated August 2022, cited October 2021]. Available from: https://www.patientslikeme.com/. Accessed 22 Oct 2021.
Roosan D, Weir C, Samore M, Jones M, Rahman M, Stoddard GJ, et al. Identifying complexity in infectious diseases inpatient settings: An observation study. J Biomed Inform. 2017;71(1):S13–21. https://doi.org/10.1016/j.jbi.2016.10.018.
Islam R, Weir CR, Jones M, Del Fiol G, Samore MH. Understanding complex clinical reasoning in infectious diseases for improving clinical decision support design. BMC Med Inform Decis Mak. 2015;15(4):101. https://doi.org/10.1186/s12911-015-0221-z.
Islam R, Weir C, Del Fiol G. Clinical complexity in medicine: a measurement model of task and patient complexity. Methods Inf Med. 2016;55(3):14–22. https://doi.org/10.3414/ME15-01-0031.
Roosan D, Tatla V, Li Y, Kugler A, Chok J, Roosan MR. Framework to enable pharmacist access to healthcare data using blockchain technology and artificial intelligence. J Am Pharm Assoc. 2022;62(4):1124–32. https://doi.org/10.1016/j.japh.2022.02.018.
Thomas EJ, Studdert DM, Burstin HR, Orav EJ, Zeena T, Williams EJ, et al. Incidence and types of adverse events and negligent care in Utah and Colorado. Med Care. 2000;38(6):261–71.
Polepalli Ramesh B, Belknap SM, Li Z, Frid N, West DP, Yu H. Automatically recognizing medication and adverse event information from food and drug administration’s adverse event reporting system narratives. JMIR Med Inform. 2014;2(1):48–51. https://doi.org/10.2196/medinform.3022.
Duh MS, Cremieux P, Audenrode MV, Vekeman F, Karner P, Zhang H, et al. Can social media data lead to earlier detection of drug-related adverse events? Pharmacoepidemiol Drug Saf. 2016;25(2):1425–33. https://doi.org/10.1002/pds.4090.
Roosan D, Hwang A, Law AV, Chok J, Roosan MR. The inclusion of health data standards in the implementation of pharmacogenomics systems: a scoping review. Pharmacogenomics. 2020;21(16):1191–202. https://doi.org/10.2217/pgs-2020-0066.
Roosan D, Karim M, Chok J, Roosan M. Operationalizing healthcare big data in the electronic health records using a heatmap visualization technique. In: Proceedings of the 13th international joint conference on biomedical engineering systems and technologies. HEALTHINF; 2020;5(9):361–8. https://doi.org/10.5220/0008912503610368.
Roosan D, Samore M, Jones M, Livnat Y, Clutter J. Big-data based decision-support systems to improve clinicians’ cognition. 2016 IEEE International Conference on Healthcare Informatics (ICHI), 2016;2:(1):285–8. https://doi.org/10.1109/ICHI.2016.39.
Roosan D. The promise of digital health in healthcare equity and medication adherence in the disadvantaged dementia population. Pharmacogenomics. 2022;23(5):505–8. https://doi.org/10.2217/pgs-2022-0062.
Roosan D, Li Y, Law A, Truong H, Karim M, Chok J, et al. Improving medication information presentation through interactive visualization in mobile apps: human factors design. JMIR MHealth UHealth. 2019;7(11):e15940. https://doi.org/10.2196/15940.
Roosan D, Chok J, Karim M, Law AV, Baskys A, Hwang A, et al. Artificial intelligence–powered smartphone app to facilitate medication adherence: protocol for a human factors design study. JMIR Res Protoc. 2020;9(10):e21659. https://doi.org/10.2196/21659.
Acknowledgements
The authors would like to thank students of Claremont Graduate University and Western University of Health Sciences for their contributions.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of Interest
The authors declare no competing interests.
Additional information
Supervising Editor: Peter Ray Chai, M.D., M.M.S..
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Information
Below is the link to the electronic supplementary material.
Rights and permissions
Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Roosan, D., Law, A.V., Roosan, M.R. et al. Artificial Intelligent Context-Aware Machine-Learning Tool to Detect Adverse Drug Events from Social Media Platforms. J. Med. Toxicol. 18, 311–320 (2022). https://doi.org/10.1007/s13181-022-00906-2
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s13181-022-00906-2
Keywords
- Social media
- Adverse drug event
- Machine learning
- Natural language processing
- Pharmacovigilance