Section 172A. (a) Except as hereinafter provided, in a court proceeding, in a proceeding preliminary thereto or in a legislative or administrative proceeding, a client of a mental health counselor who is licensed pursuant to the provisions of section 165 or employed in a state, county or municipal government agency shall have the privilege of refusing to disclose and of preventing a witness from disclosing any communication relative to the diagnosis or treatment of the client's mental or emotional condition, wherever made, between the client and the mental health counselor.
(b) If a client is incompetent to exercise or waive the privilege, a guardian shall be appointed to act on the client's behalf under this section. A previously appointed guardian shall be authorized to so act. Upon the exercise of the privilege granted by this section, the judge or presiding officer shall instruct the jury that no adverse inference may be drawn therefrom.
(c) The privilege granted by this section shall not apply to the following communications:
(1) if a mental health counselor, in the course of his diagnosis or treatment of the client, determines that the client is in need of treatment in a hospital for mental or emotional illness or that there is a threat of imminently dangerous activity by the patient against himself or another person and, on the basis of that determination, discloses the communication either for the purpose of placing or retaining the client in the hospital; but, this section shall continue in effect after the patient is in the hospital or placed under arrest or under the supervision of law enforcement authorities;
(2) if a judge finds that the client, after having been informed that a communication would not be privileged, has made a communication to a mental health counselor in the course of a psychiatric examination ordered by the court; but, the communication shall be admissible only on issues involving the patient's mental or emotional condition but not as a confession or admission of guilt;
(3) in a proceeding, except one involving child custody, in which the client introduces his mental or emotional condition as an element of his claim or defense and the judge or presiding officer finds that it is more important to the interests of justice that the communication be disclosed than that the relationship between client and mental health counselor be protected;
(4) in a proceeding after the death of a client in which his mental or emotional condition is introduced by any party claiming or defending through or as beneficiary of the patient as an element of the claim or the defense and the judge or presiding officer finds that it is more important to the interests of justice that the communication be disclosed than that the relationship between client and mental health counselor be protected;
(5) in the initiation of proceedings under paragraph C of section 23 of chapter 119 or under section 24 of said chapter 119 or section 3 of chapter 210 or to give testimony in connection therewith;
(6) in a proceeding whereby the mental health counselor has acquired the information while conducting an investigation pursuant to section 51B of chapter 119;
(7) in a case involving child custody, adoption or the dispensing with the need for consent to adoption where, upon hearing in chambers, the judge exercises his discretion to determine that the mental health counselor has evidence bearing significantly on the client's ability to provide suitable care or custody and it is more important to the welfare of the child that the communication be disclosed than that the relationship between the client and the mental health counselor be protected; but, in the case of adoption or the dispensing with the need for consent to adoption, a judge shall determine that the client has been informed that the communication should not be privileged; or
(8) if in a proceeding brought by the client against the mental health counselor, and in any malpractice, criminal or license revocation proceeding, in which disclosure is necessary or relevant to the claim or defense of the mental health counselor.