c. 1300, pocioun "medicinal drink, dose of liquid medicine or poison," from Old French pocion "potion, draught, medicine" (12c.), from Latin potionem (nominative potio) "a potion, a drinking," also "poisonous draught, magic potion" (source also of Spanish pocion "potion," ponzoña "poison," Italian pozione "potion"), from potus, irregular past participle of potare "to drink," from PIE root *po(i)- "to drink." A doublet of poison (n.). By early 15c. specifically as a magical or enchanted drink.
"branch of medicine concerned with the anus or rectum," 1896, from Latinized form of Greek prōktos "anus" (from PIE *prokto-, source also of Armenian erastan-k' "buttocks") + -logy "study of." Related: Proctologist (1897).
"magic," 1920s, probably of Creole origin; compare Gullah moco "witchcraft," Fula moco'o "medicine man." It was noted in 1935 as an underworld name for "any of the poisonous, habit-forming narcotics."
word-forming element meaning "of or pertaining to medical science; from a medical standpoint; pertaining to medicine and," used as a combining form of Latin medicus "physician; healing" (from PIE root *med- "take appropriate measures").
late 14c., farmacie, "a medicine that rids the body of an excess of humors (except blood);" also "treatment with medicine; theory of treatment with medicine," from Old French farmacie "a purgative" (13c.) and directly from Medieval Latin pharmacia, from Greek pharmakeia "a healing or harmful medicine, a healing or poisonous herb; a drug, poisonous potion; magic (potion), dye, raw material for physical or chemical processing."
This is from pharmakeus (fem. pharmakis) "a preparer of drugs, a poisoner, a sorcerer" from pharmakon "a drug, a poison, philter, charm, spell, enchantment." Beekes writes that the original meaning cannot be clearly established, and "The word is clearly Pre-Greek." The ph- was restored 16c. in French, 17c. in English (see ph).
Buck ["Selected Indo-European Synonyms"] notes that "Words for 'poison', apart from an inherited group, are in some cases the same as those for 'drug' ...." In addition to the Greek word he has Latin venenum "poison," earlier "drug, medical potion" (source of Spanish veneno, French venin, English venom), and Old English lybb.
Meaning "the use or administration of drugs" is from c. 1400; the sense of "art or practice of preparing, preserving, and compounding medicines and dispensing them according to prescriptions" is from 1650s; that of "place where drugs are prepared and dispensed" is recorded by 1833.