Hacer la visita del médico.
has nothing to do with visiting a doctor. It is usually used by mothers and
grandmothers when paying a visit to someone for the minimum time possible to
do what is needed – like turning up at a friend’s house to deliver something,
a quick “hello” and then leaving immediately. The nearest English expression
would be ‘Make a flying visit’!.