I though, If you are in hospital whilst your visa runs out (you will be overstaying before you can get to immigration for an extension of stay) but with the doctors certificate you go to immigration to get a (backdated) extention of stay. You will not be fined Overstay.