@Kay ******
I'd say unless you're the immediate family OR have a signed power of attorney form you're unlikely to be able to get a medica extension of stay for your friend.
They'd have to go to the government complex out at Chaengwattana and apply on their own. (FWIW: there was an old lady wheeled in IN a hospital bed on oxygen last week). So you really have to go in person.
Have the facility that your friend is using call the immigration office and ask what's required and how to apply for a medical extension
Do it BEFORE they end up on overstay because once you're on overstay you cannot get a medical extension..