
512 So.2d 698 (1987)
Annie L. WALTON
v.
Michael O. BOURGEOIS, M.D., and Frank Gruich, M.D.
No. 56943.
Supreme Court of Mississippi.
August 12, 1987.
As Modified on Denial of Rehearing September 23, 1987.
John A. Nichols, Jackson, for appellant.
Thomas L. Stennis, II, L. Christopher Breard, Bryant, Stennis & Colingo, Gulfport, for appellees.
*699 Before HAWKINS, P.J., and PRATHER and ROBERTSON, JJ.
ROBERTSON, Justice, for the Court:

I.
Today's appeal presents an issue of res judicata. Plaintiff brought an action in 1984 charging medical malpractice and asserting a theory of recovery sounding in tort. She suffered an adverse final judgment dismissing her complaint. In 1985 she filed a second suit against the same defendants, charging the same underlying facts, only this time she sought recovery for breach of contract. There is nothing in her second complaint that could not as well have been asserted the first time around.
The Circuit Court sustained Defendants' affirmative defense of res judicata and entered summary judgment dismissing the present complaint. For good measure three alternative grounds for dismissal were found. For the reasons set forth below, we affirm.

II.
On January 10, 1984, Annie L. Walton filed her complaint in the Circuit Court of Harrison County, Case No. 1919, charging Drs. Michael Bourgeois and Frank Gruich with medical malpractice and demanding damages therefor. She thereafter filed an amended complaint alleging the same claim. Walton alleged that in July, 1977, Drs. Bourgeois and Gruich advised her that surgery was necessary to remove ovarian cysts and female organs. Following this operation, she charged that she continued to experience abdominal pain whereupon she continued to see the Defendants and they assured her that her pain could not be due to her female organs nor ovaries. Walton alleged that later in February, 1982, she visited Dr. Frank Martin, who hospitalized her and removed her female organs and ovaries. As such, Walton charged Drs. Bourgeois and Gruich were negligent in performing their duties towards her in that they failed to remove her female organs and ovaries.
While admitting surgery was performed on Walton, Drs. Bourgeois and Gruich denied they were negligent in treating her. The doctors thereupon moved for summary judgment. On July 12, 1984, the Circuit Court granted the motion and entered judgment summarily in favor of the doctors and against Walton. No appeal was taken from the granting of summary judgment, thus rendering that judgment final.
On February 20, 1985, Walton commenced the present action when she filed another complaint, Case No. 2087, charging the same underlying facts, but seeking recovery on a different legal theory. This time Walton sought recovery based on the theory that the Defendant doctors had breached their contract with her to remove certain ovarian cysts, ovaries and female organs. On March 11, 1985, the Defendants moved to dismiss Case No. 2087 on the grounds that the summary judgment granted in Case No. 1919 constituted res judicata and collateral estoppel of the second claim, along with the second claim being barred due to the election of remedies doctrine and statutes of limitations.
On April 22, 1985, the Circuit Court entered an order that Defendants' motion to dismiss be treated as a motion for summary judgment pursuant to Rules 12(b) and 56, Miss.R.Civ.P. So treated, the motion was then granted on res judicata and several alternative grounds, whereupon the action was finally dismissed. Walton then timely perfected the present appeal.

III.
Walton first urges that the Circuit Court erred by granting summary judgment instead of ruling directly on Defendants' Rule 12(b) motion to dismiss. She argues that at no point during the hearing on the motion to dismiss was she notified that the Circuit Court was considering treating the motion as one for summary judgment.
Our jurisprudence on this once novel point of procedure is by now quite familiar. In Gray v. Baker, 485 So.2d 306, 307 (Miss. 1986) this Court recognized that motions to dismiss and motions for summary judgment have been by rule declared interchangeable. *700 See also Rule 12(b), Miss. R. Civ.P.; Kountouris v. Varvaris, 476 So.2d 599, 602 n. 3 (Miss. 1985); Griffin v. Ware, 457 So.2d 936, 938 (Miss. 1984); cf. Millican v. Turner, 503 So.2d 289, 292 (Miss. 1987) (conversely, where motion for summary judgment is failed and court determines it may appropriately be acted upon without reference to matters outside the pleadings, judgment shall be entered as judgment on the pleadings pursuant to R. 12(c), Miss.R. Civ.P.). The Court went on to explain:
The motion for summary judgment is the functional equivalent of the Rule 12(b)(6) motion to dismiss, only it occurs at a subsequent stage of the proceedings. Like the motion to dismiss, it tests the legal sufficiency of the plaintiff's claim to undergird his insistence that further proceedings be had... .
Gray, 485 So.2d at 307.
Rule 12(b) specifically provides:
If, on a motion to dismiss for failure of the pleading to state a claim upon which relief can be granted, matters outside the pleading are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided in Rule 56, and all parties shall be given reasonable opportunity to present all material made pertinent to such motion by Rule 56... .
Rule 12(b), Miss.R.Civ.P.
Anyone who reads the rule is thereby on actual notice that a motion to dismiss has the potential to be treated as a motion for summary judgment if the conditions prescribed in the rule be found. Walton and her counsel, of course, are charged with knowledge of the rule's contents. Had they read the very portion of Rule 12(b) that they attempt to invoke, they certainly had notice that the motion to dismiss could be treated as a motion for summary judgment.
Whether a Rule 12 motion ought be converted into a motion for summary judgment is a function of whether the Circuit Court finds it necessary to resort to matters outside the pleadings in order to dispose of the motion. Here the Circuit Court considered and made reference to the prior course of proceedings in Walton's 1984 lawsuit, Case No. 1919, and particularly the final judgment entered therein on July 12, 1984. These proceedings were matters extraneous to the pleadings in the present action. The Circuit Court correctly exercised the authority granted it under Rule 12(b) and considered the motion to dismiss as open for summary judgment.
Rule 12(b) provides that, upon the motion being converted to one under Rule 56, "all parties shall be given reasonable opportunity to present all material made pertinent to such a motion by Rule 56." Frequently, this will necessitate a continuance of the hearing on the motion. Cf. Hudson v. Parvin, Et Al., 511 So.2d 499, 500 (Miss. 1987); Terrell v. Rankin, 511 So.2d 126, 129 (Miss. 1987); Leonard v. Leonard, 486 So.2d 1240 (Miss. 1986). Where a legal defense such as res judicata is tendered, continuance will generally not be necessary. The only possible factual basis for avoidance of summary judgment would have been an attack on the prior proceedings. Here by contrast Walton admitted the prior action and the unappealed from final judgment entered therein. There were no other factual points to be developed. The Circuit Court committed no error in hearing and adjudging the motion as one for summary judgment without further delay.

IV.
A final judgment on the merits of an action precludes the parties and their privies from relitigating claims that were or could have been raised in that action. We have labeled this rule res judicata. Walton argues that the Circuit Court erred in holding that the present action was barred by res judicata.
There can be no question but that the Final Judgment entered July 12, 1984, dismissing Walton claim of medical malpractice against Drs. Bourgeois and Gruich arising out of the July, 1977, surgery was a final judgment on the merits. As such it was a final judgment of apparent power and force adequate to lay to rest once and for all Walton's claim that she was entitled *701 to damages because the Doctors negligently performed that surgery. Federated Department Stores, Inc. v. Moitie, 452 U.S. 394, 101 S.Ct. 2424, 69 L.Ed.2d 103 (1981).
Walton argues otherwise. Specifically, she points to the four identities prerequisite to acceptance of a plea of res judicata, set forth in Dunaway v. W.H. Hopper & Associates, Inc., 422 So.2d 749 (Miss. 1982), and asserts that at least two of those identities were not shown here. The four identities are: (1) identity of the subject matter of the original action when compared with the action now sought to be precluded; (2) identity of underlying facts and circumstances upon which a claim is asserted and relief sought in the two actions; (3) identity of the parties to the two actions, an identity met where a party to the one action was in privity with a party to the other; and (4) identity of the quality or character of a person against whom the claim is made. Dunaway, 422 So.2d at 751.
Walton argues that there is no identity of subject matter as the present complaint states a claim for breach of contract whereas the previous complaint sought relief based on negligence.[1] Next, Walton contends the causes of action[2] are not identical because a different duty is sought to be enforced in the present contract action as contrasted with the previous tort action.
The Doctors submit that Walton actually asserted breach of contract in the previous claim. The doctors point to the following language in the Complaint in Case No. 1919, the 1984 suit, as evidence that Walton, if not explicitly, at least impliedly sought relief for breach of contract. Paragraph 3 of Complaint 1919 reads:
... [Appellant] engaged ... [Appellees] to render medical treatment to her. A doctor-patient relationship between ... [Appellant] ... [Appellee] was established thereby.
Later in paragraph 8, Complaint 1919 alleges:
[Appellees] ... breached each and every duty due .. . [Appellant] arising out of their doctor-patient relationship with ... [Appellant].
The doctors also point to paragraph 9 where Walton alleges:
As a proximate result of ... [Appellees'] failure to carry out their duties owed ... [Appellant], . .. was caused to undergo additional hospitalization, surgery, experience immense pain and suffering, suffer a loss of earnings and mental suffering and distress. Also [Appellant] ... suffered a loss of consortium with her husband.
The four identities discussed in Dunaway are indeed prerequisite to dismissal of a subsequent action on grounds of res judicata. See Baker By Williams v. Williams, 503 So.2d 249, 254 (Miss. 1987); Wright v. Mayor and Commissioners of City of Jackson, 421 So.2d 1219, 1221 (Miss. 1982); Mississippi Employment Security Commission v. Georgia-Pacific Corporation, 394 So.2d 299, 301 (Miss. 1981); Cowan v. Gulf City Fisheries, Inc., 381 So.2d 158, 162 (Miss. 1980); Standard Oil Co. v. Howell, 360 So.2d 1200, 1202 (Miss. 1978); Pray v. Hewitt, 254 Miss. 20, 24, 179 So.2d 842, 844 (1965); see also Cherry v. Anthony, Gibbs, Sage, 501 So.2d 416, 418 (Miss. 1987) (parties must be substantially identical for res judicata to apply).
Today's question, however, is whether one may elude the bar of res judicata by employing a new legal theory of recovery and thereupon filing a second complaint, when the underlying facts and circumstances are the same as those involved in the first suit. Dunaway speaks to the point:
If these four identities are present, the parties will be prevented from relitigating *702 all issues tried in the prior lawsuit, as well as all matters which should have been litigated and decided in the prior suit. (citations omitted) ... In other words, "the doctrine of res judicata bars litigation in a second lawsuit on the same cause of action `of all grounds for, or defenses to, recovery that were available to the parties [in the first action] regardless of whether they were asserted or determined in the prior proceeding.'" Key v. Wise, 629 F.2d 1049, 1063 (5th Cir.1980), reh. denied, 645 F.2d 72 (5th Cir.1981), cert. den., 454 U.S. 1103, 102 S.Ct. 682, 70 L.Ed.2d 647 (1981) (quoting from Brown v. Felsen, 442 U.S. 127, 99 S.Ct. 2205, 60 L.Ed.2d 767 (1979)). [emphasis added]
422 So.2d at 751.
Over twenty years ago we put the same point in Pray v. Hewitt, 254 Miss. 20, 24, 179 So.2d 842, 844 (1965):
[A] judgment is conclusive not only on the questions actually contested and determined, but on all matters which might have been litigated and determined in the suit. (quoting 50 C.J.S. Judgments § 716 at 186 (1947)) [emphasis added]
See also Pray, 254 Miss. at 24, 179 So.2d at 844 (cases collected therein); Federated Department Stores, Inc. v. Moitie, 452 U.S. 394, 398, 101 S.Ct. 2424, 2428, 69 L.Ed.2d 103, 108 (1981); and Fleming v. Travenol Laboratories, Inc., 707 F.2d 829, 833-34 (5th Cir.1983).
Where one has a choice of more than one theory of recovery for a given wrong, she may not assert them serially in successive actions but must advance all at once on pain of the bar of res judicata.
Here, the only difference between the present lawsuit and the previous lawsuit was the theory of recovery. The primary right and duty asserted and the primary wrong complained of are the same in each action. Only the legal bases advanced for relief are arguably different. Clearly breach of contract was a grounds upon which Walton may have sought recovery in the previous lawsuit. It was a claim that might have been litigated in the previous lawsuit and, indeed, it should have been. See Rule 18(a), Miss.R.Civ.P. Accordingly, the Circuit Court correctly dismissed the present action on grounds of res judicata. Compare Dunaway, 422 So.2d at 751.
AFFIRMED.
ROY NOBLE LEE and HAWKINS, P.JJ., and DAN M. LEE, PRATHER, SULLIVAN and GRIFFIN, JJ., concur.
WALKER, C.J., and ANDERSON, J., not participating.
NOTES
[1]  Nothing said here should be taken as indicating any view on our part that Mississippi law recognizes two viable theories of recovery in the area of medical malpractice, one on contract and the other sounding in tort. Persuasive argument may be made to the contrary. For today's purposes we need not decide the point.
[2]  This case is but another suggesting that our efforts to eliminate from legal parlance the often confusing term "cause of action," see Official Comment to Rule 2, Miss.R.Civ.P., have been less than successful.
