Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2023 Jul 18:8:e47592.
doi: 10.2196/47592.

An "All-Data-on-Hand" Deep Learning Model to Predict Hospitalization for Diabetic Ketoacidosis in Youth With Type 1 Diabetes: Development and Validation Study

Affiliations

An "All-Data-on-Hand" Deep Learning Model to Predict Hospitalization for Diabetic Ketoacidosis in Youth With Type 1 Diabetes: Development and Validation Study

David D Williams et al. JMIR Diabetes. .

Abstract

Background: Although prior research has identified multiple risk factors for diabetic ketoacidosis (DKA), clinicians continue to lack clinic-ready models to predict dangerous and costly episodes of DKA. We asked whether we could apply deep learning, specifically the use of a long short-term memory (LSTM) model, to accurately predict the 180-day risk of DKA-related hospitalization for youth with type 1 diabetes (T1D).

Objective: We aimed to describe the development of an LSTM model to predict the 180-day risk of DKA-related hospitalization for youth with T1D.

Methods: We used 17 consecutive calendar quarters of clinical data (January 10, 2016, to March 18, 2020) for 1745 youths aged 8 to 18 years with T1D from a pediatric diabetes clinic network in the Midwestern United States. The input data included demographics, discrete clinical observations (laboratory results, vital signs, anthropometric measures, diagnosis, and procedure codes), medications, visit counts by type of encounter, number of historic DKA episodes, number of days since last DKA admission, patient-reported outcomes (answers to clinic intake questions), and data features derived from diabetes- and nondiabetes-related clinical notes via natural language processing. We trained the model using input data from quarters 1 to 7 (n=1377), validated it using input from quarters 3 to 9 in a partial out-of-sample (OOS-P; n=1505) cohort, and further validated it in a full out-of-sample (OOS-F; n=354) cohort with input from quarters 10 to 15.

Results: DKA admissions occurred at a rate of 5% per 180-days in both out-of-sample cohorts. In the OOS-P and OOS-F cohorts, the median age was 13.7 (IQR 11.3-15.8) years and 13.1 (IQR 10.7-15.5) years; median glycated hemoglobin levels at enrollment were 8.6% (IQR 7.6%-9.8%) and 8.1% (IQR 6.9%-9.5%); recall was 33% (26/80) and 50% (9/18) for the top-ranked 5% of youth with T1D; and 14.15% (213/1505) and 12.7% (45/354) had prior DKA admissions (after the T1D diagnosis), respectively. For lists rank ordered by the probability of hospitalization, precision increased from 33% to 56% to 100% for positions 1 to 80, 1 to 25, and 1 to 10 in the OOS-P cohort and from 50% to 60% to 80% for positions 1 to 18, 1 to 10, and 1 to 5 in the OOS-F cohort, respectively.

Conclusions: The proposed LSTM model for predicting 180-day DKA-related hospitalization was valid in this sample. Future research should evaluate model validity in multiple populations and settings to account for health inequities that may be present in different segments of the population (eg, racially or socioeconomically diverse cohorts). Rank ordering youth by probability of DKA-related hospitalization will allow clinics to identify the most at-risk youth. The clinical implication of this is that clinics may then create and evaluate novel preventive interventions based on available resources.

Keywords: AI; DKA; LSTM; NLP; RNN; T1D; artificial intelligence; deep learning; diabetic ketoacidosis; long short-term memory; machine learning; natural language processing; recurrent neural network; type 1 diabetes.

PubMed Disclaimer

Conflict of interest statement

Conflicts of Interest: MAC is a consultant for Glooko, Inc and receives research support from Dexcom and Abbott Diabetes Care. ML has received research grants from Eli Lilly and Novo Nordisk and has been a consultant or has received honoraria from Astra Zeneca, Boehringer Ingelheim, Eli Lilly, and Novo Nordisk. LD, CM, and LS are employees of Cyft, Inc. All other authors are responsible for the reported research and stated that they have no affiliation, financial agreement, or involvement with any company or other organization with a financial interest in the subject matter of the submitted manuscript.

Figures

Figure 1
Figure 1
Long short-term memory structure used to predict diabetic ketoacidosis–related hospitalization within the subsequent 180 days in youth with type 1 diabetes in the training, partial out-of-sample, and full out-of-sample validation cohorts.
Figure 2
Figure 2
Area under the receiver operating characteristic (AUROC) curve and area under the precision-recall (PR) curve for the prediction of diabetic ketoacidosis–related hospitalization within the subsequent 180 days in youth with type 1 diabetes. For the partial out-of-sample validation cohort: (A) area under the ROC curve=0.72 and (B) area under the PR curve=0.29. For the full out-of-sample validation cohort: (C) area under the ROC curve=0.85 and (D) area under the PR curve=0.42.

References

    1. Foster NC, Beck RW, Miller KM, Clements MA, Rickels MR, DiMeglio LA, Maahs DM, Tamborlane WV, Bergenstal R, Smith E, Olson BA, Garg SK. State of type 1 diabetes management and outcomes from the T1D exchange in 2016-2018. Diabetes Technol Ther. 2019 Feb;21(2):66–72. doi: 10.1089/dia.2018.0384. https://europepmc.org/abstract/MED/30657336 - DOI - PMC - PubMed
    1. Beck RW, Tamborlane WV, Bergenstal RM, Miller KM, DuBose SN, Hall CA, T1D Exchange Clinic Network The T1D Exchange clinic registry. J Clin Endocrinol Metab. 2012 Dec;97(12):4383–9. doi: 10.1210/jc.2012-1561.jc.2012-1561 - DOI - PubMed
    1. Desai D, Mehta D, Mathias P, Menon G, Schubart UK. Health care utilization and burden of diabetic ketoacidosis in the U.S. over the past decade: a nationwide analysis. Diabetes Care. 2018 Aug;41(8):1631–8. doi: 10.2337/dc17-1379.dc17-1379 - DOI - PubMed
    1. Vellanki P, Umpierrez GE. Increasing hospitalizations for DKA: a need for prevention programs. Diabetes Care. 2018 Sep;41(9):1839–41. doi: 10.2337/dci18-0004. https://europepmc.org/abstract/MED/30135197 41/9/1839 - DOI - PMC - PubMed
    1. Umpierrez G, Korytkowski M. Diabetic emergencies - ketoacidosis, hyperglycaemic hyperosmolar state and hypoglycaemia. Nat Rev Endocrinol. 2016 Apr;12(4):222–32. doi: 10.1038/nrendo.2016.15.nrendo.2016.15 - DOI - PubMed

LinkOut - more resources