Pain during menstrual cycles are likely sign of gynecological pathology. Could be an ovarian issue or endometriosis for example. My recommendation is to see your OB/Gyn. She/he may order an ultrasound to assess the matter further. I know it's not as helpful when these answers tell you to see your doctor, but I hope the advice helped a little.
There are other meds that don't have that side effect such as NSAIDs. These are very helpful in relieving pain without causing addiction.
co-morbidities (other medical issues) and her current pain state. It may require him/her to start at a very low dose and increase slowly as needed. There are also many interventional procedures we can perform depending on the location of the pain which do not require opioid medication and provide good pain control.
1. A very light pain killer such as Tylenol #3, tramadol or nucynta.
2. NSAIDs such as meloxicam, ibuprofen, aleve, diclofenac or Tylenol
3. (DEPENDS ON WHICH JOINT YOU ARE HAVING REPLACED). Talk to your anesthesiologist about placing a nerve block with a catheter pump. This will work for about 3 days after your surgery (which are usually the worst pain wise). Most times anesthesiologists place a single shot block to help with pain immediately after the surgery and they last for about 8-10 hours post op. If they have the availability and expertise, they may also place a catheter next to the nerve and a pump filled with anesthetic which continues that block for 3 days. This option however depends on your surgeon and anesthesiologist. So ask about this before your surgery.
Hope the answer helped and good luck.