(b) If authorized by an appropriate order of a court of competent jurisdiction in the county where the records are located compelling a party to produce in court specified records and specifically describing the records being sought, when the order is granted after an application showing probable cause therefor. In assessing probable cause, the court shall do all of the following:
(1) Weigh the public interest and the need for disclosure against the injury to the patient, to the physician-patient relationship, and to the treatment services.
(2) Determine that there is a reasonable likelihood that the records in question will disclose material information or evidence of substantial value in connection with the investigation or prosecution.
(3) Determine that the crime involves the causing of, or direct threatening of, the loss of life or serious bodily injury.
(4) In granting or denying a subpoena, the court shall state on the record the reasons for its decision and the facts which the court considered in making such a ruling.
(5) If a court grants an order permitting disclosure of such records, the court shall issue all orders necessary to protect, to the maximum extent possible, the patient’s privacy and the privacy and confidentiality of the physician-patient relationship.
(6) Any records disclosed pursuant to the provisions of this subdivision and any copies thereof shall be returned to the facility at the completion of the investigation or prosecution unless they have been made a part of the court record.