Seeking recourse to apparent means is not forbidden by the Shariah. Someone asked the Messenger of Allah, peace and blessings of Allah be upon him, whether they should make use of medicine. The Holy Prophetsa responded by saying: ‘Yes, use medicine; there is no illness for which a remedy does not exist.’
Indeed, this is absolutely true. No physician or doctor can claim that a certain medicine will definitely cure an illness, for if this was the case why would anyone die? Physicians and doctors ought to become righteous. They must have recourse to medicine, but pray as well. They ought to supplicate in seclusion.
Those who were consumed by their pride were the first to be disgraced. It is said that Galen prided himself on being able to cure cases of diarrhoea. Yet, the power of God is astonishing. Galen died of this very disease himself. In the same manner, certain physicians develop fever or tuberculosis and then pass on from this temporal world.
(Hazrat Mirza Ghulam Ahmadas, Malfuzat, Vol. 1, p. 255)