
116 Ga. App. 507 (1967)
157 S.E.2d 830
LANDRUM
v.
McGEHEE.
43066.
Court of Appeals of Georgia.
Argued September 12, 1967.
Decided October 13, 1967.
Fullbright & Duffey, Harl C. Duffey, Jr., for appellant.
Wayne W. Gammon, Matthews, Maddox, Walton & Smith, for appellee.
QUILLIAN, Judge.
Raymond D. Landrum brought a petition for damages on account of alleged malpractice against John M. McGehee and the Hospital Authority of Polk County. The petition was dismissed as to the hospital authority and no consideration in this regard is here involved. The defendant, McGehee, filed general and special demurrers to the petition. The trial judge entered an order overruling the general demurrers and certain special demurrers and sustaining other special demurrers with leave to amend.
The plaintiff filed an amendment to the petition to which the defendant filed renewed and additional demurrers and also what he denominated a "motion to purge and require plaintiff to rewrite petition." Subsequently, the trial judge sustained the motion to purge and required the plaintiff to rewrite his petition within 30 days, but deferred ruling on the demurrers as renewed. The plaintiff then filed a rewritten petition. The defendant filed a motion to disallow the amendment and to dismiss the plaintiff's petition on the ground that two allegations, in substance, to which demurrers had been sustained, were still included in the rewritten petition and that the plaintiff had failed to comply with the order in this material respect.
After a hearing the trial judge sustained the motion and dismissed the petition on the grounds that plaintiff "failed to comply with the order of [September 2, 1966] requiring that matters ruled out by the court not be included in the rewritten petition." The plaintiff appeals to this court and enumerates as error the order dismissing his petition. Held:
1. The trial judge dismissed the rewritten petition because 2 allegations to which demurrers had been sustained were included contrary to the previous order. The plaintiff, appellant here, contends the order instructing him to rewrite the petition was ambiguous and did not require the portions to be omitted. The settled doctrine in construing a judgment is to give it, if possible, that construction which renders it valid rather than invalid. Byrd v. Goodman, 195 Ga. 621, 631 (25 SE2d 34). "A decree or judgment must be construed in connection with the pleadings, Bentley v. Still, 198 Ga. 743 (32 SE2d 814), even though in so construing the judgment the generality of the judgment may be modified, Stanfield v. *508 Downing & Co., 186 Ga. 568 (199 SE 113)." Hudgins & Co. v. Chesterfield Laundry, 109 Ga. App. 282, 286 (135 SE2d 906). While somewhat unclear as written, when construed in the light of the motion to purge, the judgment was subject to no other reasonable interpretation than that the plaintiff would omit the portions stricken by demurrer.
2. The objections made to the 2 allegations previously referred to were that they were irrelevant, immaterial and prejudicial. This was reiterated in the motion to dismiss the petition as redrafted. When demurrers to prejudicial allegations are sustained, a trial judge may require that they be purged on pain of dismissal. Keen v. Nations, 43 Ga. App. 321 (158 SE 613); McRee v. Atlanta Paper Co., 84 Ga. App. 181 (65 SE2d 832). Where, as here, the plaintiff fails to comply with such order by purging the offending allegations the petition is properly dismissed.
Judgment affirmed. Jordan, P. J., and Deen, J., concur.
