
410 N.W.2d 85 (1987)
In the Matter of the WELFARE OF Jessie Lee ALEXANDER.
No. C9-87-974.
Court of Appeals of Minnesota.
August 11, 1987.
*86 Thomas Foley, Ramsey Co. Atty., Richard H. Hoffman, Asst. Co. Atty., St. Paul, for appellant Ramsey County.
Jon Duckstad, St. Paul, for respondent Alexander.
Heard, considered and decided by POPOVICH, C.J., and PARKER and MULALLY[*], JJ.

OPINION
MULALLY, Judge.
The Ramsey County Attorney appeals from an April 29 order committing Alexander as a mentally ill person, rather than as a mentally ill and dangerous person, and further challenges the trial court's acceptance of Alexander's waiver of a hearing on the treatment report submitted by the Minnesota Security Hospital. We reverse and remand.

FACTS
Alexander was charged with assault in the second degree after he hit a stranger in the head with a table leg in December 1986. He was found to be incompetent to proceed to trial and commitment proceedings were begun by the county attorney (hereinafter the County).
After a hearing, Alexander was committed to the Minnesota Security Hospital as a mentally ill and dangerous person on February 19, 1987. The treating facility was directed to file a report within 60 days as required by Minn.Stat. § 253B.18, subd. 2 (1986).
Medical records indicate Alexander began accepting psychotropic medications shortly after his commitment and rapidly improved. By April 14 the consulting psychiatrist concluded Alexander was no longer dangerous to himself or others as a result of the medications. In its 60-day report to the trial court, the hospital stressed that Alexander could become dangerous if he stopped accepting medications, but supported continued commitment as a mentally ill person "[i]f medication compliance can be fully assured."
At the review hearing on Alexander's commitment, Alexander indicated he would agree to commitment as a mentally ill person and the trial court, over the objections of the County, committed Alexander accordingly.
On appeal, the County argues the trial court was required to hold a hearing on the *87 issue of further commitment, despite Alexander's agreement and waiver.

ISSUES
1. Is the County an "aggrieved party" entitled to review of the commitment order?
2. Did the trial court err in accepting Alexander's waiver of a hearing and his agreement to commitment as a mentally ill person?

ANALYSIS

I.
Any "aggrieved party" may appeal from an order in commitment proceedings. Minn.Stat. § 253B.23, subd. 7 (1986). This court has previously held that a party is "aggrieved" within the meaning of this statute if "substantially affected or actually injured by a judgment or order which bears directly upon a legitimate personal interest." In re Elam, 393 N.W.2d 391, 393 (Minn.Ct.App.1986) (citing Snyder's Drug Stores, Inc. v. Minnesota State Board of Pharmacy, 301 Minn. 28, 32, 221 N.W.2d 162, 165 (1974); In re Getsug, 290 Minn. 110, 114, 186 N.W.2d 686, 689 (1971)).
The County argues that its interests in (a) a full commitment hearing while the evidence is fresh and (b) preventing or delaying Alexander's discharge from the hospital have been impaired. Here, if in fact Alexander is or may be mentally ill and dangerous to the public, the County as petitioner and representative of the public is a party, and has a right to have Alexander's status determined pursuant to the statutory hearing. Depriving the County of this right makes it an "aggrieved party" with standing to appeal from the trial court's order.

II.
Alexander was initially committed by the court as a mentally ill and dangerous person in February 1987. Minn.Stat. § 253B.18 sets out the procedures for persons mentally ill and dangerous to the public:
Subdivision 1. Procedure. Upon the filing of a petition alleging that a proposed patient is mentally ill and dangerous to the public, the court shall hear the petition as provided in sections 253B.07 and 253B.08. If the court finds by clear and convincing evidence that the proposed patient is mentally ill and dangerous to the public, it shall commit the person to the Minnesota Security Hospital, a regional center designated by the commissioner or to a treatment facility. * * *
Subd. 2. Review; hearing. A written treatment report shall be filed with the committing court within 60 days after commitment. The court, prior to making a final determination with regard to a person initially committed as mentally ill and dangerous to the public, shall hold a hearing. The hearing shall be held within 14 days of the court's receipt of the written treatment report, if one is filed, or within 90 days of the date of initial commitment, whichever is earlier, unless otherwise agreed by the parties. * * *
Subd. 3. Indeterminate commitment. If the court finds at the hearing held pursuant to subdivision 2 that the patient continues to be mentally ill and dangerous, then the court shall order commitment of the proposed patient for an indeterminate period of time. Subsequent to a final determination that a patient is mentally ill and dangerous to the public, the patient shall be transferred, provisionally discharged or discharged, only as provided in this section.
Subd. 4. Special review board. The commissioner shall establish a special review board for persons committed as mentally ill and dangerous to the public. The board shall consist of three members experienced in the field of mental illness * * *.
* * *
Subd. 7. Provisional discharge. Patients who have been found by the committing court to be mentally ill and dangerous to the public shall not be provisionally discharged unless it appears to the satisfaction of the commissioner, after *88 a hearing and a favorable recommendation by a majority of the special review board, that the patient is capable of making an acceptable adjustment to open society.
Minn.Stat. § 253B.18, subds. 1, 2, 3, 4, and 7 (1986) (emphasis added). It is the contention of the County that the distinctions relative to provisional discharge between mentally ill[1] and mentally ill and dangerous patients become important in the context of persons who may deteriorate quickly when off medication.
Consistent with the statute, the Special Rules of Procedure Governing Proceedings under the Minnesota Commitment Act of 1982, cover commitment of the mentally ill and dangerous. Rule 12.01 states:
Prior to making the final determination with regard to a person initially committed as mentally ill and dangerous to the public, the court shall hold a hearing. * * *
Minn.R.Civ.Commitment 12.01 (emphasis added). Rule 12.04 provides:
The parties shall have the same rights at the hearing as would be applicable in an initial commitment hearing.
Minn.R.Civ.Commitment 12.04 (emphasis added).
Procedures at the initial hearing are covered by Minn.Stat. § 253B.08, which provides:
Subd. 4. Witnesses. The proposed patient or patient's counsel and the petitioner may present and cross-examine witnesses including examiners, at the hearing. The court may in its discretion receive the testimony of any other person. Opinions of court-appointed examiners shall not be admitted into evidence unless the examiner is present to testify, except by agreement of the parties.
Minn.Stat. § 253B.08, subd. 4 (1986) (emphasis added).
Whether Alexander should be committed as mentally ill or mentally ill and dangerous to the public is a matter for determination by the trial court. But we conclude that the County was denied the hearing contemplated by the statute, and was deprived of the opportunity to show that Alexander continues to be mentally ill and dangerous.

OPINION
Reversed and remanded.
NOTES
[*]  Acting as judge of the Court of Appeals by appointment pursuant to Minn. Const. art. 6, § 2.
[1]  discharge. The head of the treatment facility may provisionally discharge any patient without discharging the commitment, unless the patient was found by the committing court to be mentally ill and dangerous to the public.
Minn.Stat. § 253B.15, subd. 1 (1986).
