Part1. Shozo Tanuma is a personal doctor/cardiologist of the Shinomiya family.
(Usually you see a GP or the doctor at an emergency department before seeing a specialist eg a cardiologist. So, yeah, to really see a cardiologist right away means this doctor has some relationship to this family. In this case, the relationship is that Tanuma is a personal doctor/cardiologist of this family.)
Part2. And thus knows all to well that Nayotake Shimizu died of cardiological/heart-related problems.
Part3. And then in the flashback, well... I'm not too sure. (I had to keep cropping the image because apparently it keeps exceeding the file limit.)
I thought this scene was showing Shozo's view on Kaguya when Kaguya's mom had just died or something, but I'm not sure about that. I was supposed to use this part as an emotional argument as to why Shozo visits Kaguya right away. But anyway there's the other stuff too.
Part4. In Chapter 252 of the manga (currently the anime is around Chapter 100 with S03E03),
(minor spoiler)
'Dr Tanuma tells Miyuki about the story of Kaguya's mother.'