
632 N.W.2d 577 (2001)
John Willard HINCE, et al., Petitioners, Appellants,
v.
Michael O'KEEFE, Commissioner of the Department of Human Services, et al., Respondents.
No. C0-00-49.
Supreme Court of Minnesota.
August 9, 2001.
*579 Warren J. Mass, Brooklyn Park, Thomas Wilson, Gregory Solum, Edina, Mike Biglow, James Dahlquist, Allan Poncin, Brian Southwell, Minneapolis, Kathleen Rauenhorst, Roseville and Stephen Radtke, Bloomington, for Appellants.
Mike Hatch, Attorney General and Noah A. Cashman, for Respondents.
Eric S. Janus, St. Paul and Teresa J. Nelson, Minneapolis, for amicus curiae MN Civil Liberties Union.
Heard, considered, and decided by the court en banc.

OPINION
ANDERSON, Paul H., Justice.
Appellants are individuals civilly committed to the Minnesota Sex Offender Program (Sex Offender Program). Appellants commenced a declaratory judgment action seeking a determination that the Commissioner of the Department of Human Services is required to establish a review board for the Sex Offender Program treatment facilities under Minn.Stat. § 253B.22, subd. 1 (2000). In their complaint, appellants assert that they should be treated like mentally ill and dangerous patients with respect to the establishment of a review board. They also assert constitutional violations stemming from the denial of a review board. The Ramsey County District Court dismissed appellants' action for failure to state a claim upon which relief may be granted. The Minnesota Court of Appeals affirmed the dismissal. We reverse.

Appellants' Status
Appellants are currently housed at the Minnesota Sexual Psychopathic Personality Treatment Center in Moose Lake and one unit of the Minnesota Security Hospital in St. Peter. All were civilly committed under Minnesota's civil commitment statute, Minn.Stat. ch. 253B (2000). Specifically, appellants were committed as persons with sexual psychopathic personalities (SPP) or as sexually dangerous persons (SDP) as defined in Minn.Stat. § 253B.02, subds. 18b and 18c (2000). Unlike other civil committees, those committed as SPPs, SDPs, and mentally ill and dangerous persons (MID)[1] are committed for an indeterminate period of time and the statute does not require that they be committed to the least restrictive setting.[2]Compare Minn.Stat. *580 § 253B.09, subds. 1 & 5 (2000), with Minn.Stat. § 253B.18, subds. 1 & 3 (2000). The conditions of confinement at the Sex Offender Program facilities are similar to those in a prison in that patients have restricted privileges, including lockdowns, yet their commitment is not punishment for an offense. Minnesota Sex Offender Program Resident Handbook Attachments A & B (1998); Call v. Gomez, 535 N.W.2d 312, 319-20 (Minn.1995). SPPs and SDPs may be released or transferred to a nonsecure facility only upon approval of the commissioner and a special review board. Minn.Stat. § 253B.18, subds. 4c(a) & 6 (2000).

History of the SPP and SDP Acts
The current civil commitment statutes for SPP and SDP are the product of a delicate balancing between the "legitimate public concern over the danger posed by predatory sex offenders" and the fundamental right of those persons committed to live their lives "free of physical restraint by the state." In re Blodgett, 510 N.W.2d 910, 912, 914 (Minn.1994). As early as 1939, the legislature attempted to address this problem by providing for the civil commitment of persons with psychopathic personalities. Id. at 912-13. The constitutionality of the psychopathic personality commitment provision was challenged by an individual committed under the act and upheld by our court and the United States Supreme Court. State ex rel. Pearson v. Probate Court of Ramsey County, 205 Minn. 545, 287 N.W. 297 (1939), aff'd, 309 U.S. 270, 60 S.Ct. 523, 84 L.Ed. 744 (1940). We upheld the psychopathic personality commitment statute by limiting its focus, concluding that in order to commit a person as a psychopathic personality, the person must evidence an "utter lack of power to control their sexual impulses * * *." Id., 205 Minn. at 555, 287 N.W. at 302.
The Supreme Court further clarified the constitutional parameters of civil commitment in 1992. See Foucha v. Louisiana, 504 U.S. 71, 112 S.Ct. 1780, 118 L.Ed.2d 437 (1992). In Foucha, the Court identified three circumstances under which due process is not violated by a state's confinement of an individual: (1) convicted criminals may be imprisoned for deterrence and retribution; (2) an individual may be committed if the state has proved by clear and convincing evidence that the person is mentally ill and dangerous; and (3) in certain narrow circumstances such as pretrial detention, the state may subject persons who pose a danger to others to a limited confinement. Id. at 80-81, 112 S.Ct. 1780. Civil commitment falls in the second category. Following the Foucha decision, we considered whether Minnesota's commitment provisions for persons with psychopathic personalities afforded due process to these persons. See Blodgett, 510 N.W.2d at 915-16. We concluded that "[s]o long as civil commitment is programmed to provide treatment and periodic review, due process is provided." Id. at 916 (emphasis added).
In 1994, Dennis Linehan was scheduled to be released from prison after having completely served the sentence for his criminal convictions. However, before his release, the state sought to commit him as a psychopathic personality. In re Linehan, 518 N.W.2d 609 (Minn.1994) (Linehan I). Linehan challenged his commitment and the district court upheld the commitment. On appeal, we concluded that the state had not proved the necessary elements to commit Linehan as a *581 psychopathic personality. Id. at 614. In response to our decision, the legislature enacted the Sexually Dangerous Person Act (SDP Act). In re Linehan, 594 N.W.2d 867, 869 (Minn.1999), cert. denied, 528 U.S. 1049, 120 S.Ct. 587, 145 L.Ed.2d 488 (1999) (Linehan IV). As written, the SDP Act commitment provisions differ from the psychopathic personality commitment provisions in that commitment as an SDP does not require proof that the person has an inability to control sexual impulses. Compare Minn.Stat. § 253B.02, subd. 18c (2000), with Minn.Stat. § 253B.02, subd. 18b (2000).[3] After enactment of the SDP Act, the state once again sought to commit Linehan, but this time under the new statute. In re Linehan, 557 N.W.2d 171, 174 (Minn.1996), vacated, 522 U.S. 1011, 118 S.Ct. 596, 139 L.Ed.2d 486 (1997) (Linehan III).[4] When Linehan appealed, we upheld the constitutionality of the SDP Act, concluding that it applied only to those who were "mentally disordered" and dangerous and that SDPs may be confined so long as the state provides treatment for their disorders. Id. at 182, 188-89. Linehan appealed to the U.S. Supreme Court.
Following our decision in Linehan III, the Supreme Court decided Kansas v. Hendricks, 521 U.S. 346, 117 S.Ct. 2072, 138 L.Ed.2d 501 (1997). In Hendricks, the Court concluded that a Kansas law for civilly committing sexually violent predators satisfied due process because it required a finding of dangerousness coupled with a finding of mental abnormality. 521 U.S. at 358-60, 117 S.Ct. 2072. The Court explained that the mental abnormality or personality disorder language set forth criteria relating to "an individual's inability to control his dangerousness" and was sufficient legal language, even if it was not precise medical terminology. Id. at 359-60, 117 S.Ct. 2072. The Court concluded that the "lack of volitional control, coupled with a prediction of future dangerousness * * * plainly suffices for due process purposes." Id. at 360, 117 S.Ct. 2072. Following its decision in Hendricks, the Court then granted certiorari in Linehan III, vacated our judgment, and remanded the case with instructions that it be reconsidered in light of Hendricks. Linehan IV, 594 N.W.2d at 870-71.
On reconsideration following remand from the Supreme Court, we again concluded, with three justices dissenting, that the SDP Act satisfies due process requirements. See id. at 876, 878, 885, 887. We acknowledged that under the Supreme Court's holding in Hendricks, a finding of dangerousness alone was not sufficient justification for indefinite commitment. Id. at 872. We then interpreted the SDP Act in light of Hendricks and concluded that "the Minnesota SDP Act `requires a finding of future dangerousness, and then links that finding to the existence of a mental abnormality or personality *582 disorder that makes it difficult, if not impossible, for the person to control his dangerous behavior.'" Id. at 875 (quoting Hendricks, 521 U.S. at 358, 117 S.Ct. 2072). Thus, implicit in appellants' commitments as SDPs is a finding that they suffer from a mental abnormality or personality disorder that "does not allow them to adequately control their sexual impulses * * *." Implicit in appellants' commitments as SPPs is a finding that they suffer from a mental abnormality or personality disorder that renders them utterly unable to control their sexual impulses. Id. at 876.

Appellants' Claims
It is in light of this history of the SPP and SDP Acts that we consider appellants' claim that they are entitled to a review board under the civil commitment statute. Minnesota Statutes § 253B.22, subd. 1, requires the commissioner to "establish a review board of three or more persons for each regional [treatment] center to review the admission and retention of * * * patients receiving services under this chapter." Subdivision 2 of this section provides that "[e]ach treatment facility shall be visited by the review board at least once every six months. Upon request each patient in the treatment facility shall have the right to appear before the review board during the visit." Minn.Stat. § 253B.22, subd. 2 (2000). The review board reviews the admission and retention of patients and may investigate conditions affecting the care and treatment of patients in the treatment facility. Minn.Stat. § 253B.22, subd. 4 (2000).
Appellants assert that the commissioner is required to establish a review board for each of the Sex Offender Program facilities because they are regional treatment centers. Appellants also assert that they are entitled to a review board because the statute mandates that (1) unless otherwise provided SPPs and SDPs should be treated like MIDs, (2) the review board provisions of the statute do not distinguish between MIDs and SPPs and SDPs, and (3) MIDs have access to a review board. Appellants also assert constitutional violations stemming from the denial of a review board. The state made a Rule 12 motion to dismiss the action. The district court dismissed appellants' action by reaching a legal conclusion that appellants were not entitled to a review board under the statute and that there was no basis for the constitutional claim. The court of appeals affirmed. Appellants ask us to determine whether, under the statute, SPPs and SDPs in the Sex Offender Program facilities are entitled to a review board.

I.
The answer to the question of whether review boards are required at the Sex Offender Program facilities turns on whether the Sex Offender Program facilities are "regional treatment centers" as contemplated under Minn.Stat. § 253B.22. The question presented is a legal question because it is a matter of statutory interpretation. Thus, our review is de novo. Baker v. State, 590 N.W.2d 636, 638 (Minn.1999). Basic rules of statutory construction instruct that words and phrases in the statute are to be given their plain and ordinary meaning. State by Beaulieu v. RSJ, Inc., 552 N.W.2d 695, 701 (Minn.1996). Various provisions of the same statute must be interpreted in light of each other. Van Asperen v. Darling Olds, Inc., 254 Minn. 62, 74, 93 N.W.2d 690, 698 (1958). Courts should construe a statute to avoid absurd or unjust consequences. Erickson v. Sunset Mem'l Park Ass'n, 259 Minn. 532, 543, 108 N.W.2d 434, 441 (1961). Finally, courts should interpret statutes in a way that avoids constitutional problems. *583 Pearson, 205 Minn. at 555, 287 N.W. at 302.
Here, the state asserts that the district court properly dismissed appellants' action because SPP and SDP patients are not "mentally ill" and therefore Sex Offender Program facilities are not regional treatment centers. The state's argument gives us pause because, when the state argued Blodgett, Linehan I, Linehan III, and Linehan IV, it argued that the parties suffered from mental disorders. We then upheld SPP and SDP commitment procedures as satisfying due process standards because the individuals committed under these procedures suffer from mental disorders. Linehan IV, 594 N.W.2d at 878; Linehan III, 557 N.W.2d at 184; Blodgett, 510 N.W.2d at 916. Without the mental disorder component, commitment would be based on dangerousness alone, which does not satisfy due process. Hendricks, 521 U.S. at 358, 117 S.Ct. 2072.
The state now argues that there is a difference between a mental illness and a mental disorder and this difference is the basis for the statutory distinction. However, in Hendricks the Supreme Court rejected the argument that the terms were not legally equivalent and stated, "the term `mental illness' is devoid of talismanic significance. Not only do `psychiatrists disagree widely and frequently on what constitutes mental illness,' * * * but the Court itself has used a variety of expressions to describe the mental condition of those properly subject to civil confinement." Id. at 359, 117 S.Ct. 2072 (internal citations removed). The Court went on to explain that the key to all these definitions for purposes of civil commitment is that they reflect the individual's inability to control his dangerousness. Id. at 360, 117 S.Ct. 2072. Thus, although the term mental illness is used in the definition of regional center, and inability to adequately control impulses is used in the SDP Act, and utter inability to control sexual impulses is used in the SPP Act, we are concerned about the constitutional implications for SPP and SDP commitment proceedings if we conclude that mental illness is not a component of civil commitment under these acts.
The state also asserts that the special review board that makes discharge decisions for SPPs, SDPs and MIDs, along with other statutory review mechanisms, fulfills the role of the review board for SPPs and SDPs. While there is some overlap in the role of the special review board and the review board, there is a difference in function, most notably in the authority of the review board to review conditions of confinement. Compare Minn.Stat. § 253B.22, subd. 4, with Minn.Stat. § 253B.18, subd. 4c (2000). More important, though, is that MID patients have access to both the review board and the special review board. Thus, the state's own implementation of the statute negates its argument that the legislature did not intend any group of civilly committed individuals to have access to both boards.
With the constitutionality of the civil commitment statute in mind, together with the state's implementation of it, we next proceed to review the language. As we stated earlier and the state admitted at oral argument, the determination of whether appellants are entitled to a review board turns on whether the Sex Offender Program facilities are "regional treatment centers." The state asserts that the Sex Offender Program facilities are not regional treatment centers because appellants were not committed as mentally ill persons, but instead as persons with mental disorders, and the definition of regional treatment center includes the clause "for mentally ill, mentally retarded or chemically dependent persons." The state further *584 argues that the terms mental illness and mental disorder have different meanings and cites as an example that antisocial personality disorder is considered a mental disorder but is not considered a mental illness. The state argues that upon commitment it did not prove that appellants were mentally ill and therefore, the Sex Offender Program facilities are not facilities for mentally ill patients, although they could be classified as facilities for patients with mental disorders.
While there is some credence to the state's argument, the state's overall construction of the civil commitment statute as it relates to SPPs and SDPs violates one of the basic rules of statutory constructionthat like language should be construed in a like manner. See Van Asperen, 254 Minn. at 74, 93 N.W.2d at 698. The exact same limiting language that the state cites in the regional treatment center definition in Minn.Stat. § 253B.02, subd. 18, is also included in the definition of "treatment facility" found in subdivision 19 of the same chapter. Minn.Stat. § 253B.02, subd. 19 (2000). A treatment facility is defined as "a hospital, community mental health center, or other treatment provider qualified to provide care and treatment for mentally ill, mentally retarded, or chemically dependent persons." Minn.Stat. § 253B.02, subd. 19 (emphasis added).
By definition under the statute, the Sex Offender Program facilities are secure treatment facilities. See Minn.Stat. § 253B.02, subd. 18a. The plain language of the term "secure treatment facility" suggests that in addition to being secure, the facility is also a "treatment facility." In addition to the legislature's choice in name, the commitment procedures for MID, SPP, and SDP patients also illustrate that these patients are housed in "treatment facilities." Minn.Stat. § 253B.18. Throughout the explanation of the procedures for these patients, the legislature uses the terms "secure treatment facility" and "treatment facility" almost interchangeably, reserving its use of "secure treatment facility" for those provisions relating to the level of security that must be provided for the patients and using the term "treatment facility" in the other places. Compare Minn.Stat. § 253B.18, subd. 1, with subd. 5 (2000). Additionally, in the section of the statute dealing with a transfer from a secure treatment facility, the statute states that "[t]ransfer may be to other regional centers under the commissioner's control," suggesting that secure treatment facilities are also regional centers. Minn.Stat. § 253B.18, subd. 6 (2000) (emphasis added). The inescapable conclusion of the legislature's choice of language is that a "secure treatment facility" is a "treatment facility" regardless of the presence of the words "mentally ill, mentally retarded, or chemically dependent" in the definition.
It is difficult to understand how we can conclude that the term "mentally ill" excludes the Sex Offender Program facilities for purposes of defining a regional treatment center in section 253B.02, subd. 18, but that the term does not exclude the Sex Offender Program facilities for purposes of defining a treatment facility in subdivision 19 of the same section. To follow this reasoning would certainly produce an absurd result and would violate our basic rules of statutory construction. See Van Asperen, 254 Minn. at 74, 93 N.W.2d at 698. Instead, the fact that the Sex Offender Program facilities are treatment facilities and that the identical language is used to define regional treatment centers convinces us that the Sex Offender Program facilities are also regional treatment centers.[5]*585 Therefore, we hold that Minn.Stat. § 253B.22 requires the commissioner to establish a review board for the Sex Offender Program treatment facilities in Moose Lake and St. Peter. Having reached this legal conclusion, there is no need on remand for an evidentiary hearing on this claim.

II.
The state also asserts that dismissal of appellants' declaratory judgment action was proper because appellants did not allege any harm resulting from their denial of a review board. Appellants did allege a harm. Appellants alleged that they were being denied a review board, contrary to the civil commitment statute. The legislature determined that individuals who are civilly committed in regional treatment centers should have review boards to fulfill a certain role and wrote the statute to mandate that the commissioner provide the review boards. Appellants' allegation is sufficient for their declaratory judgment action. A declaratory judgment is a declaration of rights or a determination of "whether or not further relief is or could be claimed." Minn.Stat. § 555.01 (2000). Under the statute, any person may seek construction of a statute and may "obtain a declaration of rights, status, or other legal relations thereunder." Minn.Stat. § 555.02 (2000). As we explained in Montgomery v. Minneapolis Fire Dep't Relief Ass'n, "[t]he main characteristic of the declaratory judgment, which distinguishes it from other judgments, is the fact that, by the act authorizing it, courts are empowered to adjudicate upon disputed legal rights whether or not further relief is or could be claimed." 218 Minn. 27, 30, 15 N.W.2d 122, 124 (1944) (internal citations removed). Thus, a declaratory judgment is proper when the court is "merely declaring the complainant's rights so as to relieve him from a present uncertainty and insecurity." Holiday Acres No. 3 v. Midwest Fed. Sav. and Loan Ass'n, 271 N.W.2d 445, 448 n. 3 (Minn.1978). In this declaratory judgment action, appellants sought and could obtain only a determination as to whether they were entitled to a review board under the statute. For this action, they are not required to allege any additional harm aside from the denial of such a statutorily mandated board.
The state argues that appellants need to allege a resulting harm in their constitutional claim and that appellants failed to do so. However, because appellants' constitutional claim is based on the denial of a review board and we have concluded that appellants are entitled to a review board, we do not need to determine whether appellants alleged sufficient facts such that their constitutional claim should survive a motion to dismiss.
We hold that the district court improperly dismissed appellants' claim; we reverse and remand for entry of judgment consistent with this opinion.
Reversed and remanded.
NOTES
[1]  The commitment chapter mandates that "the provisions of this chapter pertaining to persons mentally ill and dangerous to the public apply with like force and effect to persons who are alleged or found to be sexually dangerous persons or persons with a sexual psychopathic personality" unless otherwise provided in the specific section. Minn.Stat. § 253B.185, subd. 1 (2000).
[2]  The commitment statute mandates that SPPs and SDPs be confined to a secure treatment facility unless "the patient establishes by clear and convincing evidence that a less restrictive treatment program is available that is consistent with the patient's treatment needs and the requirements of public safety." Minn.Stat. § 253B.185, subd. 1 (2000).
[3]  When the legislature added the SDP commitment proceedings, it also changed the legislative designation on the psychopathic personality commitment proceedings to "Sexual Psychopathic Personality." Act of Aug. 31, 1994, ch. 1, §§ 1 & 6, 1995 Minn. Laws 6, 9 (1994 1st Sp. Session). When making this change, the legislature also moved these commitment proceedings into the civil commitment chapter in the statutes, ch. 253B, and codified the utter inability standard used in Blodgett. See id.
[4]  We reversed Linehan's commitment as a psychopathic personality in Linehan I. After his commitment as an SDP, we upheld the district court's findings and order of indefinite commitment in In re Linehan, 557 N.W.2d 167 (Minn.1996) (Linehan II). At that same time, but in a separate opinion, we upheld the constitutionality of the SDP Act in Linehan III, 557 N.W.2d at 186-87, 189. This numbering of the Linehan cases is consistent with how we presented them in Linehan IV, 594 N.W.2d at 869-70.
[5]  We do not conclude, however, that SPPs and SDPs meet the statutory definition of "mentally ill person" in Minn.Stat. § 253B.02, subd. 13 (2000). The reason that SPPs and SDPs are properly housed in treatment facilities and regional treatment centers could very well be due to the fact that the statute dictates that SPPs and SDPs be treated similarly to MIDs, whose mental illness is a component of their commitment. Minn.Stat. § 253B.02, subd. 17 (2000). SPPs and SDPs could, therefore, be in treatment facilities and regional treatment centers because they are statutorily mandated to receive the same treatment as MIDs unless the statute specifically says otherwise. See Call, 535 N.W.2d at 317-18.
