A gastroenterologist can obtain a biopsy of the intestinal wall during endoscopy or during surgery, if the person has surgery for intestinal pseudo-obstruction and the cause is unknown.

If the health care provider needs to examine the nerves in the intestinal wall, a deeper biopsy, which a gastroenterologist can typically obtain only during surgery, is necessary.

A biopsy is a procedure that involves taking a piece of the intestinal wall tissue for examination with a microscope. A health care provider performs the biopsy in a hospital and uses light sedation and local anesthetic; the health care provider uses general anesthesia if performing the biopsy during surgery. A pathologist—a doctor who specializes in diagnosing diseases—examines the intestinal tissue in a lab. Diagnosing problems in the nerve pathways of the intestinal tissue requires special techniques that are not widely available.

A health care provider can also use a biopsy obtained during endoscopy to rule out celiac disease. Celiac disease is an autoimmune disorder in which people cannot tolerate gluten because it damages the lining of their small intestine and prevents absorption of nutrients. Gluten is a protein found in wheat, rye, and barley and in products such as vitamin and nutrient supplements, lip balms, and certain medications.