St Andrews favours English people, in my experience.
For Scottish applicants, its grade requirements are the lowest in Scotland (only AAABB) and yet, nobody I know has been offered a place there.
I did apply to St Andrews and I'd been to the Summer School there and wrote that on my statement and I was still rejected.
I know 4 people who also applied there and were rejected (they were all given several offers from elsewhere so their applications were in no way defective.)
As I've said before on this forum, not a lot of Scottish people apply to St Andrews, certainly not from my area.
Clincal contact is late in St Andrews and you only stay there until year three at which point you move to Manchester to do your clinical training there. It isn't ideal and St Andrews gets slagged off quite considerably among applicants for this.
Edinburgh is a great medical school but, I'm my opinion, unless you have the top grades then I wouldn't bother applying.