Clinical factors associated with weaning failure in patients requiring prolonged mechanical ventilation.