You may have come into close contact with Medtronic (MDT 0.62%) if you've undergone a medical procedure. The company makes devices used in endoscopy, spine surgery, cardiovascular diagnostics -- and more. In fact, Medtronic is such huge player that the company won clearance for 125 products in the past 12 months. 

That didn't help stock performance last year. The stock sank in the double digits. Medtronic's big problem has been growth -- but things may be picking up. The company is making progress in its plan to boost growth -- and investors are taking notice. The shares have gained about 12% since the start of this year. Should you buy the device giant? Let's look at one green flag and one red flag before deciding.

Green Flag: Strengths in artificial intelligence

Medtronic could become a major force in a very hot growth area. And that's artificial intelligence (AI). The company already has invested in AI and developed products that are changing the world of medicine.

One good example is Medtronic's spine analyzer for spinal surgery. The UNID Adaptive Spine Intelligence System predicts likely outcomes for patients before their procedures. This helps surgeons better prepare for each particular surgery and adapt to produce the best result. The system relies on data from thousands of previous spinal surgeries.

Medtronic says AI could be the key to personalized medicine. And the UNID system illustrates that. Medtronic also recently announced a deal with Nvidia to make the Medtronic GI Genius endoscopy system even better. Thanks to Nvidia's technology, third parties can train and test AI models that may eventually become part of the GI Genius.

AI in healthcare is set to expand at a compound annual growth rate of 47% to reach more than $102 billion by 2028, according to a Markets and Markets report. And Medtronic, because of its early investment in AI, could be one of the first to benefit.

Red Flag: A tough economic environment

Higher inflation, negative currency impact, and a generally tough economic environment have weighed on Medtronic in recent times. Inflationary pressure makes it more costly and complicated for Medtronic to produce and transport its devices. And shifts in foreign currency rates could leave Medtronic with lower international revenue once that revenue is exchanged into dollars.

In the fiscal year, Medtronic reported double-digit decreases in GAAP net income and earnings per share. And free cash flow dropped 23%. The company said declines were due primarily to rising inflation and currency exchanges.

Today's economic situation remains tough. And the higher interest rate environment could continue to weigh on Medtronic. The company is in the middle of a transformation project to boost growth. That's positive. But executing the plan in today's environment may be challenging. So, it might take some time for Medtronic to deliver significant growth. And that could put the brakes on share performance.

Should you buy Medtronic?

This medical device giant probably won't deliver major earnings growth overnight. As mentioned, the economy represents a big headwind. But, over time, Medtronic is likely to succeed. The company has a strong portfolio of devices and could dominate in the high-growth area of AI.

Medtronic's growth plan may take time, but things are moving in the right direction. The company has divested certain assets, acquired others to spur growth, and is focusing investment on key research and development programs. Medtronic has made nine acquisitions since the 2021 fiscal year. And, moving forward, the company aims for R&D growth at or above revenue growth.

You also can count on Medtronic for passive income. The company recently increased its dividend for the 46th straight year. So, it's just a few years away from becoming a Dividend King.

All of this means Medtronic makes a solid buy today for long-term investors. The company still may face some headwinds, but over time its efforts should pay off -- and could help lift your portfolio.