Now Reading
How Machine Learning Is Being Used To Eradicate Medication Errors

How Machine Learning Is Being Used To Eradicate Medication Errors

Rohit Chatterjee
Medication errors

People working in the healthcare sector take extra precautions to avoid mistakes and medication errors that can put the lives of patients at risk. Yet, despite this, 2% of patients face preventable medical-related incidents that could be life-threatening. Inadequate systems, tools, processes or working conditions are some of the reasons contributing to these medical mistakes.

In a bid to solve this problem, Google collaborated with UCSF’s Bakar Computational Health Sciences Institute to publish “Predicting Inpatient Medication Orders in Electronic Health Record Data” in Clinical Pharmacology and Therapeutics. The published paper discusses how machine learning (ML) can be used to anticipate standard prescribing patterns by doctors as per the availability of electronic health records.

Google used clinical data of de-identified patients, which included vital signs, laboratory results, past medications, procedures, diagnoses, and more. Google’s new model was designed to anticipate a physician’s prescription decisions three-quarters of the time, after evaluating the patient’s current state and medical history.

Model Training

To train the model, Google chose a dataset containing approximately three million medication orders from more than 1,00,000 hospitals. The company acquired the retrospective electronic health data through de-identification, by choosing random dates and removing all the identifying checkpoints of the record as per the HIPPA rules and guidelines. The company did not gather any identifying information such as names, addresses, contact details, record numbers, names of physicians, free-text notes, images, etc.

The research by the tech giant was done using the open-sourced Fast Healthcare Interoperability Resources (FHIR) format that the company claims was previously applied to improve healthcare data and make it more useful for machine learning. Google did not restrict the dataset to a particular disease, which made the ML activity more demanding. It also allowed the model to identify a wider variety of medical conditions.

Google approached two different ML models – the long short-term recurrent neural network, and the regularized time-bucketed logistic model, which are often used in clinical research. Both models were put into comparison against a simple baseline, which was ranked as the most commonly ordered medication based on a patient’s hospital service, along with time spent since the admission in the hospital. The models ranked a list of 990 possible medications every time a medication was entered in the retrospective data. The team further assessed if the models assigned high probabilities to the medication that were provided by the doctors for each case. 


Google’s best performing model was the LSTM model, which is capable of handling sequential data, including text and language. The model has been designed to choose the recent events in data and their order, which makes it an excellent option to deal with this problem. Almost 93% of the top-10 list included at least one medication that a clinician would prescribe to a patient within the next day.

See Also
AWS SageMaker Kubernetes Machine Learning

The model rightly forecasted the medications prescribed by a doctor as one of the top-10 most likely medications, which calculated to an accuracy amount of 55%. 75% of the ordered medication were ranked in top-25, whereas false-negative cases, where a doctor’s medication did not make it into the top-25 results, found itself to be in the same 42% of the time as ranked by the model.

Benefits For Patients & Clinicians

These models are trained to mimic a physician’s behavior as it appears in historical data, and did not learn the optimal prescribing pattern. Due to this, the models do not understand how the medications might work, or if they have any side effects or not. As per Google, the learning sequence will take time to show normal behavior in a bid to spot abnormal and potentially dangerous orders. In the next phase, the company will examine the models under different circumstances to understand which medication error can cause harm to patients.

The result of this work by Google is a small step towards testing the hypothesis that machine learning can be applied to build different systems which can prevent mistakes on the part of doctors and clinicians to keep patients safe. Google is looking forward to collaborating with doctors, pharmacists, clinicians and patients to continue the research for a better result.

What Do You Think?

If you loved this story, do join our Telegram Community.

Also, you can write for us and be one of the 500+ experts who have contributed stories at AIM. Share your nominations here.

Copyright Analytics India Magazine Pvt Ltd

Scroll To Top