Bobby (Kevin Connolly) and Will (James Van Der Beek) are best friends and OB-GYNs at their joint practice.

During the pilot of CBS comedy “Friends With Better Lives,” pals Will (James Van Der Beek) and Kate (Zoe Lister-Jones) are on the verge of a fight. Bobby (Kevin Connolly), the awkward third wheel in the room, decides to exit. “Happily, I have a pap smear to get to,” he says, racing away as the laugh track roars.

Typical sitcom joke? Well, yes; but in this case, it’s also accurate because Bobby and Will are OB-GYNs. It’s a familiar scene lately in network comedies, as the new “Friends With Better Lives” joins Fox’s “The Mindy Project” in a world where gynecology is all the rage as a profession of choice for young male characters.

In real life, that scenario is actually increasingly rare: While gynecology used to be a heavily male-dominated field, according to the American Congress of Obstetricians and Gynecologists (ACOG), current statistics show the ratio skews about 75 percent female for incoming residents looking to become OB-GYNs. Why do recent TV series buck the trend and have 30-something men put on lab coats, delving into the very intimate world of obstetrics and gynecology?

It’s precisely for that reason: The intensely personal relationship between patients and their gynecologists — as well as certain subjects discussed that can even make adults giggle — are the perfect mix for an unusual, yet relatable, type of comedy.

“Every OB-GYN has a lot of clinical anecdotes that they probably couldn’t share loudly at a coffee shop,” said Nathaniel DeNicola, 33, an OB-GYN at a Philadelphia hospital. “I think the field lends itself to a lot of moments that have comedy in general, and I can see why [sitcom writers] would want to play up the gender difference to accentuate the comedy.”

Indeed: On a recent episode of “The Mindy Project,” the practice’s well-meaning partner, Jeremy (Ed Weeks), bought a traveling medical bus to offer free mammograms to women in low-income neighborhoods. Of course, when a group of guys wearing doctor’s coats showed up in Spanish Harlem offering their services (“Excuse me, Señorita, would you want to come on this bus and have us examine your breasts?”), women on the street staged a riot against the men they assumed were perverts trying to lure ladies to take topless photos.

Peter (Adam Pally), Jeremy (Ed Weeks), Danny (Chris Messina) and Morgan (Ike Barinholtz) fend off the public when they misunderstand the purpose of their mobile medical bus. (Jordin Althaus/Fox)

Given that “The Mindy Project” is mostly a workplace comedy, these outlandish situations come up frequently; the male doctors are unfazed by the most personal female health issues, but can still be squeamish and clueless about certain topics. “I need you to tell my favorite patient she’s fat,” Jeremy once begged Mindy about a pregnant woman who needed to lose weight. “I can’t tell her. She loves me, it would break her.”

The comedy, created by Mindy Kaling, had its setting partly inspired by Kaling’s mother, who worked as an OB-GYN for three decades. Kaling’s lead character as the only woman in a nearly all-male practice only elevates potential hilarity.”The comedy possibilities for a male OB-GYN are endless,” “Mindy Project” executive producer Matt Warburton said in an e-mail. “You can have a character who’s a total expert on a woman’s body downstairs, with no clue how to relate to her mind upstairs.”

Dana Klein, creator of “Friends With Better Lives,” said that writing Bobby and Will as OB-GYNs stemmed from a male obstetrician that she knows in Beverly Hills. Klein has always been intrigued about the dynamic between the doctor and his wife, given that his patients are ritzy Hollywood women.

As a result, Klein had her two lead characters start their own OB-GYN practice. There’s also an upcoming episode where Bobby’s pregnant wife is enraged and jealous when she finds out he treats supermodels and Playboy playmates. Klein thought that was an intriguing plot to explore just because of the extremely different perspectives. “It could be Heidi Klum or it could be a 70-year-old woman” — to doctors who see countless patients and body parts a day, it really doesn’t make a difference. To his wife, it’s a different story.

She also liked the idea that with some obvious exceptions, OB-GYN can be a happy medical field, helping bring babies into the world. “This is a comedy, so I didn’t want to do anything life or death,” said Klein, a mom of three. Also, by making the guys doctors, it automatically established that Connolly and Van Der Beek’s characters are hard-working and intelligent; plus, they look great in their lab coats.

Meanwhile, some characters in this new TV breed of young male OB-GYNs are a far cry from classic nice-guy doctors or even Cliff Huxtable (Bill Cosby), legendary sitcom dad and obstetrician on “The Cosby Show.” These modern dudes are all over the place personality-wise, especially on “The Mindy Project.” In addition to Jeremy the ladies man, there’s Danny, the brooding tough guy (Chris Messina); a pair of quirky new-age midwives (Jay and Mark Duplass); and insensitive frat bro Peter (Adam Pally). On CBS’s quickly-canceled “We Are Men” last fall, Jerry O’Connell played a twice-divorced OB-GYN who loved wearing speedos.

How do real-life younger generation male OB-GYNs feel about these depictions? Some are just happy to see their profession get a starring role. Though Rajiv Gala, an OB-GYN and residency program director in New Orleans, said before he watched an episode “Friends With Better Lives,” he was a bit worried that the lead OB-GYN would be a “creepy” character.

So, he was relieved when the character was a funny, kind, family-oriented guy. Even today, Gala said, he gets mixed reactions when he tells people what he does for a living: “People do snicker sometimes, ‘You’re an OB-GYN and you’re a guy?'” He hopes that maybe with this kind of new mainstream attention, younger men will realize it’s not an unusual field. “It’s a fairly female-dominated profession in medicine, and I think it’s important to see a balance,” said Gala, 40, the Young Physician at-Large on the ACOG executive board.

Even though Mindy is determined to prove she's not uncomfortable with Danny being her gynecologist, she's still not pleased to reveal her weight. (Beth Dubber/Fox) Even though Mindy is determined to prove she’s not uncomfortable with Danny being her gynecologist, she’s still not pleased to reveal her weight. (Beth Dubber/Fox)

One reason younger male residents might hesitate is the belief that women will balk at seeing an OB-GYN who’s not female. Gala said while this may be true among the younger generation (some older women are simply more familiar with males in the field), that’s a false sense. It might be slightly harder to build a practice as a male obstetrician, though it’s by no means impossible.

This issue comes up on TV: On “The Mindy Project” Season 1, Mindy went to her colleague, Danny, for a check-up where they played a sort of “gynecological exam chicken,” daring the other one to be too uncomfortable. Mindy won; although they made it through questions about her sexual history and then the breast exam, Danny bailed first when it was time for the “main event.”

Though that example was more about the two being friends than the fact that Danny was a guy, in terms of male versus female OB-GYNs in real life, it’s all about the quality of care. Even on television, the writers emphasize that the male gynecologist characters are all good at their jobs.

“I can’t comment on what the large majority of patients feel except to say that, in my experience, it’s a small percentage of patients who really have a strong preference one way or another,” DeNicola said. “The vast majority really just want the best doctor.”