Assessment of the patient for thoracic surgery