
516 N.W.2d 874 (1994)
In the Interest of B.B., A Minor Child, B.B., Appellant.
No. 93-1253.
Supreme Court of Iowa.
May 25, 1994.
*876 Mark D. Reed of Bertroche Law Offices, Des Moines, for appellant.
Bonnie J. Campbell, Atty. Gen., John M. Parmeter, Sp. Asst. Atty. Gen., Kathrine S. Miller-Todd, Asst. Atty. Gen., for appellee State of Iowa.
Considered by HARRIS, P.J., and LAVORATO, NEUMAN, ANDREASEN, and TERNUS, JJ.
TERNUS, Justice.
In this case we review the dispositional orders of the juvenile court placing a minor adjudged delinquent in the Iowa State Training School for Boys. The minor, B.B., appeals the orders arguing: (1) the initial dispositional order was not supported by sufficient evidence and was therefore an abuse of discretion; (2) the initial dispositional order went beyond the issues presented by the parties and constituted unfair surprise; and (3) the funding caps placed on group foster care pursuant to Iowa Code section 232.143 (1993) violate his constitutional rights of due process and equal protection. We affirm.

I. Background Facts and Proceedings.

B.B. first came before the juvenile court in 1990 for committing fifth-degree theft. Later that year he committed two simple assaults. Disposition on the theft and the first of the simple assault offenses included informal adjustment agreements requiring B.B. to do community service work. After the second simple assault B.B. was adjudged delinquent. The court ordered him to remain in the custody of his mother under formal probation to the Department of Juvenile Court Services (JCS).
In the first six months of 1992, B.B. was referred to the juvenile court three times, once for the offense of third-degree theft and twice for the offense of simple assault. B.B. was adjudicated on the theft charge. The juvenile court ordered B.B. to remain in his mother's home under the supervision of JCS and comply with a probation contract. The contract required that B.B. participate in family therapy until he was successfully discharged.
In October 1992, the Waterloo police department referred B.B. to JCS for the offense of possession of a counterfeit controlled substance with the intent to deliver in violation of Iowa Code section 204.401(1)(c)(6) (1991). The juvenile court adjudged B.B. delinquent and placed him under the supervision of JCS. The probation contract was continued.
At the dispositional hearing in February 1993, evidence was introduced that B.B. had violated the terms of his probation contract several times and the family had never followed through with the requirement for family counseling. JCS recommended that B.B. be placed in group foster care. The parties stipulated, however, that such a placement would violate the regional plan for group foster care. See 1992 Iowa Acts ch. 1229 § 10 (codified at Iowa Code § 232.143 (1993)).
The juvenile court concluded that the least restrictive placement available under the circumstances was at the Iowa State Training School for Boys in Eldora, Iowa. Accordingly, the court transferred guardianship of B.B. to the Director of the Department of Human *877 Services (Department) for placement at the State Training School.
B.B. appealed to the district court from this order. First, he argued that the cap placed on group foster care by section 232.143 denied him due process and equal protection. Secondly, he claimed the juvenile court abused its discretion in ordering B.B. to be placed in the State Training School. The district court rejected these arguments. B.B. appealed to this court.
At the review hearing in August 1993, the juvenile court decided to continue guardianship of B.B. with the Department but return the care, custody, and control of B.B. to his mother. The court approved a behavioral contract executed by the parties. It also ordered that if B.B. violated the contract, the court should be informed and mittimus would be issued without hearing.
B.B. later violated several conditions of the behavioral contract. After a hearing the juvenile court recommitted B.B. to the State Training School. The court stated B.B. should be placed in highly structured group foster care when an opening became available.
B.B. appealed the order recommitting him to the State Training School. Upon B.B.'s motion we consolidated his two appeals.

II. Scope of Review.

Our scope of review of juvenile court proceedings is de novo. In re D.L.C., 464 N.W.2d 881, 882 (Iowa 1991). We review both questions of law and fact. Iowa Code § 232.133(1) (1993).

III. Initial Dispositional Order.

We do not reach the merits of the issues arising from the initial order placing B.B. at the State Training School because the subsequent order recommitting B.B. to that institution renders moot the propriety of his prior placement there. "An issue is moot if it no longer presents a justiciable controversy because it has become academic or nonexistent." In re Meek, 236 N.W.2d 284, 288 (Iowa 1975). An opinion by this court that the initial order was inappropriate or unconstitutional would not secure B.B.'s release from the State Training School because he is held there under the authority of the second order. Under these circumstances, our decision with respect to the first dispositional order would be of no effect in the underlying controversy. See id.
We conclude the first two issues raised by B.B. are moot and not reviewable on the merits in this appeal. We proceed to decide whether the cap placed on the number of group foster care placements unconstitutionally limited the juvenile court's power to place B.B. in group foster care at the time the court recommitted B.B. to the State Training School.

IV. Due Process.

B.B. contends that Iowa Code section 232.143, which establishes a cap on the number of children in group foster care, violates his substantive due process rights. He asserts that the State's interest in the public fisc should not outweigh his interest in being placed in the least restrictive setting, here, group foster care.
Section 232.143 provides in part:
A statewide target for the average number of children in group foster care placements on any day of a fiscal year, which placements are a charge upon or are paid for by the state, shall be established annually by the general assembly. The department [of human services] and the judicial department shall jointly develop a formula for allocating a portion of the statewide target established by the general assembly to each of the department's regions.... The number determined in accordance with the formula shall be the group foster care placement target for that region.
Iowa Code § 232.143(1) (1993). The statute requires each region to develop a plan to meet its placement target. Id. § 232.143(2). This plan must include strategies for alternate placements "in order to contain expenditures for services provided to children within the amount appropriated by the general assembly for that purpose." Id. Finally, the statute provides that the state will not pay for group foster care which is not in accordance *878 with the regional plan. Id. § 232.143(3).
Under the Due Process Clause of the Fifth and Fourteenth Amendments to the United States Constitution, the state is forbidden from infringing on certain fundamental liberty interests, regardless of the process provided, unless the infringement is narrowly tailored to serve a compelling state interest. Reno v. Flores, 507 U.S. ___, ___, 113 S.Ct. 1439, 1447, 123 L.Ed.2d 1, 16 (1993). Substantive due process analysis requires that we first identify the asserted right and whether it is "fundamental." Id. We then decide whether the action infringing that right is narrowly tailored to serve a compelling state interest. In re C.S., 516 N.W.2d 851, ___ (Iowa 1994).
The right asserted by B.B. here is the right to the least restrictive placement.[1] B.B. argues that his liberty is less restricted in group foster care than it would be at the State Training School. We accept this premise, although we note that the juvenile court's order designated a "highly structured" group foster care setting. (Emphasis added.) The question then becomes whether B.B. has an absolute right to the least restrictive placement. In other words, is B.B. entitled to a placement that is less restrictive than the placement ordered even though the less restrictive placement is not authorized by the legislature or is otherwise unavailable? We think neither state law nor the constitution gives him this right.
A. State law. Iowa law requires the juvenile court to enter "the least restrictive dispositional order appropriate in view of the seriousness of the delinquent act, the child's culpability ..., the age of the child and the child's prior record." Iowa Code § 232.52(1) (1993). In the same statute, the legislature provides that the court cannot order group foster care placement if the placement is not in accordance with the regional plan established pursuant to section 232.143. Id. § 232.52(2A). We do not consider one portion of a statute in isolation, but rather construe it in context with other portions of the statute. John Deere Dubuque Works of Deere & Co. v. Weyant, 442 N.W.2d 101, 104 (Iowa 1989). Thus, we must read the entire statute to determine the meaning of the requirement that the court enter "the least restrictive dispositional order appropriate."
Certainly the legislature did not intend to give a juvenile the right to be placed in the least restrictive setting despite the unavailability of a less restrictive placement when in the same statute purportedly giving such a right the legislature limits the number of group foster care placements. Cf. Baker v. Webster County, 487 N.W.2d 321, 323 (Iowa 1992) (mentally retarded person's right to services under Iowa Code chapter 222 was limited by state law). We conclude that in deciding which disposition is the least restrictive, the juvenile court is confined to consideration of those facilities which have a bed available and in which the juvenile can be legally placed. Since B.B. could not legally be placed in group foster care, he had no right under state law to such a placement, although it might be less restrictive than assignment to the State Training School.
B. Constitutional right. We must now consider whether the liberty interest protected by the Due Process Clause entitles B.B. to the least restrictive placement. Both the United States Supreme Court and the Eighth Circuit Court of Appeals have considered similar claims. See Reno v. Flores, 507 U.S. ___, 113 S.Ct. 1439, 123 L.Ed.2d 1 (1993); Hanson v. Clarke County, 867 F.2d 1115 (8th Cir.1989). We find these cases instructive.
In the Flores case, the Supreme Court considered whether juvenile aliens detained by the government had a right to placement with a private custodian rather than in a child-care institution. Flores, 507 U.S. at ___, 113 S.Ct. at 1447-48, 123 L.Ed.2d at *879 17-18. The Court held that if institutional custody is constitutional, it does not become unconstitutional just because there may be a more desirable form of child care for the juvenile. Id., 507 U.S. at ___, 113 S.Ct. at 1448, 123 L.Ed.2d at 17-18. The Court stated:
"The best interests of the child" is likewise not an absolute and exclusive constitutional criterion for the government's exercise of the custodial responsibilities that it undertakes, which must be reconciled with many other responsibilities. Thus, child-care institutions operated by the state in the exercise of its parens patriae authority ... are not constitutionally required to be funded at such a level as to provide the best schooling or the best health care available; nor does the Constitution require them to substitute, wherever possible, private nonadoptive custody for institutional care.... Minimum standards must be met, and the child's fundamental rights must not be impaired; but the decision to go beyond those requirementsto give one or another of the child's additional interests priority over other concerns that compete for public funds and administrative attentionis a policy judgment rather than a constitutional imperative.
Id.
The Hanson case also dealt with a claim for a particular form of placement. There, Pamela Hanson, an adult, was voluntarily institutionalized for treatment of a genetic disorder. She sought to have the county pay for her treatment in an out-of-state private facility recommended by medical professionals. The county was willing to pay for that placement only to the extent that the cost did not exceed the cost of an in-state placement in an intermediate care facility for the mentally retarded. Because the cost of the private facility was more than the intermediate care facility, Hanson sought to compel full funding of the private facility placement.
Hanson argued that the private out-of-state facility was less restrictive than the in-state intermediate care facility. She claimed that her constitutional right to placement in the "least restrictive environment consistent with qualified professional judgment" required the county to pay for the less restrictive placement. Hanson, 867 F.2d at 1120. The Eighth Circuit Court of Appeals rejected this claim. It held that Hanson had no liberty interest protected by the Due Process Clause in being placed in the least restrictive environment. Id.
Here, B.B. does not claim that institutional custody of him is unconstitutional. Therefore, we start with the basic premise that placement of B.B. in some form of child care institution does not violate his constitutional rights. We must then consider B.B.'s claim that he is entitled to a particular form of institutional custodythe least restrictive placement. This claim is very similar to the claims of the juvenile aliens in Flores who asserted a right to a specific form of custody by the government and the claim of the adult plaintiff in Hanson who asserted a right to placement in the least restrictive environment. For the reasons discussed in Flores and Hanson, we hold that a juvenile has no constitutional right to the least restrictive form of institutional placement. See Gary W. v. State of Louisiana, 437 F.Supp. 1209, 1217, 1219-20 (E.D.La.1976) (no constitutional right to the least restrictive confinement conceivable; state must provide care in the best "available" environment).
Even if such a right did exist, it is not a "fundamental" right. Therefore, substantive due process demands, at the most, that there be a reasonable fit between the governmental purpose and the means chosen to advance that purpose. Flores, 507 U.S. at ___, 113 S.Ct. at 1448-49, 123 L.Ed.2d at 18; In re C.S., 516 N.W.2d at ___. Here the state's goals are to reduce spending on group foster care and to encourage the development of alternatives to group foster care placements. Limitations on the number of placements in group foster care "reasonably fit" these goals. Indeed, it is difficult to imagine a more direct manner in which to control spending and reallocate limited resources.
In summary, we hold that B.B. has no right under state law or the Due Process Clause to be placed in the least restrictive form of institutional custody regardless of the availability of a less restrictive placement. *880 Therefore, the juvenile court did not err in placing B.B. in the State Training School pending the availability of space in a group foster care facility.

V. Equal Protection.

The United States and Iowa Constitutions guarantee the equal protection of the laws to all persons. U.S. Const. amend. XIV, § 1; Iowa Const. art. I, § 6. B.B. claims that section 232.143 violates his right of equal protection because it serves to treat him differently than similarly situated juveniles who require group foster care merely because he falls within the class of juveniles referred at a time when the caps have been reached. B.B. argues the statute unreasonably allocates group foster care among children needing such care on a first-come-first-served basis rather than based on need.
The first step we take in applying an equal protection analysis is to determine the appropriate standard of review. Ruden v. Parker, 462 N.W.2d 674, 676 (Iowa 1990). A rational basis test applies unless the challenged statute involves a suspect classification or a fundamental right. Id. Suspect classifications are generally based on race, alienage, or national origin. Id. "`Fundamental rights include the right to vote, the right to interstate travel, and other rights, such as those guaranteed by the First Amendment, which are considered essential to individual liberty.'" Id. (quoting Bennett v. City of Redfield, 446 N.W.2d 467, 473 (Iowa 1989)).
We have already decided in our consideration of B.B.'s substantive due process claim that no fundamental right is asserted in this case. We also conclude that no suspect classification is implicated. The statute challenged here is state social legislation which is entitled to broad deference. See Lipscomb v. Simmons, 962 F.2d 1374, 1377 (9th Cir.1992). Therefore, the rational basis test is applicable. Id. at 1379.
Under the rational basis test, a statute is constitutional unless the classification bears no rational relationship to a legitimate governmental interest. West Des Moines State Bank v. Mills, 482 N.W.2d 432, 436 (Iowa 1992). The Equal Protection Clause does not require that social legislation produce a rational result in each case. Lipscomb, 962 F.2d at 1381-82. If there is a rational basis for the program as a whole, the fact that it produces "`seemingly arbitrary consequences in some individual cases'" will not render it unconstitutional. Id. (quoting Califano v. Jobst, 434 U.S. 47, 53, 98 S.Ct. 95, 99, 54 L.Ed.2d 228, 234 (1977)).
We believe the statute is not unreasonable in allocating the limited group foster care available on a first-come-first-served basis. B.B. argues that group foster care should be assigned on the basis of need. Allocating this type of placement based on need would be impracticable, expensive, and adversely affect the stability of group foster care placements.
The amount of time and resources that would be required to compare the relative needs of all juveniles for whom group foster care is the least restrictive form of placement would be substantial. Additionally, a recomparison of these juveniles would theoretically be necessary every time the juvenile court recommends group foster care for another juvenile. Allocating group foster care based on relative need would also result in the disruption of placements. A juvenile placed in group foster care could conceivably be taken out of a group foster care facility later because a newly adjudicated juvenile's need for group foster care is identified as greater. The very real practical difficulties in allocating group foster care on the basis of relative need demonstrate the reasonableness of the system of priority chosen by the legislature.
Therefore, we conclude the statutory method for placing children in group foster care is rational. Consequently, B.B. was not deprived of equal protection of the laws merely because he was temporarily denied the least restrictive institutional setting for addressing his needs.

VI. Summary.

Any issues arising from the court's initial order placing B.B. in the State Training School for Boys were rendered moot by the second dispositional order recommitting him *881 to that facility. B.B.'s placement in the State Training School did not violate his constitutional rights. The statute placing caps on the number of children who may be placed in group foster care did not violate B.B.'s substantive due process rights or his right to equal protection under the laws.
AFFIRMED.
NOTES
[1]  B.B. does not claim that the cap on group foster care dispositions deprives him of an adequate placement. More specifically, he does not allege that placement at the State Training School was an inappropriate alternative placement at the time he was recommitted to that facility. Therefore, this case does not present the issue of whether B.B. has been denied a right to minimally adequate care and treatment while in the state's custody. See In re C.S., 516 N.W.2d 851 (Iowa 1994).
