Personalized risk assessment of drug-related harm is associated with health outcomes