
    Argued and submitted February 15,
    reversed and remanded March 24, 1980
    EDWARD WILLIAM MUELLER, Appellant, v. CUPP, Respondent.
    
    (No. 111,898, CA 16176)
    608 P2d 1203
    
      Michael Curtis, Salem, argued the cause and filed the brief for appellant.
    Thomas H. Denney, Assistant Attorney General, Salem, argued the cause for respondent. With him on the brief were James A. Redden, Attorney General, and Walter L. Barrie, Solicitor General, Salem.
    Before Buttler, Presiding Judge, and Gillette and Roberts, Judges.
    GILLETTE, J.
   GILLETTE, J.

Petitioner, an inmate at the Oregon State Penitentiary, petitioned for a writ of habeas corpus alleging that respondent and his subordinates denied petitioner needed medical care and discriminated against him in terms of eligibility for work release because of his medical problems. Petitioner sought to compel immediate medical care and an end to the discrimination. The circuit court granted the defendant’s motion to strike petitioner’s amended replication because of lack of jurisdiction. Petitioner declined to plead further and the court entered an order dismissing the petition. We reverse.

This action is brought to ORS 34.310 which states, in part, that:

"* * * Every person imprisoned or otherwise restrained of his liberty, within this state, except in the cases specified in ORS 34.330, may prosecute a writ of habeas corpus to inquire into the cause of such imprisonment or restraint, and if illegal, to be delivered therefrom.”

Petitioner is not challenging the legality of his imprisonment; rather, his claim is based on the treatment, or lack thereof, that he is receiving. The issue to be decided is whether this action, which is basically an action concerning conditions of confinement, can properly be brought as a habeas corpus action.

Traditionally, a writ of habeas corpus could only be used where a prisoner was challenging the legality of his confinement and was seeking release from that confinement. Courts expanded the scope of the writ to include cases where the prisoner was not challenging the judgment of conviction itself but rather "the legality of additional measures of imprisonment or restraint * * * beyond the initial restraint” of imprisonment itself. Penrod/Brown v. Cupp, 283 Or 21, 24, 581 P2d 934 (1978). The writ was for a time also extended in Oregon to include cases where the prisoner’s sole claim concerned the legality of the treatment he or she was receiving. In Newton v. Cupp, 3 Or App 434, 437, 474 P2d 532 (1970), we stated that "habeas corpus is available in Oregon to test the constitutionality of treatment afforded an inmate of a penal institution.”

An important reason for our decision in Newton was the fact that, at the time, prisoners convicted of a felony were denied by statute the right to pursue ordinary civil remedies against illegal treatment. Id., at 439. In 1975, the legislature abolished civil death of prisoners; this gave them recourse to ordinary civil remedies. ORS 137.275. Despite the repeal of "civil death” and the resulting availability of other remedies, however, the Oregon Supreme Court nevertheless subsequently concluded that "the writ of habeas corpus remains available to challenge alleged deprivations of a prisoner’s rights” where the deprivations complained of relate solely to the prisoner’s treatment in prison. Penrod/Brown v. Cupp, supra, at 23-24. However, the court in Penrod limited the instances in which prisoners could challenge the conditions of their confinement in this way. In order to bring such an action, two essential elements must exist. The petitioner must show (1) a need for immediate judicial attention either because of the "urgency of the harm to which the prisoner claims to be exposed or * * * [judicial scrutiny] is found to be required as a matter of constitutional law”, and (2) the lack of any other adequate and timely remedy. Penrod/Brown v. Cupp, supra, at 28.

Petitioner suffers from diabetes. He alleges that, when he was first incarcerated, prison officials failed to supply him with a diabetic’s diet or insulin and that, as a result, he suffered a diabetic coma. Since that time he has received insulin but not the necessary diabetic diet. He claims to be going blind as a consequence. Petitioner alleges that prison officials have refused to provide him with the necessary surgery to arrest this deterioration in his eyesight. Additionally, he claims that they have also refused to provide him with the surgery needed to correct a congenital heart defect from which he suffers.

While petitioner does not claim a constitutional violation, he does allege a deprivation "which, if true, would require immediate judicial scrutiny.” Penrod/Brown v. Cupp, supra, at 28. Taking the allegations in his complaint as true, it is apparent that petitioner states a claim which requires immediate attention because of "the urgency of the harm” to which he claims to be exposed. Penrod/Brown v. Cupp, supra, at 28. The facts alleged, if true, show that he will suffer irreparable and immediate harm if he is not provided the diet he needs.

The question remains as to whether there are other remedies available to petitioner which would prevent him from pursuing his claim by writ of habeas corpus. The alternative remedies said to be available to petitioner are a petition for writ of mandamus or a civil action seeking injunctive relief.

A writ of mandamus, like a writ of habeas corpus, is an extraordinary remedy to be used only where there is no other adequate remedy in the ordinary course of the law. ORS 34.110. We can perceive no reason for prefering mandamus over habeas corpus, inasmuch as both are extraordinary writs.

The petitioner could also bring an ordinary civil action asking for a mandatory injunction. However, this remedy is neither timely nor adequate. A central characteristic of the writ of habeas corpus "is the speed with which it triggers a judicial inquiry.” Penrod/Brown v. Cupp, supra, at 27. ORS 34.370. In this case, petitioner alleges facts that demonstrate a need for speedy court intervention and resolution. A civil action would not be a sufficiently timely remedy. See Penrod/Brown v. Cupp, supra, at 27.

We conclude that petitioner’s claim is one that can be properly brought by writ of habeas corpus. He alleges facts that demonstrate the need for immediate judicial intervention because of the harm to which he claims to be exposed and we find no adequate and timely alternative available to him.

Reversed and remanded. 
      
       Because of the disposition we made of this case, we need not decide whether the allegation of heart difficulties, standing alone, would justify intervention by habeas corpus.
     
      
       ORS 34.110 states:
      "A writ of mandamus may be issued to any inferior court, corporation, board, officer or person, to compel the performance of an act which the law specially enjoins, as a duty resulting from an office, trust or station; but though the writ may require such court corporation, board, officer or person to exercise its or his judgment, or proceed to the discharge of any of its or his functions, it shall not control judicial discretion. The writ shall not be issued in any case where there is a plain, speedy and adequate remedy in the ordinary course of the law.”
     
      
       ORS 34.370 provides, in part:
     