The stock market's wild ride may not be done yet, but for investors with a sufficiently long investment horizon and the patience to ride out the near-term volatility, now could be the perfect time to add money to great stocks even as other investors are acting on fear or heading for the hills.

Even though the current macro environment is presenting challenges for companies across a range of sectors, quality businesses can come through this period well. Companies in the healthcare industry in particular are often known for producing steady performance even in a tough macro period as they aren't exposed to the same economic cyclicality that other industries are.

If you have $20,000 to invest, here are two rock star healthcare stocks to consider putting at least part of that amount toward now.

1. Vertex Pharmaceuticals

Vertex Pharmaceuticals (VRTX 0.26%) is a healthcare company that specializes in medicines and therapies targeting rare diseases. Right now, the company's approved medicines are all for the rare genetic disease cystic fibrosis, and it controls the lion's share of this multibillion-dollar market with its four products that treat the ailment.

It's also worth mentioning that all of these drugs belong to a category of medicines known as cystic fibrosis transmembrane conductance regulator (CFTR) modulators and are the only CFTR modulators that have been approved by regulatory authorities. This class of drugs is changing the face of what a cystic fibrosis diagnosis means for patients, both in terms of quality and quantity of life. These are also all daily dose medications, with some administered in a single dose or a series throughout the day.

Enhanced approvals over the years have also extended the availability of these medicines to younger and younger patients. For example, the company's flagship product, Trikafta, is approved for qualified patients as young as 6 years of age, while another product, Kalydeco, is approved for covered patients as young as 4 months. All this boils down to a consistent and growing need for Vertex's products with patients living longer and the fact that it retains its first-mover advantage in this market.

Meanwhile, the company is already developing a range of other promising medicines, each of which represents multibillion-dollar addressable markets, both in and outside of the cystic fibrosis drug space. One is the rare blood disorder therapy exa-cel, which it developed alongside CRISPR Therapeutics. Management has said that this therapy, which could be approved as soon as in the coming months, "holds the promise for a one-time curative therapy for thousands of patients with severe sickle cell disease and transfusion-dependent beta-thalassemia."

Vertex is also working on candidates for pain disorders, diabetes, Duchenne muscular dystrophy, and Alpha-1 antitrypsin deficiency, to name several others. Beyond its own promising pipeline, Vertex is also looking to expand its long-term growth potential through acquisitions. In the third quarter of 2022, the company finalized its purchase of ViaCyte, which is working on developing stem cell therapies for the treatment of type 1 diabetes, along with a range of other initiatives. 

The drugmaker's portfolio of medicines -- which raked in profits of $931 million in the third quarter of 2022 alone -- and its growing pipeline are certainly bright green flags for the future of this business and bode well for long-term shareholders. Even with the volatility of the current market, shares are still up by nearly 40% from one year ago and about 10% from the beginning of 2023.

At its current share price, a $10,000 investment in Vertex Pharmaceuticals would add 32 shares to your portfolio.

2. Intuitive Surgical

Intuitive Surgical (ISRG 0.99%) is a profitable and steadily growing healthcare stock for investors to consider adding to their buy list right now. While the stock is still trading down by single digits from where it was a year ago, shares have rebounded by a healthy 18% over the trailing six-month period.

If you're not familiar with this company, Intuitive is in the business of making and selling surgical robotic systems. And it does so at a scale that no one else in the industry does, controlling a roughly 80% share of this multibillion-dollar space. Since the company's flagship product, the da Vinci system, was first approved more than two decades ago, it has been used in over 10 million procedures around the world.

While Intuitive Surgical makes most of its money from its da Vinci systems -- and the accessories, software, and services that accompany them -- it also sells another surgical system called the Ion for minimally invasive lung biopsies.

In 2022, Intuitive Surgical reported revenue and net income to the tune of $6.2 billion and $1.3 billion, respectively. Fluctuating procedure volumes weighed on results -- with the bottom line falling roughly 20% year over year even as revenue grew 9%. In last year's final quarter, the company placed 369 da Vinci systems, a slight 4% decrease from the same period in 2021, while worldwide da Vinci procedures jumped by a solid clip of 18%.

The company also grew its installed base of da Vinci systems in the fourth quarter of 2022 by 12% from the year-ago period. It closed out 2022 with cash and investments on its balance sheet to the tune of about $7 billion. Bear in mind, this all follows the trailing-five-year period, in which Intuitive Surgical's revenue and profits have both increased by about 50%, driving a total share price return of more than 70%.

While Intuitive Surgical has seen growth slow in recent quarters, this is primarily due to factors outside its control. COVID-19 resurgences in certain regions have inevitably caused delays in medical procedures, especially in markets like China, which affects the company's overall procedure volume as well as the number of systems it places for medical providers. However, if you're considering an investment of five to 10 years or longer in this company, these are relatively short-term headwinds.

It's also worth noting that the da Vinci system is used in everything from cardiovascular to thoracic procedures, so generally speaking, these are not elective surgeries that patients or providers can put off for prolonged durations. The company's continued profitability, market leadership, and strong financial track record all portend well for its ability to continue delivering favorable results for shareholders in the years ahead.

Investing $10,000 in Intuitive Surgical at its current share price would add around 39 shares to your portfolio.