Skip to main content
Patterns logoLink to Patterns
. 2025 Jun 26;6(11):101312. doi: 10.1016/j.patter.2025.101312

Data-driven discovery of medication effects on blood glucose from electronic health records

Amanda Momenzadeh 1,5,, Caleb Cranney 1, So Yung Choi 2, Catherine Bresee 2, Mourad Tighiouart 2, Roma Gianchandani 3, Joshua Pevnick 4, Jason H Moore 1, Jesse G Meyer 1,∗∗
PMCID: PMC12664950  PMID: 41328165

Summary

Blood glucose (BG) in hospitalized patients is influenced by numerous clinical factors, including medications not traditionally associated with glycemic control. To better characterize these effects, we analyzed electronic health record data from 97,281 inpatient encounters (2014–2022), capturing 3,009,686 point-of-care BG measurements. We extracted over 300 variables—medications, labs, and socio-demographics—and used Lasso, ridge, and elastic net regression for predictive modeling, alongside propensity score matching (PSM) for causal inference. While Lasso reduced multicollinearity, it often assigned implausible coefficient directions. In contrast, PSM yielded clinically consistent and interpretable estimates, identifying 55 variables significantly associated with BG changes, without shrinking coefficients to zero of known BG-modulating drugs. Findings were validated in a 2022–2024 test set of 27,847 encounters. This work highlights the value of causal inference in observational EHR analysis and identifies both established and under-recognized (e.g., cholecalciferol) medication effects on BG, offering insights that inform safer inpatient glycemic management.

Keywords: blood glucose, electronic health record, lasso regression, propensity score matching, diabetes, hypoglycemia, inpatient glycemic management, drug repurposing

Highlights

  • Real-world EHR data reveal unexpected medication effects on blood glucose

  • Propensity score matching improves interpretability over Lasso regression

  • Twelve drugs associated with blood glucose alteration were validated in a 2022–2024 inpatient test set

The bigger picture

Maintaining safe blood glucose (BG) levels in hospitalized patients is critical to reducing complications, shortening hospital stays, and saving lives. Yet, managing BG is notoriously difficult. Patients are often seriously ill, on multiple medications, and unable to eat normally, all of which can unpredictably affect BG levels. While clinicians are familiar with the effects of insulin and steroids, the impact of many other commonly used hospital medications on BG remains largely unknown. This knowledge gap increases the risk of both high and low BG events, which are linked to longer hospitalizations, higher costs, and greater mortality.

This work demonstrates how routinely collected electronic health record (EHR) data can reveal previously hidden drivers of clinical risk, enabling clinicians to better anticipate and manage adverse events. Beyond glycemic control, our approach provides a general framework for identifying unexpected medication effects and optimizing inpatient care. As hospitals increasingly rely on data to inform decisions, this research demonstrates how combining real-world evidence with rigorous analytical methods can directly enhance patient safety and outcomes.


Blood glucose levels in hospitalized patients are shaped by many medications not typically linked to glycemic control. Using feature selection and causal inference on EHR data from nearly 100,000 hospitalizations, Momenzadeh et al. identified 55 variables significantly associated with blood glucose changes. Their findings, validated on a recent cohort, uncover both established and previously unrecognized medication effects, offering new insights to guide safer inpatient diabetes management.

Introduction

Individuals with diabetes face a significantly higher risk of hospitalization, with admission rates two to six times greater than individuals without diabetes.1,2,3,4 Poorly controlled blood glucose (BG) during hospitalization is linked to increased morbidity and mortality.5 While certain medications, such as steroids and beta blockers, are well documented to cause hyperglycemia6 through impaired insulin secretion or direct effects on beta cell proliferation, the glucose-altering effects of many other drugs remain poorly understood.7 Drug package inserts often fail to provide reliable adverse event data due to limitations in sample size and study design.8 Additionally, confounding factors, such as underlying patient conditions, can obscure causal relationships between medications and BG fluctuations.9 For example, a drug prescribed to individuals with diabetes may appear to induce hyperglycemia, when, in reality, the effect could stem from the disease itself rather than the medication.8

The challenge of BG management in hospitalized patients is further complicated by the dynamic nature of medication prescribing and variability in patient responses.10 At the same time, emerging evidence suggests that some approved drugs may have unexpected effects. For example, bumetanide, a diuretic, has been suggested as a potential therapy for Alzheimer’s disease,11 and approaches using genome-wide association studies and electronic health records (EHRs) have identified medications like angiotensin-converting enzyme inhibitors and calcium channel blockers as influencing BG levels.12 A systematic screening of ∼1,500 drugs against 20 diabetes-related protein targets also uncovered potential drug candidates for repurposing to treat diabetes.13 Given the vast clinical data available in EHRs, a data-driven approach may provide insights into medications with previously unrecognized effects on BG.

We conducted a large-scale analysis of patient records from inpatients who received at least one anti-hyperglycemic medication. The feature selection methods Lasso, elastic net, and ridge regression were employed to identify key predictors of BG changes. To account for confounding factors and estimate the independent effects of medications, we applied propensity score matching (PSM), which balanced treated and control groups on baseline covariates before performing regression analysis. Compared to direct feature selection alone, PSM resulted in more interpretable coefficient estimates, allowing for the identification of medications associated with BG alterations while mitigating confounding effects.

Results

Patient characteristics

Between 2014 and 2022, there were 97,281 encounters among 53,884 individuals. The median encounter age was 67.1 years; 61.8% of encounters were White, 17.7% Black or African American, 8.4% Asian, and 21.1% Hispanic. 41.3% of all encounters were female, and the median body mass index (BMI) was 26.5 kg/m2. Most encounters had diabetes; 13.1% had type 1 diabetes mellitus (T1DM), and 80.4% had T2DM. More than half of encounters had chronic kidney disease (CKD; 61.4%), and 12.7% had hypoglycemia listed as a past medical history. The median and inter-quartile range (IQR) of point-of-care (POC) BGs collected for each encounter during a 12 h lookback window were 153.0 and 123.5–193.7 mg/dL, respectively. 13% of encounters were admitted to the intensive care unit (ICU).

Feature selection using predictive modeling

We analyzed 97,281 hospital admissions comprising 3,009,686 POC BG measurements. For each POC BG, we applied a 12 h lookback window to capture relevant medications, laboratory values, and static patient features (Figure 1A). POC BG was set as the target variable, and all features (medications, laboratory, and statics) were used as inputs. Lasso, elastic net, and ridge regression models showed similar performances as measured by the R2 value; however, only Lasso and elastic net performed effective feature selection, whereas ridge regression retained nearly all predictors due to its shrinkage approach, as indicated by the number of non-zero coefficients (Figure 2A). As expected, ridge regression retained a higher percentage of collinear predictors, leading to a greater proportion of non-zero coefficients with variance inflation factor (VIF) values ≥5. Elastic net, while offering a balance between Lasso’s sparsity and ridge’s handling of multicollinearity, was not as effective as Lasso in reducing the number of non-zero coefficients and retained a higher percentage of collinear predictors. Based on this analysis, we selected Lasso for its ability to identify the most predictive variables while minimizing multicollinearity.

Figure 1.

Figure 1

Overview of study design and analysis pipeline

(A) BG trajectories were extracted for ∼100,000 admissions and aligned using a 12 h lookback window to capture prior medications (MED), lab values (LAB), and static clinical features (STATIC). BG and change in BG (ΔBG) between consecutive measurements served as the outcome.

(B) Regularized regression models (Lasso, ridge, elastic net) identified 282 predictors (257 meds, 19 static, 6 labs) and causal modeling using propensity score matching (PSM) with ordinary least squares (OLS) regression yielded 55 predictors (47 meds, 4 static, 4 labs) with significant associations with ΔBG. Final medication associations were validated against known BG effects in Micromedex.

Figure 2.

Figure 2

Feature selection and coefficient analysis

(A) Performance comparison of Lasso, ridge, and elastic net regression models, showing the R2 value, number of non-zero coefficients, and VIF distribution.

(B) Cumulative percentage of features with known effects as a function of absolute coefficient threshold.

(C) Coefficients for all drugs when categorized into classes.

(D) Effects of all drugs within the antidiabetic class (VIF, variance inflation factor; IV, intravenous; s.c., subcutaneous; PO, by mouth).

Of the 282 non-zero Lasso coefficients, 257 were medications, 19 socio-demographic, and 6 laboratory (Figure 1B). To assess whether the variables selected by Lasso align with existing literature on BG regulation, we examined the percentage of selected variables at increasing effect size thresholds that had a hyperglycemia or hypoglycemia adverse event documented in Micromedex (Figure 2B). As the effect size threshold increased, a higher percentage of variables had prior BG effect documentation, plateauing at an absolute effect size of 1.4, at which all the variables were previously documented as having a BG effect. Notably, among all predictors assigned a coefficient of zero by Lasso, 40% had documented effects on BG. This suggests that while Lasso effectively reduces model complexity, some known BG-altering medications have been excluded. Variables’ effect sizes by drug class are demonstrated in Figure 2C, indicating the following drug classes had the highest average coefficients: steroids (comprising dexamethasone, hydrocortisone, methylprednisolone, prednisone, and fluticasone), androgen inhibitors (comprising finasteride), and intravenous (i.v.) electrolytes (comprising magnesium sulfate i.v.). Antidiabetic medications, paradoxically, were associated with an average increase in BG (Figure 2C). Of the 17 antidiabetics with a non-zero effect, only four (insulin glargine subcutaneous [s.c.], 500 and 1,000 mg metformin, and 60 mg nateglinide) had a negative coefficient, or a BG-lowering effect, as expected (Figure 2D). This result likely reflects the reactive nature of short-acting insulin administration, which is typically given in response to elevated BG rather than as a preventive measure.

BG change, or the difference in BG values between consecutive measurements within an encounter, was instead used as the output for the Lasso model to investigate whether a BG trajectory output would lead to more interpretative results. However, only four out of 16 antidiabetic mediations with non-zero coefficients were in the expected negative direction. While Lasso effectively selected relevant predictors and reduced multicollinearity, the observed discrepancies highlight the need for further refinement for confounding factors and deeper investigation into the causal pathways influencing BG regulation.

PSM and regression analysis

Patients were matched based on propensity scores estimated using logistic regression, adjusting for age, sex, diabetes status (T1DM or T2DM), comorbidities (CKD or congestive heart failure [CHF]), and admission diagnosis (pain or sepsis). Matched cohorts were used to estimate each medication’s effect on BG change using ordinary least squares (OLS) regression. After false discovery rate (FDR) correction, 55 variables, including 47 medications, 4 socio-demographic, and 4 laboratory, were identified as significantly associated with BG change, including both previously documented associations and those not recognized in Micromedex (Figures 1B and 3). About half (24/47) of the medications were previously documented in Micromedex as having a BG effect. 83% (20/24) of these medications had effect sizes in the direction that agreed with Micromedex.

Figure 3.

Figure 3

Representation of coefficients from PSM variables with an adjusted p < 0.01

The x axis categorizes drugs based on whether their BG effect has been previously documented in Micromedex. The y axis lists drugs and clinical variables, with bars representing the coefficient magnitude and direction. Red indicates a positive association with BG, while blue indicates a negative association. Variable names are colored based on whether there is agreement in the direction of the coefficient with the known BG effect direction (PEG, polyethylene glycol; PMH, past medical history; PO, by mouth; IV, intravenous; neb, nebulized; s.c., subcutaneous; NPH, neutral protamine hagedorn).

The proportion of features with established clinical significance increased as the absolute coefficient threshold rose, suggesting that variables with higher-magnitude coefficients in the model are more likely to be clinically meaningful (Figure 4A). As opposed to Lasso, no variable was assigned a coefficient of zero. The volcano plot in Figure 4B highlights the 55 variables that met statistical significance; a subset of variables with highly significant associations (−log10 of adjusted p-value > 10) are labeled, all of which are documented as having a BG effect in Micromedex, including pantoprazole and tacrolimus, which are not used to treat diabetes. In Figure 4C, drug class coefficients are displayed to assess their respective contributions to the modeled outcome. A more granular examination of the 26 antidiabetic medications (Figure 4D) revealed that all had a non-zero effect and that 92% (24/26) of medications had negative coefficients, as expected. We then compared PSM coefficients and Lasso regression coefficients to understand the degree of agreement between the two methods in estimating the effects of variables on BG (Figure 5A). There was a weak positive correlation (R = 0.3), indicating variability in agreement; some of the observed differences may be due to Lasso regression’s shrinkage of coefficients toward zero due to its regularization, whereas PSM’s estimates remain more variable. Lastly, we validated our findings by applying the PSM approach to a more recent dataset (October 2022–April 2024). This analysis identified 22 drugs with statistically significant effects on BG (Benjamini-Hochberg [BH]-corrected p-value < 0.01), 12 of which overlapped with the significant drugs from the original May 2014–September 2022 dataset. Figure 5B displays a comparison of the regression coefficients for these 12 overlapping drugs, highlighting the agreement between the two time periods. The Pearson correlation coefficient (R = 0.73) indicates a high level of concordance between the effect estimates. Of the 12 overlapping drugs, calcium gluconate, cholecalciferol, magnesium oxide, norepinephrine, and PrismaSATE BK had no prior documentation of an effect on BG in Micromedex.

Figure 4.

Figure 4

Analysis of medication and clinical variable associations with BG using PSM and regression modeling

(A) Cumulative percentage of features with known effects on BG as a function of absolute coefficient threshold.

(B) Volcano plot displaying the association between medication exposure and BG change, with the x axis representing coefficients and the y axis statistical significance as −log10 of adjusted p values. Medications with p < 0.01 are highlighted in red.

(C) Coefficients across drug classes.

(D) Effects of antidiabetic medications.

Figure 5.

Figure 5

Analysis of consistency of estimated effects between modeling approaches and time periods

(A) The scatterplot displays the relationship between PSM-derived coefficients (x axis) and Lasso regression coefficients (y axis), with each point representing a drug or clinical variable. The black regression line indicates the line of best fit, and R is the Pearson correlation coefficient.

(B) The scatterplot displays the relationship between PSM-derived coefficients using 2022–2024 data (x axis) and 2014–2022 data (y axis). The black regression line indicates the line of best fit, and R is the Pearson correlation coefficient.

Discussion

Modeling medication effects using EHRs presents substantial challenges, especially due to confounding and bias. Our feature selection-based analysis found a positive association between short-acting insulin and BG, which contradicts insulin’s known physiological role in lowering BG. This paradox may be explained by indication bias—patients with hyperglycemia are more likely to receive insulin, creating a spurious positive association. We addressed this by conducting PSM to reduce confounding by balancing covariates (e.g., severity of illness and comorbidities) between treated and untreated patients. We then estimated the average treatment effect using linear regression with BG change as the outcome. This approach helped resolve inconsistencies in coefficient directions that emerged from the initial model and produced estimates that were more consistent with clinical expectations.

Fifty-five drugs and clinical variables demonstrated statistically significant associations with BG levels by PSM. Among these, several drugs with known BG effects (as documented in Micromedex) were identified, validating our model’s ability to recover established clinical relationships. These included insulin preparations (e.g., insulin regular, insulin aspart, and insulin glargine) associated with decreased BG, steroids (e.g., dexamethasone and prednisone) associated with increased BG, oral anti-hyperglycemics (e.g., glimepiride, metformin, and sitagliptin) associated with decreased BG, and immune suppressants (mycophenolate mofetil and tacrolimus) associated with increased BG.

In addition to these expected findings, our model also surfaced several medications with no prior documentation of BG effects in Micromedex, suggesting associations worth further investigation. Fentanyl and hydrocodone-acetaminophen, which are opioid agonists, increase BG via direct effects on insulin secretion through opioid receptors in the pancreas and centrally and through the activation of the sympathetic nervous system.14 Emerging evidence links vitamin D3 deficiency with insulin resistance15 and indicates that supplementation might improve glycemic control.16 Three large-scale meta-analyses found that a higher intake of calcium and dairy products was associated with a reduced risk of developing type 2 diabetes (T2D).17,18,19 Atovaquone, an anti-malarial drug, was significantly associated with BG. Atovaquone was one of five drugs selected as having high potential for antidiabetic activity by a comprehensive, web-based drug repurposing tool, molecular property diagnostic suite (MPDS).13 Laxatives polyethylene glycol (PEG), sennosides, and bisacodyl additionally had significant associations with BG. Colonic motility is slowed in the majority of individuals with diabetes,20 and the retention of gastrointestinal (GI) contents has been associated with hyperglycemia.21,22 Of note, calcium gluconate, cholecalciferol, magnesium oxide, norepinephrine, and PrismaSATE dialysate solution were statistically significant upon validation with the 2022–2024 dataset. These findings point to a set of potential BG-modulating medications that may warrant mechanistic or clinical follow-up.

The strengths of our study included an unbiased, rigorously tested approach to finding medication predictors of BG. Rather than handpicking known BG predictors, we allowed the Lasso model to perform feature selection from a large uncurated set of variables. Training data were used for feature selection, and performance was evaluated on a held-out test set. Our Lasso model’s performance fell within the range of performances from a linear model that used a 24 h moving average of inpatient BG measurements from EHRs to predict a patient's next measured BG; R2 was 0.45 using all observations, and performance varied based on the glycemic variability category (very high glycemic variability R2 = 0.14 to low glycemic variability R2 = 0.65).23 The focus of our study was to identify associations between medications and BG levels rather than optimizing for clinical prediction accuracy. This model serves as an exploratory tool and is not intended for direct clinical decision-making.

Limitations of our study included an inability to control for the many confounders that may affect a patient’s BG. While we aimed to include clinically relevant variables, the selection process based on frequency may have inadvertently excluded rare but important variables that could still influence BG levels. We did not include drug interactions that may be causing an alteration in BG. EHR data have several limitations, including missing data, erroneous entries, and lack of documentation of relevant variables. Diet and tube feeding orders were not used due to a lack of consistent recording; however, total parenteral nutrition (TPN) was included. The dataset is large, so even predictors that have a small effect can be statistically significant. The linear regression method employed did not use time-series data; however, a study using linear, cubist, random forest, and K-nearest neighbors models to predict the next BG using previous BGs over various moving averages and rolling regression windows found no difference in performance.23 Future directions include the inclusion of more patient encounters in the model and assessment of its generalizability.

This study uses a large-scale inpatient EHR dataset to systematically evaluate the effects of a broad range of medications on BG. While we recovered known associations, we also identified several medications not previously documented to affect BG. These findings should be interpreted as hypothesis generating. Future directions include expanding the dataset to include more clinical variables and conducting mechanistic studies or trials to validate the BG-modulating effects of inpatient medications.

Methods

Data source

EHR data were extracted for patients admitted between May 2014 and September 2024 to a tertiary medical center, Cedars-Sinai Medical Center (CSMC), and an affiliated community hospital, Marina Del Rey Hospital. Inclusion criteria consisted of inpatients ≥18 years old who received at least one anti-hyperglycemic medication during their stay. Individuals with a stay only in the emergency department or with a length of stay <24 h were excluded. The following five EHR datasets were extracted for each encounter: past medical history, demographics, social history, labs, and inpatient medications, which were merged on shared unique patient encounters. Cedars-Sinai institutional review board (IRB) approval was obtained for this study.

Data pre-processing

Missing lab and medication data were removed since they were rarely missing, resulting in a loss of only 1% of encounters. Ethnicity, sex, race, smoking status, illicit drug use status, and alcohol use status had higher missingness, although they were still present at levels of <20% in all of encounters. EHR data are typically not missing completely at random24,25,26; thus, we assessed whether missingness was associated with the output, BG. Chi-squared tests (all missing variables were categorical) revealed that ethnic group and sex had significant associations between missingness and BG (p < 0.01). These variables were deemed missing not at random (MNAR) and were one-hot encoded to capture the potential impact of missingness itself. The remaining variables that had missingness not significantly associated with BG (p > 0.01) were assumed to be missing at random (MAR) and were imputed using mode imputation.

Outcomes

A total of 3,009,686 POC BG measurements across all encounters between May 2014 and September 2022 were included in the analysis. BG measurements were pre-processed to exclude extreme values (>1,000 mg/dL). Analysis was performed using two different outcome variables: individual BGs or BG change. BG change was calculated as the difference between each BG and the preceding BG within the same encounter.

Covariates

We selected variables that do not change during a stay (social history, demographic data, and past medical history) and variables that change during an admission (labs and medications), totaling 383 input variables. Medications were filtered for the 300 most commonly administered unique medication entries. To ensure inclusion of common anti-hyperglycemic medications, all s.c. insulins (lispro, regular, glargine, and NPH/Regular 70-30), i.v. regular insulin, and all dosage forms of commonly prescribed oral anti-hyperglycemics (sitagliptin, glimepiride, glipizide, glipizide extended release [XR], glyburide, pioglitazone, and nateglinide) were added to the top 300 if not already included. TPN was also added. All irrigation, flush, iohexol, and non-medication orders were excluded due to inconsistency in recording of doses. Past medical history and admission diagnoses were filtered for comorbidities previously described to be predictive of BG variability.27,28,29,30 Past medical history was based on international classification of diseases, tenth revision (ICD-10) codes, which were obtained from all available sources in the EHRs (e.g., physician billing and problem list). Table 1 lists all static and time-dependent variables selected for analysis. Categorical variables were one-hot encoded. Medication doses were summed and laboratory values averaged over a 12 h lookback period preceding each BG or BG change.

Table 1.

EHR data, number of variables, and variables extracted from each dataset

EHR dataset No. of variables Model variables
Static

Past medical history (ICD-10 code) 12 liver failure (K72), chronic kidney disease (N18), type 1 diabetes mellitus (E10), type 2 diabetes mellitus (E11), malignancy (C80.1), anemia (D64.9), congestive heart failure (I50), hypothyroidism (E03.0), hyperthyroidism (E05), pregnancy (Z33.1), hypoglycemia (E16.2), pain (R52)
Socio-demographic 44 ethnic group, sex, race, smoking tobacco last use status, intravenous drug last use status, alcohol last use status, age, body mass index, hospital location at time of admission (ICU, non-ICU, operating room, postpartum), admission diagnoses: congestive heart failure, sepsis, gastrointestinal bleed, nausea/vomiting, altered mental status, acute kidney injury, end stage renal disease ± dialysis, pain

Time dependent

Laboratory 6 POC BG, creatinine, potassium, AST, albumin, lactate
Inpatient medications 321 top 300 most administered medications, commonly prescribed anti-hyperglycemic medications (if not already in the top 300), TPN

The combination of numbers and letters in parentheses in the past medical history row are international classification of diseases, tenth revision (ICD-10) codes.

Statistical analyses

Statistical analyses were conducted in Python using sklearn, statsmodels, scipy, and seaborn.

Feature selection using Lasso, elastic net, and ridge regression models

Lasso uses an L1 penalty to reduce less informative coefficients to zero, ridge applies an L2 penalty to shrink less relevant coefficients, and elastic net combines both penalties for balance. To ensure that each model was not trained and tested on the same patient, we performed an 80% train, 20% test split stratified by the patient unique identifier. The training data were then split into 5 equal folds stratified by patient identifier, and the average coefficients across all folds were recorded across the three models. Models were trained with each fold, and then a final model was fit on the full training set and evaluated on the held-out test set. The coefficient indicates the change in the output for a one unit increase in the input, assuming all other factors influencing the output remain constant. For example, a coefficient of 2 for a 5 mg prednisone tablet indicates that, on average, taking an additional dose of prednisone is associated with an increase in BG by 10 mg/dL. We assessed multicollinearity using VIF. VIF was computed for features with an average non-zero coefficient from each model and categorized based on being <5 or ≥5. To annotate medications with known BG-altering properties, the "Adverse Effects In-Depth Answers" section of Micromedex, an evidence-based clinical resource31 with data from package inserts, clinical trials, post-marketing surveillance, and case studies, was used.

PSM and regression

To evaluate the association between various drugs and BG change while adjusting for confounding variables, a binary treatment indicator was created for each variable, where treated = 1 for a drug if the patient received the drug and 0 otherwise. A logistic regression model was fit to estimate the propensity score, which represents the probability of receiving the drug based on covariates including age, sex, and comorbid conditions (T1DM, T2DM, CHF, CKD, pain, and sepsis). Patients who received the drug (treated) were matched with control patients (non-treated) based on their propensity scores using nearest-neighbor matching with Euclidean distance. Matching ensured that treated and control groups were balanced on observed covariates. After matching, an OLS regression model was built for each drug where the dependent variable was the BG change and independent variables were a binary indicator of drug exposure, age, sex, and the comorbid conditions listed above. The coefficient for treated indicates the effect of the drug on BG. To control for multiple comparisons across drugs, BH correction was applied to the p values. A corrected p < 0.01 was deemed statistically significant.

Resource availability

Lead contact

Requests for further information and resources should be directed to and will be fulfilled by the lead contact, Amanda Momenzadeh (amanda.momenzadeh@cshs.org).

Materials availability

This study did not generate new unique reagents.

Date and code availability

All Jupyter notebooks with code used in this study are available at GitHub (https://github.com/xomicsdatascience/Medication-BG-Alteration.git) and have been archived at Zenodo.32

Acknowledgments

We thank Edward Kowalewski, Kevin Japardi, and the Honest Enterprise Research Broker for EHR data extraction services. This research was supported by the NIH National Center for Advancing Translational Sciences (NCATS), UCLA CTSI grant number UL1TR001881, and the National Institute of General Medical Sciences (NIGMS), grant number R35GM142502.

Author contributions

Conceptualization, A.M. and J.G.M.; data curation, A.M. and J.G.M.; formal analysis, A.M., C.C., and J.G.M.; funding acquisition/software/resources/supervision/project administration, J.G.M. and J.H.M.; investigation, A.M.; methodology, A.M., C.B., J.G.M., J.P., M.T., R.G., and S.Y.C.; validation, A.M.; visualization, A.M.; writing – original draft, A.M. and J.G.M.; writing – review and editing, A.M., C.C., S.Y.C., C.B., M.T., R.G., J.P., J.H.M., and J.G.M.

Declaration of interests

A.M. and J.G.M. have a provisional patent related to this work. J.H.M. is a member of the Patterns advisory board.

Declaration of generative AI and AI-assisted technologies in the writing process

The authors used OpenAI’s GPT-4-turbo to improve the readability and language of the manuscript. After using this tool, the authors reviewed and edited the content as needed and take full responsibility for the content of the publication.

Published: June 26, 2025

Contributor Information

Amanda Momenzadeh, Email: amanda.momenzadeh@cshs.org.

Jesse G. Meyer, Email: jesse.meyer@cshs.org.

References

  • 1.Donnan P.T., Leese G.P., Morris A.D., Diabetes Audit and Research in Tayside Scotland/Medicine Monitoring Unit Collaboration Hospitalizations for people with type 1 and type 2 diabetes compared with the nondiabetic population of Tayside, Scotland: a retrospective cohort study of resource use. Diabetes Care. 2000;23:1774–1779. doi: 10.2337/diacare.23.12.1774. [DOI] [PubMed] [Google Scholar]
  • 2.Aro S., Kangas T., Reunanen A., Salinto M., Koivisto V. Hospital Use Among Diabetic Patients and the General Population. Diabetes Care. 1994;17:1320–1329. doi: 10.2337/diacare.17.11.1320. [DOI] [PubMed] [Google Scholar]
  • 3.De Berardis G., D’Ettorre A., Graziano G., Lucisano G., Pellegrini F., Cammarota S., Citarella A., Germinario C.A., Lepore V., Menditto E., et al. The burden of hospitalization related to diabetes mellitus: A population-based study. Nutr. Metabol. Cardiovasc. Dis. 2012;22:605–612. doi: 10.1016/j.numecd.2010.10.016. [DOI] [PubMed] [Google Scholar]
  • 4.Carral F., Olveira G., Salas J., García L., Sillero Á., Aguilar M. Care resource utilization and direct costs incurred by people with diabetes in a Spanish hospital. Diabetes Res. Clin. Pract. 2002;56:27–34. doi: 10.1016/S0168-8227(01)00342-4. [DOI] [PubMed] [Google Scholar]
  • 5.American Diabetes Association Professional Practice Committee 16. Diabetes Care in the Hospital: Standards of Medical Care in Diabetes—2022. Diabetes Care. 2022;45:S244–S253. doi: 10.2337/dc22-S016. [DOI] [PubMed] [Google Scholar]
  • 6.Rehman A., Setter S.M., Vue M.H. Drug-Induced Glucose Alterations Part 2: Drug-Induced Hyperglycemia. Diabetes Spectr. 2011;24:234–238. doi: 10.2337/diaspect.24.4.234. [DOI] [Google Scholar]
  • 7.Tosur M., Viau-Colindres J., Astudillo M., Redondo M.J., Lyons S.K. Medication-induced hyperglycemia: pediatric perspective. BMJ Open Diab Res Care. 2020;8 doi: 10.1136/bmjdrc-2019-000801. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Tatonetti N.P., Ye P.P., Daneshjou R., Altman R.B. Data-Driven Prediction of Drug Effects and Interactions. Sci. Transl. Med. 2012;4:125ra31. doi: 10.1126/scitranslmed.3003377. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Pourhoseingholi M.A., Baghestani A.R., Vahedi M. How to control confounding effects by statistical analysis. Gastroenterol. Hepatol. Bed Bench. 2012;5:79–83. [PMC free article] [PubMed] [Google Scholar]
  • 10.Pratiwi C., Mokoagow M.I., Made Kshanti I.A., Soewondo P. The risk factors of inpatient hypoglycemia: A systematic review. Heliyon. 2020;6 doi: 10.1016/j.heliyon.2020.e03913. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Boyarko B., Podvin S., Greenberg B., Momper J.D., Huang Y., Gerwick W.H., Bang A.G., Quinti L., Griciuc A., Kim D.Y., et al. Evaluation of bumetanide as a potential therapeutic agent for Alzheimer’s disease. Front. Pharmacol. 2023;14 doi: 10.3389/fphar.2023.1190402. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Shuey M.M., Lee K.M., Keaton J., Khankari N.K., Breeyear J.H., Walker V.M., Miller D.R., Heberer K.R., Reaven P.D., Clarke S.L., et al. A genetically supported drug repurposing pipeline for diabetes treatment using electronic health records. EBioMedicine. 2023;94 doi: 10.1016/j.ebiom.2023.104674. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Gaur A.S., Nagamani S., Tanneeru K., Druzhilovskiy D., Rudik A., Poroikov V., Narahari Sastry G. Molecular property diagnostic suite for diabetes mellitus (MPDSDM): An integrated web portal for drug discovery and drug repurposing. J. Biomed. Inf. 2018;85:114–125. doi: 10.1016/j.jbi.2018.08.003. [DOI] [PubMed] [Google Scholar]
  • 14.Koekkoek L.L., Van Der Gun L.L., Serlie M.J., La Fleur S.E. The Clash of Two Epidemics: the Relationship Between Opioids and Glucose Metabolism. Curr. Diabetes Rep. 2022;22:301–310. doi: 10.1007/s11892-022-01473-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Elsheikh E., Alabdullah A.I., Al-Harbi S.S., Alagha A.O., AlAhmed D.H., Alalmaee M.M.A. The Relationship between Vitamin D Levels and Blood Glucose and Cholesterol Levels. Clin. Pract. 2024;14:426–435. doi: 10.3390/clinpract14020032. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Yousefi Rad E., Djalali M., Koohdani F., Saboor-Yaraghi A.A., Eshraghian M.R., Javanbakht M.H., Saboori S., Zarei M., Hosseinzadeh-Attar M.J. The Effects of Vitamin D Supplementation on Glucose Control and Insulin Resistance in Patients with Diabetes Type 2: A Randomized Clinical Trial Study. Iran. J. Public Health. 2014;43:1651–1656. [PMC free article] [PubMed] [Google Scholar]
  • 17.Gijsbers L., Ding E.L., Malik V.S., De Goede J., Geleijnse J.M., Soedamah-Muthu S.S. Consumption of dairy foods and diabetes incidence: a dose-response meta-analysis of observational studies. Am. J. Clin. Nutr. 2016;103:1111–1124. doi: 10.3945/ajcn.115.123216. [DOI] [PubMed] [Google Scholar]
  • 18.Aune D., Norat T., Romundstad P., Vatten L.J. Dairy products and the risk of type 2 diabetes: a systematic review and dose-response meta-analysis of cohort studies. Am. J. Clin. Nutr. 2013;98:1066–1083. doi: 10.3945/ajcn.113.059030. [DOI] [PubMed] [Google Scholar]
  • 19.Hajhashemy Z., Rouhani P., Saneei P. Dietary calcium intake in relation to type-2 diabetes and hyperglycemia in adults: A systematic review and dose–response meta-analysis of epidemiologic studies. Sci. Rep. 2022;12 doi: 10.1038/s41598-022-05144-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Wei L., Ji L., Miao Y., Han X., Li Y., Wang Z., Fu J., Guo L., Su Y., Zhang Y. Constipation in DM are associated with both poor glycemic control and diabetic complications: Current status and future directions. Biomed. Pharmacother. 2023;165 doi: 10.1016/j.biopha.2023.115202. [DOI] [PubMed] [Google Scholar]
  • 21.Kong M.-F., Horowitz M. Gastric Emptying in Diabetes Mellitus: Relationship to Blood-Glucose Control. Clin. Geriatr. Med. 1999;15:321–338. doi: 10.1016/S0749-0690(18)30062-4. [DOI] [PubMed] [Google Scholar]
  • 22.Bharucha A.E., Batey-Schaefer B., Cleary P.A., Murray J.A., Cowie C., Lorenzi G., Driscoll M., Harth J., Larkin M., Christofi M., et al. Delayed Gastric Emptying Is Associated With Early and Long-term Hyperglycemia in Type 1 Diabetes Mellitus. Gastroenterology (New York, N. Y., 1943) 2015;149:330–339. doi: 10.1053/j.gastro.2015.05.007. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Zale A.D., Abusamaan M.S., McGready J., Mathioudakis N. Prediction of Next Glucose Measurement in Hospitalized Patients by Comparing Various Regression Methods: Retrospective Cohort Study. JMIR Form. Res. 2023;7 doi: 10.2196/41577. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Haneuse S., Arterburn D., Daniels M.J. Assessing Missing Data Assumptions in EHR-Based Studies: A Complex and Underappreciated Task. JAMA Netw. Open. 2021;4 doi: 10.1001/jamanetworkopen.2021.0184. [DOI] [PubMed] [Google Scholar]
  • 25.Jazayeri A., Liang O.S., Yang C.C. Imputation of Missing Data in Electronic Health Records Based on Patients’ Similarities. J. Healthc. Inform. Res. 2020;4:295–307. doi: 10.1007/s41666-020-00073-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Wells B.J., Chagin K.M., Nowacki A.S., Kattan M.W. Strategies for Handling Missing Data in Electronic Health Record Derived Data. eGEMs. 2013;1:1035. doi: 10.13063/2327-9214.1035. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Carey M., Boucai L., Zonszein J. Impact of Hypoglycemia in Hospitalized Patients. Curr. Diabetes Rep. 2013;13:107–113. doi: 10.1007/s11892-012-0336-x. [DOI] [PubMed] [Google Scholar]
  • 28.Rubin D.J., Golden S.H. Hypoglycemia in Non-Critically Ill, Hospitalized Patients With Diabetes: Evaluation, Prevention, and Management. Hosp. Pract. 2013;41:109–116. doi: 10.3810/hp.2013.02.1016. [DOI] [PubMed] [Google Scholar]
  • 29.Maynard G.A., Huynh M.P., Renvall M. Iatrogenic Inpatient Hypoglycemia: Risk Factors, Treatment, and Prevention. Diabetes Spectr. 2008;21:241–247. doi: 10.2337/diaspect.21.4.241. [DOI] [Google Scholar]
  • 30.Hulkower R.D., Pollack R.M., Zonszein J. Understanding hypoglycemia in hospitalized patients. Diabetes Manag. 2014;4:165–176. doi: 10.2217/DMT.13.73. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31.Home - MICROMEDEX. https://www.micromedexsolutions.com/micromedex2/librarian.
  • 32.Momenzadeh, A. (2025). Code for the paper “Data Driven Discovery of Medication Effects on Blood Glucose from Electronic Health Records.” (Zenodo). 10.5281/ZENODO.15578661. [DOI]

Articles from Patterns are provided here courtesy of Elsevier

RESOURCES