There are various services people need regardless of economic conditions, and medical services land somewhere atop that list. That's why the healthcare industry is an excellent place to look for stocks even when the market is struggling.

Of course, all healthcare stocks are not created equal, but solid corporations in this sector will successfully come out of the worst recession -- perhaps battered and bruised a bit, but still in one piece. Let's look at one top healthcare company worth buying in this volatile environment and holding onto forever: HCA Healthcare (HCA -1.54%).

Chart showing HCA Healthcare's price beating the S&P 500 since 2014.

HCA data by YCharts

Near-term headwind

HCA Healthcare is one of the leading hospital chains in the U.S. As of March 31, the company owned and operated 182 hospitals and 124 freestanding surgery centers, among other facilities. The company generates revenue based on the occupancy levels in its facilities and the various services physicians order for their patients in its hospitals. That's why the company had a rough go of it amid the worst of the COVID-19 pandemic.

Government-imposed lockdowns weren't the only problem. People voluntarily avoided places where they knew there would be a good chance of encountering patients who could spread the virus. With healthcare facilities swamped with COVID-19 patients, many weren't keen on visiting these facilities unless they had to. Amid this dynamic, some patients turned to telemedicine and companies like Teladoc, whose business slowed as society made more significant strides against the outbreak.

Patient sitting on hospital bed.

Image source: Getty Images.

COVID and the currently challenging economic climate continue to affect HCA Healthcare's business, but, still, the company is managing to report decent financial results. In the first quarter, revenue of $14.9 billion represented a decent increase of 6.9% year over year. Critical metrics such as patient days and average length of stay saw modest bumps, too. The company's earnings per share (EPS) remained flat at $4.14 compared to the year-ago period.

Importantly, HCA Healthcare cut its guidance for the year, citing rising labor costs and inflation as particularly tough challenges it's currently facing. The company had previously said it expected revenue between $60 billion and $62 billion. Now, it thinks its top line will come in between $59.5 billion and $61.5 billion. On the bottom line, HCA Healthcare's previous estimate of EPS between $18.40 and $19.20 was decreased to $16.40 to $17.60.

A bright future ahead

There are good reasons to be optimistic about HCA Healthcare's future, despite the headwinds it's facing right now. First, the company continues to grow in prominence in its industry. HCA Healthcare's market share has increased during the COVID-19 era -- from about 26.5% at the end of 2019 to about 28% at the end of 2021. In early 2011, the hospital chain giant had a 23% slice of the pie.

How does HCA Healthcare continue to eat up market share? The company seeks to attract more patients by expanding its clinical capabilities. It aims to be -- as CEO Sam Hazen once put it -- a "physician-friendly organization."

This means providing physicians with the tools they need to serve their patients better. That's how HCA Healthcare seeks to attract more doctors into its network. In the years before the pandemic, the company was in the habit of growing its physicians by 1.5% to 2% per year. Catering to both physicians and patients helped HCA Healthcare grow its market share, but there is even more good news for the company.

Healthcare services won't go out of style anytime soon. In fact, given the world's aging population, they will become even more in need. People require more medical attention during their golden years. This demographic shift will provide a powerful long-term tailwind to the entire healthcare industry, and as a leading hospital chain operator, HCA Healthcare is in an excellent position to benefit. That's why investors should look beyond the short-term problems the company may currently be having.

HCA Healthcare is worth buying and forgetting for those willing to be patient.