 My grandmother was unwell for a very long time and suffering from extreme pain. She and her doctors were fully aware that she was addicted to the medication, but she wasn't going to ever recover anyway so this was the best they could do.  