Any health care provider, as defined in § 32.1-127.1:03, or other provider who has provided or is currently providing services to a person who is the subject of proceedings pursuant to this chapter shall, upon request, disclose to a magistrate, the court, the person's attorney, the person's guardian ad litem, the examiner identified to perform an examination pursuant to § 37.2-815, the community services board or its designee performing any evaluation, preadmission screening, or monitoring duties pursuant to this chapter, or a law-enforcement officer any information that is necessary and appropriate for the performance of his duties pursuant to this chapter. Any health care provider, as defined in § 32.1-127.1:03, or other provider who has provided or is currently evaluating or providing services to a person who is the subject of proceedings pursuant to this chapter shall disclose information that may be necessary for the treatment of such person to any other health care provider or other provider evaluating or providing services to or monitoring the treatment of the person. Health records disclosed to a law-enforcement officer shall be limited to information necessary to protect the officer, the person, or the public from physical injury or to address the health care needs of the person. Information disclosed to a law-enforcement officer shall not be used for any other purpose, disclosed to others, or retained.
Any health care provider providing services to a person who is the subject of proceedings under this chapter shall (i) inform the person that his family member or personal representative, including any agent named in an advance directive executed in accordance with the Health Care Decisions Act (§ 54.1-2981 et seq.), will be notified of information that is directly relevant to such individual's involvement with the person's health care, which may include the person's location and general condition, in accordance with subdivision D 34 of § 32.1-127.1:03, and (ii) make a reasonable effort to so notify the person's family member or personal representative, unless the provider has actual knowledge that the family member or personal representative is currently prohibited by court order from contacting the person. No health care provider shall be required to notify a person's family member or personal representative pursuant to this section if the health care provider has actual knowledge that such notice has been provided.
Any health care provider disclosing records pursuant to this section shall be immune from civil liability for any harm resulting from the disclosure, including any liability under the federal Health Insurance Portability and Accountability Act (42 U.S.C. § 1320d et seq.), as amended, unless the person or provider disclosing such records intended the harm or acted in bad faith.
Va. Code § 37.2-804.2