If the sphincter is not sufficiently tight, it may allow acid to enter the esophagus, causing inflammation of one or more layers. Esophagitis may also occur if an infection is present, which may be due to bacteria, viruses, or fungi; or by diseases that affect the immune system.Irritation can be caused by GERD, vomiting, surgery, medications, hernias, and radiation injury. Inflammation can cause the esophagus to narrow, which makes swallowing food difficult and may result in food bolus impaction. Diagnosis
Esophagitis can be diagnosed by upper endoscopy, biopsy, upper GI series (or barium swallow), and laboratory tests.An upper endoscopy is a procedure to look at the esophagus by using an endoscope. While looking at the esophagus, the doctor is able to take a small biopsy. The biopsy can be used to confirm inflammation of the esophagus. An upper GI series uses a barium contrast, fluoroscopy, and an X-ray. During a barium X-ray, a solution with barium or pill is taken before getting an X-ray. The barium makes the organs more visible and can detect if there is any narrowing, inflammation, or other abnormalities that can be causing the disease. The upper GI series can be used to find the cause of GI symptoms. An esophagram is if only the throat and esophagus are looked at.Laboratory tests can be done on biopsies removed from the esophagus and can help determine the cause of the esophagitis. Laboratory tests can help diagnose a fungal, viral, or bacterial infection. Scanning for white blood cells can help diagnose eosinophil esophagitis.
Some lifestyle indicators for this disease include stress, unhealthy eating, smoking, drinking, family history, allergies, and immunodeficiency. Types
Reflux esophagitis
Although it usually assumed that inflammation from acid reflux is caused by the irritant action on the mucosa by hydrochloric acid, one study suggests that the pathogenesis of reflux esophagitis may be cytokine-mediated. Infectious esophagitis
Esophagitis happens due to a viral, fungal, parasitic or bacterial infection. More likely to happen to people who have an immunodeficiency. Types include:
Fungal

Candida (Esophageal candidiasis)Viral

Herpes simplex (Herpes esophagitis)
CytomegalovirusDrug-induced esophagitis
Damage to the esophagus due to medications. If the esophagus is not coated or if the medicine is not taken with enough liquid, it can damage the tissues. Eosinophilic esophagitis
Eosinophilic esophagitis is caused by a high concentration of eosinophils in the esophagus. The presence of eosinophils in the esophagus may be due to an allergen and is often correlated with GERD. The direction of cause and effect between inflammation and acid reflux is poorly established, with recent studies (in 2016) hinting that reflux does not cause inflammation. This esophagitis can be triggered by allergies to food or to inhaled allergens. This type is still poorly understood. Lymphocytic esophagitis
Lymphocytic esophagitis is a rare and poorly understood entity associated with an increased amount of lymphocytes in the lining of the esophagus. It was first described in 2006. Disease associations may include Crohns disease, gastroesophageal reflux disease and coeliac disease. It causes similar changes on endoscopy as eosinophilic esophagitis including esophageal rings, narrow-lumen esophagus, and linear furrows. Caustic esophagitis
Caustic esophagitis is the damage of tissue via chemical origin.