Question: Do I need to say a beracha on medicine? What about if I need a drink in order to swallow a pill?
Answer: The Gemara (Berachos 38a) writes that one only recites a beracha on food that one eats for medical reasons if they will enjoy eating it. Likewise, the Shulchan Aruch (OC 204:7) writes that one only says a beracha before (and after) drinking water if they are doing so to quench their thirst. Thus, the Mishna Berura (204:42) writes that if one drank some water just to enable them to swallow a pill, they shouldn’t recite a beracha. However, if one drinks any other beverage, one would be required to recite a beracha.
R’ Moshe Feinstein (Igros Moshe OC 1:82) writes that if the medication itself tastes nice, then one should recite a beracha. R’ Ephraim Greenblatt (Rivevos Ephraim 4:54:39) writes that R’ Yosef Shalom Elyashiv held that if one mixed the medicine into something that tastes good, one would need to recite a beracha on it.
R’ Dr. Avraham Avraham (Nishmas Avraham 204:1) writes that R’ Yehoshua Neuwirth (Shemiras Shabbos Kehilchasa 40:n191) held that one doesn’t recite a beracha upon taking medicine that has flavouring added to make it taste sweet since the main ingredient is bitter though R’ Ovadia Yosef (Yalkut Yosef 204:10:n10) held that one should recite a beracha. Similarly, R’ Shlomo Zalman Auerbach (quoted by R’ Dr. Avraham) held that one should recite a beracha on pills that are coated with sweeteners.
The Shulchan Aruch (OC 230:4) writes that one about to undergo a medical procedure should recite: יְהִי רָצוֹן מִלְּפָנֶיךָ ה' אֱלֹקַי שֶׁיִּהְיֶה לִי עֵסֶק זֶה לִרְפוּאָה כִּי רוֹפֵא חִנָּם אַתָּה, "May it be your will, Hashem, that this procedure should cure me, for You are a Doctor who does not charge," and afterwards, בָּרוּךְ רוֹפֵא חוֹלִים, "Blessed is the One who heals the ill" (See Mishna Berura 230:6).R’ Dr. Avraham quotes R’ Eliezer Waldenberg who says that one should say these prayers before and after taking medication. This would serve in place of reciting a beracha, thus satisfying both views.