Your boss never heard of FMLA I take it. What he did is not legal. You have a right to have a medical leave. My last job was at an auto parts store and even they knew about FMLA. Could there be another reason for the firing? My main job(that I had retired from) was a union represented job and none of that ever happened. I still have my insurance from that job and they have already approved my surgery even though a day hasn't been set yet.
I wish you good luck. Maybe you need to get a lawyer if you really want the job back.