 Patients were assigned to different buildings based on their gender, social status, and the type of illness.
<clarity>  Patients were assigned to different buildings based on their gender, social status, and the type of illness.
 Patients were assigned to buildings based on their gender, social status, and the type of illness.