When a patient goes to the best hospital, he or she usually hopes for a doctor who is knowledgeable and experienced. Something else to wish for? A woman physician.

That's because female doctors may on average be better than their male counterparts at treating patients in the hospital and keeping them healthy long-term, according to findings published Monday in JAMA Internal Medicine

The study, conducted by a team of researchers at Harvard, examined a random sample of Medicare patients hospitalized between January 2011 and December 2014 treated by general internists. Overall, the researchers scrutinized more than 1.5 million hospitalizations, controlling for differences in hospitals and patient cases.

Their conclusion: Patients who saw a female doctor were less likely to die within 30 days of leaving the hospital. They were also less likely to get readmitted within a one-month span of their initial discharge.

"Women physicians are more likely to do evidence-based medicine, and follow clinical guidelines," noted Ashish Jha, a professor at the Harvard School of Public Health and one of the study's co-authors. "They are more likely to communicate in a way patients report is more effective."

And those tendencies, it seems, result in healthier patients.

To be sure, there's a long-held notion that patients often consider gender when choosing a doctor. But this is the first to suggest that, for patients of all identities, female physicians may be more effective.

The findings come as hospitals are increasingly pressed to figure out ways to keep patients healthier, and for longer. The 2010 health law restructured how they get paid so that they're rewarded for patients' long-term health, and penalized when patients get readmitted. And while the Trump administration has vowed to repeal the law, analysts say many of those payment reforms -- which enjoy bipartisan support -- are expected to stick around.

With such incentives in play, hospitals may now see more value in female doctors -- who, research has found, are consistently paid less than their male counterparts and less likely to get promoted

"Understanding characteristics that are somehow associated with higher quality of care, and lower cost, is important in this era," said Yusuke Tsugawa, a physician and research associate at Harvard's school of public health, and the study's lead author. Hospitals, trying to improve their bottom lines, "might look at their female doctors slightly differently -- as a more valuable professional in the team."

Put another way: Paying female doctors less than men isn't just unfair, Jha said. It's actually inefficient.

"There's a little craziness around it," he said. "The people who seem to provide somewhat better care are the ones who are getting paid less. I think that makes very little sense."

That's the idea behind an op-ed published in in conjunction with the study. It argues that the paper's findings suggest hospitals serious about improving patient health should invest in improving female salaries and other benefits, so that they're comparable with those of male doctors.

Still, it's unclear why this difference emerges, or even how meaningful it might be. The study's conclusions suggest women are better about communication and following rules in terms of how they practice medicine.

But that's all conjecture, noted Anna Parks, an internal medicine resident at the University of California-San Francisco and the op-ed's principal author.

"It's pretty speculative right now to say what women are doing better than men," she said. "We need to gather more data on this, so instead of going off of stereotypes, we have hard evidence."

That said, generalizing the findings gets tricky. The paper only looks at Medicare patients, who are older, and it only focuses on the inpatient setting. Jha said he thinks the hospital-based findings would likely hold if expanded to other age groups.

But that's not necessarily true for other kinds of medicine. The researchers are now examining whether physician gender may relate to surgical outcomes. It's also unclear whether outpatient cases -- for instance, patients seeing a regular doctor to manage a chronic condition -- may yield a different result. In hospitals, patients don't get to choose their doctors, Jha noted, whereas they might pick a surgeon or a primary care doctor.

Others note that much more research is necessary before physician gender should be factored into the quality equation.

Join the conversation See the latest news and share your comments with CNN Health on Facebook and Twitter.

The differences between male and female doctors may not hold under additional examination, suggested Mark Friedberg, a senior natural scientist at the RAND Corp., a non-profit think tank. He was not involved with the study. Other factors, such as a doctor's age or educational experience, may matter more.

"It would be a mistake to change anything in public policy on the basis of these results, or to advise patients to change their behavior based on this information alone," he said.

If the findings hold, they point to a way health care can become more efficient and safer for consumers.

"What this should do is to prompt us to look at these specific behaviors these female physicians are practicing," Parks said. "Those are behaviors we should be inculcating in all physicians."