Patients diagnosed with conditions like anxiety and sleep disorders have become caught in the crosshairs of America’s opioid crisis, as secret policies mandated by a national opioid settlement have turned filling legitimate prescriptions into a major headache.

In July, limits went into effect that flag and sometimes block pharmacies’ orders of controlled substances such as Adderall and Xanax when they exceed a certain threshold. The requirement stems from a 2021 settlement with the U.S.’s three largest drug distributors — AmerisourceBergen, Cardinal Health, and McKesson. But pharmacists said it curtails their ability to fill prescriptions for many different types of controlled substances — not just opioids.

Independent pharmacists said the rules force them come up with creative workarounds. Sometimes, they must send patients on frustrating journeys to find pharmacies that haven’t yet exceeded their caps in order to buy prescribed medicines.