I don’t know about the legality of it, but as a comical skit it’d be hilarious: a patient gets in deep shit with their doctor for violating patient-doctor confidentiality. Sounds straight out of Curb Your Enthusiasm!
Edit: It seems it's straight out of Curb, because it is!
https://youtu.be/YH55dFlF_Rg?si=kOLC5rGq5fi8tke2