AimsDevelop and validate a model for predicting hypoglycemia in inpatients. MethodsDerivation cohort: patients treated with hypoglycemic drugs and admitted to the departments of medicine of a university hospital during 2016. Validation: patients admitted to a community hospital, and patients admitted to a university hospital in the north of Israel, 2017–2018. Data available in the electronic patient record (EPR) during the first hours of hospital stay were used to develop a logistic model to predict the probability of hypoglycemia. The performance of the model was measured in the validation cohorts. ResultsIn the derivation cohort, hypoglycemia was measured in 474 out of 3605 patients, 13.1%. The logistic model to predict hypoglycemia included age, nasogastric or percutaneous gastrostomy tube, Charlson score, vomiting, chest pain, acute renal failure, insulin, hemoglobin and diastolic blood pressure. The area under the ROC curve (AUROC) was 0.71 (95% CI 0.69–0.73). In the highest probability group the percentage of hypoglycemia was 24.3% (258/1061). In the two validation groups hypoglycemia was measured in 269/2592 patients (11.1%); and 393/3635 (10.8%). AUROC was 0.72 (95% CI 0.68–0.76); and 0.71 (95% CI 0.68–0.74). In the highest probability groups hypoglycemia was measured in 28.1% (111/395); and 23.0% (211/909) of patients. ConclusionsThe derived model performed well in the validation cohorts. Assuming that most of the hypoglycemia episodes could be prevented we would need to invest efforts to avoid hypoglycemia in 4–5 patients to prevent one episode of hypoglycemia.