HIPPA laws prevent almost all communication between a healthcare provider and the courts. We also have a problem where the medical diagnosis for mental incompetence and danger to society is far broader than the legal definition, which allows far too many mentally ill people to purchase guns.
I don't want to know their medical history, I just want them locked up.