Factors associated with mortality in patients with tuberculosis