The procedure used most often to detect evidence of a hiatal hernia is barium x-rays. With the barium x-rays, the patient drinks a liquid that contains barium, which will coat the walls of the esophagus and stomach. X-rays are then taken, which can then show if there is a hiatal hernia.
The Upper Endoscopy allows the doctor to examine the inside of the patient's esophagus, stomach, and duodenum (the first part of the small intestine) with an instrument called an endoscope, a thin flexible lighted tube. With this procedure the doctor will be able to see if there is a hiatal hernia.
The Bernstein Test attempts to reproduce symptoms of heartburn. It is usually done along with other tests dealing with esophageal functions. This test is also called the acid perfusion test. It isn't used alone to diagnose a hiatal hernia, but used in combination with barium x-rays can help determine if an associated condition also exists: Gastroesophageal Reflux Disease (GERD).