Ouch oh no.
Sorry to hear that your little one is hurt.
I use pre filters sponges over the ends of all my filter intakes. This not only keeps the impeller from getting gummed up as often but prevents larvae, eggs, and limbs from getting stuck and the axi struggling till something gives, usually bone or skin.
Aside from preventing it you can only keep the little guy cool, dark and calm and see if they heal.
Good luck.