Injured Fledgling Magpie.

I have just watched a dozen crows attacking something at the top of a tall leylandi tree. I saw a bird fall through the branches to the ground and it appears to be a fledgling magpie without fully developed tail feathers. It has been pecked on the back of the neck and is bloody. It hasn't moved but is gasping. Due to cats in the vicinity I have put it in a box of hay. What should I do next? Thanks Jingley