Sakanas Haguf and Sakanas Eiver
When discussing Shabbos and medicine, one of the primary factors that decide the ultimate Halacha is the state of danger that the patient is in. The Gemara teaches two reasons that allow the desecration of Shabbos to save a life. Either it is because it is worth desecrating one Shabbos to keep many others, or it is because it is no different from most other mitzvos of which the Torah commands Vchay Bahem- the mitzvos should be a way of life, not a cause for death. Either derivation only allows desecrating Shabbos for a deathly ill patient. However, for patients who are not in immediate danger, one is not permitted to desecrate Shabbos on their behalf.
While one may not violate Biblical prohibitions for someone who is not critically ill, Halacha still recognizes differences in the severity of non-life-threatening illnesses. The most lenient Choleh Shayin Bo Sakana is what Halcha calls a Sakanas Eiver: a danger to a limb. In the time of Chazal, the potential loss of a limb (other than the eye) was not considered to be life-threatening. Accordingly, one cannot violate melachos dioraysa to save a specific limb. The Shulchan Aruch (O.C. 328, 17) rules that there is a distinction between a choleh sakanas eiver and a choleh shayin bo sakana. To treat a regular choleh shayin bo sakana, one can only do a melacha drabanan with a shinui making it a shvus dshvus. However, regarding a sakanas eiver, one does not need to do the prohibited act with a shinui, as long as it’s only a Rabbinic prohibition. The Nishmas Avraham (O.C. 328, 54) cites more lenient opinions regarding treating a choleh shayin bo sakana when it’s not a shvus dshvus.)
In modern medicine, there are often situations where a danger or infection to a limb is considered life-threatening. Shu”t Tzitz Eliezer (Vol. 8 15;18) rules accordingly: any such instance should be treated with the normal stringencies of a life-threatening situation, and Biblical prohibitions may be violated to treat the patient.