Data quality control in electronic medical record