Diagnosis typically involves a combination of medical history, physical examination, and diagnostic tests. Endoscopy allows direct visualization of the digestive tract, while imaging techniques like CT scans and MRI provide detailed images. Biopsy involves taking a tissue sample for microscopic examination to confirm the presence of cancer cells.