Following the discharge of a respondent from a treatment facility or the issuance of a court order denying a petition for commitment, the respondent may at any time move to have all court records pertaining to the proceedings expunged on condition that the respondent file a full release of all claims of whatever nature arising out of the proceedings and the statements and actions of persons and facilities in connection with the proceedings. Upon the filing of the motion and full release, the court shall order the court records either expunged or sealed, whichever the court considers appropriate under the circumstances.