ALBANY, N.Y. — New York lawmakers are considering legislation that would limit the amount of prescription opioid drugs patients can get after an initial visit to the doctor’s office, part of an effort to curb a statewide addiction crisis.

The bill would allow patients five days-worth of short-term prescription painkillers such as Oxycontin and hydrocodone to treat acute pain from procedures such as recovery from surgery. Patients would need another consultation with a doctor to get more medication.

Advocates say the limit would prevent distribution of unneeded pills that can end up being sold or left for anyone in a household to use.

But opponents, including the Medical Society of the State of New York, say the potential limit would inhibit physicians’ ability to exercise their best judgment when dealing with patients.