Shaykh Muḥammad ibn Ṣāliḥ al-Uthaymīn [d. 1421 AH] said:
We say that if fasting causes harm to a sick person, then it would be ḥarām for that sick person to fast.
If someone was to say: ‘What is the measure of [this] harm?’
We say [in answer]: Harm [referred to here] is conceptualised with the senses and with that which has been related to us. As for the senses: It is for the sick person to recognise that fasting is causing him harm, [or] the causative factor of the pains he experiences, [or] obligates a delay in his recovery or anything that holds similarity [to these factors]. As for that which is related to him: It is for a knowledgeable, trustworthy physician to tell him that if he were to fast it would cause him harm. If a layman was to tell him the same, he should not take his opinion. Similarly, if an inexperienced, ignorant doctor was to relate to him the same, he should also not take his opinion in this matter. Just as if an untrustworthy physician was to give him advice in this issue, he should also seek another opinion.
[If the question is posed to us]: Is it a prerequisite for the doctor from whom we take the opinion regarding fasting to be a Muslim? As disbelievers are not to be trusted in such matters?
[We say]: In this matter the people of knowledge have expressed two opinions. What is correct though is that being a Muslim is not a valid prerequisite [as it applies to the physician]. Thus, whenever we are given sufficient reason to trust in the opinion expressed, [the sick person] should adopt it in leaving the fast. This is because these matters are from [a doctor’s] expertise and thus there is a chance that a disbelieving doctor may fulfil his duty faithfully in so far as it concerns his livelihood and honour. Consequently, he would utter what he believes wholeheartedly to be the truth. Moreover, the Prophet [ﷺ] put his trust in a disbeliever in a situation fraught with danger. For when he migrated from Makkah to Madīnah, he hired a disbelieving man from Banī al-Dayl named ʿAbdullāh ibn Urayqiṭ to guide him on the path. This was an extremely cautionary request [for him to make] as the Quraysh were actively seeking him and had set a reward of one hundred camels for anyone who could reveal his whereabouts. However, [in this situation] the Prophet [ﷺ] put his trust in him [a disbeliever]. This proves that it is permissible to take the opinion of a polytheist provided we are given reason to trust his speech.
Source: Al-Sharḥ al-Mumtiʿ 6:328-329
Translated by: Riyāḍ al-Kanadī