About 10 percent of people who have a heart attack have undiagnosed diabetes.

Researchers looked at data on 2,854 heart attack victims who had not been diagnosed with diabetes, an American Heart Association news release via EIN news reported.

The research team looked at the patients' A1C levels, which determined blood sugar.

Out of the participants 287 were found to be diabetic through the A1C test; they had not known about their condition beforehand. Less than a third of these patients had received education or medication related to diabetes when they were discharged from the hospital.

In 69 percent of the undiagnosed cases medical providers had failed to identify the patients' condition. Six months after discharge less than seven percent of the patients whose diabetes was not recognized during their hospital stay were on medication for the disease; 71 percent of the patients whose condition was recognized during their stay were on diabetes medication.

Diabetes causes blood sugar to spike, which can significantly raise heart attack risk.

"Diagnosing diabetes in patients who have had a heart attack is important because of the role diabetes plays in heart disease," Suzanne V. Arnold, M.D., M.H.A., the study's lead author and assistant professor at Saint Luke's Mid America Heart Institute and the University of Missouri at Kansas City, said in the news release. "By recognizing and treating diabetes early, we may be able to prevent additional cardiovascular complications through diet, weight loss and lifestyle changes in addition to taking medications. Another important reason to diagnose diabetes at the time of heart attack is that it can guide the treatments for the patient's coronary artery disease."

The researchers urge anyone who has had a heart attack to ask for a diabetes test and take into account diabetes risk factors such as weight and family history.