Parin Chheda decided before entering medical school he wouldn't become a family doctor, a position that had less prestige than medical specialists, and frankly, less pay.

However, that resistance began to erode during his last two years at the University of Florida's medical school. During rotations from one specialty to the next, Chheda came across family doctors who had an intimate knowledge of the medical histories of their patients.

There's really something to be said about knowing a patient's name and their entire history without having to look at their chart, said Chheda, now a first year resident in family medicine at the University of California, San Diego. There's really a sense of completeness in your work; it's a good feeling at the end of the day.

The projected shortage of family physicians will likely bode well for Chheda's career prospects, but health officials project the deficit of 40,000 family doctors in the U.S. by 2025 will impact the aging population.

The dearth of family doctors has become so problematic that the American Academy of Family Physicians (AAFP) and the New Jersey Academy of Family Physicians (NJAFP) classified the field as a distressed practice environment. The warning meant fewer family physicians existed at a time when more were needed. We definitely face a shortage of family physicians across the country, AAFP President Glen Stream said.

The biggest reason behind the shortage: the pay gap between family doctors and specialists. Primary care physicians earned $186,044 on average in 2008, whereas specialists earned nearly twice as much, an average annual salary of $339,738, according to the U.S. Department of Labor.

Medical students graduated with an average of $157,944 in debt in 2010, according to the American Medical Association, more than enough to draw an aspiring doctor into a higher-paying field. It's an economic driver for medical students to make that decision, Stream said.

Family medicine is not an exalted field in the larger world of medicine, and there is a stigma attached to it that comes as early as medical school, experts and doctors say.

I did get that sense, of the stigma attached to family medicine, said Alex Kipp, a second-year family medicine resident at the Swedish Medical Center in Seattle, Wash. You get to do a little something different every day, Kipp, 29, said of family medicine. Even in clinic you can just see a wide variety of age groups, issues.

Kenneth Prager, director of clinical ethics at the Columbia University Medical Center in New York City, also noted the dwindling number of family physicians. It is sometimes easier to get a referral for a heart transplant than get a general internist, he said. The problem persists and it's not just at Columbia. It's a general problem throughout the country with some areas being affected worse than others.

Attracting 40,000 new family doctors within a generation comes with challenges, but medical experts say the shortage can be overcome.

Stream suggests two solutions. First, offer scholarships and loan forgiveness programs that mitigate educational debt to attract medical students into the lesser-paying field, he said. Second, improve payment disparities for family medicine by advocating an improvement in Medicare and Medicaid fees. Stream said he sees policymakers moving in that direction. It's encouraging that we're seeing a trend to address these problems, he said. More money invested in primary care, he said, will mean a more efficient system and happier patients.

And maybe more family doctors like Chheda.

The 27-year-old resident said he believes some of the bias against family medicine comes from not knowing all the things a family doctor can do. I don't think it's malicious, he said of those who look down upon family medicine. They just don't have the right information to really understand what a family medicine doctor does.