I see you already have an answer but
Code:
#showtooltip
/cast [help,nodead,@mouseover][help,nodead,@target][help,nodead,@targettarget][@player]Greater Heal
could also be useful
What it does, in this order is...
Heals your Mouse Over target.
If you have no Mouse Over target it heals you normal target assuming they are a friendly unit. (So far identical to the other macro).
If Target is hostile, it will attempt to heal you Targets Target assuming they are friendly.
Finally, if all else fails, it will heal yourself.
May well be more than you are looking for, but it is what I use with all my healing spells (Just replace the spell name).