
443 N.W.2d 855 (1989)
In the Matter of Randi STUBBE.
No. C1-89-1203.
Court of Appeals of Minnesota.
August 8, 1989.
*856 Thomas Bennett Wilson, III, Gayle Gaumer, Edina, for petitioner Stubbe.
Thomas Johnson, Hennepin County Atty., Margaret A. Daly, Asst. County Atty., Minneapolis, for respondent.
Considered at Special Term and decided by WOZNIAK, C.J., and FORSBERG and SHORT, JJ.

SPECIAL TERM OPINION
WOZNIAK, Chief Judge.

FACTS
A petition was filed to involuntarily commit Randi Stubbe as mentally ill. At the commencement of the hearing on the petition, the parties indicated to the court that they had arrived at a settlement. The parties agreed that it would be in the best interests of all to continue the commitment hearing for six months to allow Stubbe to pursue voluntary treatment.
The court denied the six-month continuance, concluding it was required by statute to conduct a hearing no later than 44 days after the date of filing of the petition.
Stubbe has petitioned this court for a writ of prohibition, claiming the committing court abused its discretion by refusing to grant a six-month continuance of the hearing.

DECISION
The petition for prohibition is the proper method of addressing the question whether the court abused its discretion by refusing to grant the requested continuance. See State ex rel. Hierl v. District Court, Seventh Judicial District, 237 Minn. 456, 54 N.W.2d 5 (1952).
Minn.Stat. § 253B.08, subd. 1 (1988) provides:
The hearing on the commitment petition shall be held within 14 days from the date of the filing of the petition. For good cause shown, the court may extend the time of hearing up to an additional 30 days. When any proposed patient has not had a hearing on a petition filed for the person's commitment within the allowed time, the proceedings shall be dismissed. * * *
The statute requires that a hearing be conducted no later than 44 days after the filing of a commitment petition. There is no provision in the statute allowing a proposed patient to waive this 44-day requirement. The legislature could have allowed such a waiver, had it so desired; in fact, there are provisions for waiver in other sections of the Minnesota Commitment Act. See, e.g., Minn.Stat. § 253B.08, subd. 2 (waiver of notice of hearing); Minn.Stat. § 253B.08, subd. 5 (waiver of right to attend hearing); Minn.Stat. § 253B.12, subd. 6 (waiver of review hearing).
The legislature has stated that the term "shall" is mandatory. Minn.Stat. § 645.44, subd. 16 (1988). Since the statute specifies the consequences for failure to comply with its terms, it is not merely *857 directory. Cf. Sullivan v. Credit River Township, 299 Minn. 170, 176-77, 217 N.W.2d 502, 507 (1974).
Stubbe argues that public policy favors a broad construction of Minn.Stat. § 253B.08, subd. 1 to allow lengthier continuances and avoid commitment proceedings, thereby benefiting the parties, attorneys, and court by avoiding the stress, expense, and time expended in conducting hearings.
We recognize that the legislature has indicated that involuntary commitment is warranted only where other alternatives fail. See, e.g., Minn.Stat. § 253B.04 (informal admission is preferred over involuntary commitment); Minn.Stat. § 253B.09 (the court must consider all less restrictive alternatives before determining that involuntary commitment is necessary.)
Nevertheless, the policy that involuntary commitment proceedings should be avoided where possible must be weighed against the policy that commitment proceedings should not hang over a person's head indefinitely. Here, the court correctly ruled that upon the filing of a commitment petition, the hearing must be conducted within at least 44 days, or the petition must be dismissed.
Petition for writ of prohibition denied.
