Diagnosis of pneumonia