Frailty in geriatric psychiatry inpatients: a retrospective cohort study