Definitive diagnosis is by endoscopy. Proper history taking by the medical doctor to distinguish other conditions that cause haematemesis but definitive diagnosis is by conducting esophagogastroduodenoscopy.
Mallory–Weiss syndrome
Plummer–Vinson syndrome
Bloom syndrome
Gastric varices
Esophageal varices
Barrett's esophagus
Ogilvie syndrome
Secretan's syndrome