Unless your boss is always like this, it is possible that he is feeling the strain of your absence. I am not saying that he acted or reacted in an understandable way, just that he might have been unusually insensitive due to pressures on him, and the sudden realisation that a member of his team is not able to be as reliable as previously taken for granted.
It is difficult to deal with, and it sounds as though he either has little experience of managing people and expectations, or is being bullied/harangued from above. It is good that you are discussing this with your HR dept, as he clearly needs to be reminded of his duties and responsibilities as a line manager. Nonetheless, you need to tread very carefully and do your job as best you can, as any shortfall would substantiate proceedings for dismissal. Whilst you wish him to understand your situation, perhaps you might also take time to appreciate his.