Yes because it is the government's duty to protect the citizenry. Public health is such a thing, and contagious diseases are beyond the scope of the individual.