*482The opinion of the court was delivered by
Burch, J.:The question in this appeal is whether the trial court erred in denying the plaintiff’s motion for permission to file an amended petition. A petition filed previously in the same case was considered by this court on appeal from an order overruling a demurrer to the same and we reversed the district court. In so doing, we held in substance that such petition did not warrant application of the doctrine res ipsa loquitur and that such petition did not contain a sufficient allegation of negligence. The ruling of the trial court, therefore, was reversed and the cause remanded with instructions to sustain the demurrer. We did not direct that judgment be entered for the defendant. (See Waddell v. Woods, 158 Kan. 469, 148 P. 2d 1016.) The decision in the former appeal was filed as of May 6,1944, and on the 5th day of January, 1945, the plaintiff filed a motion in the district court for permission to file a second amended petition and in connection therewith presented to the court such second amended petition. In denying the motion the district court signed a journal entry to the effect that the decision of this court in the former appeal precluded the district court from exercising any discretion in the matter and from exercising any jurisdiction, including that of granting the plaintiff permission to file the second amended petition. From such ruling the plaintiff has appealed.
The defendant has filed in this court a motion to dismiss the appeal. The first ground on which süch motion is based is that the order refusing permission to file an amended petition was not a final appealable order. Such contention is not sound. The result of the order made by the district court is analogous in many respects to a demurrer having been sustained to the second amended petition. The order is a final disposition of the plaintiff’s case unless the district court reverses its own order or it is reversed upon appeal. Consequently, the motion to dismiss the appeal cannot be sustained on such ground. The second ground of the motion to dismiss is that the plaintiff’s second specification of error in this appeal is nothing more than a request for this court to reexamine and grant a rehearing in the former appeal. Examination of the second amended petition, however, discloses that it contains material allegations relating to acts of negligence which were not present in the petition which we considered in the former appeal. As a result the motion to dismiss the appeal must be denied.
*483Having disposed of the motion to dismiss the appeal, consideration must be given to the merits of the appeal. The proffered second amended petition could have been filed without leave of the district court since no answer had been filed, under the authority of G. S. 1935, 60-756. If the petition had been so filed, undoubtedly the defendant would have filed a demurrer thereto and it is reasonable to assume that one of the grounds of the demurrer would have been that the alleged cause of action, if any, was barred by the applicable statute of limitations. . Ordinarily a plea that a cause of action is so barred is an affirmative defense and must be raised by proper pleadings. It can be raised by demurrer when the delay appears in the pleading. Candor commands the admission that the question of the statute of limitations has not been directly raised by the record in the present appeal. Therefore, the legal problem is not exactly the same as that which confronted this court in the case of McCue v. Franklin, 157 Kan. 668, 143 P. 2d 646, because in such case the effect of the statute of limitations had been raised.
We have given consideration to the necessity of the statute of limitations either being pleaded as a defense or properly raised by demurrer in order that no impression may prevail that we are departing from such a rule in this case. The rule is not decisive of the appeal, however, because counsel for the plaintiff do not urge us to apply the rule. In all probability such counsel deliberately have omitted to do so because from a practical standpoint a reversal of the court’s ruling for such a reason alone would result only in the litigation bobbing back and forth, as a cork on turbulent waters, between this court and the district court. The real question to be decided in order to be of aid to both the litigants is whether any cause of action which may be alleged properly in the second amended petition is barred by the statute of limitations.
1. Before giving consideration, however, to such a question it is necessary to discuss briefly the reasons assigned by the trial court for its ruling on the motion for leave to file the second amended petition. If by our silence we should give apparent approval to such reasoning an erroneous inference might result. When this court, upon appeal, merely reverses a district court on its ruling in connection with a demurrer to a pleading and no judgment is directed in behalf of either party, the effect of the ruling by this court is the same for the purpose of further proceedings in the district court as if the district court had made the same ruling without an appeal *484to this court. Under such circumstances the district court is not divested of any discretion it may have in connection with the filing of subsequent pleadings and is not precluded from exercising further ■jurisdiction in the pending case. In such instance the doctrine of res judicata does not rise to any greater height or expand to any greater extent by reason oí the ruling having been made by this court rather than originally made in the district court. It is possible, of course, that a decision by this court in sustaining a demurrer to a pleading may be of such a nature as to make the rule of res judicata applicable in such a manner that amended pleadings could not thereafter be filed properly in the district court but it certainly does not follow that such a consequence must always occur. In support of their contentions to such effect counsel for the plaintiff cite Penquite v. General Accident & Life Ass’n, 126 Kan. 511, 268 Pac. 851, Burris v. Burris, 140 Kan. 208, 34 P. 2d 127, Beloit Bldg. Co. v. Quinn, 141 Kan. 762, 44 P. 2d 232, and In re Estate of Reed, 157 Kan. 602, 142 P. 2d 824. Such cases are in point and are controlling insofar as they are applicable to the new allegations of negligence in the second amended petition. A different result occurs where a final judgment has been rendered on the merits but we do not have such a case before us. The reasons assigned by the trial court for its ruling upon the motion for leave to amend were incorrect but it does not follow necessarily that the ruling was incorrect. -It is well established that the reasons given for a lower court's order are immaterial if its ruling is correct for any reason. (See Quinton v. Kendall, 122 Kan. 814, 823, 253 Pac. 600, and In re Estate of Bond, 158 Kan. 776, 782, 150 P. 2d 343.)
2. The principal question involved in this appeal develops more logically if we consider first the new matter which was alleged in plaintiff’s second amended petition. Such petition contained, among others, the following allegations which were not included in the petition considered by this court in the prior appeal:
“. . . in reference to specific items of negligence against the defendant says: that from investigation and consultation with skilled men familiar with the methods and operation of X-ray machines, he is informed and believes and therefore alleges the fact to be that the defendant was negligent in that he used voltage that was not proper and of too high a frequency; that the application of the same was too close to the flesh of the plaintiff and that proper insulation and proper discs or mediums were not used to insulate and protect the defendant from burns; that the application of the X-ray was applied too long and so long that it caused the plaintiff to be burned; that in addition *485thereto the apparatus was defective and not kept in good mechanical condition, in ways and manners not known to this plaintiff.”
In the petition filed prior to the second amended petition the plaintiff had alleged that for certain reasons he was unable to set out in detail or in substance the negligence of the defendant. Consequently, it is very evident that the second amended petition contained substantial additions to the allegations of the prior petition which were material. We have no hesitancy in saying that the rule of res judicata would not prevent the plaintiff from filing such an amended petition, or that the same would be sufficient, if tested for sufficiency, by the filing of a demurrer thereto on the grounds that the second amended petition did not allege a cause of action based on negligence. The second amended petition, however, affirmatively shows on its face that the specific acts of negligence charged against the defendant occurred in the month of August, 1940. The motion for leave to file the second amended petition was not filed until the 5th day of January, 1945 — almost four and one-half years after the alleged negligence occurred. While the question of the effect of the statute of limitations, as hereinbefore stated, reaches us in an irregular manner, principally because of the original irregularity arising by reason of the filing of an unnecessary motion, nevertheless for the reasons herein set out we will consider the effect of the statute of limitations in disposing of this appeal.
Whether the proffered second amended petition alleges a cause of action which is not barred by the statute of limitation is a question, the answer to which is dependent upon the answer to another question, to wit: Did any petition filed in this case prior to the expiration of the period provided in the statute of limitations allege any cause of action? Our decision in the first appeal clearly held that no cause of action predicated upon the theory of res ipsa loquitur was alleged in the involved petition. The second amended petiton does not enlarge in any way, or add any material, allegations as a basis for the application of the rule of res ipsa loquitur. Consequently, all questions relative to such rule are no longer in the case unless we can reverse our former decision in such respect. Such a question will be discussed subsequently in this opinion. In the absence of any such new allegations relative to the theory of res ipsa loquitur we are confined to consideration of whether the petition previously filed within the statutory period contained any allegations of negligence which were sufficient to constitute a cause of action. Refer*486ence to our prior decision discloses that the opinion contained the following statements:
“As shown by the journal entry, the trial court, in ruling on the demurrer, held that the doctrine of res ipsa loquitur did not apply to the treatment of cases such as were outlined in the petition, but that an allegation, hereafter quoted in full, that defendant had delegated work to a person unknown to plaintiff, waá a sufficient allegation of negligence, and it overruled the demurrer.” (p. 469.)
Therefore, it will be seen that the question whether the petition then being considered contained a sufficient allegation of negligence was directly before us for decision. After quoting in full the part of the petition referred to by the trial court, our opinion continues:
“. . . Without repeating earlier allegations, it will be noted that although the pleader denominated it as an act of negligence, the simple statement of the allegation segregated by the trial court is that the defendant delegated work ‘to a person unknown to this plaintiff and who was not a physician and surgeon and otherwise not qualified.’ There is no allegation that such person did anything whatever. Even liberally construed to mean that such person did the delegated work, there is no allegation that the delegated work was done negligently or contributed to the injury. The mere fact the pleader said the act was one of negligence did not make it so.” (p. 471.)
Later in the opinion will be found the following statement:
“We are of opinion that ... a mere allegation that if the treatment had been properly administered no harm would have resulted, . . . did not state facts sufficient to make the doctrine of res ipsa loquitur apply, . . . If it is not applied there was no sufficient allegation of negligence, and the demurrer to the petition should have been sustained. . . .” (p. 476.)
(Emphasis supplied.)
By reason of the foregoing we think it clearly appears that our opinion in this case on its former appeal must be construed as holding that the involved petition did not allege sufficiently a cause of action based on either the theory of res ipsa loquitur or common law of negligence. Consequently, since no cause of action whatever was pleaded in the prior petition, none existed which could be amended. It is true, of course, that ordinarily an amended petition can be filed within the statutory period even if previously-filed petitions have not alleged a cause of action, but unless some petition is filed within the period provided by the statute which alleges sufficiently a cause of action, then any amendment thereof arrives too late. There is nothing new or novel about the rule *487which we think is controlling in the present case. Syllabus, paragraph two in the case of Railway Co. v. Bagley, 65 Kan. 188, 69 Pac. 189, contains a concise statement of the rule. It reads as follows:
“Where the original petition states no cause of action whatever, it will not arrest the running of the statute of limitations, and an amendment made after the bar of the statute is complete must be treated as filed at the time the amendment is made. A cause of action, being stated then for the first time, cannot escape the bar of the statute of limitations by being filed as an amendment.”
Syllabus, paragraph one from the case of Powers v. Lumber Co., 75 Kan. 687, 90 Pac. 254, reads as follows:
“When a petition fails to state -a cause of action an amendment which as-' serts a cause of action barred by the statute of limitations does not relate back to the first petition so as to deprive defendant of the defense of the statute.”
See, also, Beneke v. Bankers Mortgage Co., 119 Kan. 105, syl. ¶ 3, 237 Pac. 932. Among later cases holding to the same effect is that of Clark v. Wilson, 149 Kan. 660, 88 P. 2d 1070, the syllabus of which reads as follows:
“Where a demurrer to a petition is sustained on the ground that the petition does not state a cause of action, the filing of such petition does not arrest the running of the statute of limitations, and the filing of an amended petition does not relate back to the date of the filing of the original petition so as to deprive the defendant of the defense of the statute.”
(See, also, the additional cases cited in support of the syllabus at page 662.)
We do not have in this case an instance of amplification of a cause of action imperfectly pleaded. (See discussion of this distinction in Springer v. Roberts, 151 Kan. 971, 101 P. 2d 908.) Since our decision held that no cause of action whatever was pleaded sufficiently by the petition involved in the prior appeal of this case, it must follow that the additional amendments in the proffered second amended petition were alleged too late and any cause of action based upon them is barred by the statute if our decision in the original appeal is to stand as the settled law of the case. Actions to recover damages for negligence in malpractice cases are barred by the two-year limitation statute which begins to run from the time the alleged malpractice was committed. (See Blackburn v. Security Benefit Ass’n, 149 Kan. 89, 86 P. 2d 536, and Becker v. Floersch, 153 Kan. 374, 110 P. 2d 752.)
3. We are asked, however, by counsel for the plaintiff, to review *488our decision in the preceding appeal of this case. We cannot do so. Assuming for the purpose of consideration that the writer of this opinion and a majority of the members of the court as now constituted are of the present opinion that the result reached in our decision in the previous appeal was erroneous, nevertheless it is the settled law of the case. All questions involved in this present appeal, with the exception of the effect of the amendment and 'the application of the statute of limitations thereto, were considered and determined when this case originally was here on appeal. If we were to consider the entire case again such would be equivalent to granting a rehearing in a cause fully and finally decided nearly a year and a half ago. On June 16, 1944, plaintiff’s motion for rehearing in such case was denied. (See Ingalls v. Smith, 101 Kan. 301, 167 Pac. 1040; State, ex rel., v. Lyons, 106 Kan. 860, 189 Pac. 976; Gratney v. Wyandotte County, 118 Kan. 101, 233 Pac. 795; Robertson v. Labette County Comm’rs, 124 Kan. 705, 261 Pac. 831; and also Fleming v. Campbell, 148 Kan. 516, 83 P. 2d 708.)
The ruling of the trial court is affirmed and it is directed that judgment be entered for the defendant.