Energy drinks can be OK in moderation, but when you drink too many in one day, your health can suffer.

A construction worker recently went to the hospital after having abdominal pain, nausea and vomiting. He thought he had the flu, but when his skin started turning yellow and his urine became dark, he realized it wasn't the normal illness, CBS News reported.

Emergency room doctors asked him about his habits, what he ate and drank, even recreational drug use.

The man said he didn't drink alcohol, smoke or use drugs but he had been drinking five energy drinks a day, the medical journal BMJ reported.

Blood tests showed he had elevated liver enzymes that showed liver damage. A biopsy showed he had acute hepatitis.

>> Read more trending stories  

Energy drinks usually have a mix of B vitamins and what companies call an energy blend that includes caffeine.

Doctors said they attributed the hepatitis to high levels of vitamin B3, also known as niacin, in the drink. Each bottle the man drank had 40 milligrams of niacin, double the recommended amount for a day. It added up to about 160 to 200 milligrams of niacin a day for at least three weeks, the study found.

There was one other documented case of liver damage from drinking too many energy drinks.

That person consumed about 300 milligrams a day.

The construction worker had also been infected with hepatitis C at one point in his life. Hepatitis C is a virus that can be spread through sex, blood transfusions or sharing needles. Doctors said the man's previous condition may have left him predisposed to more liver damage from too much niacin.

Doctors said that anyone with chronic liver disease should speak with their providers before using supplements. They also suggest that anyone born between 1945 and 1965 be tested for hepatitis C since many people in that age group are not aware they could be infected, CBS News reported.

Energy drink companies stand by the safety of their products.