Walgreen (NYSE:WAG) may be just the cure for any ailing portfolio, judging by its ability to churn out steady, double-digit earnings growth. This quarter was no exception, and the long-term prognosis calls for much of the same; the company continues to fire on all cylinders and keep the competition in check.

The pharmacy chain reported third-quarter earnings on Monday, including a 12.4% sales increase, earnings growth of 14.2%, and impressive same-store-sales growth of 7.6%, with prescription sales accounting for most of that strength. A little more than 60% of sales at Walgreen's stores comprise prescriptions filled for customers, with the rest coming from "front-end" sales. That consists of everything outside the pharmacy, including over-the-counter medications, cosmetics, and on-the-go food and beverages. According to management, a significant amount of opportunity for internal expansion remains; in the meantime, the company is not standing still in fending off other potential avenues of competition.

It's hard to tell exactly when it will happen, but I think it's inevitable that the U.S. will eventually be saturated with drugstores on nearly every corner. The two biggest players in this market, Walgreen and CVS (NYSE:CVS), will see to that. Both are rushing to open their own new stores, and CVS also has a reputation as an aggressive acquirer of smaller, regional chains or mom-and-pop stores. Now Walgreen, too, may be realizing that the occasional savvy acquisition might not hurt, as witnessed in its recent purchase of Delaware-based Happy Harry's.

The prescription-filling business is extremely competitive, and government reimbursement rates for seniors under a recently enacted Medicare Part D plan are low, leaving little profitability for stores that fill the orders under that plan. Demographic trends show that the elderly will dominate prescription needs, and as Uncle Sam minimizes its costs, economies of scale become a huge factor, benefiting the bigger players. As a result, acquiring smaller chains represents a way to remove rivals, gain market share, and further scale.

There's also another major player in the industry. Pharmacy benefit managers (PBMs) have grown rapidly in recent years, relying on their own scale and purchasing power to fill prescriptions for clients, mostly on a mail-order basis. The larger PBMs include CareMark (NYSE:CMX) and Medco (NYSE:MHS), and they have a further cost advantage in that they don't operate retail stores. Customers usually include large companies or managed-care organizations such as Aetna (NYSE:AET) and Cigna (NYSE:CI). And yes, you guessed it: Walgreen is on to the threat and has worked to develop its own PBM business. Not so long ago, it announced a major coup that will have it filling prescriptions for another large managed-care organization -- UnitedHealth Group (NYSE:UNH).

To sum up, Walgreen appears to have identified the potential threats to its business, and it's being proactive in maintaining its lead as the most profitable drugstore chain and major prescription-filler. This may very well allow it to continue the impressive track record of 15% annual sales growth and nearly 17% annual earnings growth it's tallied during the past 10 years. In addition, its returns on equity average nearly 20%, and negligible debt levels mean that returns on capital are as high.

This may all explain why Walgreen trades at a current 28 times earnings. Great companies rarely trade at bargain-basement levels. But if Fools keep a watchful eye, they may find an opportunity to pick up some shares at a fairer price.

UnitedHealth is a Motley Fool Stock Advisor pick. To see what other healthy companies Tom and David Gardner are prescribing for their readers, try out Stock Advisor free for 30 days.

Fool contributor Ryan Fuhrmann is long shares of Walgreen but has no financial interest in any other company mentioned. Feel free to email him with feedback or to further discuss any companies mentioned here. The Fool has an ironclad disclosure policy.