Investors had good reason to be worried over athenahealth's (ATHN) share price slide last week. After all, the company trades at a jaw-dropping 119 times expected earnings per share.

But plenty of companies with 100 plus P/E ratios make shareholders money. Amazon.com jumps to mind. Motley Fool co-founder David Gardner has owned that company for more than a decade, and he got a 100-bagger from it.

So, instead of worrying over athenahealth's lofty P/E, it may be more useful to see if the market for the company's products has more room to grow. After all, sometimes good companies stumble, presenting opportunities for long-term investors to take advantage of sale prices.

The market for medical records
As of the end of September, 47,195 providers were using athenahealth's software network to manage patient records. Yet that only scratches the surface of the addressable market. Athenahealth's market share in the physician medical records market stood at just 2.3% at the end of May -- after increasing 35% from a year ago.

Athenahealth's recently acquired Epocrates mobile app business has been downloaded by more than 300,000 doctors, suggesting that there's plenty more physicians for athenahealth to market its EHR systems.

Competing for share
Athenahealth's most direct competitors in the physician EHR space are Quality Systems (NXGN), with 75,000 customers, and GE Healthcare (GE 1.30%). All three of these competitors have an opportunity to grow as doctors rush to implement solutions in order to qualify for incentive payments tied to the Affordable Care Act's Meaningful Use provision.

That rush is accelerating as spending on health care IT solutions grows from $89.7 billion to $184.5 billion in 2020. Couple the bump in spending along with the fact 50% of the market for physician EHR systems is still controlled by more than 400 small regional EHR players, and there's a good opportunity for athenahealth, Quality Systems, and GE Healthcare to win business.

Debating earnings
However, sales growth hasn't really been investors' major concern for athenahealth. Instead, it has been earnings.

Last December, investors knocked athenahealth down 7% over worries tied to its 2013 guidance, which was looking for $525 million to $550 million in sales. Yet shares still gained 80% this year, even when including the 10% fall last week following athenahealth's 2014 guidance.

And athenahealth's outlook for 2014 isn't horrible. The company expects $580 million to $615 million in revenue projection this year, well above last year's guidance, and $725 million to $755 million in sales for 2014. Even if we use the high end of 2013 and the low end of 2014, that projection works out to 18% growth next year and 72% growth from 2012

Instead, it's likely that investors are worrying over athenahealth's earnings outlook for 2014. The company plans to plow money back into developing its software next year, which may drop operating margin from 11.7% to 13% this year to an estimated 9.7% to 10.6% next year. That drop in margin suggests earnings per share will be $0.98 to $1.10 in 2014, down from $1.05 to $1.15 this year.

Foolish final thoughts
Athenahealth operates in a fast growing market that's requiring plenty of investment to stay ahead of competitors Quality Systems and GE Healthcare. So investors should take athenahealth's eye-popping P/E ratio with a grain of salt. After all, if athenahealth can continue to win providers over to its cloud-based records system, it will build enough scale to allow it to address the margin issue later. That suggests that investors should keep a close eye on industry projections for the coming decade to see if they rise or fall, because that may have a bigger impact on whether shares ultimately go higher or lower.