More than ninety percent of chronic pain patients hospitalized for an overdose of opioid painkillers continue to receive prescriptions for the drugs afterwards, a new study reveals.

Researchers analyzed a large commercial insurance claims database with information on 50 million people over a 12-year period. They found that almost 3,000 people who were prescribed opioids for chronic pain had been treated in the emergency department and/or as an inpatient after a nonfatal opioid overdose.

The Annals of Internal Medicine study reports that 91 percent continued to be prescribed opioids after an overdose event.

Get Breaking News Delivered to Your Inbox

"I was surprised. I thought we'd see a number that was shocking but this is more than we thought," said lead author Dr. Marc LaRochelle, an attending physician in the department of General Internal Medicine at Boston Medical Center, and assistant professor of medicine at Boston University School of Medicine.

LaRochelle said this puts patients at a high risk for experiencing another overdose. In fact, the research also indicated that after two years of follow-up, patients who continued taking high doses of opioids were twice as likely to have another overdose compared to those who stopped taking the drugs after their first overdose experience.

Seventy percent received prescriptions from the same health care provider who prescribed opioids before their first overdose, according to the study.

CDC statistics released this month show that opioids were involved in more than 28,600 deaths in the U.S. in 2014, accounting for 61 percent of all drug overdose deaths. The rate of opioid overdoses has tripled since 2000, the CDC said.

The research only included patients on private insurance and did not take into account those on Medicare and Medicaid who might also be vulnerable to opioid overdoses, said LaRochelle.

The study was primarily of patients prescribed the powerful drugs for musculoskeletal pain - such as lower back or knee pain, for example - not cancer patients.

LaRochelle said prescribing physicians should not be blamed, and that the numbers are more a sign of a broken health care system. Doctors who prescribe drugs such as Vicodin often aren't notified when a patient overdoses, and communication needs to be scaled up, he said.

"Patients may not be receiving emergency care where they receive outpatient care," he noted.

"We need to do something at a policy level and a system level to make sure information is being communicated and better tools are developed to identify and intervene on patients who have risky use and are at high risk for having problems."

LaRochelle said he believes the majority of doctors are practicing "in a good faith effort," but current tools to identify at-risk patients aren't picking them up. "It is very difficult to know who is getting benefits from the drugs and who is getting harmed from the drugs," he said.