Rabbi Hershel Schachter
Shemiras Shabbos for Doctors and Medical Students
The Vilna Gaon is quoted as having said that to the extent that one is lacking in his knowledge of science, to that extent his Torah learning will be deficient. It is for this reason that the Gaon wanted very much to go to Italy to study medicine. His father did not permit him to do so, because he felt that his son Eliyahu was so brilliant, that if he would attend medical school, he would master the science of medicine much better than the other students, and then if someone would become sick, his son would be obligated to take time away from his learning to heal the sick person, since he would probably be better qualified than the other doctors.
A brilliant person is not obligated to go to medical school in order to learn medicine in order to save lives. Only one who already knows medicine is obligated to take time away from his learning to attend to issues of pikuach nefesh.
The medrash derives from a posuk in Parshas Lech Lecha that one may violate the laws of Shabbos to save the life of a choleh sheyesh bo sakanah (an individual with a life threatening sickness). The Talmud clearly states that even when we are not sure whether there is a real danger to someone's life or whether the chilul Shabbos will save the life, we still declare that the chilul Shabbos is allowed. Rav Shimon Shkop, in his famous sefer Shaarei Yosher, points out from the Gemarah that even in a case of sfek sfeka we still allow chilul Shabbos.
However, all of these halachos only apply once someone is already a doctor. We would not, however, allow one to be mechalel Shabbos in order to attend medical school in order to save lives at some later time.
Even a doctor or a paramedic who is performing a great mitzvah when he violates Shabbos laws for the sake of pikuach nefesh must still observe the Shabbos laws for the rest of that very same day of Shabbos. He should not think that since this Shabbos has already been violated, there is no use in observing the remaining hours of Shabbos. Any additional act of chilul Shabbos not done for the sake of pikuach nefesh is an unqualified aveira of chilul Shabbos.
There is a terrible misconception that the laws of Shabbos do not apply to doctors. This is absolutely incorrect. No profession exempts anyone from any mitzvos. Medical students are certainly not exempt from Shabbos observance. And even after having completed his school years, the future doctor must take special care to make sure he has a Sabbath-observant residency. If this can not be arranged, the student must simply look for a different profession.
This misconception has led some otherwise Orthodox people to be mechalel Shabbos in situations where there is absolutely no heter. We have heard of medical students who feel uncomfortable reciting Kiddush on Shabbos because they had violated the sanctity of that Shabbos. Of course they should recite Kiddush. Their discomfort should motivate them to no longer be mechalel Shabbos.
Editor's note: Future divrei Torah will hopefully discuss in more detail the parameters of what is permissible for doctors to do on Shabbos. In the meantime, see Rav Schachter's shiur Issues of Shabbos, Yom Tov, and Kashrus in Dentistry, where he discusses issues of refuah on Shabbos
Introduction so sefer Pe'as Hashulchan, by Rav Yisroel Mei'Shklov, a student of the Vilna Gaon
 When Avraham Avinu was approaching Egypt he was concerned that because his wife Sarah was so good looking the Egyptians may kill him in order to take her away. In order to save his life he made up with Sarah that they would lie about their relationship and have the Egyptians believe that she was his sister, rather than his wife. Under normal circumstances it is highly improper to lie, but for the sake of pikuach nefesh we certainly permit it. From this possuk we derive that for the sake of pikuach nefesh one may violate almost all Torah laws.