Autoimmune diseases are different from immuno deficiency diseases

Autoimmune diseases are different from immuno deficiency diseases. How? Give one example of each in human.

Autoimmune diseases are due to a state in which body’s immune system starts attacking the self cells and it leads to damage in the body, e.g. rheumatoid arthritis.
In case of immuno deficiency diseases, the immune system of the body weakens and it leads to recurrence of infections and inability to heal injuries, e.g. AIDS.