Development of an Algorithm to Identify Cannabis Urine Drug Test Results within a Multi-Site Electronic Health Record System

Benjamin J. Morasco, Sarah E. Shull, Melissa H. Adams, Steven K. Dobscha, Travis I. Lovejoy

Research output: Contribution to journalArticlepeer-review

2 Scopus citations


With the rapid changes in the legalization of cannabis in the U.S., there is an urgent need to understand clinical outcomes and processes of care among patients who use cannabis, particularly among patients with chronic pain who are high utilizers of cannabis. Electronic health records (EHRs) are a common and convenient mechanism for examining processes of care; however, there is not an indication for cannabis use that does not meet criteria for a diagnostic disorder. We used urine drug test (UDT) results identified through EHRs to identify patients with confirmed cannabis use. We developed and tested an algorithm to identify outcomes of UDT results for cannabis because there is wide variability in reporting methodology, including in multi-site health systems. Among all patients receiving care in the Department of Veterans Affairs (VA) who were prescribed long-term opioid therapy for chronic pain, we identified a random sample who completed UDT for cannabis. Through an iterative process, we developed an algorithm to identify UDT cannabis results. Manual review of EHR data was conducted to verify accuracy of UDT results. The final UDT algorithm correctly identified 99% of cannabis positive UDT results and 100% of cannabis negative UDT results among 200 randomly sampled patients. Study findings suggest a high degree of accuracy for using an algorithm to identify samples of patients with positive cannabis UDT results across multiple institutions with disparate UDT reporting practices. The methodology for testing this algorithm is feasible and may be applied to other multi-site health systems.

Original languageEnglish (US)
Article number163
JournalJournal of Medical Systems
Issue number9
StatePublished - Sep 1 2018


  • Algorithm
  • Cannabis
  • Electronic health record
  • Urine drug test

ASJC Scopus subject areas

  • Medicine (miscellaneous)
  • Information Systems
  • Health Informatics
  • Health Information Management


Dive into the research topics of 'Development of an Algorithm to Identify Cannabis Urine Drug Test Results within a Multi-Site Electronic Health Record System'. Together they form a unique fingerprint.

Cite this