Your friend (or someone who can communicate for him) needs to contact the hospital and ask for an Extension of Stay Based on Unable to Travel due to Medical Reasons. This is a
*****
/90 day extension of stay, and costs 1,900 THB. The hospital can acquire this extension for your friend.