Table S1. Classification of medications Medication Class Medications that may have been taken by at least one patient in study Opioid analgesics codeine and codeine containing analgesics, fentanyl transdermal and fentanyl infusions, hydrocodone containing analgesics, hydromorphone, methadone (when given for a pain), morphine IR and morphine SR, oxycodone IR, oxycodone SR and oxycodone containing analgesics, propoxyphene and propoxyphene containing analgesics, tramadol and tramadol containing analgesics Neuroleptic amitriptyline, carbamazepine, desipramine, duloxetine, gabapentin, analgesics lamotrigine, levetiracetam, oxcarbazepine, phenytoin, pregabalin, tiagabine, topiramate, valproic acid, venlefaxine, zonisamide Non-opioid/nonaspirin (not 81mg), acetaminophen, baclofen, carisoprodol, celecoxib, neuroleptic cyclobenzaprine, diclofenac, glucosamine/chondroiten, ibuprofen, analgesics indomethacin, metaxalone, naproxen, orphenadrine, sulindac, tizanadine, any combination analgesic with these agents provided it was not opioid containing Table S2. Specific ER Diagnoses for Opioid and Non-opioid cohorts. Opioid Cohort (N = 86) Patient ID Diagnosis 3 Back pain 4 Left before seen 4 Fall with hip fracture 5 Hip pain 14 Abdominal pain 14 Abdominal pain 17 Chest Pain 20 Skin abscess 20 Nausea and vomiting 20 Rash 20 Pneumonia 20 Chronic pain 20 Kaposi's sarcoma 20 Wound check 20 Leg pain 28 Left before seen 28 Allergic reaction 31 Pulmonary embolism 33 Gastrointestinal bleed 34 Back pain 34 Back pain 35 Pneumonia 35 Rule out tuberculosis 36 Right ear problem 36 Cervical Strain 39 Flank pain 39 Shortness of breath 39 Knee pain 43 Pneumonia 43 Alcohol withdrawal 43 Back injury 43 Flank pain 43 Pneumonia 43 Back pain 44 Rash 48 Buttocks infection 48 Abdominal pain Non-opioid cohort (N = 85) Patient ID Diagnosis 24 Abdominal pain 24 Narcotic request 24 Abdominal pain 24 Cellulitis 71 Epididymitis 71 Ankle sprain 71 Epididymitis 71 Upper respiratory tract infection 78 Seizure 78 Back pain 78 Altered Mental Status 78 Foreign body in rectum 78 Foreign body in rectum 78 Seizure 78 Seizure 78 Seizure 78 Shortness of breath 78 Suicidal 86 Tinea 92 Cellulitis 101 Epididymitis 116 Graves Flare 139 Groin pain 139 Anxiety 139 Abscess 139 Rectal problem 139 Anxiety 139 Abscess 139 Abscess 169 Cocaine use 175 Cellulitis 185 Rib pain 185 Chest pain 206 Fainted 206 Red eye 206 Cellulitis 206 Suicidal 48 48 49 72 79 80 84 84 84 84 84 184 204 215 215 215 265 Chest pain Abscess Muscle spasm Right sided endocarditis Assault Allergic reaction Pneumonia Callus on toe Pain Cough Tendon laceration Pancreatitis Vomiting Asthma Chest pain Motor vehicle accident Chest pain 227 242 246 246 256 256 256 256 256 256 313 316 316 316 316 316 324 285 336 373 399 Itching Chest pain Epidural abscess Assault 361 362 362 364 556 Upper respiratory infection Abdominal pain, left against 606 medical advise 606 Schizophrenia 662 Fever 662 Diarrhea 662 Vomiting 662 Vomiting 662 Vomiting 662 Hypokalemia 662 diarrhea 749 Clostridium difficile 749 Clostridium difficile 749 Clostridium difficile 749 Nausea and vomiting 749 Clostridium difficile 749 Shingles 755 Fever Pancreatitis SBO Unstable angina Pneumonia Skin abscess Skin abscess Skin abscess Wound check Infusion reaction Skin abscess Epididymitis / orchitis Facial contusion Upper respiratory tract infection Scrotal abscess Scrotal abscess Assault Pneumonia Chronic obstructive pulmonary disease exacerbation Headache Headache Otitis media 404 Syncope 404 409 413 473 473 473 473 500 500 500 511 514 527 561 688 688 Cellulitis Chest pain Rash Suicidal ideation Suicidal ideation Suicidal ideation Back pain Seizure Altered mental status Dehydration Upper respiratory tract infection diarrhea Upper respiratory tract infection Wrist sprain Compression fracture Compression fracture 763 788 817 949 949 949 949 949 992 992 992 Chronic pain, medication refill Pneumonia Alcohol intoxication Foot callus Foot pain Laceration of hand Cough Pneumonia Shortness of breath Altered mental status Chest pain 696 696 696 696 698 704 724 803 845 999 Nausea and vomiting Chest pain Nausea and vomiting Nausea Eye keratitis AIDS rule out infection Back pain Chest pain Abdominal pain Dehydration Table S3. Specific Hospital Diagnoses for Opioid and Non-opioid cohorts. 594 594 634 634 Opioid cohort Hospital Diagnosis Gastroenteritis Pneumonia Clostridium difficile Cellulitis Pulmonary embolism Total hip arthroplasty surgery AVN Surgery Altered mental status QT Prolongation Pneumonia Back surgery Pneumonia Pneumonia Pneumonia Buttox infection Right sided endocarditis AVN Surgery Pneumonia Pancreatitis Pulmonary embolism Pneumonia Atypical Chest pain Obstructing gastric ulcer Epidural abscess Agitations secondary to substance abuse Dehydration Feeling poorly Ascites 662 662 662 662 662 Diarrhea Diarrhea/vomiting Central line infection Diarrhea/vomiting Failure to thrive Patient ID 14 20 20 30 31 31 31 35 35 35 43 43 43 48 48 72 83 84 184 285 286 336 343 373 662 Failure to thrive Patient ID 24 24 24 78 78 78 78 131 175 227 242 246 246 256 256 316 324 362 404 404 500 500 500 597 600 688 696 696 704 724 770 770 845 Non-opioid cohort Hospital Diagnosis Endocarditis Abdominal pain Nausea and vomiting Seizure Seizure Foreign body in rectum Altered mental status Pregnancy Cellulitis Pancreatitis Small bowel obstruction Unstable angina Pneumonia Skin abscesses Fe infusion reaction Scrotal abscess/cellulitis Pneumonia Overmedication Cellulitis Syncope Altered mental status Seizure Altered mental status Carotid endarterctomy Coronary artery disease, stenting compression fracture Viral gastroenteritis Pneumocystis pneumonia Neck fullness Spastic paraparesis Pneumocystis pneumonia Diarrhea Hypotension Disseminated Mycobacterium avium 845 intracellulare complex 662 662 662 749 749 749 749 749 749 749 749 755 788 949 992 992 992 Hypokalemia Diarrhea Diarrhea Clostridium difficile Varicella zoster, disseminated Altered Mental status Clostridium difficile Diarrhea Clostridium difficile Klebsiella pneumonia bacteremia Clostridium difficile Fever of unknown origin Bronchitis Pneumonia Right breast abscess Gastroenteritis Altered Mental status 845 914 932 999 1094 Disseminated Mycobacterium avium intracellulare complex Pneumonia Bursitis Failure to thrive Influenza Pneumonia