(b) Confidential information shall not be disclosed, except:
(1) In a proceeding under section four, article five of this chapter to disclose the results of an involuntary examination made pursuant to section two, three or four of said article;
(2) In a proceeding under article six-a of this chapter to disclose the results of an involuntary examination made pursuant thereto;
(3) Pursuant to an order of any court based upon a finding that the information is sufficiently relevant to a proceeding before the court to outweigh the importance of maintaining the confidentiality established by this section;
(4) To provide notice to the federal National Instant Criminal Background Check System, established pursuant to section 103(d) of the Brady Handgun Violence Prevention Act, 18 U.S.C. §922, in accordance with article seven-a, chapter sixty-one of this code;
(5) To protect against a clear and substantial danger of imminent injury by a patient or client to himself, herself or another;
(6) For treatment or internal review purposes, to staff of the mental health facility where the patient is being cared for or to other health professionals involved in treatment of the patient; and
(7) Without the patient's consent as provided for under the Privacy Rule of the federal Health Insurance Portability and Accountability Act of 1996, 45 C.F.R. §164.506, for thirty days from the date of admission to a mental health facility if: (i) The provider makes a good faith effort to obtain consent from the patient or legal representative prior to disclosure; (ii) the minimum information necessary is released for a specifically stated purpose; and (iii) prompt notice of the disclosure, the recipient of the information and the purpose of the disclosure is given to the patient or legal representative.