Skip to main content
IDF logo
Child eating spaghetti

Digestive and liver health

Key points:

  • The gastrointestinal (GI) tract and liver can be affected by autoimmunity, inflammation, infection, and, sometimes, cancer in people with primary immunodeficiency (PI).
  • The type of PI a person has influences how common or rare particular GI and liver problems are.
  • GI and liver infections, autoimmunity, and inflammation can cause permanent organ damage and increase cancer risks, so it is important to seek care from providers experienced in diagnosing and managing these complications.
  • It is important to remember that not all signs and symptoms of GI or liver disease are due to the PI, so providers should perform a thorough workup just as they would for someone without PI.

The digestive system, also known as the gastrointestinal (GI) tract, includes all the organs from your mouth to your anus. This system is responsible for taking in food, breaking it down to get nutrients, and getting rid of solid waste. 

Digestive system
Organs of the gastrointestinal system. Source: https://commons.wikimedia.org/wiki/File:Digestive-system-for-kids.png

Here’s how the digestive system works:

  1. The mouth starts the process of breaking down food by chewing and mixing it with saliva, which has proteins that chemically digest the food.
  2. The esophagus is a muscular tube that moves the chewed food to the stomach. It also has a specialized muscle at its end to prevent stomach contents from getting back into the esophagus.
  3. The stomach further grinds up the food and continues chemical digestion.
  4. The food then goes to the small intestine, where it mixes with bile (from the liver) and more digestive proteins (from the pancreas) to be broken down even more.
  5. Nutrients are then absorbed through the wall of the small intestine into the bloodstream.
  6. Finally, the remaining waste passes into the colon (also known as the large intestine or bowel), where fluid is absorbed back into the body and stool is formed to be eliminated through the anus.

The liver is part of your digestive system and does many important things to keep your body working properly. Some of the most important jobs of the liver are:

  • Breaking down nutrients absorbed by your intestines.
  • Making important blood proteins, like clotting factors.
  • Breaking down certain medications.
  • Cleaning waste out of your blood.
  • Getting rid of this waste through bile.

The GI tract has the largest number of immune system cells in the body and is one of the most frequent places that the immune system comes in contact with germs and other substances. Because of this, the digestive system is a common place to have symptoms related to primary immunodeficiency (PI), including infections, autoimmunity, inflammation, and, rarely, cancer.

Sometimes healthcare providers refer to GI conditions by the organ(s) that are affected:

  • Hepatitis (liver).
  • Gastritis (stomach).
  • Pancreatitis (pancreas).
  • Cholangitis (bile duct).
  • Cholecystitis (gallbladder).
  • Enteritis (small intestine).
  • Colitis (large intestine).

These ‘-itis’ terms mean inflammation, but they do not reveal whether an infection or something else is causing the inflammation. The symptoms across different types of GI conditions can be similar, so it's important to get checked out and properly diagnosed. Your healthcare provider may refer you to a GI specialist (gastroenterologist) or a liver specialist (hepatologist). Early diagnosis and treatment can help prevent long-term problems and organ damage.

Many bacteria and other ‘good’ germs, such as viruses and fungi, live throughout the digestive system, with the highest numbers in the colon. As a group, they are called the gut microbiome. The gut microbiome acts almost as another organ within the GI system. Which germs are part of your gut microbiome and in what relative amounts affects:

  1. How your food gets broken down and what nutrients are available for your body to use (metabolism).
  2. Which chemical signals might move from your gut to your brain and nervous system.
  3. How active your immune system is, both within the GI system and in other parts of your body.

Microbiome problems can cause or worsen GI conditions. The condition of the gut microbiome may need to be considered when checking for digestive problems in people with PI.

Finally, it's important to remember that not everyone with PI has GI problems, and if they do, their GI problems may not always be directly caused by PI.

Gastrointestinal (GI) infections

GI infections in people with PI are usually caused by the same types of germs that cause GI infections in people who don’t have PI. However, some germs that don’t usually cause severe GI infections in people without PI, like cytomegalovirus (CMV), sometimes do in people with PI [1].

There are also types of PI that place someone at higher risk for GI infections. For example, in one study, 60% of people with common variable immune deficiency (CVID) had a gut infection even when they were being treated with immunoglobulin (Ig) replacement therapy [2]. People with selective IgA deficiency (SIgAD) are also at increased risk for GI infections including norovirus, rotavirus, Giardia lamblia (G. lamblia), Escherichia coli (E. coli), and Campylobacter jejuni (C. jejuni) [3]. Infectious diarrhea, especially caused by Salmonella spp. and Clostridioides difficile, can affect people with chronic granulomatous disease (CGD).

There are general steps you can take to prevent GI infections like:

  • Washing your hands before eating and after using the bathroom.
  • Cooking all meat and seafood fully.
  • Washing fruits and vegetables.
  • If you rely on well water, testing the water often to make sure it’s safe to drink.
  • Drinking only bottled or boiled water if you’re not sure your water source is safe to drink (for example, if you are traveling).
  • Not putting your head underwater in freshwater lakes, rivers, and streams.

For many GI infections, treatment consists of antimicrobial medication targeted to the germ causing the infection.

Infectious gastroenteritis is when the stomach and small intestines are inflamed because of an infection. You may have diarrhea, a fever, stomach pain or cramps, or vomiting when you have infectious gastroenteritis. Many different types of germs can cause infectious gastroenteritis, including:

  1. Viruses, like norovirus, adenovirus, or rotavirus. Note that viral gastroenteritis is sometimes called “stomach flu,” but it is not caused by influenza viruses.
  2. Bacteria, like Salmonella spp., C. jejuni, and E. coli.
  3. Parasites, like G. lamblia and Cryptosporidium spp.

Your healthcare provider may collect a stool sample to find out what is causing your infectious gastroenteritis. Knowing the cause can help your provider decide on the right treatment, like antibiotic (for bacteria) or antiparasitic (for parasites) medication. If bacteria are causing your diarrhea, you might not always need antibiotics, and sometimes antibiotics can make your symptoms last longer.

Infectious gastroenteritis is very easy to spread. To prevent it from spreading to others in your household, here are some steps you can take:

  • The person who is sick should use disposable cups, plates, and silverware if possible.
  • Dirty diapers, clothes, sheets, and towels should be kept apart from other items and washed separately at high temperatures.
  • Clean bathrooms regularly with a cleaner that contains a germ-killing chemical (disinfectant), like bleach.
  • Close the toilet seat cover before flushing.
  • Everyone should wash their hands often with soap and water, especially before and after touching dirty diapers, clothing, or linens.

Diarrhea with blood, or diarrhea along with a strong need to go and severe stomach cramps, could mean you have something other than an infection. You should always tell your healthcare provider if you have these symptoms. You might need more tests to find out the cause.

Norovirus causes digestive system infections with ongoing diarrhea. It is one of the most common causes of short-term (acute) gastroenteritis worldwide. However, this virus can lead to long-term (chronic) infections in people with PI, especially those with X-linked agammaglobulinemia (XLA), CVID, or who have had a hematopoietic stem cell transplant (HSCT) [4–8]. These chronic infections are very difficult to treat and can lead to severe malnutrition.

There are currently no vaccines or specific antiviral medications for norovirus, so preventing infections in the first place is key. Note that washing your hands with soap and water works best to prevent norovirus infections because alcohol-based hand sanitizers are not effective against the virus [9]. Norovirus is most often spread through contaminated food and people need to be extra careful on cruise ships, which often report norovirus outbreaks.

Clostridioides difficile (formerly known as Clostridium difficile) is a bacterium that can cause colon infections when there aren’t enough good microbiome bacteria to keep it from growing out of control. Recurrent C. diff, which means C. diff infections that are hard to get rid of or that keep coming back, happens most often when people are taking antibiotics to treat an infection, either in the gut or elsewhere. The antibiotics kill off good microbiome bacteria, as well as the bacteria they were prescribed for, giving C. diff a chance to grow. Even though people with PI tend to take a lot of antibiotics, studies do not show a higher risk of recurrent C. diff than the general population [10,11].

In addition to antibiotics, recurrent C. diff can also be treated with fecal microbiota transplantation (FMT). During FMT, people with recurrent C. diff first take powerful antibiotics to kill off the bad bacteria, then receive purified germs from the GI tract of healthy individuals to ‘re-seed’ their gut microbiome and prevent C. diff from growing back. However, there is limited data on how effective and safe FMT is for people who are immunocompromised [12].

Helicobacter pylori (H. pylori) is a type of bacteria that causes stomach infections. In terms of PI, H. pylori infections have been reported mostly in people with CVID [13]. H. pylori attacks the lining of the stomach and can cause pain and bleeding sores (peptic ulcers), leading to dark, tar-like stool. It is important to find and treat H. pylori infections because long-term infection can lead to stomach (gastric) cancer [13].

Small intestinal bacterial overgrowth (SIBO) is a condition where bacteria that are usually in the colon grow up into the small intestine. This usually happens when the movement of digested food through the small intestine is too slow, allowing the bacteria to grow where they shouldn’t. SIBO can interfere with how the body digests and absorbs nutrients, leading to diarrhea, nausea, weight loss, bloating, and malnutrition. Up to 40% of people with CVID who have ongoing GI problems have SIBO [14]. However, other PIs have not been looked at in the same way, so it is possible that people with other types of PI are also at risk for SIBO.

Healthcare providers treat SIBO with antibiotics but may also recommend diet changes, such as a low-carbohydrate diet, to manage bacterial growth long term.

Up to 45% of people with CGD develop deep sores in their liver (liver abscess), most often from Staphylococcus aureus bacteria [15]. Liver abscesses are fairly unique to CGD but have also been seen in people with STAT3 deficiency (also known as Job’s syndrome or autosomal dominant hyper IgE syndrome) and hyper IgM syndrome [16,17]. These individuals often have fever, belly pain, tiredness, and, less often, belly tenderness and an enlarged liver (hepatomegaly) [18].

Treatment for a liver abscess is usually more involved than for other GI infections. Healthcare providers drain the abscess of pus (gathered neutrophils) and then administer antibiotics, sometimes intravenously. In some cases, surgery might be necessary.

Autoimmune and inflammatory GI conditions

Autoimmune and inflammatory GI conditions are common in people with PI, especially those with CVID, XLA, or CGD, and in those with primary immune regulatory disorders (PIRDs) like immune dysregulation, polyendocrinopathy, enteropathy, X-linked (IPEX) syndrome, autoimmune polyendocrinopathy-candidiasis-ectodermal dystrophy (APECED; also known as autoimmune polyglandular syndrome type-1 (APS-1)), Wiskott-Aldrich syndrome (WAS), IL-10 deficiency, and X-linked inhibitor of apoptosis (XIAP) deficiency. The GI tract is always in contact with germs and food, which can trigger wayward immune responses or make them worse.

Autoimmune or inflammatory conditions in the digestive system can damage the protective mucous membranes lining the mouth, esophagus, stomach, and intestines. This can lead to several symptoms, such as:

  • Geographic tongue, a condition causing the tongue to have an unusual appearance that might be confused with a yeast infection (thrush).
  • Gingivitis, which is inflammation of the gums.
  • Sores in the mouth (oral ulcers).
  • Stomach or abdominal pain.
  • Diarrhea, which may be watery or bloody.
  • A strong need to have a bowel movement soon after eating.
  • Unexpected weight loss, even with a reasonable diet.

People with PI can have similar symptoms if they have GI infections. Since both autoimmune or inflammatory diseases and infections can cause serious long-term damage, including cancer, it's important to get any new GI symptoms checked out. In rare cases, ongoing GI symptoms could be a sign of stomach or colon cancer, which is more common in primary antibody deficiencies than in the general population [19].

CVID can cause a GI condition called autoimmune atrophic gastritis (AAG) that has not been observed in other PIs [2]. AAG happens when your body makes autoantibodies against the stomach lining, particularly the cells that make stomach acid and a protein called intrinsic factor (IF). IF binds to vitamin B12 so your intestines can absorb it. Since your body needs vitamin B12 to make red blood cells, people with AAG sometimes have low red blood cells because of vitamin B12 deficiency, a condition called pernicious anemia.

AAG doesn’t always cause symptoms and when it does, they are related to the degree of B12 deficiency and the resulting anemia. These symptoms can include weakness, fatigue, pale skin, and tongue soreness.

Celiac disease, also called celiac sprue, is an autoimmune condition where the body develops antibodies against gluten, a harmless protein found mostly in wheat, rye, and barley. Celiac disease is a type of enteropathy, which means it causes inflammation in the small intestines. Symptoms include diarrhea, bloating and gas, and nausea and vomiting.

People with SIgAD are more likely to have celiac disease than people without SIgAD [20]. Because the standard test for celiac disease relies on IgA antibodies, people with SIgAD need to be tested for celiac disease in a different way that looks at IgG antibodies instead [21]. A gluten-free diet works for some, but not all, people with celiac disease.

Several types of PI can cause problems in the small intestines and/or colon that are difficult to classify. These conditions, collectively referred to as inflammatory bowel disease (IBD) or IBD-like, differ based on which organ(s) are affected and whether changes to the gut lining are visible to the eye or can only be seen by microscope in tissue samples.

Enteropathy

Although ‘enteropathy’ technically means any disease of the small intestines, in the context of PI, healthcare providers generally use it to mean diseases of the small intestines caused by inflammation or autoimmunity where the damage is mainly microscopic and can’t be seen by endoscopy. Enteropathy leads to large volume, watery bowel movements, weight loss, and malnutrition due to poor digestion of food and absorption of nutrients.

Enteropathy is common in people with CVID. Experts don’t know the exact cause. CVID-related enteropathy causes long-lasting diarrhea and difficulty absorbing nutrients from food, particularly protein, vitamins, and minerals. People with CVID-related enteropathy may lose significant weight unintentionally. Their small intestines may look normal during a visual exam. However, when viewed under a microscope, biopsied intestinal tissue shows signs of inflammation and damage. SIgAD is another antibody deficiency linked to enteropathy.

PIs that cause someone to have fewer T regulatory cells (Tregs) or Tregs that don’t work well can lead to enteropathy caused by autoimmunity. Examples include IPEX syndrome and STAT3 gain of function (GOF) [22,23]. Tregs help keep the immune system from attacking healthy tissue. In these conditions, lack of working Tregs leads to too much T cell activity. This can result in auto-reactive T cells attacking the lining of the intestines. These attacks cause watery, and less often bloody, diarrhea and makes it hard to absorb nutrients. Enteropathy in people with PIRD can cause poor weight gain and failure to thrive. It can be the first sign of a PIRD, or can develop later [24]. Treatment for these specific types of PIs ultimately requires a hematopoietic stem cell transplant (HSCT), but the enteropathy can be temporarily managed with steroids or immunosuppressants.

Crohn’s disease and ulcerative colitis

In people without PI, there are two main types of inflammatory bowel disease (IBD), Crohn’s disease and ulcerative colitis. In Crohn’s disease, inflammation can happen anywhere in the GI tract from your mouth to your anus and patches of inflammation are mixed in with patches of healthy tissue. Ulcerative colitis (UC) causes chronic inflammation and sores (ulcers) in the wall of the colon and the inflammation happens over one continuous stretch of tissue. It causes painful, often bloody, bowel movements. The damage from both Crohn’s and UC is visible during an endoscopy. However, the IBD seen in people with PI sometimes is not considered classic Crohn’s or UC.

People with CVID and XLA may develop inflammation of the gut that looks like Crohn’s disease or ulcerative colitis, although this is less common than other GI conditions in those with CVID [25,26]. People with WAS can develop colitis resembling UC with bleeding from the rectum, but this is rare [27,28]. The bleeding is worse if the person has low platelet counts.

Up to 50% of people with CGD develop what’s known as CGD-associated IBD or CGD-associated colitis [29]. It can cause:

  • Sores and dental abscesses that cause pain in the mouth and make it hard to eat.
  • Narrowing of the esophagus, caused by scarring, and changes in how the muscles work caused by inflammation from clumps of white blood cells (granulomas).
  • Stomach wall thickening that causes the stomach not to work as well or hold as much, resulting in vomiting, pain, and weight loss.
  • Enteropathy and colitis causing diarrhea.
  • Blockages from granulomas in the small intestines and colon.
  • Pain and bleeding from the rectum.

The most common GI problems in people with CGD are abdominal pain and diarrhea (with or without rectal bleeding). These can be due to very large granulomas that fill and block the bowel and decrease area available for normal nutrient absorption. GI symptoms usually begin before age 10, sometimes before the person is diagnosed with CGD, and can lead to delayed growth.

Experts have reported IBD in PIRDs like XIAP deficiency, IPEX syndrome, and IL-10 deficiency [30,31]. IL-10 deficiency is a PIRD that can cause very early onset IBD (VEO-IBD) by 6 years of age. This type of IBD shows colon inflammation that has features of Crohn’s disease, sometimes developing within weeks of birth. Experts have proposed that GI inflammation because of too much signaling from white blood cells called macrophages as the cause of IBD in infants and children with IL-10 or IL-10R deficiencies.

Though several types of PIRD tend to cause IBD by 2 years of age (infantile onset) or VEO-IBD, a significant proportion of people with PIRD develop IBD after age 6. IBD in older individuals can have a slow, gradual onset with frequent, small-volume diarrhea with blood and mucus. Due to the slow onset, it is common for these individuals to have been tested for food allergies and to have had multiple formula or food changes for allergies.

In contrast, IBD in infants with PIRD is usually much more dramatic. They typically have explosive, large-volume watery diarrhea. These symptoms are common in infants with IPEX and IPEX-like disorders. Biopsies show flattening of the cells that line the small intestines (villous atrophy) and signs of cell death (apoptotic enterocolitis).

It is important to identify people who have IBD as the first symptom of PIRD because diagnosing the underlying PIRD can help with treatment, resulting in better control of the GI condition. VEO-IBD is common, but the age of onset should not be the only reason to test for a PIRD. Healthcare providers should consider an underlying PIRD if a person with IBD has autoimmune conditions or conditions where the body makes too many white blood cells (lymphoproliferation), abnormal connections between the GI tract and the skin or organs (fistulae), recurrent fevers, or difficult to treat eczema. Someone with IBD may also have an underlying PIRD if they don’t respond to first- and second-line IBD therapies.

Nodular lymphoid hyperplasia (NLH) is when lymph nodes in the digestive system become inflamed and enlarged, developing into nodules or polyps. NLH happens most often in the small intestines but can also develop in other places in the GI tract.

NLH happens most often in people with CVID [32]. It has also been found in people with other antibody deficiencies like SIgAD. It usually doesn’t cause symptoms but can cause chronic diarrhea, make it hard to absorb nutrients from food (malabsorption), and block the GI tract if the nodules are large or there are a lot of them.

Autoimmune hepatitis refers to liver inflammation that does not involve the bile ducts caused by autoimmunity rather than an infection. APECED and CVID are both associated with autoimmune hepatitis [33]. It can cause fluid to build up in the belly (ascites), yellowing of the skin or eyes (jaundice), and problems with blood clotting. If it is not treated, autoimmune hepatitis can cause permanent scarring (cirrhosis) of the liver and liver failure.

Certain infections, like viral hepatitis (A, B, or C), cytomegalovirus (CMV), and Epstein-Barr virus (EBV), can also lead to severe liver inflammation (hepatitis) and damage. Because the symptoms of infection and autoimmunity are similar, people with liver problems should always be tested for these specific viruses. The treatment for an infection is different from the treatment for autoimmunity [33].

Nodular regenerative hyperplasia (NRH) is when the liver develops small clusters, or nodules, of dividing liver cells that press into surrounding tissue [34]. While NRH is not well understood, it may be a response to damage of the small blood vessels inside the liver. Healthcare providers see NRH most often in people with CVID or XLA, but it has also been reported in other PIs like CGD, CD40 ligand deficiency, and STAT3 gain of function (GOF) [33].

NRH usually develops without symptoms but can eventually cause increased blood pressure in the vein that carries blood from your intestines into your liver (portal hypertension). Signs of portal hypertension include retaining fluid in your limbs (edema), itching, yellowing of the eyes or skin (jaundice), and buildup of fluid in the belly (ascites). Portal hypertension can then disrupt the spleen’s function, leading to low blood cell counts (cytopenias). It can also cause more blood to flow through veins in the lower esophagus, causing them to become larger than usual (varices) and risking bleeding if they rupture [35].

Generally, healthcare providers use medications that lower the immune system's activity (immunosuppressants) to treat autoimmune or inflammatory GI conditions in people with PI. However, the treatment plan must weigh the risks of the treatment, including a higher risk of infections, against the risks of the autoimmune or inflammatory condition itself. In some cases, like GI conditions in people with CVID or CGD, providers prescribe corticosteroids as the first treatment. They may be enough to manage symptoms.

It can also be helpful to consult a registered dietician for advice on a nutritional plan to make sure you’re getting enough calories, which may include adding medium chain triglyceride oil. Be aware that there are many online sources and social media influencers that promote anti-inflammatory diets or nutritional supplements with little evidence to back them up. A registered dietician, however, is trained and certified to address medical conditions through diet.

In some cases, tube feeding via either a nasogastric (NG) tube or gastrostomy tube (GT) helps by delivering calorie sources that are easier to absorb, such as simple sugars and amino acids, directly to either the stomach or small intestines. Finally, parenteral nutrition, or delivery of nutrients directly into a vein, may be necessary in some cases.

Severe GI conditions related to PIRDs like IPEX syndrome usually need stronger immunosuppressants than corticosteroids. It is important to understand that there is no single defined treatment plan for managing GI conditions in people with PIRDs. They may not respond to medications that usually work for other people with autoimmune/inflammatory GI conditions, such as anti-TNF medications like infliximab or adalimumab.

Immunologists will often select medications that are most likely to work based on which specific PIRD the person has. The provider may consider second-line treatments, such as vedolizumab or ustekinumab, earlier. The provider may also try immunosuppressants that aren’t usually prescribed for GI conditions but that target a particular inflammatory cell, molecule, or protein. These medications include ruxolitinib, tacrolimus, cyclosporine, sirolimus, abatacept, and anakinra. Some people have to try multiple different medications to find the combination that works best for them.

Though GI conditions in a person with PIRD might be well-controlled, long-term quality of life may not be good with medication alone. People with PIRD may have flares, become less responsive to medication over time, and develop other autoimmunity, infections, or uncontrolled growth of white blood cells (lymphoproliferation). As a result, immunologists are recommending allogeneic hematopoietic stem cell transplantation (HSCT) more often for people with PIRDs than they used to.

Usually, HSCT in someone with PIRD is not an emergency. The medical team will try to get their autoimmunity and inflammation under control, since HSCT outcomes are better if the immune system is better controlled beforehand. The medical team will also try to get the person nutritionally stable and up to a healthy body weight as much as possible. HSCT can be a one-time, long-term treatment for PIRDs, but it's important to think carefully about the long-term risks from conditioning, the chance of graft versus host disease or other complications after the transplant, the risk of infection, and the small, but real, risk of the transplant failing.

Cancer

Cancer in the digestive system can develop from either chronic infections or from chronic inflammation or autoimmunity. People with PIs that include an increased risk of lymphoma in general can develop intestinal lymphoma, which is when white blood cells grow and divide out of control, starting in the intestines. People with CVID or XLA can also develop gastric adenocarcinoma, which is the most common type of stomach cancer, either from chronic H. pylori infection or from autoimmune atrophic gastritis [36,37]. Since many of the GI conditions linked to PI are risk factors for GI cancer, it’s important to get diagnosed and treated as soon as possible if you have GI symptoms.

Diagnosing digestive system and liver conditions

Diagnosing GI conditions in people with PI often requires multiple steps. These steps include a physical exam, imaging tests, and laboratory blood and stool tests. For people with PI who have significant digestive symptoms, it is important to involve a gastroenterologist or hepatologist to help with diagnosis and to guide treatment.

During a physical exam, healthcare providers may look for mouth or anal sores, enlarged lymph nodes in the neck, armpits, or groin, stomach tenderness, fluid in the belly (ascites), an enlarged or tender liver and spleen, cracks around the anus, unintentional weight loss, and, in children, poor growth (sometimes called failure to thrive).

Signs and symptoms like general abdominal pain, changes in bowel habits, bloating, and upset stomach, as well as bleeding from the upper or lower GI tract, most often cannot be diagnosed without further tests.

If your healthcare provider thinks you have a GI infection, they will send stool samples to the laboratory to be tested, cultured, or stained and viewed under a microscope. These tests look for bacteria, parasites, viruses, or other germs that could be causing GI symptoms.

Other tests that healthcare providers use to diagnose GI or liver problems include:

  • Upper endoscopy, where the provider introduces a camera on the end of a small flexible tube (endoscope) through the mouth into the GI tract to look at the esophagus, stomach, and upper small intestine.
  • Colonoscopy, where the provider introduces an endoscope into the anus to look at the anus, rectum, colon, and the end of the small intestine.
  • Percutaneous liver biopsy, where the provider removes a small piece of liver tissue (liver biopsy) by inserting a needle through the skin into the liver.

All of these tests are done with appropriate anesthesia. The endoscopic procedures check the gut lining for visible problems. They also allow the provider to take samples of the gut's contents and tissue samples (biopsies) for a specialist who looks at and tests body tissues for diseases (pathologist) to examine under a microscope. A pathologist will also examine any liver biopsies for signs of liver problems.

Other GI imaging tests include:

  • Double balloon endoscopy (also known as push-and-pull endoscopy), which uses a much longer scope to look at the entire GI tract, specifically parts of the small intestines that regular endoscopy or colonoscopy can’t reach.
  • Video endoscopy, which involves swallowing a pill-sized camera that takes pictures as it travels through the digestive system.
  • X-rays of the belly or intestines.
  • Ultrasounds of the belly or liver and bile ducts.
  • Computerized tomography (CT) scans of the belly after swallowing dye (CT with contrast).

Laboratory tests for digestive system problems start with a complete blood count (CBC) and a stool test to check for blood loss, infection, protein loss, pancreatic function, or inflammation in the stomach or intestines. The tests a provider orders are guided by the types of symptoms the person has. The healthcare provider may also do additional blood tests to measure inflammation throughout the body like C-reactive protein (CRP) and erythrocyte sedimentation rate (ESR). These two tests will be high when there is an infection or inflammation, including autoimmune inflammation, in the body.

Blood tests for albumin and pre-albumin levels provide a general sense of a person's nutritional status. Low albumin levels can indicate that the liver is having trouble making protein or that the person is losing too much protein through urine or stool. Liver disease, kidney disease, or malnutrition, either from lack of protein in someone’s diet or from GI conditions that interfere with protein absorption, can lead to low albumin levels. Low pre-albumin levels are more specific to protein malnutrition.

Liver tests like aspartate transaminase (AST), alanine transaminase (ALT), and bilirubin (a product of breaking down red blood cells that causes jaundice at high levels in the blood) check how well the liver is working and for inflammation or damage. High AST and ALT levels show that there is damage to liver cells (hepatitis) from infection or autoimmunity. This damage can also be caused sometimes by medications and nutritional supplements. High bilirubin can happen if the liver is not making bile normally or if there is a blockage of the bile ducts themselves.

Other tests that a healthcare provider uses to diagnose digestive system problems include:

  • Hydrogen breath test for SIBO.
  • D-xylose absorption test, which checks how well the small intestines can absorb sugars by measuring d-xylose in your urine and blood after drinking it.
  • Esophageal manometry, which measures the strength and coordination of the esophagus’ muscle contractions to understand symptoms of swallowing difficulties.
  • 24-hour ambulatory pH monitoring to look for excess exposure of the esophagus to stomach acid that could cause damage (a condition known as reflux esophagitis).

General diarrhea and upset stomach care

Diarrhea means having stools (bowel movements) that are frequent, loose, and watery. It is a general GI symptom that can be caused by an infection (infectious diarrhea) or by inflammation unrelated to an infection. Some medications, including those used to treat GI infections, like antibiotics, can also cause diarrhea. Diarrhea can be mild or severe, depending on how often you go to the bathroom, and the amount and consistency of the stools.

Upset stomach (dyspepsia) is when you have upper abdominal discomfort, nausea, and vomiting or dry heaves. Like diarrhea, both GI infections and conditions that are not related to infections can cause an upset stomach.

If diarrhea is severe, it can cause dehydration, which means your body loses too much water. Babies, young children, and older adults are more likely to have serious problems from dehydration. Sometimes, GI infections cause both diarrhea and vomiting, which increases the dehydration risk. Signs of dehydration include:

  • Skin that does not bounce back quickly when pinched.
  • Dry lips, tongue, and mouth.
  • Feeling unusually thirsty.
  • Peeing less than usual.
  • In babies, soft spots on the head (fontanelles) look sunken.
  • Eyes that look sunken.
  • Changes in behavior, like being restless or very tired and weak.

Supportive care for diarrhea includes replacing the fluids and salts your body has lost to prevent dehydration. If you have mild diarrhea, you can try changing your diet and drinking more fluids to make up for the loss. Your healthcare provider may suggest a clear liquid diet (avoiding milk products), including weak tea, sports drinks, broth, and flat soda without bubbles. As you start to feel better and your bowel movements become less frequent and smaller, you can slowly start eating more solid foods. If you are severely dehydrated from diarrhea, you may need to go to the hospital and get intravenous (IV) fluids.

Older children and adults should rinse their mouths with water often to help with mouth dryness and bad taste from being sick, especially after throwing up.

Sometimes, antibiotics themselves may cause diarrhea. The job of antibiotics is to kill bacteria. In some cases, they kill good bacteria that are part of your GI microbiome as well as the infection-causing ones. Your healthcare provider may recommend taking a probiotic when you are on antibiotics to replace some of the good bacteria. However, the benefit of probiotics is still controversial and, because they contain live bacteria and are not regulated by the FDA, they can pose a risk to PI patients. Only take probiotics as directed by your healthcare provider.

Sometimes the frequent bowel movements and repeated wiping with toilet paper that happens with diarrhea can lead to irritation of the skin around the anus. To feel more comfortable, you can coat the rectal area with petroleum jelly or other barrier creams used for diaper rash. This will protect the skin and reduce irritation from frequent bowel movements. Dirty diapers and clothes should be changed right away and anyone handling dirty diapers, clothes, or linens should immediately wash their hands.

  1. Chan S, Godsell J, Horton M, Farchione A, Howson LJ, Margetts M, et al. Case report: Cytomegalovirus disease is an under-recognized contributor to morbidity and mortality in common Variable Immunodeficiency. Front Immunol. 2022;13: 815193. Available: https://www.frontiersin.org/journals/immunology/articles/10.3389/fimmu.2022.815193/full 
  2. Pikkarainen S, Martelius T, Ristimäki A, Siitonen S, Seppänen MRJ, Färkkilä M. A high prevalence of gastrointestinal manifestations in common variable immunodeficiency. Am J Gastroenterol. 2019;114: 648–655. Available: https://pubmed.ncbi.nlm.nih.gov/30747770/ 
  3. Ludvigsson JF, Neovius M, Hammarström L. Risk of infections among 2100 individuals with IgA deficiency: A nationwide cohort study. J Clin Immunol. 2016;36: 134–140. Available: https://pubmed.ncbi.nlm.nih.gov/26739713/ 
  4. Rolfes MC, Sriaroon P, Dávila Saldaña BJ, Dvorak CC, Chapdelaine H, Ferdman RM, et al. Chronic norovirus infection in primary immune deficiency disorders: an international case series. Diagn Microbiol Infect Dis. 2019;93: 69–73. Available: https://pubmed.ncbi.nlm.nih.gov/30174143/ 
  5. Langereis JD, Jacobs JFM, de Jonge MI, van Deuren M. Plasma therapy leads to an increase in functional IgA and IgM concentration in the blood and saliva of a patient with X-linked agammaglobulinemia. J Transl Med. 2019;17: 174. Available: https://pubmed.ncbi.nlm.nih.gov/31122289/ 
  6. Ottosson L, Hagbom M, Svernlöv R, Nyström S, Carlsson B, Öman M, et al. Long term Norovirus infection in a patient with severe common variable immunodeficiency. Viruses. 2022;14: 1708. Available: https://pmc.ncbi.nlm.nih.gov/articles/PMC9413339/ 
  7. Woodward J, Gkrania-Klotsas E, Kumararatne D. Chronic norovirus infection and common variable immunodeficiency. Clin Exp Immunol. 2017;188: 363–370. Availble: https://pmc.ncbi.nlm.nih.gov/articles/PMC5422859/ 
  8. Roddie C, Paul JPV, Benjamin R, Gallimore CI, Xerry J, Gray JJ, et al. Allogeneic hematopoietic stem cell transplantation and norovirus gastroenteritis: a previously unrecognized cause of morbidity. Clin Infect Dis. 2009;49: 1061–1068. Available: https://pubmed.ncbi.nlm.nih.gov/19705974/ 
  9. CDC. How to Prevent. In: Norovirus [Internet]. 13 Jan 2025 [cited 29 Jan 2026]. Available: https://www.cdc.gov/norovirus/prevention/index.html 
  10. Khan R, Habbal M, Scaffidi MA, Bukhari AA, Rumman A, Al Ghamdi S, et al. Gastrointestinal disease in patients with common variable immunodeficiency: A retrospective observational study. J Can Assoc Gastroenterol. 2020;3: 162–168. Available: https://pubmed.ncbi.nlm.nih.gov/32671325/ 
  11. Oksenhendler E, Gérard L, Fieschi C, Malphettes M, Mouillot G, Jaussaud R, et al. Infections in 252 patients with common variable immunodeficiency. Clin Infect Dis. 2008;46: 1547–1554. Available: https://pubmed.ncbi.nlm.nih.gov/18419489/ 
  12. Shogbesan O, Poudel DR, Victor S, Jehangir A, Fadahunsi O, Shogbesan G, et al. A systematic review of the efficacy and safety of fecal Microbiota transplant for Clostridium difficile infection in immunocompromised patients. Can J Gastroenterol Hepatol. 2018;2018: 1394379. Available: https://pubmed.ncbi.nlm.nih.gov/30246002/ 
  13. Motta-Raymundo A, Rosmaninho P, Santos DF, Ferreira RD, Silva SP, Ferreira C, et al. Contribution of Helicobacter pylori to the inflammatory complications of common Variable Immunodeficiency. Front Immunol. 2022;13: 834137. Available: https://www.frontiersin.org/journals/immunology/articles/10.3389/fimmu.2022.834137/full 
  14. Baniadam L, Arshi S, Nabavi M, Yousefi A, Fallahpour M, Shokri S, et al. Can concurrent lower gastrointestinal manifestations help the timely diagnosis of small intestinal bacterial overgrowth in CVID patients? Eur Ann Allergy Clin Immunol. 2021;53: 18–22. Available: https://pubmed.ncbi.nlm.nih.gov/32186350/ 
  15. Marciano BE, Spalding C, Fitzgerald A, Mann D, Brown T, Osgood S, et al. Common severe infections in chronic granulomatous disease. Clin Infect Dis. 2015;60: 1176–1183. Available: https://pubmed.ncbi.nlm.nih.gov/25537876/ 
  16. Xie Y, Guo L-Y, Liu B, Hu H-L, Hu B, Chen T-M, et al. Pyogenic liver abscess in pediatric populations in Beijing (2008-2023). BMC Infect Dis. 2024;24: 745. Available: https://pubmed.ncbi.nlm.nih.gov/39075343/ 
  17. Shah I, Rahangdale A, Bhatnagar S. Liver abscesses and hyper IgM syndrome. J Family Med Prim Care. 2013;2: 206–208. Available: https://pmc.ncbi.nlm.nih.gov/articles/PMC3894042/ 
  18. Straughan DM, McLoughlin KC, Mullinax JE, Marciano BE, Freeman AF, Anderson VL, et al. The changing paradigm of management of liver abscesses in chronic granulomatous disease. Clin Infect Dis. 2018;66: 1427–1434. Available: https://pubmed.ncbi.nlm.nih.gov/29145578/ 
  19. Sardella G, Quinti I, Pulvirenti F. Upper gastrointestinal tract manifestations in primary antibody deficiencies: from Helicobacter pylori to gastric cancer. Curr Opin Allergy Clin Immunol. 2025;25: 455–463. Available: https://pubmed.ncbi.nlm.nih.gov/41158014/ 
  20. Malesza IJ, Malesza M, Krela-Kaźmierczak I, Zielińska A, Souto EB, Dobrowolska A, et al. Primary humoral immune deficiencies: Overlooked mimickers of chronic immune-mediated gastrointestinal diseases in adults. Int J Mol Sci. 2020;21: 5223. Available: https://pubmed.ncbi.nlm.nih.gov/32718006/ 
  21. Leonard MM, Lebwohl B, Rubio-Tapia A, Biagi F. AGA clinical practice update on the evaluation and management of seronegative enteropathies: Expert review. Gastroenterology. 2021;160: 437–444. Available: https://www.gastrojournal.org/article/S0016-5085(20)35220-3/fulltext 
  22. Vogel TP, Leiding JW, Cooper MA, Forbes Satter LR. STAT3 gain-of-function syndrome. Front Pediatr. 2022;10: 770077. Available: https://pmc.ncbi.nlm.nih.gov/articles/PMC9948021/ 
  23. Barzaghi F, Amaya Hernandez LC, Neven B, Ricci S, Kucuk ZY, Bleesing JJ, et al. Long-term follow-up of IPEX syndrome patients after different therapeutic strategies: An international multicenter retrospective study. J Allergy Clin Immunol. 2018;141: 1036–1049.e5. Available: https://www.jacionline.org/article/S0091-6749(17)31893-6/fulltext 
  24. Crowley E, Warner N, Pan J, Khalouei S, Elkadri A, Fiedler K, et al. Prevalence and clinical features of inflammatory bowel diseases associated with monogenic variants, identified by whole-exome sequencing in 1000 children at a single center. Gastroenterology. 2020;158: 2208–2220. Available: https://pubmed.ncbi.nlm.nih.gov/32084423/ 
  25. Ho H-E, Cunningham-Rundles C. Non-infectious complications of common variable immunodeficiency: Updated clinical spectrum, sequelae, and insights to pathogenesis. Front Immunol. 2020;11: 149. Available: https://www.frontiersin.org/journals/immunology/articles/10.3389/fimmu.2020.00149/full 
  26. Khan F, Person H, Dekio F, Ogawa M, Ho H-E, Dunkin D, et al. Crohn’s-like enteritis in X-linked agammaglobulinemia: A case series and systematic review. J Allergy Clin Immunol Pract. 2021;9: 3466–3478. Available: https://www.jaci-inpractice.org/article/S2213-2198(21)00579-1/fulltext 
  27. Folwaczny C, Ruelfs C, Walther J, König A, Emmerich B. Ulcerative colitis in a patient with Wiskott-Aldrich syndrome. Endoscopy. 2002;34: 840–841. Available: https://pubmed.ncbi.nlm.nih.gov/12244510/ 
  28. Suri D, Rikhi R, Jindal AK, Rawat A, Sudhakar M, Vignesh P, et al. Wiskott Aldrich syndrome: A multi-institutional experience from India. Front Immunol. 2021;12: 627651. Available: https://www.frontiersin.org/journals/immunology/articles/10.3389/fimmu.2021.627651/full 
  29. Yang AH, Sullivan B, Zerbe CS, De Ravin SS, Blakely AM, Quezado MM, et al. Gastrointestinal and hepatic manifestations of chronic granulomatous disease. J Allergy Clin Immunol Pract. 2023;11: 1401–1416. Available: https://pubmed.ncbi.nlm.nih.gov/36646382/ 
  30. Aguilar C, Lenoir C, Lambert N, Bègue B, Brousse N, Canioni D, et al. Characterization of Crohn disease in X-linked inhibitor of apoptosis-deficient male patients and female symptomatic carriers. J Allergy Clin Immunol. 2014;134: 1131–41.e9. Available: https://www.jacionline.org/article/S0091-6749(14)00606-X/fulltext 
  31. Zheng HB, de la Morena MT, Suskind DL. The growing need to understand very Early Onset Inflammatory Bowel Disease. Front Immunol. 2021;12: 675186. Available: https://www.frontiersin.org/journals/immunology/articles/10.3389/fimmu.2021.675186/full 
  32. Albuquerque A. Nodular lymphoid hyperplasia in the gastrointestinal tract in adult patients: A review. World J Gastrointest Endosc. 2014;6: 534–540. Available: https://pubmed.ncbi.nlm.nih.gov/25400867/ 
  33. Zinser E, Tan K-L, Kim D-IS, O’Brien R, Winstanley A, Yong PFK. Differential diagnosis: Hepatic complications in inborn errors of immunity. J Clin Med. 2023;12: 7480. Available: https://www.researchgate.net/publication/376198524_Differential_Diagnosis_Hepatic_Complications_in_Inborn_Erors_of_Immunity 
  34. Nodular regenerative hyperplasia of the liver. [cited 28 Jan 2026]. Available: https://rarediseases.info.nih.gov/diseases/10929/x 
  35. Esophageal varices. In: Mayo Clinic [Internet]. [cited 28 Jan 2026]. Available: https://www.mayoclinic.org/diseases-conditions/esophageal-varices/symptoms-causes/syc-20351538 
  36. Staines Boone AT, Torres Martínez MG, López Herrera G, de Leija Portilla JO, Espinosa Padilla SE, Espinosa Rosales FJ, et al. Gastric adenocarcinoma in the context of X-linked agammaglobulinemia: case report and review of the literature: Case report and review of the literature. J Clin Immunol. 2014;34: 134–137. Available: https://pubmed.ncbi.nlm.nih.gov/24338562/ 
  37. Gullo I, Costa C, Silva SL, Ferreira C, Motta A, Silva SP, et al. The dysfunctional immune system in common variable immunodeficiency increases the susceptibility to gastric cancer. Cells. 2020;9: 1498. Available: https://pubmed.ncbi.nlm.nih.gov/32575504/ 

This page contains general medical and/or legal information that cannot be applied safely to any individual case. Medical and/or legal knowledge and practice can change rapidly. Therefore, this page should not be used as a substitute for professional medical and/or legal advice. Additionally, links to other resources and websites are shared for informational purposes only and should not be considered an endorsement by the Immune Deficiency Foundation.

Adapted from the IDF Patient & Family Handbook for Primary Immunodeficiency Diseases, Sixth Edition 
Copyright ©2019 by Immune Deficiency Foundation, USA