Doctors will stay in the nearest infirmary if one is present. However, doctors can be sent to an injured person by selecting the doctor, then right clicking the injured person. Alternatively, an injured prisoner can be taken to the infirmary by a guard, where a doctor will heal them. Doctors will also go to heal any prisoner or staff within 10 blocks of them. Doctors prioritize healing Guards over Prisoners.
Like other staff, Doctors will not move to areas in which a riot is happening, so it is recommended to use Paramedics instead.