OxyContin pills. (Toby Talbot/Associated Press)

Doctors have gotten a bad rap as addictions to prescription painkillers have ravaged communities throughout the country. As the critique typically goes, the medical community helped make the United States the top country in terms of opioid consumption — which, in turn, gave way to a surge in addiction and overdoses.

That’s not necessarily fair. Research has consistently shown showing that under the right medical supervision, the vast majority of opioid prescriptions do not result in addiction or heroin use. But a new paper circulated by the National Bureau of Economic Research does show that doctors could contribute substantially to the fight against opioid abuse — just by looking up patient prescription histories.

As the opioid epidemic gained momentum, most states implemented “prescription drug monitoring programs,” which collected Medicare data on prescriptions for controlled substances. The idea was to figure out which patients were abusing the drugs by “doctor-shopping” — going to multiple doctors to get drugs at multiple location.

But each state designed these programs a bit differently: Some were built solely for law enforcement to access, but not health providers. Others simply encouraged providers to access the data. Ten states specifically required health providers to look up more information about their patients before giving them painkillers.

The result? Only states with “must-access” programs saw doctor-shopping fall substantially. The number of people receiving drugs from five or more prescribers fells by 8 percent, and the number of people receiving drugs from five or more pharmacies dropped 15 percent. In fact, the study’s authors estimate that implementing “must-access” programs in every state would save $174 million in Medicare drug spending every six months.

The data is limited because it doesn’t tell researchers what happens to the drugs after they’re prescribed. Legitimate patients will take the pills as instructed, but others might sell the drugs or give them to people for whom the prescriptions weren’t intended.

But “the monitoring programs make the physicians aware that there are patients showing up for drug-seeking reasons,” said Thomas C. Buchmueller, a health economist and professor at the University of Michigan and co-author of the paper. “It’s a red flag.”

Buchmueller suggests that must-access programs could make the lives of health providers themselves easier. Many physicians find themselves in a tough position: They want to help people in pain, but they don’t want to contribute to the opioid crisis by putting more painkillers into black markets. Having more information could help root out the people who are truly abusing the system.

Why does this matter? In 2012 alone, physicians wrote enough prescriptions to give every American adult their own bottle of opioids. Four in five new heroin users over the past decade first became addicted by misusing prescription painkillers. Putting a check on how many prescriptions we give to people could help stem the flood of painkillers in the United States.

This is not to say that better prescription monitoring will solve the opioid epidemic. Research suggests that opioid abuse is strongly linked to mental-health issues and economic insecurity, meaning that crafting policy to deal with the crisis is far more complicated than simply tweaking how the drugs are prescribed.

Still, it’s not bad practice for doctors to make sure the products they’re prescribing are going to people who actually need them. States should welcome any measure that could prevent more needless deaths.

Read more:

The opioid epidemic could turn into a pandemic if we’re not careful

Why people should be able to buy drugs approved in other countries

It’s time we finally offer over-the-counter birth control pills

The great mystery of e-cigarettes