Patients not strictly taking opioids for pain relief after total hip or knee replacement can decrease their reliance on the drug and have fewer complications.