/cast [mod:shift,target=targettarget,help][help][target=player] Healing Wave

Make sure you put your cases in the order you want them evaluated so it will fall-through properly. Otherwise you have to add more explicit statements like nomod. This will (should) cast Healing Wave on your target's target (assisting) if you hold shift and that target is friendly, on your target if it's friendly, or on yourself if neither of those cases is true. (Sometimes multiple target= statements don't behave as expected to avoid letting macros be too "intelligent" but I think this should work.)

You can change the targettarget to party1target if you want it to explicitly be the leader's target, not a literal assist. I got a little confused after the first bit of the post.