Application of routine electronic health record databases for pharmacogenetic research