For most people with long term pain an opiate prescription is the wrong choice.
The patient ends up with an addiction of opiates; while taking dangerously large quantities of opiates; while still being in pain.
They've still got the pain; they now have two additional problems.
Most people with long term pain need access to pain management services which include other stuff (exercise, physiotherapy, weight loss, psychological therapies) as well as (if needed) opiates.