That's why in France, for example, it's illegal for the government to keep track of people's race or religion. When the Nazis occupied France they used such documents to figure out who the Jews were.
I’m pretty sure the German government has a list of people enrolled in the German socialized medical system.