A pulmonary function test, or spirogram, helps health care providers find out how a patient's lungs are functioning. A PFT can also predict whether certain medications may improve lung function.