Bethel, Judge. In this medical malpractice action, George Westley Wentz appeals the dismissal with prejudice of his claims against Emory Healthcare, Inc. (Emory) and two nurses, as well as the dismissal of his renewal suit for the same cause of action. Wentz argues that because the trial court did not exercise its discretion to dismiss the suit with prejudice until after Wentz voluntarily dismissed the original action, the trial court erred in concluding that his renewal action was barred by res judicata. Because Wentz dismissed his original action without prejudice prior to the trial court ruling on Emory’s motion to dismiss, thereby resulting in no final adjudication on the merits of the original complaint, we find that Wentz’s claims are not barred by res judicata. Accordingly, we reverse. ”In ruling on a motion to dismiss, the trial court must accept as true all wellpled material allegations in the complaint and must resolve any doubts in favor of the plaintiff. We review the trial court’s ruling de novo.” Roberson v. Northrup, 302 Ga. App. 405, 405 (691 SE2d 547) (2010) (citations omitted). So viewed, the record shows that Wentz originally filed this medical malpractice action on February 21, 2017, alleging that two unidentified nurses employed by Emory negligently removed his catheter, causing damage to his bladder, urethra, and prostate gland.[1] As required by OCGA § 9119.1, Wentz filed an expert affidavit with his original complaint. On March 28, 2017, Emory filed its answer and a motion to dismiss for failure to state a claim, arguing in its motion that Wentz’s expert affidavit was insufficient. Specifically, Emory argued that the expert affidavit failed to set forth the affiant’s experience, and thus failed to satisfy OCGA § 247702. On May 2, 2017, Wentz voluntarily dismissed his case, terminating the action without prejudice and filing a final disposition of the matter. The following day, Emory moved to strike Wentz’s dismissal without prejudice, arguing that because Wentz failed to amend his expert affidavit within the statutorily-prescribed 30 days, OCGA § 9-11-9.1 (e) compels his complaint to be dismissed for failure to state a claim, which is a dismissal with prejudice.Wentz refiled and renewed his action against Emory on July 13, 2017, and he attached an expert affidavit to his complaint.[2] This affidavit, however, contained updates that reflected the expert’s experience and licensing status. In response, Emory filed a motion to dismiss the renewal complaint for failure to state a claim. In this motion, however, Emory argued that Wentz’s claim was barred by res judicata. Emory contended that because Wentz’s original suit could only be dismissed with prejudice under OCGA § 9-11-9.1, his renewal suit was barred. On September 29, 2017 — almost five months after Wentz’s voluntary dismissal — the trial court addressed these matters in an order that both converted Wentz’s original dismissal to one with prejudice and dismissed his renewal action.[3] In its order, the trial court concluded that Wentz “had no absolute right to voluntarily dismiss [the] prior suit without prejudice under OCGA 91141 (a),” and that “by operation of law, the earlier dismissal of the action was with prejudice, and the renewal action is barred by the doctrine of res judicata.” This appeal followed.1. Wentz first contends that the trial court erred in its order dismissing his original suit with prejudice for failure to amend the expert affidavit. Wentz argues that this dismissal without prejudice was a matter of right, and further, once dismissed, the trial court had no power to convert or modify it. We agree.OCGA § 9-11-9.1 (e) provides:If a plaintiff files an affidavit which is allegedly defective, and the defendant to whom it pertains alleges, with specificity, by motion to dismiss filed on or before the close of discovery, that said affidavit is defective, the plaintiff’s complaint shall be subject to dismissal for failure to state a claim, except that the plaintiff may cure the alleged defect by amendment pursuant to Code Section 91115 within 30 days of service of the motion alleging that the affidavit is defective. The trial court may, in the exercise of its discretion, extend the time for filing said amendment or response to the motion, or both, as it shall determine justice requires.