Patient assessment and prevention of pulmonary side-effects in surgery