A doctor may prescribe opioid medications to manage pain after surgery or traumatic injury. They may also prescribe them for longer than several weeks to manage chronic conditions, such as ...