News Release

Friday, July 5, 2019

Novel Method Identifies Patients at Risk for HIV Who May Benefit From Prevention Strategies

NIH-funded studies demonstrate the value of automated prediction algorithms that could be used to prevent new HIV infections.

Researchers have demonstrated the effectiveness of using algorithms that analyze electronic health records (EHRs) to help physicians identify patients at risk for HIV who may benefit from preexposure prophylaxis (PrEP), which significantly reduces the risk of getting HIV. The studies, which were supported by the National Institute of Mental Health (NIMH) and the National Institute of Allergy and Infectious Diseases (NIAID), part of the National Institutes of Health, advance a novel method that can help clinicians identify individuals most in need of PrEP. The two studies were published in The Lancet HIV.

“The development of innovative tools to increase PrEP use and adherence in the United States is crucial to our efforts to end the HIV epidemic,” stated Dianne Rausch, Ph.D., director of the NIMH Division of AIDS Research. “Identifying individuals who may benefit from PrEP is a major challenge for clinicians, and this is an important advance that could help improve PrEP delivery and use.”

PrEP is a strategy in which healthy people routinely take one or more antiretroviral drugs to reduce their risk of getting HIV. It is highly effective for reducing the risk of HIV acquisition, yet it remains greatly underutilized. The Centers for Disease Control and Prevention estimates that as many as 1.1 million Americans may be candidates for PrEP use — but, in 2016, only an estimated 78,360 (about 7%) were prescribed PrEP medication.

Physicians may underprescribe PrEP due to a lack of time or skills to adequately assess patients for HIV risk. In other instances, physicians may be unfamiliar with PrEP or consider it outside their purview to prescribe.

“The incorporation of automatic screening algorithms into EHRs could help busy clinicians identify and assess patients who may benefit from PrEP more efficiently, and empower them to prescribe PrEP more frequently,” said study author Douglas Krakower, M.D., of Beth Israel Deaconess Medical Center and Harvard Medical School.

In two large-scale studies, which used EHRs from large health systems in Massachusetts and California, researchers created and tested algorithms that analyze a rich array of health data and patient information to help clinicians automatically identify those at highest risk for HIV infection and therefore most likely to benefit from PrEP medications.

In the first study, Krakower and colleagues used machine learning to create an HIV prediction algorithm using 2007-2015 EHR data from more than 1 million patients attending Atrius Health, a large healthcare system in Massachusetts. The model used variables in the EHRs such as diagnosis codes for HIV counseling or sexually transmitted infections (STIs), laboratory tests for HIV or STIs, and prescriptions for medications related to treating STIs. The model was subsequently validated using data from 537,257 patients seen by Atrius Health in 2016, as well as 33,404 patients seen by Fenway Health, a community health center in Boston that specializes in providing healthcare for sexual and gender minorities, between 2011 and 2016. In these validation studies, the prediction algorithm was able to successfully distinguish between patients who did or did not acquire HIV, and between patients who did or did not receive a PrEP prescription, with high precision. 

The researchers discovered many potential missed opportunities to prescribe PrEP. For example, more than 9,500 people in the 2016 dataset had particularly high risk scores from the prediction algorithm and lacked prior PrEP prescriptions.

According to Krakower, “A striking outcome is that our analysis suggests nearly 40% of new HIV cases could potentially have been averted had clinicians received alerts to discuss and offer PrEP to their patients with the highest 2% of risk scores.” 

The second study, led by Julia Marcus, Ph.D., of Harvard Medical School and Harvard Pilgrim Health Care Institute, with Krakower and colleagues, scaled-up this prediction approach by using the EHRs of more than 3.7 million patients receiving outpatient services from Kaiser Permanente Northern California. They developed a model to predict HIV incidence using data from patients who entered the Kaiser Permanente system between 2007 and 2014, and they validated the model on data from patients who had entered the Kaiser Permanente system between 2015 and 2017. The model used variables in the EHRs such as high-risk sexual behavior indications, HIV and STI testing frequency, and STI diagnoses and treatments.

“Our model was able to identify nearly half of the incident HIV cases among males by flagging only 2% of the general patient population,” Marcus said. “Embedding our algorithm into the Kaiser Permanente EHR could prompt providers to discuss PrEP with patients who are most likely to benefit.”

Both studies are among the first to demonstrate that EHR-based prediction algorithms can effectively identify individuals in general populations who are at high risk for HIV and potential candidates for PrEP. These models offer clinicians an important new tool to reduce new HIV infections. Future research will continue the development of these predictive models and discover the best ways to integrate them with healthcare systems to improve PrEP use and prevent HIV infections.

Grants: MH098795; AI122853; AI060354

About the National Institute of Mental Health (NIMH): The mission of the NIMH is to transform the understanding and treatment of mental illnesses through basic and clinical research, paving the way for prevention, recovery, and cure. For more information, visit the NIMH website.

About the National Institute of Allergy and Infectious Diseases (NIAID): NIAID conducts and supports research—at NIH, throughout the United States, and worldwide—to study the causes of infectious and immune-mediated diseases, and to develop better means of preventing, diagnosing and treating these illnesses. News releases, fact sheets and other NIAID-related materials are available on the NIAID website.

About the National Institutes of Health (NIH): NIH, the nation's medical research agency, includes 27 Institutes and Centers and is a component of the U.S. Department of Health and Human Services. NIH is the primary federal agency conducting and supporting basic, clinical, and translational medical research, and is investigating the causes, treatments, and cures for both common and rare diseases. For more information about NIH and its programs, visit

NIH…Turning Discovery Into Health®


Krakower, D.S., Gruber, S., Hsu, K., Menchaca, J. T., Maro, J. C., Kruskal, B. A., … & Klompas, M. (2019). Development and validation of an automated HIV prediction algorithm to identify candidates for preexposure prophylaxis. The Lancet HIV.

Marcus, J.L., Hurley, L. B., Krakower, D. S., Alexeeff, S., Silverberg, M. J., & Volk, J. E. (2019). Use of electronic health record data and machine learning to identify potential candidates for HIV preexposure prophylaxis: a modelling study. The Lancet HIV.