Investing in medical industry

Assalamu alaikum

I have invested in some stocks in the medical industry - they primarily sell medical software and may also own their own medical clinics and pharmacies. My investing apps say they are Shariah compliant

Lately I have learned that some of the software may guide doctors towards when medical cannabis may be a good option for the patient (and their criteria is likely not the same as ours, would be more encouraging). Likewise a pharmacy may also provide medical cannabis. And while medical clinics are primarily for medical services but they often also provide botox treatment

My own interpretation is i can continue to invest and it will be halal but I just want to confirm. The reason I feel this way is because the business is primarily halal and the primary functions are clearly halal - actually quite important and beneficial for society. Also medical marijuana has halal uses as well, and regardless of what the software suggests the decision is ultimately up to the doctor what to prescribe. Am I thinking in a correct way?

JazakAllah khair


May Allah bless you.

I do not see any issues with the medical software suggesting cannabis as a medical treatment option.

And Allah knows best!