Death is certain. Too often an accurate accounting of the events leading to it is not. When a person dies, a doctor, medical examiner or coroner must fill out a certificate listing the cause of death and the underlying factors that helped to bring it about. Too often, however, these forms are riddled with problems. When a drunk driver dies in a car accident, for example, the fact that alcohol was involved is frequently not noted. Neither are other factors that carry stigmas, such as suicide and medical errors. Tens of thousands of antibiotic-resistant bacterial infections similarly fly under the radar.

These problems give us a distorted picture of our nation's health. Failure to understand why we are dying may mean that our money and medical resources are not always going to the right places. And we already know why the mistakes happen, as well as ways to fix them.

The forms themselves are a major cause. States, counties and some cities have their own record-keeping systems, and even now one state—West Virginia—has not yet switched over to a standardized certificate created in 2003. Another reason is that the forms are filled out incompletely or inaccurately. A death certificate may record that a person died from, say, “lung cancer” when actually the tumor had metastasized from the ovaries, thus inflating the statistic for one type of cancer at the expense of another.

The person who fills out a death certificate can make matters worse. He or she may not be a doctor or other medical professional. For example, one review indicates that in 241 of Texas's 254 counties, covering 60 percent of the state's population, a death outside the hospital is usually handled by the elected justice of the peace—the same person who oversees traffic violations. Most justices are law-enforcement officers or educators with little mandated training about death certificates. They are supposed to consult with medical professionals, but at times they do not. Nationally, the latest published numbers suggest that 28 states have coroners instead of trained medical examiners in one or more counties.

The problems extend beyond lack of training and inconsistency in death certificates. Even on the standardized forms, there is no formal “check box” to record crucial factors such as suicide or antibiotic-resistant infection. Reuters recently worked with the Centers for Disease Control and Prevention to scan the text of death certificates for clues about deaths linked to resistant bacteria. Their findings were startling: between 2003 and 2014, there were 180,000 such deaths.

Alcohol-related deaths apparently go undocumented, too. One analysis of death certificates from 1999 to 2009 found that, officially, only about 3 percent of traffic deaths were linked to alcohol—yet national traffic safety records indicate the number was seven times greater. A recent study published in BMJ suggested that weak coding on death certificates allows medical errors to remain hidden when they should be recognized as the third leading cause of death in the U.S. (The CDC disputes that number and maintains that most underreporting of errors stems from litigation concerns or reluctance to admit wrongdoing.)

Better training is a proved way to attack some of these issues. About a dozen years ago New York City claimed that people died from coronary heart disease at 1.7 times the national rate. But when the city required physicians to undergo training on filling out the forms, those numbers dropped. Doctors reported more accurate details in other areas, too, including deaths caused by serious infections. Other cities and states should follow suit. Such training should start in medical schools and be offered throughout physicians' careers. Already there are efforts under way to create continuing education credits for this type of training. These efforts should be more widespread. States and counties should also better enforce regulations requiring nonmedical professionals to consult with people who are doctors when it comes to these forms.

Another fix: electronic death certificates. Adopting them would speed up the transfer of information into a national database and would also permit the creation of automatic pop-up boxes that would demand more complete information. For example, such boxes would not let “lung cancer” be entered as the cause of death unless the user listed the original site of the cancer. This practice need not compromise patient privacy: this year the CDC expects to launch a pilot project that will remove personal identifiers on death certificates so that they can be more readily studied by researchers without raising ethical concerns.

Once we have better information on the causes of death, we can make better decisions about when and how to spend our research and health care dollars. Understanding what kills us will help keep us healthier.