The stock market has dipped in and out of bear territory over the last few years, a reality that long-term investors know all too well. While these volatile periods can be unnerving at the moment, consistently investing cash in great companies amid both market highs and lows can help you build a profitable portfolio that withstands the test of time. 

The healthcare industry tends to be more resilient than other sectors in turbulent market periods, primarily because companies in these space serve essential consumer needs. If that sounds like an intriguing buying opportunity to you, you're not alone. 

Let's take a look at two top healthcare stocks that are not only flourishing in the current market, but have businesses that can deliver generous growth in the years to come. 

1. Vertex Pharmaceuticals 

Vertex Pharmaceuticals (VRTX -0.08%) may not be one of the healthcare stocks that has made it to the status of a household name, but this profitable, fast-growing biotech continues to go from strength to strength. The S&P 500 has delivered a total return of about 14% over the past year, while shareholders of Vertex are looking at a total return in the ballpark of 23%.  

Through the highs and lows that companies across all sectors have experienced the last few years, this is a business that has remained consistently profitable. This goes back to the success of its core business, comprised of four drugs that treat the genetic illness cystic fibrosis. More importantly, these four drugs are the only ones on the market that treat the root cause of the genetic ailment. 

Vertex has turned billions in profits in the last few years alone: $2.7 billion in 2020, $2.3 billion in 2021, and $3.3 billion in 2022. The company is also a cash powerhouse. It had roughly $13 billion in cash and investments on hand at the end of the most recent quarter. Even though Vertex estimates that there are still tens of thousands of patients worldwide that could benefit from its existing portfolio of drugs and aren't taking them yet, its product pipeline could leave the company's current profits in the dust over the next decade. 

One of its late-stage candidates is VX-548, a non-opioid drug targeting multiple rare pain ailments. In the company's second-quarter earnings call, CEO Reshma Kewalramani said that the drug "holds the promise of effective pain relief without the side effects or addictive properties of opioids" and is "designed to support a broad moderate-to-severe acute pain level, which would enable prescribing and usage across multiple settings including in hospital or the ambulatory surgical center post-discharge and in the home."

The most near-term approval for Vertex could be the first-ever gene editing therapy to hit the market, a drug called exa-cel that treats two rare types of blood disorders for which there is currently no functional cure. This business bears watching, and even a small investment could pay off handsomely in the years ahead.  

2. Intuitive Surgical 

Intuitive Surgical (ISRG -0.94%) has delivered a total return of about 25% over the trailing 12 months, a nice bump above the market's broader performance in that same window of time. The healthcare company develops, manufactures, and distributes surgical robotics systems to healthcare providers around the globe.

Even though a single system sale can run upwards of $2 million, the genius of Intuitive Surgical's business model is that most of its revenue and profits are derived from recurring revenue sources rather than one-time purchases. Case in point: In the third quarter, Intuitive Surgical reported $379 million from system sales, $1.1 billion from the replacement instruments and accessories that go with those systems, and $293 million from services such as software and training that it sells to customers.  

The company's total $1.7 billion in revenue for the three-month period represented a nice 12% bump from the year-ago period. Intuitive Surgical's profits for the quarter totaled $416 million, up 38% year over year.  

The number of procedures performed using its flagship da Vinci surgical system rose 19% in the third quarter compared to the same period in 2022. And, if you look back at the da Vinci procedures performed between the third quarter of 2019 to now, these have generated a compound annual growth rate of 17% over the four-year period.

Adoption of surgical robotics systems is still in its early stages, even though this technology has been around for decades. That bodes extremely well for a market leader like Intuitive Surgical and its shareholders.