Britni Hebert was chief resident, on track for a career in the highly demanding field of oncology, when she found out she was having twins. “Everything kind of just tilted on its head,” she said.

She couldn’t imagine 80-hour workweeks with two newborns at home, while her husband was doing an equally intensive radiology fellowship. But she didn’t leave the profession. Instead, Dr. Hebert, 37, decided to practice internal medicine and geriatrics, with more control over her hours. She has been able to change her schedule three times as her family’s needs have changed (the twins are 6, and the couple has a new baby), and now works about 85% of full-time hours.

Women are now half of medical students. In specialties such as pediatrics, geriatrics and child psychiatry, they are the majority. Female doctors are likelier than women with law degrees, business degrees or doctorates to have children. They are also much less likely to stop working when they do. 

Medicine has become something of a stealth family-friendly profession, at a time when other professions are growing more greedy about employees’ time. It has changed in ways that offer doctors and other health care workers the option of more control over their hours, depending on the specialty and job they choose, while still practicing at the top of their training and being paid proportionately.

Flexible, predictable hours are the key — across occupations — to shrinking gender gaps, according to the body of research by Claudia Goldin, an economist at Harvard.

Hebert, who lives in Lafayette, La., estimates that forgoing oncology halved her lifelong earnings. But she is grateful that she had other options for practicing medicine — and can still meet her children at the school bus most afternoons.

“I don’t want to pretend there aren’t sacrifices that come with the path that I’ve chosen,” she said, “but I just don’t think I could be employed at this time if not for being able to decide my schedule.”

A generation ago, the typical doctor owned a private practice, and saw patients whenever they got sick. Today, doctors are much likelier to work for large-group practices or hospitals and be on call at predictable times. Seventy percent of doctors under 40 are now employees, not owners, according to American Medical Association data. So are the majority of female doctors of all ages.

Large-group practices are more profitable because they can share resources, like clinic space or physician assistants, and more easily negotiate with health insurance plans.

But the setup also gives doctors more work-life balance, because there are more people who can serve as substitutes and divide night and weekend work.

“The old market expectation that your doctor will be available at all hours and is entirely flexible was beginning to fall apart as the workforce became more diverse,” said Robert Wachter, chairman of the department of medicine at the University of California, San Francisco. “New generations look at the work-life balance of older generations of physicians, and I think many of them say, ‘I don’t want that.’ ”

Wachter was responsible for naming one of the jobs that exemplifies this shift: hospitalist, the physician who sees patients who are hospitalized and coordinates with the specialists caring for them. They also make doctors’ schedules predictable, because hospitalists work in shifts, and primary care physicians don’t have to go to the hospital when their patients do.

Sara Gonzalez, 37, a pediatrician in Dartmouth, Mass., works as a hospitalist and in the emergency department, another shift job. She usually works 10 eight-hour shifts a month, with a few 16-hour overnights. When she is off, she is responsible for anything that comes up with her 1-year-old daughter; when she is at the hospital, her wife, who works in marketing, is the on-call parent.

“When my shift changes, I hand off my patients to the next provider, and that’s a really nice thing to not be on call when I walk out of the hospital,” Gonzalez said. “It gives me a great deal of control over my schedule, especially since I have these other interests, which were initially travel and have now shifted to family.”

The internet helps. Electronic medical records enable any doctor to see a patient’s history. Some use telemedicine to see patients who don’t require a physical exam. In the case of radiology, the entire job can be done remotely.

If doctors have figured out how to work predictable hours and substitute for one another — for things like delivering babies, diagnosing diseases or saving lives — couldn’t other occupations, too?

Hebert said for her and her physician husband, substitutes have been the key to making it all work — both at home and in their practices. Almost all her partners at work have children, which she said is critical because they understand what she’s dealing with.

“We jump at the chance to help each other, because we know we might need help,” she said.