Cloud applications are sweeping across the healthcare landscape. Just look at the success for two cloud-based applications vendors -- Veeva Systems (NYSE:VEEV) and athenahealth (NASDAQ:ATHN). Both companies have seen revenue soar in recent years. 

But which of these two stocks is the better buy for long-term investors? Here's how Veeva and Athenahealth compare.

Touching healthcare icon

Image source: Getty Images.

The case for Veeva Systems

Veeva Systems has definitely been the hotter stock so far in 2017. Shares of the cloud solutions company are up close to 50% year to date. This sizzling performance has stemmed from equally sizzling growth for Veeva. 

In the first quarter of 2017, Veeva Systems reported a year-over-year earnings increase of 188% on a GAAP basis and 57% on a non-GAAP basis. The company's revenue jumped 32% compared to the prior-year period. 

What's behind Veeva's phenomenal growth? Customers in the life sciences industry are flocking to the company's customer relationship management (CRM), clinical management, regulatory, and quality management applications. Many of the largest biopharmaceutical companies in the world, along with quite a few smaller ones, have implemented Veeva's solutions. 

There's still plenty of room for Veeva Systems to capture more life sciences customers. The company is also looking to expand beyond this core market and recently landed a large consumer packaged goods customer.

Wall Street analysts think that Veeva's growth over the next five years could be reduced by half compared to the last five years. However, that still would mean that the company could increase its earnings by more than 22% per year on average.

Doctor with tablet and icons displayed


Image source: Getty Images.

The case for Athenahealth

Athenahealth has also been a winner this year. The healthcare technology provider's stock is up more than 30% year to date.

Things didn't start off so well, though. Athenahealth posted disappointing results in the first quarter. Revenue grew but at a much smaller rate than the company has experienced in the past. Athenahealth's increased spending also dampened its earnings growth.

However, the stock shot up in mid-May on two announcements that pleased investors. First was the disclosure that hedge fund Elliott Management had bought a 9.2% stake in Athenahealth. Second, the company announced that it was adding a guarantee for hospitals that offsets any reduction in payment from Medicare Part A after using its athenaOne system. This move should help Athenahealth attract additional hospital customers.

Athenahealth shareholders became accustomed to revenue and earnings growth of around 30%. However, much of that growth came during a period when the federal government was providing financial incentives for healthcare providers to adopt new technology. Those incentives are no longer in place.

Analysts don't think that Athenahealth will return to its prior level of growth. Still, though, the company is expected to generate average annual earnings growth of 20% over the next five years. That's quite good compared to most stocks.

Better buy

Both of these companies have great products that have been disruptive to the healthcare industry. Both companies have strong management teams. And both stocks are also quite expensive.

Veeva Systems stock trades at nearly 61 times expected earnings. Athenahealth shares trade at almost 58 times expected earnings. Any hiccup with either company could send shares lower.

But while Athenahealth looks marginally more attractive from a valuation standpoint, Veeva Systems has the better growth prospects. Because of this potential growth, I think Veeva is the better pick. 

Keith Speights has no position in any stocks mentioned. The Motley Fool owns shares of and recommends Veeva Systems. The Motley Fool recommends Athenahealth. The Motley Fool has a disclosure policy.