
334 N.W.2d 757 (1983)
Jerry HEUMPHREUS, Administrator of the Estate of Billy Gene Heumphreus, Deceased; Teresa Heumphreus, Parent, Guardian, and next friend of Amy Heumphreus, a minor; and Teresa Heumphreus, Individually, Appellants,
v.
STATE of Iowa, Appellee.
No. 68738.
Supreme Court of Iowa.
June 15, 1983.
*758 Bruce L. Walker, Iowa City, for appellants.
Thomas J. Miller, Atty. Gen., and Iris J. Post, Asst. Atty. Gen., for appellee.
Considered by UHLENHOPP, P.J., and HARRIS, McCORMICK, LARSON, and CARTER, JJ.
UHLENHOPP, Justice.
This wrongful death action by the survivors of a deceased penitentiary inmate raises a question of subject-matter jurisdiction of the district court.
In the present action the survivors filed a petition in district court against the State containing the following allegations with respect to liability:
2. Defendant operates the penal system for the state of Iowa to include the Fort Madison penitentiary and is subject to Chapter 25A Iowa Code, 1979 and 1981.
3. On or about the 29th day of November, 1979, Plaintiff's decedent was an inmate of the Augusta Unit of the John Bennett Correction Center located north of the Fort Madison Penitentiary.
4. While working on that date Plaintiff's decedent became ill and a state employee at the Augusta Unit diagnosed Billy Gene Heumphreus' medical condition.
5. Thereafter Plaintiff's decedent was transported to the prison facility for medical treatment by state personnel in a state van.
6. There was a delay at the prison facility which included:
a) Plaintiff's decedent was required to walk through the turnkey area after his condition had been diagnosed as suffering from a heart attack;
b) Plaintiff's decedent was required to wait in the turnkey area for a period of time after his condition had been diagnosed as suffering from a heart attack;
c) Plaintiff's decedent was required to walk to the prison hospital after waiting in the turnkey area after his condition had been diagnosed as suffering from a heart attack.
7. When Plaintiff's decedent arrived at the prison hospital there was no adequate medical attention or assistance available to Plaintiff's decedent and a Lee County Ambulance was summoned which transported Plaintiff's decedent to a Fort Madison community hospital.
8. Approximately one hour after Plaintiff's decedent's arrival at the Fort Madison community hospital, Plaintiff's decedent was pronounced dead.
9. All persons who were responsible for the incident described herein were agents or employees of the State of Iowa and were acting in the scope of their agency or employment with the State of Iowa at all times material hereto.
10. Defendant, through its agents or employees, was negligent and as a result thereof, on November 29, 1979, caused Billy Gene Heumphreus' death.
11. Said negligence of the State of Iowa was a proximate cause of the death of Billy Gene Heumphreus.
Plaintiffs also filed a separate claim against the State before the industrial commissioner under the worker's compensation act, chapter 85, Iowa Code (1979) (references are to that Code).
In the present case the State challenged the jurisdiction of the district court by a special appearance grounded on sections 25A.14(6) and 85.59 of the Code. Special appearance is a proper way to challenge the district court's subject-matter jurisdiction on the ground that the industrial commissioner has exclusive jurisdiction. Jansen v. Harmon, 164 N.W.2d 323, 326 (Iowa 1969).
Chapter 25A provides a system for making tort claims against the State notwithstanding sovereign immunity, but section 25A.14(6) of that chapter provides:
The provisions of this chapter shall not apply with respect to any claim against the state, to:
....
6. Any claim by an inmate as defined in section 85.59.
*759 Section 85.59 is apparently the outgrowth of Frederick v. Men's Reformatory, 203 N.W.2d 797, 799 (Iowa 1973). The section provides in its first, second, and fifth paragraphs:
For the purposes of this section, the term "inmate" includes a person confined in a reformatory, state penitentiary, release center, or other state penal or correctional institution while that person works in connection with the maintenance of the institution or in an industry maintained therein or while on detail to perform services on a public works project.
If an inmate is permanently incapacitated by injury in the performance of his or her work in connection with the maintenance of the institution or in an industry maintained therein or while on detail to perform services on a public works project, that inmate shall be awarded only such benefits as are provided in section 85.27 and section 85.34, subsections 2 and 3. The weekly rate for such permanent disability shall be equal to sixty-six and two-thirds percent of the state average weekly wage paid employees as determined by the Iowa department of job service under the provisions of section 96.3 and in effect at the time of the injury.
....
If death results from the injury, death benefits shall be awarded and paid to the dependents of the inmate as in other workers' compensation cases except that the weekly rate shall be equal to sixty-six and two-thirds percent of the state average weekly wage paid employees as determined by the Iowa department of job service under the provisions of section 96.3 and in effect at the time of the injury.
....
The district court held a hearing on the special appearance, and sustained it. The survivors appealed.
I. At common law a jailer has a duty to exercise reasonable diligence with reference to the care of injured, ill, or diseased inmates. Lang v. City of Des Moines, 294 N.W.2d 557, 560-61 (Iowa 1980); Miller v. Dickinson County, 68 Iowa 102, 105, 26 N.W. 31, 32 (1885); Restatement (Second) of Torts § 314A (1965). But for section 25A.14(6) of the Code, clearly the district court would have subject-matter jurisdiction under chapter 25A of the present tort claim. Do sections 25A.14(6) and 85.59 substitute a worker's compensation claim for the present tort claim? This question poses a problem of statutory construction.
II. Section 25A.14(6) does not allow State tort liability for an inmate's claim which falls under section 85.59. What is such a claim? Section 85.59 provides that an inmate includes a person confined to a correctional institution (which Heumphreus was), while working in connection with the maintenance of the institution (which Heumphreus was). Does this end the inquiry? Is an injured inmate who is confined to a correctional institution and working in the maintenance of the institution ipso facto entitled to worker's compensation and disentitled to seek relief for a tort, whatever the other facts of the case may be?
The second and fifth paragraphs of section 85.59 bear on this question. The second paragraph begins, "If an inmate is permanently incapacitated by injury in the performance of his or her work in connection with the maintenance of the institution" the inmate is entitled to worker's compensation. (Emphasis added.) The fifth paragraph, dealing with resulting death, parallels the second paragraph. We construe the italicized words to require a nexus between the permanent injury or the death and the performance of the work the injury or death must be "in" the performance of the work.
This analysis of the sections leads us to the following conclusion in situations such as the present one. An "inmate" under section 85.59 and hence under section 25A.14(6) is a person who is (a) confined in a correctional institution, (b) at work on maintenance of the institution, and (c) permanently *760 incapacitated or killed in the performanceas a resultof that work. Such a person is entitled to worker's compensation but not to relief for tort. Otherwise the person is entitled to seek relief for tort but cannot have worker's compensation.
III. What are the survivors' allegations here? They allege that Heumphreus was (a) confined to a correctional institution and (b) at work on maintenance of the institution. They also allege he had a heart attack and died as a result of negligent post-attack care. If the heart attack resulted from the performance of the work under either of the theories in Sondag v. Ferris Hardware, 220 N.W.2d 903 (Iowa 1974), the survivors would be entitled to worker's compensation for injury or death growing out of improper care after the heart attack. Brinkman v. Buffalo Bills Football Club, 433 F.Supp. 699, 702 (W.D.N.Y.1977); Dixon v. Ford Motor Co., 53 Cal.App.3d 499, 505, 125 Cal.Rptr. 872, 875 (1976); Komel v. Commonwealth Edison Co., 56 Ill.App.3d 967, 970, 14 Ill.Dec. 563, 565, 372 N.E.2d 842, 844 (1978); Szydlowski v. General Motors Corp., 397 Mich. 356, 358, 245 N.W.2d 26, 28 (1976); 1 Larson's Workmen's Compensation Law § 13.20, 2 Id. § 61.12(d) (1982). This is in line with the rule in tort cases generally. Casey v. Koos, 323 N.W.2d 193, 197 (Iowa 1982); Hunt v. Ernzen, 252 N.W.2d 445, 447 (Iowa 1977); Becker v. D. & E. Distributing Co., 247 N.W.2d 727, 731 (Iowa 1976). The survivors therefore would not be entitled to relief for tort.
If however the heart attack did not result from the work under either Sondag theory but would have occurred anyway, the survivors would not be entitled to worker's compensation but they would be entitled to try to establish tort liability for damages for death resulting from negligent post-attack care, under the principle of section 314A of the Restatement.
IV. The survivors do not allege in this case that the heart attack resulted from performance of the work. Since their allegations relating to the merits and to jurisdiction of the district court are intertwined, a ruling on jurisdiction should not be made at this time. Martin v. Ju-Li Corp., 332 N.W.2d 871 (Iowa 1983). If the worker's compensation claim is heard and decided first, and the decision is that the death is not compensable because the heart attack did not result from Heumphreus' performance of work, then the special appearance in the present case should be overruled; but if the decision is that the heart attack did result from the work and the death is compensable, then the special appearance in this case should be sustained. On the other hand, if this tort case is tried and decided first and a decision is made that the death resulted from Heumphreus' performance of work, then the special appearance should be sustained; but if a decision is made that the heart attack did not result from the work, then the present special appearance should be overruled and the survivors will not be entitled to worker's compensation.
We find no necessity to decide the constitutional question the survivors present by supplemental brief.
REVERSED.
All Justices concur except CARTER and McCORMICK, JJ., who concur specially.
CARTER, Justice (concurring specially).
I concur in the result because I agree that under the allegations of the petition it would be possible for the evidence to sustain a claim which does not fall under section 85.29; such circumstance would permit a negligence claim to be maintained under chapter 25A. I believe, however, that the majority opinion unduly limits the circumstances under which this would be possible.
Under the holding of the majority, a determination by the fact finder that the heart attack resulted from decedent's performance of work would conclusively establish that compensation for his death may only be based on the worker's compensation law. I believe that it would be possible for the evidence to show that decedent's heart attack was caused by the performance of work but that his death was not. If this were found to be the case and if it is also shown that the death resulted from the *761 negligence of agents of the state, this circumstance should permit a claim under chapter 25A regardless of whether the heart attack resulted from the performance of work.
McCORMICK, J., joins in this special concurrence.
