
19 Cal.Rptr.3d 737 (2004)
122 Cal.App.4th 1606
The PEOPLE, Plaintiff and Appellant,
v.
Billy SHEEK, Defendant and Respondent.
No. E034840.
Court of Appeal, Fourth District, Division Two.
October 14, 2004.
*738 Michael A. Ramos, District Attorney, Grover D. Merritt, Lead Deputy District Attorney, Mary L. Andonov and Diane Harrison, Deputy District Attorneys, for Plaintiff and Appellant.
Gerald J. Miller, by appointment of the Court of Appeal, Los Angeles, for Defendant and Respondent.

OPINION
HOLLENHORST, Acting P.J.
The People contend that the trial court lacked jurisdiction to grant defendant's Penal Code[1] section 2966, subdivision (b), petition on the ground of insufficiency of evidence without conducting a jury trial and erred as a matter of law in granting the petition.

FACTS AND PROCEDURAL BACKGROUND
Petitioner filed a petition under section 2966, subdivision (b) challenging the Board of Prison Terms' certification that he met all six criteria for commitment for treatment as a condition of parole under the Mentally Disordered Offender Act (MDO Act, § 2960 et seq.). Before trial, defendant filed a motion in limine on the ground of insufficiency of evidence as to the MDO criterion requiring 90 days of treatment for the severe mental disorder in the year prior to parole or release. The trial court required the People to make an offer of proof concerning that criterion. The trial court conducted a hearing under Evidence Code section 402, at which the People presented the testimony of Dr. Mendel Feldsher, a psychiatrist, who had evaluated defendant to determine whether he met the requirements for certification as an MDO.
Dr. Feldsher concluded that defendant suffered from two mental illnesses: depressive disorder and pedophilia. Dr. Feldsher concluded that defendant had suffered from pedophilia for a long time, extending beyond the underlying offense; both the depressive disorder and the pedophilia were aggravating factors in the underlying offense; and both were mutually dependent. Dr. Feldsher described the interaction between the pedophilia and the depression as cyclic: the pedophilia caused defendant to have very strong urges to engage in sexual acts with children, and the depression increased the frequency of the pedophilic acts, resulting in feelings of guilt. Petitioner then used sexual gratification as a form of self-medication for the depression.
Dr. Feldsher testified that defendant's depression was in remission on August 4, 2003. However, defendant's pedophilia was not in remission because, among other things, "He hasn't specifically received a complete course of treatment for pedophilia to address managing his pedophilic urges."
Dr. Feldsher stated his opinion that defendant had received treatment for a severe mental disorder for 90 days during the preceding year because defendant had been treated with the medication Zoloft for *739 his depression for more than 90 days during the year before his parole, and Zoloft also has benefits in treating pedophiles, in that Zoloft may lower the libido and ameliorate pedophilic urges.[2] However, on cross-examination, Dr. Feldsher conceded that he was not "aware of any diagnosis of pedophilia made concerning [defendant] within the state prison system." Moreover, in his review of the records, he found no indication that defendant was ever treated specifically for pedophilia. Rather, defendant's records indicated only a diagnosis of depressive disorder. The case manager contact record dated May 19, 2003, indicated that no additional treatment was necessary. Dr. Feldsher testified that, based on the judgment of the person who had made that notation, all diagnosed mental illnesses or disorders had at that time been successfully treated and were in remission.
Dr. Feldsher was unaware of the therapeutic dose of Zoloft used to treat pedophilia. He did not recall if he personally had ever treated persons diagnosed with pedophilia by prescribing Zoloft. In his clinical practice, however, patients reported sexual side effects from Zoloft more often than not. Petitioner's records did not indicate that he was having side effects from Zoloft other than irritability when he stopped taking it.
The trial court granted the motion, concluding that the People's offer of proof was insufficient on the treatment criterion to proceed to trial.

DISCUSSION

The People Failed to Offer Proof of One of the Six Prerequisites for Treatment as a Condition of Parole
The MDO Act is a civil commitment statute that provides for treatment as a condition of parole for one year for certain offenders about to be released on parole. An offender is eligible for commitment under the MDO Act if all of the following six factors are met: (1) the prisoner has a severe mental disorder; (2) the prisoner used force or violence in committing the underlying offense; (3) the prisoner had a disorder which caused or was an aggravating factor in committing the offense; (4) the disorder is not in remission or capable of being kept in remission in the absence of treatment; (5) the prisoner was treated for the disorder for at least 90 days in the year before being paroled; and (6) because of the disorder, the prisoner poses a serious threat of physical harm to other people. (§ 2962; People v. Clark (2000) 82 Cal.App.4th 1072, 1075-1076, 98 Cal. Rptr.2d 767.) A "severe mental disorder" is "an illness or disease or condition that substantially impairs the person's thought, perception of reality, emotional process, or judgment; or which grossly impairs behavior; or that demonstrates evidence of an acute brain syndrome for which prompt remission, in the absence of treatment, is unlikely." (§ 2962.) "Remission" is "a finding that the overt signs and symptoms of the severe mental disorder are controlled *740 either by psychotropic medication or psychosocial support." (§ 2962.)
If a prisoner disagrees with the Board of Prison Terms' determination the prisoner may file a petition under section 2966 requesting a trial on whether he or she met those criteria as of the date of the Board of Prison Terms' hearing. "The hearing shall be a civil hearing; however, in order to reduce costs, the rules of criminal discovery, as well as civil discovery, shall be applicable. The standard of proof shall be beyond a reasonable doubt, and if the trial is by jury, the jury shall be unanimous in its verdict. The trial shall be by jury unless waived by both the person and the district attorney." (§ 2966.) This court has stated that the MDO statutes are civil in nature, even though they are situated in the Penal Code. (See People v. Cosgrove (2002) 100 Cal.App.4th 1266, 1270-1273, 123 Cal.Rptr.2d 535.)
The sole issue in the trial court was whether any proof was offered that the People could establish factor 5, that "[t]he prisoner has been in treatment for the severe mental disorder for 90 days or more within the year prior to the prisoner's parole or release."[3] (§ 2962, subd. (c).) The 90 days need not be consecutive. (See People v. Del Valle, supra, 100 Cal.App.4th 88, 90-92, 121 Cal.Rptr.2d 889 [holding that, although the 90 days of treatment need not be consecutive, the treatment must be planned, approved, and implemented by the Department of Mental Health through the Department of Corrections to qualify].)
In effect, the People attempt to bootstrap the treatment defendant received for his depressive disorder, which was indisputably in remission and therefore did not satisfy factor 4, onto defendant's pedophilia, which was not even diagnosed until April 9, 2003. The People argue that the medication prescribed for depression might, as a side effect, have incidentally lowered defendant's libido, and therefore the medication might also be considered to have been a treatment for pedophilia. This position cannot be reconciled with either the letter or the spirit of the statute, which provides that "[t]he prisoner has been in treatment for the severe mental disorder . . . ." (§ 2962, subd. (c), italics added.) Given that the People failed to offer any proof that defendant's pedophilia was diagnosed before April 9, 2003, it necessarily follows that defendant was not treated for that disorder, even if Zoloft, at certain doses, arguably might be used to treat pedophilia. We conclude that the People's offer of proof was wholly inadequate to require trial.

The Trial Court Did Not Err in Granting the Motion in Limine
The People argue that the MDO statutes do not provide for a pretrial disposition of the issues, and a jury trial is always required unless waived by both parties. However, it is within trial courts' discretion to entertain and grant dispositive pretrial motions under the courts' inherent *741 power to provide for the orderly conduct of proceedings before them. In Rutherford v. Owens-Illinois, Inc. (1997) 16 Cal.4th 953, 967, 67 Cal.Rptr.2d 16, 941 P.2d 1203, the Supreme Court discussed the expansiveness of the courts' inherent powers: "It is . . . well established that courts have fundamental inherent equity, supervisory, and administrative powers, as well as inherent power to control litigation before them. [Citation.] `In addition to their inherent equitable power derived from the historic power of equity courts, all courts have inherent supervisory or administrative powers which enable them to carry out their duties, and which exist apart from any statutory authority. [Citations.] "It is beyond dispute that `Courts have inherent power . . . to adopt any suitable method of practice, both in ordinary actions and special proceedings, if the procedure is not specified by statute or by rules adopted by the Judicial Council.' [Citation.]" [Citation.] That inherent power entitles trial courts to exercise reasonable control over all proceedings connected with pending litigation . . . in order to insure the orderly administration of justice. [Citation.] "Courts are not powerless to formulate rules of procedure where justice demands it." [Citations.]'"
In particular, courts have affirmed the use of such power to completely dispose of an action when, as here, the evidence raises purely legal issues. (See, e.g., Clemens v. American Warranty Corp. (1987) 193 Cal.App.3d 444, 238 Cal.Rptr. 339 [affirming the dismissal of a breach of contract action based on a third party beneficiary theory when the court's rulings on other motions in limine precluded the appellant from introducing any evidence as to the issues set forth in the complaint].) In People v. Superior Court (Ghilotti) (2002) 27 Cal.4th 888, 910, 119 Cal.Rptr.2d 1, 44 P.3d 949, the Supreme Court referred to the courts' inherent powers in instituting a procedure not specifically authorized by statute under which a court may review for legal error the expert evaluations that are a prerequisite for the filing of a petition for involuntary civil commitment under the Sexually Violent Predators Act (Welf. & Inst.Code, § 6600 et seq.). Another court has explained the holding in Ghilotti as follows: Ghilotti's "holding rests on the court's inherent judicial power to determine whether an evaluator's recommendation stems, on its face, from an inaccurate understanding of the statutory criteria, and therefore constitutes legal error." (Bagration v. Superior Court (2003) 110 Cal.App.4th 1677, 1689, 3 Cal.Rptr.3d 292 [distinguishing Ghilotti and holding that a motion for summary judgment is not available in sexually violent predator proceedings].)
Thus, we conclude that the trial court in this instance acted within the scope of its inherent powers in granting a dispositive pretrial motion to prevent what would have been an unnecessary and futile trial.

Any Error Was Harmless
Even if the trial court had erred in granting defendant's motion, any error was harmless. In People v. Cosgrove, supra, 100 Cal.App.4th 1266, 123 Cal.Rptr.2d 535, this court held that the trial court erred by granting the People's motion for a directed verdict in proceedings finding the defendant to be an MDO under section 2960 et seq. when the defendant had requested a jury trial under section 2966. We explained, "Section 2966 states that MDO hearing shall be civil. However, it also states that `[t]he standard of proof shall be beyond a reasonable doubt, and if the trial is by jury, the jury shall be unanimous in its verdict. The trial shall *742 be by jury unless waived by both the person and the district attorney.' (Italics added.)" (Cosgrove, at p. 1273, 123 Cal. Rptr.2d 535, fn. omitted.) We concluded that the statute did not permit the trial court to make a determination in the case when neither defense counsel nor the defendant had waived jury trial. (Id. at pp. 1274-1275, 123 Cal.Rptr.2d 535.) We further held, however, that the error was subject to harmless error analysis under People v. Watson (1956) 46 Cal.2d 818, 836, 299 P.2d 243, because the defendant's right to a jury trial was statutory.
Here, likewise, any error in failing to hold a jury trial was harmless. As discussed above, the offer of proof was simply insufficient to establish one of the six prerequisites for continued treatment under section 2962.

DISPOSITION
The order appealed from is affirmed.
We concur: WARD and GAUT, JJ.
NOTES
[1]  All further statutory references are to the Penal Code unless otherwise noted.
[2]  When asked the basis for his opinion that defendant had received treatment for severe mental disorder for 90 days, Dr. Feldsher responded, "Well, first off, he received treatment for depression with the medication Zoloft for a period of more than 90 days in the year prior to his parole. [¶] So he received and he had psychiatric follow-up for his depression, so, again, conceptualizing his severe mental disorder as comprising both depression and pedophilia. He did receive treatment for 90 days for his severe mental disorder." Dr. Feldsher testified that Zoloft has "been shown through research to have some success in treatment of sexual offenders." He added, however, "I'm not saying that the doctors in prison intended to treat the pedophilia. What I'm saying is, he nevertheless did receive a treatment for pedophilia."
[3]  August 4, 2003, was the date of the hearing at which the Board of Prison Terms found defendant to be a mentally disordered offender. Counsel for both parties agreed at a hearing on defendant's motions in limine on November 14 that that was the date from which the court could measure back one year. At the hearing on November 18, however, counsel for defendant stated that he had been mistaken; defendant's parole release date had been June 14, and the one-year period would run backward from that date. In People v. Del Valle (2002) 100 Cal.App.4th 88, 90, 121 Cal.Rptr.2d 889, the court held that the time runs from the release date. Here, the trial court found that the People did not establish 90 days of treatment for the mental disorder of pedophilia regardless of which date was used.
