
40 Pa. Commonwealth Ct. 581 (1979)
William Madara, Plaintiff
v.
Commonwealth of Pennsylvania, Defendant.
No. 1199 C.D. 1978.
Commonwealth Court of Pennsylvania.
Submitted on briefs, September 22, 1978.
February 26, 1979.
*582 Submitted on briefs, September 22, 1978, to President Judge BOWMAN and Judges CRUMLISH, JR., WILKINSON, JR., MENCER, ROGERS, BLATT, DISALLE, CRAIG and MacPHAIL.
Stephen Cohen, for plaintiff.
Raymond Kleiman, Deputy Attorney General, with him Gerald Gornish, Acting Attorney General, for defendant.
OPINION BY JUDGE MENCER, February 26, 1979:
William Madara (Madara) purchased a 50-cent Pennsylvania lottery ticket, No. 921746, with a drawing date of June 14, 1972. Thereafter, his wallet containing the ticket and other valuables was mislaid and not recovered until June 16, 1973, at which time the lottery ticket was presented to the Bureau of State Lotteries as a prize claim. On June 22, 1973, the Bureau denied Madara's claim.
*583 Madara filed a complaint in mandamus to compel Robert Kane, Secretary of Revenue, to honor lottery ticket No. 921746 as a winning ticket and alleged damages in the amount of $1 million. The defendant filed preliminary objections to the complaint in mandamus, a part of which was a demurrer asserting that Madara failed to state a cause of action.
We held, in Madara v. Kane, 13 Pa. Commonwealth Ct. 433, 323 A.2d 401 (1974), that Madara's complaint in mandamus had not stated a cause of action and we dismissed his complaint. We stated the question to be whether or not Section 14 of the State Lottery Law,[1] 72 P.S. § 3761-14, places a 1-year time limitation on the presentation of prize claims under the State Lottery Law. We concluded that all claims for prizes must be presented within 1 year after the drawing in which the prize was won.
Madara failed to appeal our decision but waited more than 4 years before filing, in this Court, an action in equity seeking payment from the Commonwealth of Pennsylvania (Commonwealth) because of unjust enrichment. The alleged unjust enrichment consisted of (1) the Commonwealth's retaining $150 in prize money which was untimely claimed by Madara, (2) the Commonwealth's refusal to allow Madara participation in the millionaire drawing, and (3) the Commonwealth's failure to hold the millionaire drawing relative to which Madara held a qualifying ticket.
The Commonwealth filed preliminary objections to the complaint in equity, a part of which was the defense of res judicata.[2] "Res judicata" literally means *584 "a matter adjudged or a thing judicially acted upon or decided." As we stated in McCarthy v. Township of McCandless, 7 Pa. Commonwealth Ct. 611, 617, 300 A.2d 815, 819-20 (1973),
[w]here the same cause of action is involved, the doctrine can be summarized: plaintiff's cause of action is merged in a final judgment if he wins, or barred by it if he loses. The scope of the merger or bar includes not only matters actually litigated but also all matters that should have been litigated. Frequently this doctrine is referred to by the generic name of res judicata, but it is sometimes termed `technical' res judicata to distinguish it from `collateral estoppel,' discussed infra. For `technical' res judicata (or simply res judicata) to prevail, there must be a concurrence of four conditions: (1) Identity in the thing sued upon or for; (2) Identity of the cause of action; (3) Identity of persons and parties to the action; (4) Identity of the quality or capacity of the parties suing or sued.
For purposes of res judicata, there is identity of causes of action when in both the old and new proceedings the subject matter and the ultimate issues *585 are the same. Here, the things sued for were the same (claimed prize money and damages in the amount of $1 million for refusing Madara participation in the millionaire drawing), and the ultimate issue in both proceedings is the same; namely, whether or not Section 14 of the State Lottery Law places a 1-year time limitation on the presentation of prize claims under the State Lottery Law.
Therefore, we conclude that our determination on the merits in Madara v. Kane, supra, wherein we held that the State Lottery Law places a 1-year time limitation on the presentation of prize claims and Madara's failure to claim his prize within the 1-year allowable period prevented him from having a cause of action for said prize, is res judicata[3] and constitutes an absolute bar to his present action in equity.
Accordingly, we enter the following

ORDER
Now, this 26th day of February, 1979, the Commonwealth of Pennsylvania's preliminary objection of res judicata is sustained, and the complaint of William Madara is hereby dismissed.
NOTES
[1]  Act of August 26, 1971, P.L. 351, as amended, 72 P.S. § 3761-1 et seq.
[2]  Madara has questioned the propriety of raising the defense of res judicata by means of preliminary objections to a complaint in equity. It is true that res judicata is an affirmative defense which should be pleaded under the heading "New Matter" in a responsive pleading and is not properly raised by preliminary objections. See Pa. R.C.P. No. 1030. However, we conclude, as did the Supreme Court in Callery v. Blythe Township Municipal Authority, 432 Pa. 307, 243 A.2d 385 (1968), that nothing is to be gained by sending the defendant back to set his procedural house in order before returning with the identical issue. The interests of judicial economy, therefore, compel us to consider the merits of the Commonwealth's defense of res judicata. See McDevitt v. Golin, 35 Pa. Commonwealth Ct. 409, 386 A.2d 627 (1978); Iudicello v. Department of Transportation, 34 Pa. Commonwealth Ct. 361, 383 A.2d 1294 (1978); Commonwealth ex rel. Milk Marketing Board v. Sunnybrook Dairies, Inc., 32 Pa. Commonwealth Ct. 313, 379 A.2d 330 (1977).
[3]  Where preliminary objections are sustained and a complaint dismissed, and plaintiff files no appeal within the time prescribed, the doctrine of res judicata becomes applicable to the cause of action the complaint attempted to state. Catanese v. Scirica, 437 Pa. 519, 263 A.2d 372 (1970).
