You are correct of course but that does not seem to stop any government any longer.
Not only is this a violations of privacy, but to involve a group of so called doctors, Psychiatrists in any decision making process is absurd beyond the pale. Psychiatry is not sound science. Their conclusions cannot pass basic scientific tests of repeatability and verifiability.
If it were not for the fact that doctors stick together psychiatry would be labeled as a fraud just as is-slime is a fake religion.