https://abukhadeejah.com/taking-medicine-is-recommended-in-islam-for-the-one-who-is-sickbut-it-is-not-obligatory/
It is not allowed to forcibly medicate a person... The Prophet stated, "Did I not forbid you from putting medicine in my mouth?" An-Nawawī said: “It is desirable that the sick person is not forced to take medication...”