Each time the player is attacked you can use a condition to check if the player has equal to, or below 0 hp. Something like the following should be added to your attack procedure (If you have one that is).
if ( %hp% <= 0 ) then goto <Hospital> else ' do damage procedure
Oh, also make sure you use the correct variable format, otherwise it won't work properly. Something like,
%hp[id]% or some crap like that.