A barium swallow, also known as an upper GI, may be done. After you drink a barium solution, you have x-rays taken of your esophagus and stomach. The barium solution makes your esophagus show up more clearly on the x-rays.