People who regularly take opioid painkillers such as Vicodin and OxyContin for nonmedical reasons are more likely to get the medication from a doctor than from a friend or other sources, a new study finds.