Large language models for preventing medication direction errors in online pharmacies

Large language models for preventing medication direction errors in online pharmacies

June 2024 | Cristobal Pais, Jianfeng Liu, Robert Voigt, Vin Gupta, Elizabeth Wade & Mohsen Bayati
This study explores how integrating domain knowledge with large language models (LLMs) can reduce medication direction errors in online pharmacies. The researchers developed MEDIC, a system that emulates pharmacist reasoning by prioritizing precise communication of core clinical components of prescriptions, such as dosage and frequency. MEDIC fine-tunes a first-generation LLM using 1,000 expert-annotated and augmented directions from Amazon Pharmacy to extract core components and assembles them into complete directions using pharmacy logic and safety guardrails. The system was compared against two LLM-based benchmarks: one leveraging 1.5 million medication directions and the other using state-of-the-art LLMs. On 1,200 expert-reviewed prescriptions, the two benchmarks recorded 1.51 and 4.38 times more near-miss events than MEDIC. Additionally, MEDIC reduced near-miss events by 33% during deployment in an online pharmacy's production system. The study shows that LLMs, with domain expertise and safeguards, improve the accuracy and efficiency of pharmacy operations. Medication errors are a major category of medical errors that can occur at any stage of the medication-use process, including prescribing, dispensing, and administering medications. These errors result in at least 1.5 million preventable adverse drug events annually in the US and incur nearly $3.5 billion in annual costs. Recent studies suggest these figures may be considerably higher. Although not every medication error results in harm, approximately 1% lead to adverse consequences. Medication errors are a significant cause of preventable harm, with over 75% attributed to prescribing and administration phases, while errors in pharmacies are both common and costly. One of the leading types of medication errors is incorrect prescription directions, stemming from various factors, including human error, miscommunication, ambiguous data entries, and the complexity of medication management. A common point where these errors occur is when the prescription is entered into the pharmacy's computer system. For example, inputting a prescription direction such as '500 mg before procedure' can lead to confusion, requiring patients to interpret the meaning of '500 mg' in relation to their medication. A clearer instruction such as 'take one tablet by mouth before procedure' reduces such ambiguity. A critical example is the incorrect transcription of 'take 20 mg by mouth once weekly' as 'take 20 mg by mouth once daily' for methotrexate oral capsules, which could result in severe adverse effects. The introduction of electronic health records (EHRs) adds complexity to medication direction accuracy. EHRs, while structuring data entry, also permit free-text fields for prescriptions, creating inconsistencies and potential for errors. This challenge is further exacerbated by diverse, nonstandard style guidelines used across various organizations and countries. To tackle this challenge, the study investigates the implementation of a human-in-the-loop AI solution to enhance the standard pharmacy process, particularly the keyThis study explores how integrating domain knowledge with large language models (LLMs) can reduce medication direction errors in online pharmacies. The researchers developed MEDIC, a system that emulates pharmacist reasoning by prioritizing precise communication of core clinical components of prescriptions, such as dosage and frequency. MEDIC fine-tunes a first-generation LLM using 1,000 expert-annotated and augmented directions from Amazon Pharmacy to extract core components and assembles them into complete directions using pharmacy logic and safety guardrails. The system was compared against two LLM-based benchmarks: one leveraging 1.5 million medication directions and the other using state-of-the-art LLMs. On 1,200 expert-reviewed prescriptions, the two benchmarks recorded 1.51 and 4.38 times more near-miss events than MEDIC. Additionally, MEDIC reduced near-miss events by 33% during deployment in an online pharmacy's production system. The study shows that LLMs, with domain expertise and safeguards, improve the accuracy and efficiency of pharmacy operations. Medication errors are a major category of medical errors that can occur at any stage of the medication-use process, including prescribing, dispensing, and administering medications. These errors result in at least 1.5 million preventable adverse drug events annually in the US and incur nearly $3.5 billion in annual costs. Recent studies suggest these figures may be considerably higher. Although not every medication error results in harm, approximately 1% lead to adverse consequences. Medication errors are a significant cause of preventable harm, with over 75% attributed to prescribing and administration phases, while errors in pharmacies are both common and costly. One of the leading types of medication errors is incorrect prescription directions, stemming from various factors, including human error, miscommunication, ambiguous data entries, and the complexity of medication management. A common point where these errors occur is when the prescription is entered into the pharmacy's computer system. For example, inputting a prescription direction such as '500 mg before procedure' can lead to confusion, requiring patients to interpret the meaning of '500 mg' in relation to their medication. A clearer instruction such as 'take one tablet by mouth before procedure' reduces such ambiguity. A critical example is the incorrect transcription of 'take 20 mg by mouth once weekly' as 'take 20 mg by mouth once daily' for methotrexate oral capsules, which could result in severe adverse effects. The introduction of electronic health records (EHRs) adds complexity to medication direction accuracy. EHRs, while structuring data entry, also permit free-text fields for prescriptions, creating inconsistencies and potential for errors. This challenge is further exacerbated by diverse, nonstandard style guidelines used across various organizations and countries. To tackle this challenge, the study investigates the implementation of a human-in-the-loop AI solution to enhance the standard pharmacy process, particularly the key
Reach us at info@study.space
Understanding Large language models for preventing medication direction errors in online pharmacies