A barium swallow is done to help your health care provider determine if there is a problem with your esophagus.