So the end result of your concerns is that there’s just no way to share medical information.
First, yes, there's no secure way to share medical information. We should recognize that, and by doing so, I think you'll see my argument about your employer being right is pretty strong.
Second, my argument isn't the slippery slope you're making it out to be. In fact, there are likely scenarios in which an application flaw exposes your database, and likely scenarios in which XSRF/XSS flaws will coerce users into exposing medical information. My argument does not depend on some hypothetical killer zero-day bug.
Finally, I'm not advocating a world in which we don't provide access to medical information. I'm just saying, there's no way to do it casually. Any project that does it is going to need a steering committee, and special insurance.
Or I guess more to the point: what would you do? You’re an intelligent person who knows the issues so give me a solution. Because saying "lets form a committee" isn’t an answer it’s an evasion. It’s what people say when they don’t want to be bothered with coming up with a solution.
You're arguing that it should be possible to make medical information (including mental health information) available to patients over the Internet. I agree.
I'm arguing that, confronted with your specific proposal to put that information onto the Internet, your employer made the right call. The considerations you came up with to defend patient privacy aren't convincing; your suggestion, which I concede is probably abbreviated, is insufficient for an application which handles credit card information, let alone irrevocable patient mental health information.
First, assigning a confidential number is a step in the right direction, but it isn't secure; simple traffic analysis (for instance, via a database flaw) will correlate IDs to recent activity, or to a specific visit (say by a tailed car).
Second, any number of other vulnerabilities anywhere on the Internet could coerce a browser to give up the unique IDs assigned to your site, as would any physical compromise of a user's computer, however brief (like, 5 seconds with a malicious USB stick).
Third, your employer would face almost unlimited liability in the event of a mass compromise; they've probably insured themselves against HIPAA violations, but compromise of stigmatizing mental health information is easy to tie to material harm --- far more so than a credit card number, which can at least be revoked.
Using SSL and firewalls doesn't mitigate the core problem, which is that any false step with the application that serves this information cost cost them tens of millions of dollars.
This is a rare instance where I see a draconian regulation actually working to the benefit of consumers.