I've worked in public-facing roles - I've been shouted at, sworn at, inappropriately or aggressively touched, had written and verbal complaints about everything from my facial expression to my judgement.
I've never ever retaliated in the heat of the moment. I've walked away, I've sought senior support, I've engaged with complaints procedures and incident reporting. I've never lashed out or behaved badly in response.
Even if that was a homophobic slur against him (all clearly not in context) but even if it was. The point is he need to recognise his position and walk away, use reporting procedures and alert others to it. He also needs to not be using equally offensive language towards other people left, right and centre. He is the doctor, he is the one with a code of conduct. The onus is on him.