Hello!
It depens on the kind of event. If it was the typical "open" one where many people are invited, nothing to worry.
However, it if was an event with a limited invited list, then I would defenetly write HR explaining the reasons why you could not go, just in case.
Hope it helps! Cheers,
Clara