Discontinuing mechanical ventilation