Opioids and opiates together comprise a class of medications that are widely used primarily to control severe pain. The first line medications for mild to moderate acute pain treatment are Acetaminophen or NSAIDS. If these first line agents are not effective to control the pain, we can use medications which target different pathways like combinations of acetaminophen and opioid. Severe acute pain is treated with potent opioids. Conventionally, the term opiates refer to natural compounds usually obtained from the poppy flower base. Opioids are synthesized by chemical processes. Opiates and opioids are among the most commonly abused substances throughout the world. Addiction to opioids and opiates has become a major health problem in the developed world since the 2000s, particularly in the United States.  About 21 to 29 percent of patients prescribed opioids for chronic pain misuse them and about 8 and 12 percent develop an opioid use disorder. It is estimated 4 to 6 percent who misuse prescription opioids transition to heroin. Opioid overdoses accounted for more than 42,000 deaths in 2016, more than any previous year on record. About 40% of opioid overdose deaths involved a prescription opioid.
Opioids are derived synthetically from generally unrelated compounds. Opiates are derived from the liquid of the opium poppy either by direct refinement or by relatively minor chemical modifications. Both opioids and opiates act on three major classes of opioid receptors: mu, kappa, delta and several minor classes of opioid receptors like nociceptin, and zeta. Simplifying significantly, the mu receptors are thought to provide analgesia, respiratory suppression, bradycardia, physical dependence, gastrointestinal dysmotility and euphoria. The kappa agonism can yield hallucinations, miosis and dysphoria. The delta receptor likely has pain control and mood modulation effects, but some have suggested that mu agonism is necessary for the delta receptor to function strongly for analgesia.The nociceptin receptor modulates brain dopamine levels and has clinical effects like analgesia and anxiolysis. The zeta receptor, also known as the opioid growth factor receptor, can modulate certain types of cell proliferation, such as skin growths, and is not thought to have many functions in the modulation of pain or emotion. 
Deaths from overdoses of opioids and opiates had very large increases in the United States between 2000 and 2014, a pattern not seen before in history. In the early 2010s, many states in the US enacted new regulations either enhancing scrutiny of consumers, restricting prescribers, or both. As of 2014, a marked jump in deaths from opiates, particularly heroin, was seen concurrently.  It is suggested to use following strategies to prevent any opioid prescription diversion:
Opioids can be administered through a variety of routes. In the healthcare setting, the method of administration is usually intravenous, intramuscular, or oral. Different routes of administration can provide different onsets and offsets of action. In the setting of abuse, complications of problematic injection are common, diverse, and covered elsewhere (cellulitis, abscess, thrombophlebitis, endocarditis, compartment syndrome, foreign body, human immunodeficiency virus, hepatitis). 
Opioids generally do not cause any specific histopathology in and of themselves. However, there is a diversity of histopathologic change that can occur in the presence of improper/recreational parenteral administration.
Opioids have an extremely wide diversity of durations and intensities of effect. Alfentanil, for example, has a half-life of around 1.5 hours; whereas, Methadone has a half-life of between 8 to 60 hours. Opioid uptake and effect can also vary by route of administration, some examples being fentanyl patches or long-acting oral formulations of oxycodone and morphine. Some, such as diphenoxylate and loperamide, have almost no effect other than suppression of bowel motility. Opioids such as methadone can significantly prolong the QT interval. Opioids can sometimes precipitate serotonin syndrome, especially when given to patients already taking a variety of psychoactive medications (antidepressant medications like SSRI). There is an evolving body of knowledge that the intensity and quality of response to opioids can vary significantly between patients which can be unrelated to tolerance. This is likely related to genetics, but this is not well characterized at this time. 
Patients with opioid overdose typically have decreased responsiveness, hypopnea (abnormally slow respirations), slow speech, and constricted pupils. Constricted pupils may be seen in opioid tolerating individuals during active use even without the associated sedation and decreased respiratory drive issues. Constipation is common, particularly in chronic consumers and the elderly. Opioids are thought to decrease bowel motility, but on occasion, bowel spasms can be produced such as with "codeine cramps." Naloxone is the treatment of choice for opioid-induced bowel spasms. If there is intravenous use, there can be "track marks." These are very small abrasion-type skin changes overlying veins, usually in the extremities but occasionally in the neck and other anatomic locations. 
Diagnosis of acute opioid poisoning is primarily clinical. In the overdose setting, hypopnea can progress to apnea. Naloxone is a mainstay of therapy, but the practitioner is warned that first-line treatment is control of the airway and rescue breathing. Adequate intravenous access is necessary so enough fluids and medication can be administered. An initial intravenous dose of 0.4 to 0.8 mg of naloxone will quickly reverse neurologic and cardiorespiratory symptoms   although in some cases much higher doses are necessary, with case reports as high as 100 mg of naloxone required for successful resuscitation of a single overdose event (reference). Bag-valve mask ventilation or similar intervention should be initiated immediately by the primary rescuer to restore oxygen supply to vital organs while other rescuers evaluate available methods of naloxone administration. Basic Life Support and Advanced Cardiac Life Support principles should be followed during the resuscitation of the opioid poisoned patient. Laboratory testing can include drug screening, but there is a widespread opinion that drug screening in this setting is not useful in making a timely diagnosis of opioid poisoning. Drug screening is much more useful in screening for occult opioid use in settings such as pre-employment testing. When there is disagreement between the patient and the provider regarding a drug screen result, gas chromatography and mass spectroscopy (GCMS) can provide a definitive answer regarding what was in the patient sample. In the United States, Medical Review Officers manage the data produced by employment drug testing. 
Traditional treatment of opioid/opiate addiction focuses on self-help in the setting of counseling and mentorship by addicts already successfully in recovery, with a focus on drug-free living. "Drug-free" in the minds of many in both recovery and treatment involves an absence of any chemicals including those prescribed by a medical provider. In the 2010s the concept of harm reduction became increasingly accepted by the mainstream of addiction treatment providers, which allowed for ingested medications to be taken, with an increased focus on objective patient outcome optimization. Chronic treatment of addicts with methadone (a full mu receptor agonist), buprenorphine (partial agonist of mu receptors and Kappa antagonist), and Natrexone (a opioid receptor antagonist) became more accepted. Increasing numbers of studies comparing various strategies of recovery and relapse suppression were seen in the literature. Concurrently, depot naltrexone injection for enhancement of complete opioid avoidance became available. Each naltrexone injection lasts approximately 30 days. During that time, opioids are rendered ineffective by the effect of the naltrexone on the target receptors.  Disadvantages of naltrexone include difficulties in controlling acute pain in the setting of trauma and other acute medical issues. Depot naltrexone injection is contraindicated in the setting of chronic pain. Oral naltrexone is taken daily but is just about always ineffective if the patient controls their dosing schedule. Observed oral naltrexone administration controlled by a significant other may have promise given recent literature regarding disulfiram in the treatment of alcoholism. 
If the classic signs of opioid toxicity are present in a comatose patient, such as constricted pupils and slow respiratory rate, assumptions are often made that there is nothing else this patient could have, and if after naloxone reversal the patient appears to have normalized, this assumption can be justified. However, undifferentiated comatose patients are seen often in the emergency setting and can be challenging to evaluate and treat. Traditionally, a "coma cocktail" of 4 medications (dextrose/thiamine/naloxone/flumazenil) was used, but only one of the components of the original cocktail (naloxone) remains in use in emergency care as of early 2019. Sometimes an unforeseen consequence of injecting a robust dose of naloxone into the undifferentiated comatose patient is subsequent agitation, which can at times severely limit the team's efforts to evaluate for potentially severe underlying disease unrelated to opioid toxicity. It is often best to consider a very small test dose of naloxone such as 0.4 mg intravenous in the adult patient, if that medication is to be given diagnostically, and to keep the differential broad regarding potential etiologies of unresponsiveness until the history and physical findings narrow that differential.
The proper and legal administration of in-hospital opioids is well characterized, as are the biochemical nature of the receptors involved. As of early 2019, research interests in opioid consumption focused on risk reduction in both the prevention and the subsequent management of opioid use disorder. There is growing reliance on evidence based medicine principles in the management of the opioid tolerant and those with opioid substance use disorder. There is a large body of evidence at this point supporting opioid agonist management for the medication assisted treatment of those with opioid substance use disorder . However, there remains intense interest in alternative strategies such as use of marijuana or its components, driven in large part by the stigma and lack of availability of methadone and buprenorphine management in many areas of the United States . Some have called for the study of nation-of-origin features of heterogeneous opioid responses, noting for example that the capacity to metabolize codeine to morphine, which is several thousand times more effective for pain control per mg than codeine, is very rapid in those whose nation of origin is near the Horn of Africa. This enzymatic conversion is far slower in many Caucasians, giving these patients ineffective pain control with codeine. There are likely other variations in opioid response that are to date poorly characterized regarding predicting which patient will have what response to which specific opioid.
It has become increasingly clear as of early 2019 that the duration of an outpatient opioid prescription can have a major impact on the chance of future development of opioid use disorder. There is moderately strong evidence that there is a growing intensity of likelihood of development of opioid use disorder if outpatient opioid consumption continues longer than 5 days past the date of injury, with this risk intensifying as subsequent days pass and opioid consumption for the pain related to the injury has not yet ceased. Some studies suggest that NSAIDs work as well for acute pain as opioids, but others have suggested there may be confounding by genetic opioid response heterogeneity, which as this point remains poorly characterized. 
Patients who use opioids as prescribed can be at risk of overdose and this risk increases sharply with concurrent consumption of outpatient benzodiazepines, even if these are also prescribed. There is similar risk enhancement if opioids and alcohol are consumed together . There is growing evidence as of early 2019 that death risk can be significantly reduced in this population with access to home emergency naloxone reversal kits. This is similar to data from studies of the heroin using population . There are case reports of overdoses receiving successful rescue by lay observers with an injection of illicit buprenorphine/naloxone, but this has been unsuccessful with layperson injection of illicit buprenorphine alone 
In the acute setting, receiving opioids for a very short duration is not likely to induce a substance use disorder. A single event of opioid toxicity likely by itself is not likely to produce substance use disorder either. Once the opioid wears off, patients are predicted to regain normal physiology and capacity to do activities of daily living, provided the toxicity event did not result in hypoxic organ injury. Although there are claims that single doses of opioids by themselves created a cascade of disordered use, this is thought to be quite rare. The more opioid doses a given patent receives, the more chance they have of expressing an opioid use disorder.
It should be stressed that there is a clear difference between the opioid user with prescribed, legal, controlled dosing increases in the setting of tolerance and true opioid use disorder. According to the DSM-5, to qualify as opioid use disorder, a patient must express at least some of the following features: longer consumption than expected, inability to tolerate reduced dosing, a great deal of time spent in pursuit of opioids, craving, use interferes with social obligations, use causes interpersonal problems, physically hazardous use, continued use despite pathologic consequences of use, tolerance causing a need for increased dosing for similar effects, and characteristic withdrawal state when use is reduced or stopped. The more criteria the patient has, the more likely they are to have opioid use disorder. As of early 2019 there is growing literature evidence supporting medications such as methadone or buprenorphine to stabilize opioid use disordered patients and make relapse and future opioid toxicity/overdose events less likely. Detoxification to the point of abstinence from all forms of opioids, including avoidance of such medications as buprenorphine or methadone, does not seem to provide the same relapse prevention advantage.
Opioid overdose, if left untreated, often leads to severe permanent disability or death by hypoxic organ injury. Chronic use can lead to tolerance and risk for development of opioid use disorder. Illicit use can lead to a variety of complications, largely related to injection, including endocarditis and all of its associated complications, abscess, cellulitis, thrombophlebitis, retained foreign bodies, compartment syndrome, human immunodeficiency virus, hepatitis and scar formation. Body packers delivering potent opioids for the illicit market can have packets undergo enteral rupture, resulting in sudden, often catastrophic, loss of respiratory drive.
Patients who chronically consume opioids who have an opioid toxicity event are at risk for a repeat opioid toxicity event and must have proper management of that risk. Consultation with a chronic pain management doctor is advised whenever and wherever possible to optimize care, even if the primary doctor wishes to keep managing the prescription opioids. As of 2019 there has been a move away from abrupt cessation of opioids in this setting and a move toward gradually decreased dosing until the chronic pain doctor consultation is completed to provide additional guidance to the primary care physician.
The discussion of risk of the initial dose of outpatient oral opioids for acute pain has dramatically increased in intensity during the 2010s, particularly in pediatric and adolescent patients. Some locations in the United States mandate written consent of the guardian of the patient prior to initial outpatient opioid prescription. If there is a significant risk of misuse or overdose in the setting of chronic severe pain, some pain management doctors have found success with frequent appointments for prescriptions with very small numbers of doses, in some cases utilizing daily dosing of potent opioids to maintain the scrutiny intensity that particular patient requires for consumption safety, for example in the hospice patient with end stage cancer who is actively using heroin. Many pain management doctors feel that an opioid overdose is not itself necessarily a mandate for ceasing all outpatient opioids, but is is certainly an event worth discussing at length with the patient and family regarding the risk of future overdose that this event predicts.  It is essential for patients consuming opioids of any kind to realize the enhanced danger opioids represent when co-ingested with substances that are GABA-ergic such as benzodiazepines, barbiturates, or alcohol.
It is important for a provider to carefully evaluate for chronic pain in any patient under consideration for referral to opioid recovery services. Improper referral of chronic pain patients without proper pain control contingency can result in severe patient distress and at times lead to a variety of medical complications. In the 2000s and 2010s, there was a dramatic increase in population-level opioid consumption in the United States, leading to a national discussion on how to better control distribution and use. Interdiction with control of physician behavior had some modest effects in reduction of street availability of opioids with the following results (1) a concurrent rise in consumption of heroin, and (2) no improvement in the number of overall deaths from opioids from all sources combined. Also noted was the risk of theft of medications prescribed to the elderly and disabled, and steps were taken to educate these populations regarding those risks.
Portugal had a severe problem with people addicted to these drugs and overdose deaths in the 2000s and early 2010s. Shortly after regulatory changes emphasizing drug decriminalization and referral to heavily government-subsidized treatment, Portugal documented a rapid and significant drop in deaths in the substance use disordered population. Portugal's example may provide a way forward for the United States with similar policy changes.
The opioids have created a major crisis in the US with reports of dozens of people dying almost every day. To ensure patient safety numerous guidelines have been developed to help healthcare workers mitigate the risks associated with opioid therapy. All healthcare workers who prescribe and dispense opiates are important partners in preventing the opioid overdose epidemic from getting worse. The guidelines all agree that the doses of opioids greater than 90 -200 mg of morphine equivalents per days should be avoided. Further, when starting or switching fentanyl patches to oral opioids, the doses should be reduced by 25-50%. The guidelines also recommend the use of opioid risk assessment tools, written agreements and urine drug testing to mitigate the risks.  (Level III)
The pharmacist is perhaps in the ideal position to fight the opioid overdose epidemic. He or she should be the first to detect high prescription doses of opioids and speak to the healthcare provider before dispensing the drug. In addition, the pharmacist can check the drug database to determine if the patient is a drug abuser. Thirdly the pharmacist should inform the authorities if he or she deems that a healthcare worker is overprescribing narcotics each month. (level III)
There is good evidence to support the use of an opioid for chronic pain but only with careful monitoring and education of the patient. For all patients, nurses are in the prime position to educate patients about the potential toxicity of opioids and the risk of addiction. Data show that in the short term, education and restriction of opioid prescriptions may be helping to avert the crises but the long-term data on whether it solves the addiction and physical dependence remain unknown.  (Level V)