Codeine is an opiate used to treat pain, as a cough medicine, and for diarrhea.  It is typically used to treat mild to moderate degrees of pain. Greater benefit may occur when combined with paracetamol (acetaminophen) or a nonsteroidal anti-inflammatory drug (NSAID) such as aspirin or ibuprofen. Evidence does not support its use for acute cough suppression in children or adults. In Europe it is not recommended as a cough medicine in those under twelve years of age. It is generally taken by mouth. It typically starts working after half an hour with maximum effect at two hours. The total duration of its effects last for about four to six hours.

Common side effects include vomiting, constipation, itchiness, lightheadedness, and drowsiness. Serious side effects may include breathing difficulties and addiction. It is unclear if its use in pregnancy is safe. Care should be used during breastfeeding as it may result in opiate toxicity in the baby.  Its use as of 2016 is not recommended in children. Codeine works following being broken down by the liver into morphine. How quickly this occurs depends on a person’s genetics.

Codeine was discovered in 1832 by Pierre Jean Robiquet. In 2013 about 361,000 kilograms of codeine were produced while 249,000 kilograms were used. This makes it the most commonly taken opiate. It is on the World Health Organization’s List of Essential Medicines, the most effective and safe medicines needed in a health system. The wholesale cost in the developing world is between 0.04 and 0.29 USD per dose as of 2014.  In the United States, it costs about one dollar a dose. Codeine occurs naturally and makes up about 2% of opium.

Adverse effects
Common adverse effects associated with the use of codeine include drowsiness and constipation. Less common are itching, nausea, vomiting, dry mouth, miosis, orthostatic hypotension, urinary retention, euphoria, dysphoria, and coughing. Rare adverse effects include anaphylaxis, seizure, acute pancreatitis, and respiratory depression. As with all opiates, longer-term effects can vary, but can include diminished libido, apathy, and memory loss. Some people may have allergic reactions to codeine, such as the swelling of skin and rashes.

Tolerance to many of the effects of codeine develops with prolonged use, including to its therapeutic effects. The rate at which this occurs develops at different rates for different effects, with tolerance to the constipation-inducing effects developing particularly slowly for instance.

A potentially serious adverse drug reaction, as with other opioids, is respiratory depression. This depression is dose-related and is a mechanism for the potentially fatal consequences of overdose. As codeine is metabolized to morphine, morphine can be passed through breast milk in potentially lethal amounts, fatally depressing the respiration of a breastfed baby. In August 2012, the United States Federal Drug Administration issued a warning about deaths in pediatric patients < 6 years old after ingesting “normal” doses of paracetamol with codeine after tonsillectomy; this warning was upgraded to a black box warning in February 2013.

Some patients are very effective converters of codeine to its active form, morphine, resulting in lethal blood levels. The FDA is presently recommending very cautious use of codeine in young tonsillectomy patients: use the drug in the lowest amount that can control the pain, use “as needed” and not “around the clock”, and seek immediate medical attention if a child on codeine exhibits excessive sedation or abnormally noisy breathing.

Withdrawal and dependence
As with other opiate-based painkillers, chronic use of codeine can cause physical dependence. When physical dependence has developed, withdrawal symptoms may occur if a person suddenly stops the medication. Withdrawal symptoms include: drug craving, runny nose, yawning, sweating, insomnia, weakness, stomach cramps, nausea, vomiting, diarrhea, muscle spasms, chills, irritability, and pain. To minimize withdrawal symptoms, long-term users should gradually reduce their codeine medication under the supervision of a healthcare professional.

There is also no evidence that CYP2D6 inhibition is useful in treating codeine dependence, though the metabolism of codeine to morphine (and hence further metabolism to glucuronide morphine conjugates) does have an effect on the abuse potential of codeine. However, CYP2D6 has been implicated in the toxicity and death of neonates when codeine is administered to lactating mothers, particularly those with increased 2D6 activity (“ultra-rapid” metabolizers)

Codeine, or 3-methylmorphine, is an alkaloid found in the opium poppy, Papaver somniferum var. album, a plant in the papaveraceae family. Opium poppy has been cultivated and utilized throughout human history for a variety of medicinal (analgesic, anti-tussive and anti-diarrheal) and hypnotic properties linked to the diversity of its active components, which include morphine, codeine and papaverine.

Codeine is found in concentrations of 1% to 3% in opium prepared by the latex method from unripe pods of Papaver somniferum. The name codeine is derived from the Greek word kodeia (κώδεια) for “poppy head”. The relative proportion of codeine to morphine, the most common opium alkaloid at 4% to 23%, tends to be somewhat higher in the poppy straw method of preparing opium alkaloids.

Until the beginning of the 19th century, raw opium was used in diverse preparations known as laudanum (see Thomas de Quincey’s “Confessions of an English Opium-Eater”, 1821) and paregoric elixirs, a number of which were popular in England since the beginning of the 18th century; the original preparation seems to have been elaborated in Leiden, the Netherlands around 1715 by a chemist named Lemort; in 1721 the London Pharmocopeia mentions an Elixir Asthmaticum, replaced by the term Elixir Paregoricum (“pain soother”) in 1746.

The progressive isolation of opium’s several active components opened the path to improved selectivity and safety of the opiates-based pharmacopeia.

Morphine had already been isolated in Germany by German pharmacist Friedrich Sertürner in 1804. Codeine was first isolated decades later in 1832 in France by Pierre Robiquet, a French chemist and pharmacist already famous for the discovery of alizarin, the most widespread red dye, while working on refined morphine extraction processes. This paved the way for the elaboration of a new generation of safer, codeine-based specific antitussive and antidiarrheal formulations.

Codeine is currently the most widely used opiate in the world, and is one of the most commonly used drugs overall according to numerous reports by organizations including the World Health Organization and its League of Nations predecessor agency. It is one of the most effective orally administered opioid analgesics and has a wide safety margin. Its strength ranges from 8% to 12% of morphine in most people; differences in metabolism can change this figure as can other medications, depending on its route of administration.

While codeine can be directly extracted from opium, its original source, most codeine is synthesized from the much more abundant morphine through the process of O-methylation, through a process first completed in the late 20th century by Robert C. Corcoran and Junning Ma.

By 1972, the effects of the War On Drugs had caused widespread shortages of illicit and licit opiates because of a scarcity of natural opium, poppy straw, and other sources of opium alkaloids, and the geopolitical situation was growing difficult for the United States. After much of the opium and morphine in the US National Stockpile of Strategic & Critical Materials was tapped in order to ease severe shortages of medicinal opiates — the codeine-based antitussives in particular — in late 1973, researchers were tasked with finding a way to synthesize codeine and its derivatives. They quickly succeeded using petroleum or coal tar and a process developed at the United States’ National Institutes of Health.

Numerous codeine salts have been prepared since the drug was discovered. The most commonly used are the hydrochloride (freebase conversion ratio 0.805), phosphate (0.736), sulphate (0.859), and citrate (0.842). Others include a salicylate NSAID, codeine salicylate (0.686), a bromide (codeine methylbromide, 0.759), and at least four codeine-based barbiturates, the cyclohexenylethylbarbiturate (0.559), cyclopentenylallylbarbiturate (0.561), diallylbarbiturate (0.561), and diethylbarbiturate (0.619). The latter was introduced as Codeonal in 1912, indicated for pain with nervousness.[41] Codeine methylbromide is also considered a separate drug for various purposes.

Codeine and morphine, as well as opium, were used in an attempt to treat diabetes in the 1880s and thereafter, as recently as the 1950s.