Factors associated with attempted suicide among hospitalized depressed patients