Secondary end points were the occurrence of ventilator-associated pneumonia and major complications , duration of mechanical ventilation and weaning , intensive care unit and hospital length of stay , and survival .