Hospitals in some states, including New Mexico, Texas and Wyoming, have developed prescription painkiller tracking systems tailored to emergency rooms, NPR reports. The systems are designed to reduce prescription drug abuse.

Some people seeking painkillers repeatedly visit the ER because it has become more difficult to obtain the drugs from doctors. Every state except Missouri now has a drug monitoring database that allows doctors to look up the prescription history of patients.

At the emergency room of Cheyenne Regional Medical Center in Wyoming, the hospital’s new system takes the decision about whether to prescribe painkillers to patients who may be abusing the drugs out of the hands of the doctor on duty. A hospital panel made up of doctors and administrators will meet monthly to decide whether patients flagged for unhealthy behavior should be labeled abusers.

When a patient is flagged, the hospital will send them a certified letter stating they will not be prescribed painkillers for anything other than a dire emergency, the article notes. Bold red letters appear on patients’ electronic medical records when they are flagged as abusing prescription painkillers.

A similar program has had a big impact at San Juan Regional Medical Center in Farmington, New Mexico. According to Dr. Eric Ketcham, who helped create the system, the hospital has reduced the number of ER visits by 5 percent annually. Since many people seeking painkillers didn’t have insurance, eliminating their repeat visits saved the hospital about $500,000 a year.

Dr. Alex Rosenau, past president of the American College of Emergency Physicians, warns that these new programs may discourage doctors from providing painkillers when they are really needed. “If somebody is an abuser of Vicodin or one of these other medicines … if they break a leg or break an arm, they’re still going to need medicine to reduce their pain,” he said.