Gastritis is inflammation of the lining of the stomach. It may occur as a short episode or may be of a long duration. There may be no symptoms but, when symptoms are present, the most common is upper abdominal pain (see dyspepsia). Other possible symptoms include nausea and vomiting, bloating, loss of appetite and heartburn. Complications may include stomach bleeding, stomach ulcers, and stomach tumors. When due to autoimmune problems, low red blood cells due to not enough vitamin B12 may occur, a condition known as pernicious anemia.Common causes include infection with Helicobacter pylori and use of nonsteroidal anti-inflammatory drugs (NSAIDs). Less common causes include alcohol, smoking, cocaine, severe illness, autoimmune problems, radiation therapy and Crohns disease. Endoscopy, a type of X-ray known as an upper gastrointestinal series, blood tests, and stool tests may help with diagnosis. The symptoms of gastritis may be a presentation of a myocardial infarction. Other conditions with similar symptoms include inflammation of the pancreas, gallbladder problems, and peptic ulcer disease.Prevention is by avoiding things that cause the disease. Treatment includes medications such as antacids, H2 blockers, or proton pump inhibitors. During an acute attack drinking viscous lidocaine may help. If gastritis is due to NSAIDs these may be stopped. If H. pylori is present it may be treated with a combination of antibiotics such as amoxicillin and clarithromycin. For those with pernicious anemia, vitamin B12 supplements are recommended either by mouth or by injection.
Since 1992, chronic gastritis lesions are classified according to the Sydney system. Metaplasia
Mucous gland metaplasia, the reversible replacement of differentiated cells, occurs in the setting of severe damage of the gastric glands, which then waste away (atrophic gastritis) and are progressively replaced by mucous glands. Gastric ulcers may develop; it is unclear if they are the causes or the consequences. Intestinal metaplasia typically begins in response to chronic mucosal injury in the antrum and may extend to the body. Gastric mucosa cells change to resemble intestinal mucosa and may even assume absorptive characteristics. Intestinal metaplasia is classified histologically as complete or incomplete. With complete metaplasia, gastric mucosa is completely transformed into small-bowel mucosa, both histologically and functionally, with the ability to absorb nutrients and secrete peptides. In incomplete metaplasia, the epithelium assumes a histologic appearance closer to that of the large intestine and frequently exhibits dysplasia. Diagnosis
Often, a diagnosis can be made based on  patients description of their symptoms. Other methods which may be used to verify gastritis include:

Blood tests:
Blood cell count
Presence of H. pylori
Liver, kidney, gallbladder, or pancreas functions
Urinalysis
Stool sample, to look for blood in the stool
X-rays
Endoscopy, to check for stomach lining inflammation and mucous erosion
Stomach biopsy, to test for gastritis and other conditionsThe OLGA staging frame of chronic gastritis on histopathology. Atrophy is scored as the percentage of atrophic glands and scored on a four-tiered scale. No atrophy (0%) = score 0; mild atrophy (1–30%) = score 1; moderate atrophy (31–60%) = score 2; 9 severe atrophy (>60%) = score 3.