
87 N.W.2d 452 (1958)
Grace A. STUCKER, Appellant,
v.
COUNTY OF MUSCATINE, Iowa, and Muscatine County Hospital, Appellees.
Grace A. STUCKER, Appellant,
v.
COUNTY OF MUSCATINE, Iowa, Muscatine County Hospital, and Hartford Accident and Indemnity Company, Appellees.
Nos. 49318, 49319.
Supreme Court of Iowa.
January 14, 1958.
*454 Newport & Wine, Davenport, and Frank A. Gillett, Wilton Junction, for appellant.
Robert H. Wilson, Muscatine, and Lane & Waterman, Davenport, for appellees.
LARSON, Justice.
By stipulation the trial court's judgments in two suits and six special appearances have been consolidated in one appeal. The cause of action stated in the original petition was for damages for personal injuries caused by negligently transfusing improper blood into the person of the plaintiff during the month of August, 1954. The original petition was in one count and named one Lorraine Shepherd, a professional nurse, the County of Muscatine, and the Muscatine County Hospital, as defendants. Subsequent to due notice, the county and the hospital, hereafter referred to as "county defendants", filed special appearances asking the court to "quash service of original notice as to them for lack of jurisdiction." As the principal basis of this attack, county defendants claimed they were "immune from this action under the laws of the State of Iowa," and that the court therefore lacked "jurisdiction of the subject matter." Plaintiff resisted orally and by brief and argument contending said defendants should raise this issue by motion to dismiss after appearance, but the trial court determined it was "without jurisdiction over the subject matter in this type of case" under our past pronouncements, sustained the special appearances of the county defendants, and quashed the service of original notices as to them. Plaintiff appealed that ruling to us, but on county defendants' motion, that appeal was dismissed on July 26, 1956, for failure to diligently prosecute the same. In the meantime on May 21, 1956, some two months after the trial court had sustained the special appearances, plaintiff asked leave of court to amend her petition by adding several new counts and including two new defendants, a doctor and the Hartford Accident and Indemnity Company, hereafter referred to as the "Hartford Company." This was granted and new notices were also served on these county defendants.
While the original petition was bottomed on the negligence of the hospital employee, the amendment contained counts bottomed on an alleged breach of warranty that the blood furnished was suitable for the purpose of its intended use, and that under the third-party beneficiary concept, the insurance carrier was liable to the plaintiff to the extent of its policy for the injury she suffered as a result of the transfusion.
*455 Apparently through an abundance of caution, the plaintiff also commenced a new action against the same parties, and her petition was identical with the original petition as amended and sought the same relief. Proper notices were served, and again the county defendants filed special appearances in both cases based upon the same grounds as before, and on the additional ground that the previous determination of the court of the jurisdictional issue was res judicata of the cause of action resulting from the circumstances revealed. The Hartford Company also filed special appearances in each case, and as its basis claimed it was a privy of the county defendants and that the jurisdictional question previously decided was res judicata, and for the further reason that the plaintiff could not, due to the bar provided in Section 516.1, Code of Iowa, 1954, I.C.A. maintain an action against it as indemnitor in an original action. The trial court sustained all six special appearances and plaintiff appeals, listing eleven errors, and argues them in six divisions of her brief and argument. Appellees' brief replies in three divisions, but, as issues are closely connected, we shall consider them together.
The trial court found that the first order sustaining the special appearances, on the ground that they were immune from tort liability, was an adjudication on the merits of a vital issue in the case. It also found it had no power to render a valid and enforceable judgment against them due to a lack of jurisdiction over the subject matter. County defendants argue that when plaintiff's appeal to this court was dismissed, judgment became final as to the issue of jurisdiction and that plaintiff had had her day in court. It is further argued plaintiff's effort to amend her petition and file a new identical petition is an attempt to relitigate the single cause of action by allegations of other theories on which recovery for the same personal injuries might be based. We agree.
I. It must be conceded that if there were adjudications on the jurisdictional merits, as to that issue at least, affecting both the county defendants and their privies, the determinations were final adjudications. Martin Bros. Box Co. v. Fritz, 228 Iowa 482, 292 N.W. 143; Scott v. Scott, 174 Iowa 740, 156 N.W. 834.
The county defendants, relying on "county immunity", contend that the original suit was in fact against the county to recover from it damages for an alleged wrong, i. e. the negligent act of its servants in the transfusion of blood to plaintiff. As this involved a jurisdictional question, special appearance was a proper method of raising it. Martin Bros. Box Co. v. Fritz, supra; Bachman v. Iowa State Highway Commission, 236 Iowa 778, 782, 20 N.W.2d 18; Estevez v. Nabers, 5 Cir., 219 F.2d 321; Ripperger v. A. C. Allyn & Co., 2 Cir., 113 F.2d 332; In re Estate of Bourke, 159 Kan. 553, 156 P.2d 501, 157 A.L.R. 1107. See R.C.P. 66 and 104(a), 58 I.C.A., providing that the "want of jurisdiction of the subject matter may be so raised" by special appearance. Due to our pronouncement in Shirkey v. Keokuk County, 225 Iowa 1159, 275 N.W. 706, 281 N.W. 837, the trial court concluded the county and the hospital were within said immunity and, whether right or wrong, that determination of the jurisdictional question as it related to the circumstances in the cause of action alleged became a final adjudication that it lacked jurisdiction over the subject matter of the action. Martin Bros. Box Co. v. Fritz, supra, and cases cited.
The definition of jurisdiction set forth in Franklin v. Bonner, 201 Iowa 516, 518, 207 N.W. 778, 779, affirmed in the recent case of Hulburd v. Eblen, 239 Iowa 1060, 1064, 33 N.W.2d 825, 827, is as follows: "* * * jurisdiction is the lawful exercise of judicial authority, and involves two elements: (1) The subject-matter of the action or proceeding, and (2) the parties thereto. Jurisdiction of the subject-matter *456 is given to a court solely by the law. Consent cannot (usually) confer the right. Jurisdiction over the person is acquired by the service of process upon the defendant, as defined by law, or by his voluntary submission to the jurisdiction of the court." (Insertion ours.) Also on this subject see Collins v. Powell, 224 Iowa 1015, 1020, 277 N.W. 477. No question was raised here as to the proper service of notice and there was no claim of consent by the county defendants to be sued for damages for this personal injury. Generally it is the nature of the relief demanded that determines whether the suit against an agency or branch of the state is in fact against the state so as to involve subject matter beyond the power of the court to adjudicate. See note 44 L.R.A., N.S., 189, et seq. Accordingly, in ruling on the county defendants' first special appearances, the trial court, after due consideration, determined it did not have jurisdiction of the subject matter and that the court could not grant the relief of damages for personal injuries against these governmental agencies.
II. The term res judicata as used generally embraces in its entirety the effect of a judgment as preventing the parties and their privies from relitigating in a subsequent proceeding a controversy or issue already decided by a former judgment. See annotations, 49 A.L.R.2d 1031-1070; 50 C.J.S. Judgments § 824, page 393; 30 Am.Jur., Judgments, § 167; McCarthy v. State of Utah, 1 Utah 2d 205, 265 P.2d 387, 49 A.L.R.2d 1031.
The usual effect of an original judgment is to bar a second action upon the same claim, demand or cause of action, and we attach here that meaning to the term res judicata. Kunkel v. Eastern Iowa Light & Power Co-op., 232 Iowa 649, 657, 5 N.W.2d 899. The vital issue as to whether the court had power to grant relief was involved, argued and decided on the allegations of plaintiff's original stated cause.
In Restatement of the Law, Judgments, § 49, it is stated: "Where a valid and final personal judgment not on the merits is rendered in favor of the defendant, the plaintiff is not thereby precluded from thereafter maintaining an action on the original cause of action and the judgment is conclusive only as to what is actually decided." (Emphasis supplied.)
This judgment, however, was not such as would simply preclude the relitigation of particular facts or issues in another cause of action between the same parties, which is sometimes called estoppel by judgment. On the contrary a judgment as to jurisdiction over the subject matter is a conclusive one, not only as to the actual question decided, but to every matter and question which plaintiff could present within the purview of the first action.
Plaintiff's contention that her cause was not considered on its merits is not justified. As we have indicated, on the vital question of jurisdiction, when properly before the court, a determination under the facts appearing in the petition and otherwise is, as to that issue, a judgment rendered upon the merits. Obviously it is not necessary to consider all the merits to dispose of a legal matter. Due consideration of vital ones will usually determine the matter as to all issues.
Apparently plaintiff herself realized the effect of the adjudication on her cause of action, for she attempted both by amendment of the old petition and by a new petition to state a new or different cause of action, one which she now claims sets up a different relief or claim which would not be barred by the former adjudication nor be subject to the same immunity contentions by a state agency. It is true in the added counts she asks only a recovery from the county defendants to the extent of the indemnity policy carried in the Hartford Company. She, therefore, contends that because she amended her petition alleging in other counts a relief demand, the nature *457 of which was not subject to the jurisdictional bar, prior to the dismissal of her appeal to this court, she had stated a cause of action no longer subject to the jurisdictional objection and was still in court. This contention is also without merit, principally for the reason that it came too late.
When the court sustained the special appearance, rightly or wrongly, that adjudication, unsuccessfully appealed, became res judicata of the cause of action arising from the circumstances related in her petition, and she could not thereafter by amendment seek other remedies and avoid the prior adjudication of the court. Prompt appeal was her sole remedy. Hawley v. Davenport, R. I. & N. W. Ry. Co., 242 Iowa 17, 45 N.W.2d 513.
It is unnecessary at this time to decide the question as to whether the original petition as amended, or the second petition, would have stated a cause of action not subject to dismissal under a special appearance contesting the jurisdiction of the court.
While we have taken the position that the function of the special appearance should be limited and, while perhaps not saying so, we have indicated that questions not clearly determinable on the merits in such a manner as to invite disposal by that forum should be overruled.
It is well to point out here that the issue as to the court's jurisdiction over the subject matter may be raised at any time. Usually defendants will not suffer greatly by having their special appearance overruled. R.C.P. 66 provides: "* * * If his special appearance is erroneously overruled, he may plead to the merits or proceed to trial without waiving such error." Logically, then, the determination of the jurisdictional question, after being challenged by a special appearance, must be appealed within the usual appeal time if sustained; and if overruled, the question is by statute preserved for appeal until after the trial on the merits. In either event the parties are afforded full opportunity for review when duly and properly pursued.
On the other hand, as pointed out in 17 Iowa Law Review 81, the desirability of a prompt decision on the merits has been emphasized by this court. The doctrine of res judicata, justified by practical necessity, is designed to promulgate equal justice for all litigants, and parties should not be required to relitigate issues which they have already litigated or have had a reasonable opportunity to litigate. Once a party has had an opportunity to be heard, he has had his day in court and cannot thereafter be heard to complain, especially if it can be said he had the opportunity to be heard on decisive merits.
III. From a careful study of plaintiff's petitions we also agree with the trial court that there was but one wrong and but one cause of action involved in these petitions, and that the alleged existence of liability insurance as pleaded in plaintiff's amendment to petition and her companion petition does not evade the bar of res judicata. As no liability can be imposed on the county defendants, none can be imposed upon their alleged indemnity carrier. It is not only proper but necessary for a plaintiff to include in his original petition all theories of recovery that he has, arising out of the same negligent act of defendant upon which he relies for recovery. See Davis v. Mater, Iowa, 79 N.W.2d 400, 402, which quotes from Wells v. Wildin, 224 Iowa 913, 277 N.W. 308, 115 A.L.R. 169, as follows: "In this case the plaintiff's cause of action is for a single wrong. He seeks in each count the same damages for the same injuries arising out of the same act of the decedent. The petition states one cause of action and he may recover on either theory, * * *. `It was not only permissible but necessary for plaintiff to include both theories of recovery in his petition. A party is not permitted to divide his single cause of action into different actions.'" Similar holdings of this court are found in In re Estate of *458 Flaugher, 232 Iowa 520, 5 N.W.2d 821, and Mortenson v. Hawkeye Casualty Co., 234 Iowa 430, 12 N.W.2d 823. Also see 58 I.C.A. Rule of Civil Procedure 22, which provides for joining alternative causes of action in the same petition.
The mere existence of liability insurance creates no new and distinct cause of action, and the purchase of liability insurance by the county and hospital did not in any way waive or prejudice the right of the governmental agency to raise the defense of governmental immunity. McGrath Building Co. v. City of Bettendorf, Iowa, 85 N.W.2d 616, 620, and cases cited therein.
We must conclude, therefore, that as to the county and hospital, the amendments and the new petition merely restated the same cause of action for personal injuries, and the adjudication of immunity to that cause not being appealed was conclusive.
IV. The court committed no error in sustaining the special appearance as to the defendants' insurance company. This court has frowned upon the practice of joining an insurance carrier in an action in tort without first having obtained a judgment against the insured as the alleged tort feasor and the return of the execution unsatisfied. See Section 516.1, Code of Iowa, 1954, I.C.A.; McCann v. Iowa Mutual Liability Ins. Co., 231 Iowa 509, 1 N.W.2d 682; Hoosier Cas. Co. of Indianapolis v. Fox, 8 Cir., 102 F.Supp. 214; Rule 28, R.C.P. From the circumstances appearing in plaintiff's petition it must be concluded she stated no direct cause of action against the Hartford Company for her personal injuries, and as a privy of the county defendants the Hartford Company was relieved of liability in this action. Under the rule announced in Hawley v. Davenport, R. I. & N. W. Ry. Co., supra, 242 Iowa 17, 22, 45 N.W.2d 513, 516, the bar of res judicata is also applicable to the defendant Hartford Company. We said therein: "* * * the doctrine of res judicata is available * * * to the parties to a prior adjudication and their privies," citing cases. (Emphasis supplied.) The same rule is recognized in 50 C.J.S. Judgments §§ 592, 756; 30 Am.Jur., Judgments, sections 161, 219, 237; and in the Restatement of the Law, Judgments, sections 82, 83. We further pointed out in the Hawley case that if defendant's responsibility is necessarily dependent upon the culpability of another, who was the immediate actor, and who, in an action against him by the same plaintiff for the same act, has been adjudged not culpable, the defendant may have the benefit of that judgment as an estoppel, even though he would not have been bound by it had it been the other way. Further authority for this position is found in Portland Gold Mining Co. v. Stratton's Independence, 8 Cir., 158 F. 63, 16 L.R.A.,N.S., 677, and Restatement of the Law, Judgments, § 96 (1) a, page 472.
Plaintiff directs our attention to the statements of this court in Mahaffa v. Mahaffa, 230 Iowa 679, 298 N.W. 916, but this is not a jurisdictional question. It does refer to the qualities necessary in a judgment to be regarded as res judicata. It is true a statement is found in 30 Am.Jur. 908, that "* * * the doctrine of res judicata is that an existing final judgment rendered upon the merits, without fraud or collusion, by a court of competent jurisdiction, is conclusive of rights, questions, and facts in issue, as to the parties and their privies, in all other actions in the same or any other judicial tribunal of concurrent jurisdiction." (Emphasis supplied.) However, the alleged implication that no jurisdictional question can be decided upon its merits in a special appearance must be denied. It is the generally accepted rule that courts have the authority in the first instance to pass upon the vital issue as to whether or not it is a court of competent jurisdiction to pass on the subject matter and adjudge the parties. In considering the facts and circumstances disclosed by the pleadings and otherwise, we conclude that the judgment of the court on this vital *459 issue is on the merits, sufficient at least to make its determination a final judgment, which if not appealed is res judicata of the cause pleaded. As heretofore stated, a hearing upon all the issues is not necessary to satisfy the requirement of a judgment on the merits. Only such proceedings as will afford "full legal opportunity for an investigation and determination of the merits of the suit" are required. Tutt v. Smith, 201 Iowa 107, 115, 204 N.W. 294, 298, 48 A.L.R. 394, 400. Here plaintiff was afforded just such a required opportunity and fairly presented her contentions to the trial court.
In the Mahaffa case there was no opportunity for an investigation, and the judgment did not purport to adjudicate any matter appearing in the petition, but regardless of the decision under the facts there disclosed, we cannot here hold the issue of jurisdiction was not properly considered on its merits as permitted in a special appearance and that it was not res judicata of that cause of action.
We are satisfied the trial court was correct in holding that the adjudication in the original petition applied to the Hartford Company as in privity with county defendants, and that only one cause of action was stated in both petitions.
Although the result of this appeal seems somewhat distressing in view of our recent decision that counties and county hospitals may be sued in tort for wrongs committed by their servants while performing proprietory functions, which would probably include this cause originally alleged, Wittmer v. Letts, Iowa, 80 N.W.2d 561, plaintiff's failure to diligently pursue her appeal of the vital jurisdictional determination leaves us no alternative but to now affirm the learned trial court's action in sustaining all special appearances in both suits.
Affirmed.
All Justices concur, except SMITH, J., who takes no part.
