
820 P.2d 1225 (1991)
120 Idaho 868
DANNY L., Plaintiff-Appellant,
v.
William BONNES, Director, State Hospital South, Defendant-Respondent.
No. 18686.
Supreme Court of Idaho, Boise, September 1991 Term.
October 21, 1991.
Rehearing Denied December 23, 1991.
Idaho Legal Aid Services, Inc., Boise, for plaintiff-appellant. Howard A. Belodoff argued.
Larry J. EchoHawk, Atty. Gen., for defendant-respondent. Weldon B. Stutzman, Deputy Atty. Gen., argued.
PER CURIAM:
Appellant Danny L., a 14-year-old patient at State Hospital South, filed a verified complaint and an amended verified complaint alleging, among other things, that at the date of the filing of the complaint and the amended complaint "there is no medical reason which justifies his continued commitment to State Hospital South and [that he] has requested his release to receive care and treatment in a lesser restrictive commitment in the community." The complaint further alleged that his continued commitment violated the due process clauses of the state and federal Constitutions and was in violation of the statutes of the State of Idaho.
The respondent State of Idaho filed two motions to dismiss, one in response to the original complaint and the other in response to the amended complaint. The first motion was filed pursuant to I.R.C.P. *1226 12(b)(6), and the second was filed "on the grounds that the issues raised by the pleadings are moot as plaintiff Danny L. is no longer at State Hospital South." The second motion to dismiss briefly described the history of Danny L.'s commitment to State Hospital South and concluded with the prayer that "defendant requests that this action be dismissed."
The district court responded to both motions to dismiss, first concluding that the action was not moot. The district court's ruling presaged our recent opinion in Bradshaw v. State, 120 Idaho 429, 816 P.2d 986 (1991), in which this Court held, in a similar case involving a commitment to State Hospital South, that the termination and release of an involuntarily committed patient from the state hospital did not necessarily moot his claim that his rights were violated in the course of that commitment. We find no error in that ruling.
The district court did dismiss the amended complaint "on the merits," concluding that "neither statutory nor constitutional law afford plaintiff a basis for release." After reviewing the verified amended complaint, we conclude that the allegations contained in the verified amended complaint raise issues which cannot be resolved on a motion to dismiss.
The respondent argues that the motions to dismiss should be treated as motions for summary judgment as permitted by I.R.C.P. 12(b)(6) because the parties submitted other evidentiary matters for consideration by the court. Cook v. Soltman, 96 Idaho 187, 525 P.2d 969 (1974), suggests that the trial court could have treated the proceeding as one for summary judgment. However, the trial court expressly stated that he was treating the motion as a motion to dismiss.[1] Even if we consider the motion to dismiss as a motion for summary judgment, we nevertheless conclude that on this record there were triable issues of fact which precluded the granting of a judgment of dismissal of at least portions of the verified amended complaint.
Accordingly, the judgment of the trial court is reversed and the cause remanded for further proceedings.
NOTES
[1]  In the transcript, the trial court specifically stated, "[I]t looks like to me the motion to dismiss is a 12(b)(6) motion. So we can get that in perspective. You have to weigh under the requirements of 12(b)(6) as far as the status of the pleadings."
