Diagnosing pneumonia in cancer patients typically involves a combination of a physical examination, medical history review, imaging tests such as a chest X-ray or CT scan, and laboratory tests like blood tests and sputum cultures. In some cases, a bronchoscopy may be performed to obtain a sample from the lungs.