A functional abnormality of the immune system. The phenotype is Abnormality of immune system physiology (Human Phenotype Ontology term HP_0010978).