The study of how genetic variation affects an individual's response to drugs and their efficacy and safety.