ATLANTA (AP) — Georgia lawmakers have reached a compromise on a bill that would require doctors to log into a pill-tracking database before prescribing painkillers and other high-risk drugs. The goal is to curtail the overprescribing of opioids.

But critics say loopholes written into the proposal would create a false sense of accomplishment while leaving patients exposed to harm. Physician groups counter that the exceptions are necessary to reduce the burden on already strained doctors.

"Let's be clear: checking the prescription drug monitoring database isn't about reducing access to needed pain medicine, it's about making prescriptions safer," said former CDC Director Tom Frieden.

The Senate will discuss and likely vote on the proposal Wednesday.

The bill only requires doctors to check the database before prescribing opioids, it does not include any restrictions on the actual prescriptions that the physician chooses to write. Doctors can delegate the ability to check the database to a physician assistant so that they can spend more time on patient care.

"This is not about limiting the number of pills a person can get. That's up to the doctor," said Gary Mendell, the CEO of the non-profit Shatterproof, which lobbies state governments to tighten prescribing standards for addictive drugs. "The only thing we're asking is that he or an assistant checks the database so that the doctor has the necessary information of what to prescribe safely."

Mendell added that the database also would help doctors to know if their patient might be on a benzodiazepine for mental health issues. The combination of that drug and opioids can be deadly.

The bill would exempt outpatient surgery, allowing doctors to prescribe up to a ten-day supply of opioids without referencing the database.

Frieden said that such an exception "makes no sense at all" and noted a report released last week that found a significant increase in the risk of addiction after five days of use. The authors recommended that doctors try to limit prescriptions to less than three days.

Another exception would allow doctors to write three-day prescriptions, for instance in an emergency room, without referencing the database. Neither Frieden nor Mendell had a problem with that but they want the bill to specify that those would be one-time prescriptions with no refills allowed.

Physician advocacy groups such as the Medical Association of Georgia said the exemptions are fair.

"It is burdensome to require a check on all the patients when the doctors have a relationship and know if their patients are at risk for addiction," said Donald J. Palmisano Jr., the executive director and CEO of the Medical Association of Georgia.

He said his group would rather wait until the system is working well rather than asking doctors to take additional time to run their patient through the database.

Sen. Renee Unterman, R-Buford, was the author of the original bill with fewer exceptions but made concessions after realizing that the lobbying efforts were against her. Both Frieden and Mendell supported that bill.

"The political reality is that we're likely to have a watered-down version that passes," she said.