Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

In a refrigerator in the coroner’s office in Marion County, Ind., rows of vials await testing. They contain blood, urine and vitreous, the fluid collected from inside a human eye.

Needles used for shooting heroin and other opioids along with other paraphernalia litter the ground in a park in the Kensington section of Philadelphia, Pennsylvania, on Oct. 26, 2017. Charles Mostoller / Reuters file

In overdose cases, the fluids may contain clues for investigators.

“We send that off to a toxicology lab to be tested for what we call drugs of abuse,” said Alfie Ballew, chief deputy coroner. The results often include drugs such as cocaine, heroin, fentanyl or prescription pharmaceuticals.

After testing, coroners typically make note of the drugs involved in an overdose on the death certificate — but not always.

Standards for how to investigate and report on overdoses vary widely across states and counties. As a result, opioid overdose deaths aren’t always captured in the data reported to the federal government. The country undercounts opioid-related overdoses by 20 to 35 percent, according to a study published in February in the journal Addiction.

“We have a real crisis, and one of the things we need to invest in, if we’re going to make progress, is getting better information,” said Christopher Ruhm, the author of the paper and a health economist at the University of Virginia.

Data from death certificates move from coroners and medical examiners to states and eventually the Centers for Disease Control and Prevention, which publishes reports on overdose counts across the U.S. According to the CDC, more than 42,000 people died from opioid-related overdoses in 2016, a 30 percent increase from the year before.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

But that number is only as good as the data states submit to the CDC. Ruhm said the real number of opioid overdose deaths is closer to 50,000. He came to the higher estimate through an analysis of overdoses that weren’t linked to specific drugs.

On a death certificate, coroners and medical examiners often leave out exactly which drug or drugs contributed to a death. “In some cases, they’re classifying it as a drug death, but they don’t list the kind of drug that was involved,” said Ruhm. In the years he reviewed in his paper, 1999 to 2015, investigators didn’t specify a drug in one-sixth to one-quarter of overdose deaths.

Some states do worse than others. In 14 states, between 20 and 48 percent of all overdose deaths weren’t attributed to specific drugs in 2016, according to a breakdown from FiveThirtyEight.

Many overdoses not linked to a specific drug were likely opioid-related, Ruhm said, so the lack of specificity leads to undercounting. According to Ruhm’s earlier research published in 2017, Indiana’s opioid overdose fatality rate is especially far off. He estimated the state’s rate in 2014 was 14.3 overdose deaths per 100,000 people, twice as high as the rate reported that year.

In some states such as Indiana, independent county coroners investigate deaths. Coroners are usually elected, and they aren’t necessarily medical professionals. Other states, though, have medical examiners, who are doctors. Some even have a chief medical examiner who oversees death investigations for the whole state.

“States that have centralized oversight with medical examiners tend to do better than those with coroners,” said Ruhm.

In some places, death investigators don’t list substances on a death certificate because they haven’t tested for them. Brad Ray, a policy researcher at Indiana University’s School of Public and Environmental Affairs, said toxicology reports cost hundreds of dollars each, which could strain county budgets.

Additionally, toxicology reports are currently optional for Indiana coroners. “So if you’re not required to pay for it, and you’re not required to report it, why would you?” said Ray.

Indiana’s legislature recently passed a bill to standardize how coroners handle suspected overdoses, and Republican Gov. Eric Holcomb is expected to sign it. Starting in July, coroners will have to run toxicology screens and report the results to the state health department. The state will also help cover the added costs.

“States that have centralized oversight with medical examiners tend to do better than those with coroners.”

Data that is more accurate would likely make the opioid problem look worse as the numbers go up. But Ray said realistic data could help the state access federal funds to tackle the opioid epidemic and keep better track of drug problems.

“So we can see when trends are happening. We can see when there tend to be increases in cocaine and meth and decreases in opioids, if that happens,” Ray said.

Marion County’s Ballew learned at a conference last year that she could help improve the state’s data. Her office was already getting toxicology reports for all suspected overdoses, and now her team will list the drugs involved in an overdose on the death certificate.

“We’ll say ‘drug overdose’ or ‘drug intoxication,’ and then we identify the drugs,” she said. “So if it’s five drugs that have caused or contributed to the death, then we put those five drugs down.”

Ballew said she plans to travel the state and train other coroners to do it the same way.

This story is part of a partnership that includes Side Effects Public Media, NPR and Kaiser Health News.

This story was written by Jake Harper and contributed by Kaiser Health News, a national health policy news service that is an editorially independent part of the Henry J. Kaiser Family Foundation, a nonprofit, nonpartisan health policy research and communication organization not affiliated with Kaiser Permanente.