Hi Jade,

to NT.
Call your doctor and report the incident with the pain pills and ask for something different. Offer to turn in the remainder of the bad pills (as a gesture of good faith that you're not just drug-seeking [
and I'm not implying/suggesting that you are!]) There's no reason you should have to go through this in pain.
Google:
talk doctor pain
It might help to post a list of supplements you're taking; there should be some calcium stuff and vit. D for bones (have you been tested for osteoporosis?) and something like Glucosamine & Chondroitin for joints.
When you're recoverd & healed enough from surgery, physical therapy may help, and is usually first-line therapy prescribed.
This is a process, and may take some time, so let's see if we can address the pain first.
Doc