WOAH hold up people take a step back. How many of us have slipped up and been rude? Maybe he was having a terrible day. Maybe he truly believed you were skipping class.
As a teacher, I absolutely detest when people skip on text or quiz days. It is an unbelievable hassle to reschedule.
I think you should go talk to him in private and apologize for not letting him know in advance and promise that in the future you will make sure to have a doctors note and notify him before class that you will not be in attendance. (Even though there is nothing wrong with staying home when you are sick, just take the high road on this one)
When my students do that, I am very understanding and it shows the student respects my time and knows it is an inconvenience when students dont attend class.
He was out of line saying shut up to you. But do not complain about him yet. Wait until you have finished the course and then notify the head of the department he is in. They WILL take into account what you say, often people dont complain because they fear nothing will be done but I assure you that the administration does not allow that type of behavior and will address it accordingly.
So in the future:
When you feel ill, dont wait for the school to call you. Call the school, preferably email or call that particular teacher and let them know you are ill.
If you go to the doctor, ask the Dr. to write you a note.
When you return to class, find a day and time that is convenient for the teacher then for you. That way you will be on his good side (even if he is a bit moody)
Hope that helps.