We may not take medication on Shabbos due to the concern that a person may come to grind herbs to prepare it, which would be a violation of the prohibition of toichein, grinding, one of the 39 melochos prohibited on Shabbos. However, a person whose health is in danger may take medication in any case, even if it involves grinding. There are various opinions regarding a person who is a choleh she’ein bo sakanah, not in a life-threatening situation, but is nevertheless ill, a choleh kol gufo, one whose entire body is not well, i.e. he has a general feeling of malaise, or one who is nafal le’mishkav, feeling so ill that he is forced to lie in bed. The consensus is to go by the lenient position, that a person who is generally not well—although not in danger—may take medication, unless it is just a minor ailment. One of the reasons for ruling leniently is as follows: while a choleh may not perform any melachah on Shabbos, including transgressing rabbinic prohibitions, an individual who is a choleh may have a non-Jew do a melachah for him on Shabbos (or he may do it himself with a shinui). However, in the case of taking medication, since it cannot be done in his stead by another (in our case, the non-Jew), as no one can take medication on another’s behalf, Chazal have relaxed the decree and ruled that a choleh may take medication on Shabbos. A second reason is that it is a rabbinic prohibition, and safek derabbanan le’hakel, when there is a difference of opinion among poskim regarding a rabbinic ruling, one may follow the lenient position.