Temporal and external validation of a prediction model for adverse outcomes among inpatients with diabetes