The development and validation of a marginalization index for inpatient psychiatry