You could have taken some painkillers and still gone.
Just because you have a legitimate reason it doesn't mean your friend won't think less of you or question your friendship.
It's too coincidental that you couldn't meet up 4 times, and he'll know that you've lied at least once, and will question any excuse you give. You've made yourself the boy who cried wolf.
This.
Your friend's trust in you is lessening.
Try not to keep this up.