In letters to state regulatory boards and in interviews with The New York Times, many pharmacists at companies like CVS, Rite Aid and Walgreens described understaffed and chaotic workplaces where they said it had become difficult to perform their jobs safely, putting the public at risk of medication errors.

They struggle to fill prescriptions, give flu shots, tend the drive-through, answer phones, work the register, counsel patients and call doctors and insurance companies, they said — all the while racing to meet corporate performance metrics that they characterized as unreasonable and unsafe in an industry squeezed to do more with less.

“I am a danger to the public working for CVS,” one pharmacist wrote in an anonymous letter to the Texas State Board of Pharmacy in April.

“The amount of busywork we must do while verifying prescriptions is absolutely dangerous,” another wrote to the Pennsylvania board in February. “Mistakes are going to be made and the patients are going to be the ones suffering.”

[Read how you can protect yourself against medication errors.]

State boards and associations in at least two dozen states have heard from distraught pharmacists, interviews and records show, while some doctors complain that pharmacies bombard them with requests for refills that patients have not asked for and should not receive. Such refills are closely tracked by pharmacy chains and can factor into employee bonuses.