A new study out in the Journal of the American Medical Society found that state laws limiting opioid prescriptions had mixed results.

The study looked at two states that implemented opioid prescribing deadlines – Massachusetts and Connecticut. Both have seven-day limits on initial opioid prescriptions with some exceptions.

Study authors from Emory University analyzed data from 16,281 patients who received an opioid prescription within three days of a surgery between June 2014 and November 2017.

In Massachusetts, patients were prescribed a lower dosage and for fewer days than before the law went into effect in 2016. There were no changes in Connecticut.

Study authors say doctors might be working around the laws and post-dating prescriptions so that patients still get opioids after that seven-day limit is up. The authors suggest hospitals could institute their own limits.

Kentucky passed a law in 2017 that is more restrictive than Connecticut and Massachusetts. Kentucky patients can only be prescribed three days of opioids for acute pain. A majority of opioids prescribed for use after surgery aren’t taken by the patient, putting them at risk of being diverted and abused

Thirty-one states have opioid prescribing laws that were implemented after the Centers for Disease Control and Prevention in 2016 published opioid prescribing guidelines for acute pain.