Development and validation of medical record-based logistic regression and machine learning models to diagnose diabetic retinopathy