The Department of Public Health of the City and County of San Francisco is hereby authorized and empowered, whenever in its judgment it may be necessary for the protection of the public health and public safety, and for the prevention of the spread of smallpox, cholera, yellow fever, bubonic plague, typhus fever, poliomyelitis, diphteria and scarlet fever, to remove or cause to be removed, any person or persons afflicted with any of said diseases who may be found residing in any hotel, lodging house, boarding house, tenement house, or any other place or places, or districts within the City and County of San Francisco, to such hospitals with the City and County of San Francisco as said Director of Public Health may designate.