The study looked at more than 800,000 patients and found women were less likely to be readmitted to a hospital if treated by a female doctor.