Oh sure, but you know, I also probably benefited a little bit from the Tuskegee Syphilis experiments, and heck, if nuclear war ever comes, the things learned from keeping Hisashi Ouchi alive after his radiation expose, will probably help too.
The primary issue with this was the lack of ethical research, not the privacy of medical records. In fact the opposite argument could be made, with a more open and connected system, we could likely glean such information without the trial in the first place.
If you view letting infections play out in people because "We view black people as sub-human" is or can be equivalent to sharing medical records for patient care, research, or outbreak surveillance, and that there isn't a meaningful distinction between those categories, it is unlikely we could have a productive conversation on the topic.
In the nightmare scenario proposed by GP, of everyone's medical records being open to the public, I would simply stop consuming all medical services. So no.
You're correct in pointing out that people are inherently selfish, however one major purpose of collective government is to do those things which are necessary and not always in-line with selfish motivations. Just as most Americans would be horrified to have their salary posted publicly for fear of stigma, jealousy, reprisals etc, Norway has demonstrated that those fears are unfounded, and salary data doesn't even have the opportunity to save thousands and thousands of lives.
Or more importantly, the harms are to me, and the upsides are to you, so who cares?