By SUMMER BALLENTINE, Associated Press

JEFFERSON CITY, Mo. (AP) — The Missouri Senate on Thursday passed a bill to create a statewide prescription drug tracking database, which could bring Missouri into line with every other state.

Senators voted 20-13 in favor of a database to track when prescriptions for controlled substances are written and filled. The goal of such programs is to prevent so-called doctor shopping, when people go to multiple doctors to get prescriptions for opioid drugs and painkillers.

The bill is sponsored by Sen. Rob Schaaf, who has been one of the fiercest critics of a monitoring program. But he said his version includes enough security to ensure patient data is protected.

"It's about privacy," the St. Joseph Republican said. "It's always been about privacy."

Schaaf's bill would create a system that would either give doctors and pharmacists the green light or warn of signs of potential abuse. If the database shows the patient has in the past 180 days seen another doctor or pharmacist, users could type in the last four digits of their Social Security numbers to see more detailed records and decide whether to deny drugs. Prescription data could only be kept for 180 days before being purged.

While pain management specialists would be required to submit records of prescriptions to the database, other prescribers would not.

Republican Rep. Holly Rehder, who has pushed for a prescription drug monitoring program for years and is sponsoring her own version, said she's not sure if it's possible to create the kind of system outlined in Schaaf's proposal.

She also raised concerns about more restricted access for doctors to patient records.

"The most important part is for your physician to be able to spot those early signs of addiction," Rehder said, adding it's also helpful for doctors to see "if they're writing you a prescription that's going to counteract with something you're already taking or if you've been to other doctors."

The measure also would undo local prescription drug monitoring programs, which some counties are adopting in response to inaction on the state level.

"I just don't trust it," said Senate Minority Leader Gina Walsh, whose home of St. Louis County is creating a local program. "I know he's (Schaaf) always been against having one, and I don't trust that his is better than ours."

Legislative researchers estimate Schaaf's program could cost close to $6.7 million in general revenue in fiscal year 2019, the first full year it would be in effect.

Schaaf said he's proposing more changes he hopes the House will adopt to take down the cost.