Perhaps the one good thing about an overdose is that it might scare a drug abuser into going straight. But new research shows that's usually not the case.

The number of people filling painkiller prescriptions in the six months after treatment for an opioid overdose declined about 10 percent, according to a study of Pennsylvania Medicaid records published Tuesday. Meanwhile, rates of medication-assisted treatment, considered the gold standard for opioid addiction, went up 12 percent.

The findings signal "a relatively weak health-system response to a life-threatening event," the authors wrote.

For long-term users of opioids, many of them in denial of their addiction or terrified of painful withdrawal, landing in a hospital after an overdose provides a rare opportunity for health workers to intervene and get them into treatment. It also could be a time to reflect and perhaps act upon their near-death experience. Those are the theories, anyway.

"We had hoped to see a greater response," said Julie M. Donohue, an associate professor at the University of Pittsburgh Graduate School of Public Health and senior author of the study.

She was not surprised by the results, however, in part because studies of patients covered by private health insurance plans have found similarly small responses. Low-income and disabled people covered by Medicaid often have multiple and more serious health conditions in addition to addiction, especially mental illness, and are at greater risk of a drug overdose.

The number of overdoses that don't end in death is difficult to estimate. Someone who is overdosing may be revived by a buddy carrying the emergency reversal medication naloxone. Paramedics may administer the same antidote and then fail to persuade the patient to go to the hospital for a follow-up visit that might lead to drug treatment, often because the patient is suffering withdrawal symptoms brought on by the medication and just wants to be left alone.  Emergency room physicians say people who do come in often walk out before they can be fully examined. In all these examples, the patients' overdoses may not be counted by health authorities.

But plenty are: Nearly 1.3 million Americans in 2014 were hospitalized or treated in emergency rooms for abuse of opioids, including prescription painkillers and illegal drugs such as heroin, according to the most recent federal statistics. In Pennsylvania, admissions for heroin overdose alone increased two-thirds from 2014 to 2016, the Pennsylvania Health Care Cost Containment Council reported in June.

The University of Pittsburgh research, published as a letter in JAMA, relied on state Medicaid-claims data for treatment of nonfatal overdoses. Measures of opioid use were based on prescriptions filled and could not count drugs purchased with cash, bought on the street or given by friends and relatives, although other research has found that most people on opioids had a physician's prescription.

There were 13,670 Pennsylvania Medicaid patients ages 12 to 64 with "an overdose event" between 2008 and 2013, the period covered by the study, which included only the 6,013 who were continuously enrolled for six months before and after.

Of patients who overdosed on prescription opioids, claims data showed that 66.1 percent had filled prescriptions earlier — the rest would have gotten the drugs from other sources, Donohue said — and 59.6 percent afterward, a drop equal to about 10 percent. Of those who overdosed on heroin, 43.2 percent had filled opioid prescriptions before and 39.7 percent after, a decline equal to about 8 percent.

One-third of patients who survived a heroin overdose were getting medication-assisted treatment — methadone, buprenorphine, or naltrexone — as were one-sixth of those who had overdosed on prescription opioids. Both represented increases of about 12 percent.

"What really stands out," said David K. Kelley, chief medical officer for Pennsylvania's medical assistance programs, including Medicaid, was that enrollees who had overdosed "continued to be able to get medications prescribed." That suggested the possibility of  "a disconnect between what happens in the ER" and what gets reported to their primary care provider, he said.

State and federal privacy laws are especially strict when alcohol and drug abuse is involved, Kelley said, and hospitals cannot inform outside physicians — and, in some circumstances, even other departments in their own system — without a patient's written permission.

Kelley, whose office provided the data for the study, but who was not involved with the analysis, agreed with the authors that the arrival of overdose patients in ERs was a key missed opportunity to get them into treatment programs.

The state has been working with hospitals and county governments to set up warm handoffs — transferring a patient directly from the ER to a treatment program but most are unable to do so. Waiting days or weeks for admission gives time for any motivation created by the overdose  to dissipate and makes the risk of another high. Kelley said he also would like to see emergency departments start overdose patients on buprenorphine, the medication-assisted treatment that is commonly sold as suboxone, a strategy that has been pioneered in New England.

He said Pennsylvania's Medicaid program has seen "a nice uptick" in prescriptions for the opioid overdose-reversal medication naloxone — a tenfold spending increase just last year, according to the Urban Institute.  Kelley said his office was working with Medicaid's managed-care organizations to identify patients at high risk of opioid overdose. Among them: those who are receiving high dosages or are also prescribed benzodiazepines, antianxiety medicines that can increase the chance of an overdose if taken with painkillers. When those patients' doctors seek prior authorization for the opioid prescriptions, they would also get a reminder to consider prescribing naloxone as well.

All of this — as well as the Affordable Care Act's expansion of Medicaid, which has dramatically increased the number of drug users receiving medication-assisted treatment — has taken place in the years after the data were collected for the University of Pittsburgh study. But illicit fentanyl has also arrived in large quantities over the same period, often mixed with heroin and other street drugs, making overdoses more deadly.

Donohue, the senior author, speculated that new data would likely show only a "slight improvement" in how the health-care system responds to near-fatal overdose.

Patients, too, aren't likely to have changed their behavior.

"You hope that the episode was alarming enough to motivate them to follow up," said Regan P. Kelly, president and CEO of NET Centers, a regional nonprofit treatment organization. But addiction is a "disease that gets hold of your brain and you can really talk yourself out of treatment," she said, and "seek the drugs instead."