Hospital staff foil sex attack