Nearly 30 percent of opioids prescribed by doctors failed to show a clinical reason for the patient to take them, a new report found, shedding light on roles doctors might play in America’s opioid epidemic.

The analysis inspected data from the National Ambulatory Medical Care Survey on opioid prescriptions handed out by doctors between 2006 and 2015.

Of the 809 million doctor visits where an opioid was prescribed, 66 percents were to treat non-cancer pain. Five percent were for cancer-related pain, while the remaining 28.5 percent did not show a record of pain or a condition causing pain.

“Transparency in clinical decision-making is predicated on proper documentation that clearly spells out the reason for giving a patient opioids and can limit inappropriate prescriptions and curb excessive use of these potent drugs,” said Nicole Maestas, associate professor of health care policy at Harvard Medical School, in a statement.

Results of the analysis from Harvard Medical School and the Rand Corporation appear in the journal Annals of Internal Medicine.

The most common non-cancer conditions listed were back pain, diabetes and other chronic pain.

Researchers cite documentation standards as a potential reason for the rise in opioid use over the last 20 years. Authors of the study hope policymakers consider systems to help document prescription use more efficiently.

“Whatever the reasons, lack of robust documentation undermines our efforts to understand physician prescribing patterns and curtails our ability to stem overprescribing,” said study author Tisamarie Sherry, a Harvard Medical School instructor and RAND researcher, in a statement.

Last year, the Department of Health and Human Services declared a public health emergency regarding the spike in opioid overdoses. In 2016, 116 people died each day from opioid-related drug overdoses, according to HHS.