Respiratory therapy to prevent pulmonary complications of surgery