How do I prioritize targets for healing

As a holy pally I usually focus the tank that is targeting the boss and mostly heal them, throwing AoE heals out when I have the holy power to do so, or quickly targeting a raid member in trouble and then switch back to the tank.

What I would like to be able to to is insert a targeting priority into a macro that would follow this sequence; tank that is targeting boss, mouseover raid member in trouble, me.

Is this possible? If so, where in a castsequence macro would I insert this?