Fiqh-us-Sunnah Volume 4, Funerals and Dhikr, Fiqh 4.011.

Section : Prohibition of Someone with a Contagious Disease Living Among the Healthy.

Anyone with a contagious disease may be prohibited from living among healthy people. The Prophet, peace be upon him, said: “A sick person must not be brought among the healthy.” The Prophet, peace be upon him, prohibited the owner of sick camels from mixing them with the healthy ones of another owner, even though he also stated: “No contagious disease is transmitted without Allah’s permission, nor is there any bad omen.” It is also reported that the Prophet, peace be upon him, accepted the oath of allegiance from a leper from outside Madinah and did not permit him to enter the city.