Narcotic pain medications can often make it more difficult to urinate, depending on the strength and the type of the drug, the effects can be increasingly more adverse.
There are some side effects for the urthera when you use pills for intercouse. Azithromycin causes pain to the abdomen and the urethra gets effected. By taking pain killer very often it effects the kidney and in turn the urethara also gets weak and causes pain will be very severe.
You would have to talk to your doctor about the effects of taking poain meds, the doctor can tell you about some of the side effects. Or when you go to the drug store you could ask the person that is filling your meds.