Effect of autoimmune diseases on cognitive function.