Development of predictive genetic tests for improving the safety of new medicines: the utilization of routinely collected electronic health records