Bayesian networks for the analysis of drug safety