Predicting the risk of diabetic retinopathy in type 2 diabetic patients