In general, until the synthesis of dihydromorphine (c. 1900), the dihydromorphinone class of opioids (1920s), and oxycodone (1916) and similar drugs, there were no other drugs in the same efficacy range as opium, morphine, and heroin, with synthetics still several years away (pethidine was invented in Germany in 1937) and opioid agonists among the semi-synthetics were analogues and derivatives of codeine such as dihydrocodeine (Paracodin), ethylmorphine (Dionine), and benzylmorphine (Peronine). Even today, morphine is the most sought after prescription narcotic by heroin addicts when heroin is scarce, all other things being equal; local conditions and user preference may cause hydromorphone, oxymorphone, high-dose oxycodone, or methadone as well as dextromoramide in specific instances such as 1970s Australia, to top that particular list. The stop-gap drugs used by the largest absolute number of heroin addicts is probably codeine, with significant use also of dihydrocodeine, poppy straw derivatives like poppy pod and poppy seed tea, propoxyphene, and tramadol. The structural formula of morphine was determined by 1925 by Robert Robinson. At least three methods of total synthesis of morphine from starting materials such as coal tar and petroleum distillates have been patented, the first of which was announced in 1952, by Dr. Marshall D. Gates, Jr. at the University of Rochester.
Morphine has also traditionally been used in the treatment of acute pulmonary edema. A 2006 review, though, found little evidence to support this practice. A 2016 Cochrane review concluded that morphine is effective in relieving cancer pain. Shortness of breath
Morphine is beneficial in reducing the symptom of shortness of breath due to both cancer and noncancer causes. In the setting of breathlessness at rest or on minimal exertion from conditions such as advanced cancer or end-stage cardiorespiratory diseases, regular, low-dose sustained-release morphine significantly reduces breathlessness safely, with its benefits maintained over time. Opioid use disorder
Morphine is also available as a slow-release formulation for opiate substitution therapy (OST) in Austria, Germany, Bulgaria, Slovenia, and Canada for persons with opioid addiction who cannot tolerate either methadone or buprenorphine. Contraindications
Relative contraindications to morphine include:

respiratory depression when appropriate equipment is not available. Although it has previously been thought that morphine was contraindicated in acute pancreatitis, a review of the literature shows no evidence for this. Adverse effects
Constipation
Like loperamide and other opioids, morphine acts on the myenteric plexus in the intestinal tract, reducing gut motility, causing constipation. The gastrointestinal effects of morphine are mediated primarily by μ-opioid receptors in the bowel. By inhibiting gastric emptying and reducing propulsive peristalsis of the intestine, morphine decreases the rate of intestinal transit. Reduction in gut secretion and increased intestinal fluid absorption also contribute to the constipating effect. Opioids also may act on the gut indirectly through tonic gut spasms after inhibition of nitric oxide generation.