4Shadow Analytix· Field to Decision
INVISTICS / PEER-REVIEWED EVIDENCE
NIH-supported research · Production ML · Investigator review

Detecting drug diversion in health-system data.

Machine learning and advanced analytics unified medication-use evidence across systems, surfaced risk for review, and preserved the investigator's authority.

The situation

Hospitals had the evidence, but it was distributed across systems designed for other jobs.

A controlled substance can move through purchasing, pharmacy inventory, an automated dispensing cabinet, a clinician, the patient record, waste, return, and reconciliation. Each system may record its own transaction correctly while the end-to-end pattern remains invisible. Traditional monthly usage and discrepancy reports were slow, noisy, and easy to evade by spreading behavior across workflows.

The operating consequence was larger than lost medication. Diversion can deprive a patient of treatment, expose patients to infection, harm the clinician diverting, and create legal and regulatory risk for the health system. The research question was therefore not whether a model could find anomalies. It was whether consolidated clinical evidence could identify known diversion earlier and make investigation materially faster.

The NIH program

Domain experts mapped the drug lifecycle before machine learning assigned risk.

NIH award R44DA044083, funded through the National Institute on Drug Abuse, supported development of clinical data intelligence and advanced analytics across the care-delivery cycle and drug supply chain. Hospital administrators, diversion investigators, clinicians, pharmacists, regulators, and law-enforcement experience defined the failure points and candidate evidence.

The engineering work consolidated automated dispensing cabinet and EHR data, then reconciled dispenses, administration, waste, returns, transfers, dosage forms, patient-specific infusions, procedural workflows, and peer behavior. Supervised learning optimized the patterns, but the output remained a risk signal for a trained investigator. It was not an accusation or finding of diversion.

The test

Blinded historical cases measured whether the system would have changed the timeline.

TRANSACTIONS
27.9M
Medication movements consolidated across the study history.
CLINICIANS
20,796
Nursing, pharmacy, and anesthesia professionals represented.
KNOWN CASES
22
Blinded diversion incidents detected in ten hospitals across four health systems.
EARLIER SIGNAL
160 days
Mean improvement over existing detection, with a median of 74 days.

The published study reported 96.3 percent accuracy, 95.9 percent specificity, and 96.6 percent sensitivity on the initial sample used to classify high-risk transactions. In the historical test, all 22 known blinded cases were detected earlier than existing methods, with improvements ranging from 7 to 579 days.

Investigation changed as well. Users reported that consolidated evidence reduced auditing from 4 to 20 hours of manual reconciliation to roughly 10 to 30 minutes. That is where the data engineering, model, and workflow became one product.

Local article
Download the preserved local article
The published evidence

The peer-reviewed article is preserved with the site.

Knight, T., May, B., Tyson, D., McAuley, S., Letzkus, P., and Murphy Enright, S. (2022). American Journal of Health-System Pharmacy, 79(16), 1345–1354. The acknowledgments thank John Holstein for his many contributions to the research.