Diagnosis typically involves a combination of patient history, physical examination, and diagnostic tests. [Chest X-rays]() and [CT scans]() can help visualize the extent of the infection. Sputum cultures and blood tests may also be performed to identify the causative organism.