A system for mechanical ventilation treatment is described. In one embodiment the system provides advice on treatment and/or weaning of patients from mechanical ventilation based on the patient's conditions. In another embodiment the system includes apparatus to monitor and analyze the patient's data and data from the mechanical ventilator and controls the ventilator automatically.