Bayesian networks for the analysis of inpatient admissions