What was the immediate cause of the hospitalization of immigrants at Ellis Island?

Immigrants were diagnosed with a disease.
Immigrants were rejected and sent back.
Immigrants had to take a physical exam.
Immigrants were kept for days or weeks.