Predicting patient outcomes in psychiatric hospitals with routine data: a machine learning approach