Introduction: Recreational and medical cannabis use (CU) information is often available within the electronic health record (EHR) in a format that is impractical for health care provider use. Transformation of free-text EHR documentation in notes to discrete elements is possible using natural language processing (NLP) and has the potential to characterize CU efficiently. The objective of this study was to develop an NLP algorithm to identify CU documentation within unstructured EHR clinical notes. Methods: We identified EHR notes with cannabis-related terminologies through a keyword search among all Geisinger patients with at least one encounter between 1/1/2013 and 6/30/2022. We trained four NLP models to classify CU documentation within notes into six categories based on time, context, and reliability, as identified through manual annotation. We compared the demographic characteristics of patients with a positive CU classification using the best-performing model to those of the studied sample. Results: Of the over 1.7 million eligible patients, 150,726 (8.6%) were flagged as cannabis users. Bio-ClinicalBERT, a transformer-based NLP model, achieved close to human performance in classifying CU (weighted precision=91.4, recall=93.3, F-score=92.4). An unadjusted analysis showed that cannabis users had higher body mass index (BMI) and were at least nine-fold more likely to use tobacco, alcohol, or illicit substances. Conclusion: Our study evaluated the prevalence of CU documentation across the entire corpus of EHR notes data based on available data without population segmentation over a 9.5-year period. The NLP methodologies used achieved performance close to that of human annotation and laid the foundation for identifying and classifying CU within unstructured data sources, with future applications in research and patient care.
Pradhan et al. (Sat,) studied this question.