@Phil *****
Good Luck... I'm done replying. Clearly you are not listening to me.
The doctor that treated you IN THE HOSPITAL prepares a Medical Certificate Report...And in it requests Thai Immigration Officers to grant you 30, 60 or 90 days extension of stay for ongoing medical care. As you are NOT FIT TO FLY.
At the Thai Immigration office... you submit the Medical Report FROM the doctor...and hospital stamped Along with TM7 request for extension of stay.