The Shulhan Aruch (Orah Haim 328:7) rules that if somebody suffers from "Kadahat" – a fever – on Shabbat, it may be treated even if this entails Shabbat desecration. The question arises as to how this Halacha practically applies nowadays, and under which circumstances the treatment of a fever overrides the Shabbat prohibitions.
Hacham Ovadia Yosef (Hazon Ovadia – Shabbat, vol. 3, p. 246) writes that Shabbat may be violated if a person’s body temperature is 40 degrees Centigrade – 104 degrees Fahrenheit – and is not being reduced through standard medications, and the cause of the fever is unknown. Under ordinary circumstances, when standard fever reducers are effective in lowering the patient’s body temperature, or if the patient has an ordinary cold or flu, the situation is not considered potentially life-threatening, and thus Shabbat may not be desecrated for the sake of treating the patient. Shabbat desecration is warranted only if the patient has a mysterious fever that reached 104 degrees, and is not responding to standard remedies. In such a case, medical attention must be immediately sought, even if this entails desecrating Shabbat.
In the case of a fever that does not meet all these conditions, Hacham Ovadia writes, one may summon a non-Jew to do what is necessary for the sake of treating the patient. (Certainly, medication may be taken for a fever of any temperature, as the prohibition against Refua (medication) on Shabbat does not apply in the case of somebody with a fever.)
Hacham Bension Abba Shaul (Israel, 1924-1998), in Or Le’sion (36:13), adopts a more lenient position, allowing Shabbat violation even if the patient’s temperature is only 39 degrees Centigrade, or around 102 degrees Fahrenheit. One may follow this lenient opinion, and violate Shabbat for the sake of treating a patient with this body temperature if he does not respond to standard medication.
Importantly, these guidelines do not apply to infants or to elderly patients. In the case of an infant or elderly person, a fever of any temperature can be potentially dangerous, and so if the patient has a temperature above 98.6 Fahrenheit, and fever reducers do not lower the fever, everything must be done to seek immediate medical attention, even if this entails Shabbat desecration.
Summary: If somebody on Shabbat has an unexplained fever of 102 degrees Fahrenheit or above, and standard fever reducers are not effective in lowering the patient’s temperature, this is considered a potentially dangerous condition, and thus medical attention must be immediately sought even if this entails Shabbat desecration. In the case of an infant or elderly patient, even a slight fever that does not respond to standard medications must be treated as a potentially life-threatening situation that must be immediately treated even at the expense of Shabbat desecration.