Speak to doctor that treated you in hospital and tell him your situation that you was to fly out in 5 days and ask if he will write a letter requesting that you need an extension ,and need follow up appointment you will need him to say that also .than take it to immigration before your days are up .
I was able to get an extension ( 5 months ) though I had 2 broken arms 😊
I was in a international private hospital in Ao Nang Krabi and I had to have someone with me the whole time I had to stay in the ICU until someone came and than I was moved to a private room and that person had to stay with me until I was discharged.