No person shall be interviewed by a pretrial services agency unless he or she has first been apprised of the identity and purpose of the interviewer, the scope of the interview, the right to secure legal advice, and the right to refuse cooperation. Inquiry of the defendant shall carefully exclude questions concerning the details of the current charge. Statements made by the defendant during the interview, or evidence derived therefrom, are admissible in evidence only when the court is considering the imposition of pretrial or posttrial conditions of release, denial of pretrial release, or when considering the modification of a prior release order.
725 ILCS 185/11