Does "reaction" mean the same thing in these two sentences?

When I last tried to eat strawberries I had a terrible allergic reaction.

A bad reaction to the medicine.
the same meaning