I don’t like EHR’s. Most of the information clinicians enter into an EHR is for lawyers and for billing. Feel free to disagree, but the EHR takes up my valuable patient-doctor time. It also becomes the focus of the visit; no way for me to see a patient without documenting the visit – that’s how bad it’s gotten.
However, there is hope for our EHR’s. EHR-based prediction algorithms can be used to identify at-risk patients and even predict diseases. Specific interventions can then help prevent negative outcome for these selected individuals.
A real life example is this HIV prediction algorithm which was recently published in The Lancet HIV. You can read the summary on the NIH website. A machine learning protocol was used to identify patients at highest risk for HIV, in order to intervene with PrEP.
Imagine doing the same thing for tuberculosis, aspiration pneumonia, tetanus, malaria, and MDR UTI.
The EHR contains a ton of data, from diagnoses to lab codes. Our physician minds can account for 10-15 variables at a time before coming up with a risk stratification for the patient. A computer prediction model can factor for 100’s of variables
So, a patient comes in and asks me for STI screening. It would be too time-intensive for me to look through all of their previous visits and read through each office visit note.
Even if I identify them as being sexually high-risk, it might be tough to bring up the topic of PrEP for HIV prevention. When you’re in the room for only 10 minutes with a patient, it’s hard to warm up to these kinds of sensitive conversations.
An EHR-based prediction algorithm runs in the background – that’s the beauty of it. It scours the patient’s chart for pertinent information and accounts for everything that I enter into the chart. It then comes up with a suggestion which guides the doctor.
Right before I discharge the patient with some STI screening blood tests, a pop-up might suggest that I offer this patient PrEP for HIV prevention. And it will tell me that this patient has a 78% chance of contracting HIV in the next 2 years and with access to PrEP their risk would go down to 1%.
Creating the Algorithm
We first need an eventual outcome: contracting HIV, in this case. So that’s what we want to prevent. We now need to work backwards to figure out what information we can use to predict this outcome.
But it would take ages for us to run through every scenario. And we may never think that the zip code of the patient or their choice of pharmacies could predict their outcome. We’re not creative enough to come up with all the juicy variables.
But machine learning can do this for us. Let’s talk about that next. The software can learn from the data without a programmer and clinician having to code everything in manually.
Machine Learning Algorithms
In this EHR-based prediction model, the researchers needed the following:
- previous patient data
- a prediction model
- model training
- validation of the model
- measuring success
1. Patient Data
To create the model you need access to old data. In this case, the researchers got access to 1 million old patient records from Atrius Health from 2007-2015. They also got access to 3.7 million old charts from Kaiser Permanente from 2007-2014.
The researchers likely also created some synthetic data. These are patient cases which are completely made up. A clinician will come up with all sorts of parameters and risk factors which they believe are risk factors for eventually contracting HIV.
The synthetic data will battle the real data and that’s how the researchers will determine which of these parameters are true predictors of HIV. In that process, they might also identify new parameters which the clinicians didn’t even think of.
The hardest part for companies and researchers who are developing these EHR-based prediction algorithms is getting access to the data. With current laws in the US, this can be difficult. All PHI data has to be scrubbed from the patient records before using them. You can’t do that manually when dealing with 3.7 million patients.
2. The Prediction Model
The prediction model is what is referred to as the algorithm. It’s what a 3rd party company will try to create and market to their customers; or what these researchers created in this case. They will then claim that their algorithm is X% accurate in predicting a certain disease or outcome.
Once the researchers or software designers decide on their specific model, they will need to test it in order to determine how effective it is. This is the next step, validation.
In this study, the researchers used things like:
- previous diagnoses codes
- medications they were prescribed
- STI counseling codes
- wording used by clinicians in the charts
- previous lab tests
What this highlights is how important it is that we as clinicians document as cleanly as possible. But I find that so hard when I’m plowing through 60 patients in 10 hours. This is why I suspect that voice technology will be the future of the office visit and our visits will need to be recorded.
3. Model Training
To train the model, the researchers may have used a “supervised learning algorithm” in order train the model. The input data (the old patient records) is the “training data”. The model then creates a prediction based on these parameters and the researchers make corrections as needed. If the model is performing well then it is given more and more data to train on.
It gets complicated because the computation power is very taxing. In fact, for every extra factor that’s added in, the computation can increase exponentially. It can take 24 hours to run a test to see how the model performs.
4. Model Validation
What the researchers did next is take their EHR-based prediction algorithm and used it on new data. They validated it on 500,000 patients from Atrius Health in 2016 and on Kaiser Permanente charts from 2015-2017.
Their model only needed to flag 2% of the male patients which helped them accurately diagnose 50% of eventual HIV cases. Remember, the goal is to predict the HIV cases but the desired intervention is prescribing PrEP to the right patients in order to prevent HIV.
The final result is that 40% of the HIV cases could have been prevented if PrEP was prescribed to those in the highest 2% risk group.
This is why AI in healthcare is so fascinating to me. I hope to continue to expand my expertise in this area and grow my healthcare consulting clients in the artificial intelligence space.
If you’re interested in dabbling in this kind of work. Consider taking my Healthcare Consulting Course where I outline how to get started in healthcare consulting and finding your first client.