There's a growing fear among investors that weight-loss drugs and treatments such as Ozempic could negatively impact many businesses, from food companies to healthcare businesses. But there are a couple of medical device makers that are still seeing strong demand for their products even amid the rising popularity of weight-loss treatments.

DexCom (DXCM -0.18%) and Abbott Laboratories (ABT 4.61%) are two businesses that are still doing well. Here's why they could continue to be good buys for the foreseeable future.

1. DexCom

DexCom makes continuous glucose monitoring (CGM) devices that help people with diabetes track their glucose levels. But investors have been concerned that with the rising popularity of drugs that can help with weight loss, including Wegovy and Ozempic, there will be less of a need for CGMs, and that will hurt the growth prospects of a company like DexCom.

But the numbers don't suggest that at all. DexCom reported its third-quarter numbers last month, and revenue of $975 million for the period ended Sept. 30 was up 27% year over year. For the full year, DexCom anticipates that its top line will come in around $3.6 billion, which would represent a year-over-year increase of approximately 24%. It also projects that its adjusted operating margin will be a fairly healthy 19% of revenue.

On the company's earnings call, CEO Kevin Sayer also indicated that a rise in weight-loss drugs that help to curb appetite (also known as GLP-1 drugs) isn't hurting business. "The data clearly show that CGM usage grows faster in GLP-1 users than those who are not on therapy." Whether this pattern continues is the big question, but for now weight-loss drugs may be helping to encourage people to track their glucose levels.

DexCom is down more than 30% from its 52-week high. Now could be a potentially good time for investors to buy shares of this healthcare stock.

2. Abbott Laboratories

A big rival for DexCom is Abbott Laboratories, which also makes CGMs. The company's medical device segment, specifically diabetes care products, is a key source of growth. For the period ended Sept. 30, Abbott reported revenue of $4.2 billion in its medical device segment, which grew at a rate of nearly 17% -- the highest among all of its segments. Sales of its FreeStyle Libre CGM devices were especially strong, coming in at $1.4 billion and growing at a rate of 31%.

Abbott's management sees a similar to trend with respect to CGMs and weight-loss treatment: They are going hand-in-hand with one another. CEO Robert Ford said on the company's earnings call last month that "a recent analysis of our U.S. user base showed that a growing number of Libre users are using Libre in combination with GLP-1 medications as part of a companion therapy approach for managing their diabetes."

The early signs are encouraging for both DexCom and Abbott, indicating that perhaps GLP-1 treatments aren't going to bad news for their respective businesses. But with both stocks down more than 13% this year, investors don't appear to be convinced just yet.

Which stock is the better option for investors?

Trading at 33 times its trailing earnings, Abbott is the more modestly priced stock of the two right now -- DexCom's price-to-earnings multiple is at more than 100, but that should come down as the business continues to grow over the years. Abbott is also the more diversified of the two businesses, with pharmaceutical, nutritional products, diagnostics, and other medical devices also contributing to its top line.

Both stocks could make for good long-term investments, but if you prefer a more pure-play diabetes stock, then DexCom may be the better buy. However, if you want a more diversified healthcare investment, then Abbott could be the optimal choice for your long-term investing strategy.