Laboratory tests that measure different parts of the immune system are important for diagnosing an individual with primary immunodeficiency (PI) and determining which of over 450 different conditions they may have. Laboratory tests are necessary to determine if an individual has a primary immunodeficiency (PI).