From patient care to research: a validation study examining the factors contributing to data quality in a primary care electronic medical record database