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.
The ask:thailand community, consisting of multiple Q/A groups with over 100,000 members, powers this platform. It is not an official government resource. Our members actively contribute to this resource, and while we strive for accuracy, we cannot guarantee its complete reliability. Assistance to travelers is provided as a community service.