In this randomized controlled trial, medically hospitalized opioid dependent patients will be assigned to a "treatment as usual" group, where they will receive a detox regiment of Suboxone during their hospital stay, or a "linkage" group, where they receive a maintenance course of Suboxone during their hospital stay, and appointment post-discharge with an outpatient Suboxone clinic/provider and a Suboxone prescription to use between discharge and this appointment. Study interviews are completed at baseline, and 1, 3- and 6-months post-baseline. Primary outcomes are opioid use and HIV risk behavior.