that is a negative side effect of that drug, and she needs to be moved to a new pain killer. Pain killers need to kill or dimish pain, not cause pyschosis. A drug induced pyschosis is not fun to live through.
give her a gentle hug, once you are sure she wont rip your head off.
thats awful.