A prospective cohort study of 4,083 patients with diabetes