Risk factors of suicide in inpatients and recently discharged patients with affective disorders. A case-control study