                   IN THE COURT OF APPEALS OF IOWA

                                   No. 15-1434
                             Filed October 12, 2016


IN THE MATTER OF R.M.D,
Alleged to be Seriously
Mentally Impaired,

R.M.D,
Appellant.
________________________________________________________________


      Appeal from the Iowa District Court for Johnson County, Paul D. Miller,

Judge.



      An inmate appeals the dismissal of his “motion for declaratory relief,”

which sought a ruling on his right to counsel and right to an independent medical

examination in a habeas corpus proceeding. REVERSED AND REMANDED.




      Noelle R. Murray of Murray Law Office, P.L.C., Cedar Rapids, for

appellant.

      Thomas J. Miller, Attorney General, and H. Loraine Wallace, Assistant

Attorney General, for appellee State.



      Considered by Danilson, C.J., and Vaitheswaran and Tabor, JJ.
                                         2


VAITHESWARAN, Judge.

       An inmate serving a lengthy prison sentence was also involuntarily

committed based on a serious mental impairment.          The inmate appeals the

dismissal of his “motion for declaratory relief,” which sought a ruling on his right

to counsel and right to an independent medical examination in a habeas corpus

proceeding.

I.     Background Facts and Proceedings

       More than twenty-five years ago, R.M.D. was sentenced to three prison

terms not exceeding twenty-five years each for three counts of second-degree

sexual abuse. In time, R.M.D. was found to be “seriously mentally impaired,” and

the district court ordered hospitalization. R.M.D. was subsequently transferred to

the Iowa Medical and Classification Center run by the department of corrections.

The Center contains prison units as well as mental health units. According to the

department, R.M.D. was housed in prison units.

       Years after R.M.D.’s initial classification as seriously mentally impaired,

R.M.D. expressed a desire to appeal one of his mental health commitment

orders. A mental health advocate notified the district court. The court appointed

an attorney to investigate the issue and request a hearing if needed.           The

attorney recommended against a hearing, and the district court declined to take

further action.

       R.M.D. wrote to the court, vociferously objecting to the denial of a hearing.

He asked to file a habeas corpus action pursuant to Iowa Code section 229.37

(2013) and requested the appointment of counsel to assist with the matter. The

court scheduled “Respondent’s petition for writ of habeas corpus” for hearing and
                                        3


stated the previously appointed attorney “remain[ed] appointed to represent”

R.M.D.

      R.M.D. questioned the competency of the previously appointed counsel

and sought the appointment of someone else.           The district court ordered

consideration of his request for a new attorney at the time of the scheduled

habeas corpus hearing.

      Meanwhile, R.M.D.’s attorney moved for an adjudication of law points on

several issues, including whether his contract with the State Public Defender

authorized the court to summarily appoint him in the habeas corpus matter. The

district court concluded counsel’s motion was not viable under our civil procedure

rules and found his question about contractual representation was not ripe for

review.   The court ordered the attorney to recast the motion and file an

application for another hearing.

      Counsel recast his motion in the form of a “motion for declaratory relief.”

He asked the court to “settle the following legal issues”: (1) whether R.M.D. was

“constitutionally entitled to a Court Appointed Attorney for a Habeas Corpus

Hearing” under Iowa Code section 229.37; (2) whether counsel should be

“summarily” appointed to represent R.M.D. where the contract with the public

defender was “silent on the matter of representation for Habeas Corpus petitions

under 229.37 of the Code”; and (3) whether R.M.D. was entitled to an

independent medical examination “for purposes of a Habeas Corpus, and if so,

who is responsible for the payment of said IME?” The State filed a resistance

and motion to dismiss, and R.M.D.’s attorney filed a response. The same day

the response was filed, the district court entered an order finding R.M.D. to be
                                        4


“seriously mentally impaired and in need of full-time custody, care and treatment

as alternative placement with Iowa Prison Systems.”

      At a non-evidentiary hearing on R.M.D.’s motion for declaratory relief, the

district court considered the arguments raised in the State’s motion to dismiss.

The court granted the State’s motion, citing two statutory provisions, Iowa Code

sections 822.1 and 229.37. “Based on these two rulings,” the court further found

R.M.D. had no constitutional right to court-appointed counsel and the attorney

currently representing him had no contractual obligation to do so. The court

declined to address whether R.M.D. was entitled to an independent medical

examination at State expense.

      On appeal from the dismissal of his motion for declaratory relief, R.M.D.

addresses the two statutory bases for dismissal cited by the district court.

R.M.D. does not challenge the court’s further conclusions concerning his right to

counsel. The State responds by seeking affirmance on the two cited statutory

grounds as well as a third ground. The State also addresses the question of

R.M.D.’s right to counsel in a habeas corpus proceeding. Based on the posture

of the district court’s ruling and the appellate arguments, we begin and end with

the State’s arguments for affirmance.

II.   State’s Arguments for Affirmance of Dismissal Ruling

      A.     Ripeness

      The State starts with an argument that was not expressly raised or

addressed in the district court. It contends R.M.D.’s motion for declaratory relief

“was not ripe nor did it present a justiciable controversy.” We must preliminarily

decide whether we can address this issue. See DeVoss v. State, 648 N.W.2d
                                            5


56, 63 (Iowa 2002) (“[W]e will not consider a substantive or procedural issue for

the first time on appeal, even though such issue might be the only ground

available to uphold a district court ruling.”).

         The State did not raise the term “ripeness” in the district court, a term that

means there is “an actual, present controversy, as opposed to one that is merely

hypothetical or speculative.” Taft v. Iowa Dist. Ct., 879 N.W.2d 634, 638 (Iowa

2016) (citation omitted).      But the State did assert that R.M.D.’s motion for

declaratory relief failed to raise a justiciable controversy and sought an advisory

opinion. These assertions implicate the ripeness doctrine. See id. (“We seek to

avoid issuing advisory opinions on possible future injuries, though we may find

our present-controversy requirement ‘satisfied by a “direct threat of personal

detriment.”’” (citation omitted)). Accordingly, we conclude the State effectively

raised the ripeness doctrine, and we will address this claimed basis for

affirmance.

         The State specifically asserts R.M.D.’s attorney “sought an advisory

opinion from the District Court concerning issues that might arise in a habeas

action that had never been filed with the Court.” We disagree. R.M.D. requested

habeas corpus relief in his letter to the court.       The district court treated the

request as a habeas corpus petition, appointed an attorney, and scheduled the

matter for an evidentiary hearing. At this juncture, appointed counsel questioned

his ability to represent R.M.D. pursuant to his contract with the public defender.

The court canceled the scheduled hearing, solicited a “recast” pleading from

counsel, and ruled he could request another hearing. Counsel complied with the

order.     His recast “motion for declaratory relief” raised the pertinent and
                                          6


justiciable issues of whether R.M.D. had a constitutional right to counsel in the

already-scheduled-and-canceled habeas corpus hearing and whether he could

obtain an independent medical examination. We conclude the issues R.M.D.

raised in his motion for declaratory relief were ripe for review. The fact that the

district court subsequently issued a new order finding R.M.D. to be seriously

mentally impaired and subject to civil commitment underscores the justiciability of

the issues the attorney raised. We decline to affirm the district court’s dismissal

ruling for lack of ripeness.

       B.     Iowa Code section 822.1

       The State next argues R.M.D. was statutorily prohibited from filing a

habeas corpus action. The State relies on language in the postconviction relief

statute stating “[t]he provisions of [the habeas corpus chapter] shall not apply to

persons convicted of, or sentenced for, a public offense.” Iowa Code § 822.1.

       Section 822.1 is inapposite. As R.M.D. points out, his request for habeas

corpus relief raised a challenge to the civil commitment orders, not his criminal

judgment or sentences.          Habeas corpus was permissible under these

circumstances. See id. § 229.37 (“All persons confined as seriously mentally

impaired shall be entitled to the benefit of the writ of habeas corpus . . . .”); In re

S.M., No. 12-1983, 2014 WL 69773, at *2-3 (Iowa Ct. App. Jan. 9, 2014) (“S.M.’s

request for a placement hearing could be treated as a petition for a writ of

habeas corpus under section 229.37.”); In re B.T.G., 784 N.W.2d 792, 794-95

(Iowa Ct. App. 2010) (treating application for review of commitment as a petition

for writ of habeas corpus); Hackett v. State, 354 N.W.2d 247, 249 (Iowa Ct. App.

1984) (noting postconviction procedures “specifically apply to persons who have
                                        7


been convicted of, or sentenced for, a public offense and who claim that their

probation, parole or conditional release has been unlawfully revoked”).        We

reverse the district court’s dismissal of R.M.D.’s motion for declaratory relief

under section 822.1.

      C.     Iowa Code section 229.37

      The State also argues R.M.D. was “not a person confined as seriously

mentally impaired under section 229.37.” Chapter 229 addresses “hospitalization

of persons with mental illness.” Section 229.37 states:

              All persons confined as seriously mentally impaired shall be
      entitled to the benefit of the writ of habeas corpus, and the question
      of serious mental impairment shall be decided at the hearing. If the
      judge shall decide that the person is seriously mentally impaired,
      such decision shall be no bar to the issuing of the writ a second
      time, whenever it shall be alleged that such person is no longer
      seriously mentally impaired.

Iowa Code § 229.37.

      R.M.D. fell squarely within the ambit of this provision. Although he was an

inmate under the jurisdiction of the department of corrections, he was also

subject to involuntary inpatient hospitalization orders based on findings of a

serious mental impairment. See S.Q. v. St. Anthony Reg’l Hosp., No. 10-1293,

2011 WL 3481001, at *1, 4 (Iowa Ct. App. Aug. 10, 2011) (holding “confinement”

refers to “involuntary hospitaliz[ation] in an inpatient setting”). The most recent

order entered after R.M.D. filed the motion for declaratory relief and before the

non-evidentiary hearing, found R.M.D. “seriously mentally impaired” based on the

report of the Chief Medical Officer and determined he was “in need of full-time

custody, care and treatment as alternative placement within Iowa Prison

Systems, currently IMCC.” The report did not recommend outpatient treatment.
                                          8


Instead, it recommended an "alternate placement" with the IMCC, and the

explanation stated RMD "has been on a restricted status of movements because

of his history of assaulting peers."     Whether RMD was housed in a general

population prison unit or a mental health unit, his mental health commitment

resulted in a level of confinement over and above his incarceration for his

criminal offenses.

       We conclude R.M.D. was confined as seriously mentally impaired and was

“entitled to the benefit of the writ of habeas corpus.” We reverse the district

court’s dismissal of R.M.D.’s motion for declaratory relief under section 229.37.

III.   Disposition

       Having found the State’s arguments for affirmance of the dismissal order

unavailing, we reverse the order.      We remand for an evidentiary hearing on

R.M.D.’s original request for habeas corpus relief.

       The district court’s additional rulings on R.M.D.’s constitutional and

contractual rights to counsel were “[b]ased on” its rulings under Iowa Code

sections 822.1 and 229.37, and R.M.D. does not conditionally challenge them.

Because the issue of whether R.M.D. had a constitutional or contractual right to

counsel is not properly before us, we decline to address it.1 Nothing in this

opinion should be construed as precluding the parties from raising the issue on

remand.




1
  The State argues against a constitutional or statutory right to counsel but makes the
following concession: “[I]t may be that this Court does have the inherent authority or
discretion to appoint counsel to represent Section 229.37 habeas applicants on a pro
bono basis. See Maghee v. State, 639 N.W.2d 28 (Iowa 2002).”
                                         9


       As noted, the district court did not decide the question of whether R.M.D.

had a right to an independent medical examination at State expense.

Accordingly, we have no basis for reviewing the question. Again, nothing in this

opinion should be construed as precluding the parties from raising the issue on

remand.2

       REVERSED AND REMANDED.




2
 R.M.D. has not discharged his criminal sentence. His habeas corpus challenge to the
mental health commitment orders has no bearing on his criminal sentence or discharge
date.
