A family of illnesses with the common pathogenesis of an immune system-mediated attack on the body and a failure to distinguish self from nonself.