Factors associated with duration of hospital stay and complications in patients with COVID-19