dissenting:
I respectfully dissent. The majority decides this case on the basis of an issue not presented by the parties. Conclud*546ing that the causes of action in this case and the cause of action in the first case arise from the same occurrence, the majority holds that under the mandatory joinder provisions of Pa.R.C.P. 1020(d)(1), appellant was required to join them all in the first case and the failure to do so has resulted in the waiver of the causes of action asserted in the instant case pursuant to Pa.R.C.P. 1020(d)(4). Neither party raised the Rule 1020(d) mandatory joinder issue in the trial court or on appeal. In its preliminary objections, appellee, State Farm, raised only lack of subject matter jurisdiction, pend-ency of a prior action, failure to state a cause of action upon which relief could be granted and the statute of limitation. It is improper for this Court to decide an appeal on the basis of an issue not presented to it by the parties. Coleman v. Board of Education of the School District of Philadelphia, 477 Pa. 414, 383 A.2d 1275 (1978); Wiegand v. Wiegand, 461 Pa. 482, 337 A.2d 256 (1975). The majority therefore erred in sua sponte raising and deciding this appeal on the basis of Rule 1020(d).
Had the issue of mandatory joinder of causes of action been raised by the parties, I would not find it dispositive under the circumstances of this case. Preliminarily, I disagree with the majority’s conclusion that the causes of action in the instant case and the cause of action in the first case arise out of the same occurrence: State Farm’s refusal to provide uninsured motorist benefits to compensate appellant for injuries suffered in the July accident. Only the instant action arises out of State Farm’s refusal to provide uninsured motorist benefits. The first action arises not out of State Fárm’s refusal to pay benefits, but out of the July accident itself. The first action involves appellant’s claim under the uninsured motorist provisions of the insurance policy for injuries suffered in the July accident. The causes of action involved in the instant case arise not from the July accident but from State Farm’s alleged wrongful conduct occurring after the accident and in the course of processing and litigating the uninsured motorist claim.
*547However, granting for purposes of argument that the causes of action in both cases arise from “the same series of transactions or occurrences” so as to bring them within the mandatory joinder provisions of Rule 1020(d)(1), appellant could not have joined, in the first action, the causes of action he now asserts and therefore he cannot justly be held to have waived them by failing to do so. The first action was not commenced by appellant, but by appellee, State Farm. State Farm commenced the first action by filing a petition to compel the appointment of an arbitrator. No complaint was filed by the appellant in the first action; thus, he cannot be required to have joined the causes of action asserted in the instant action in separate counts in the first action. Furthermore, the timing and sequence of the events giving rise to the causes of action asserted in the instant action prevented appellant from raising and joining them in the first action. It is appellee, State Farm’s, conduct occurring after the July accident and in the course of the first action, which appellant claims was tortious and in breach of contract, that forms the basis of the causes of action asserted in the instant case. Thus, under the unusual procedural and factual circumstances of this case, the mandatory joinder provisions of Pa.R.C.P. 1020 furnish no basis for dismissal of the instant action.
Nor is dismissal justified on the grounds of res judicata or lis pendens. Res judicata is an affirmative defense which, under Pa.R.C.P. 1030, must be raised in a responsive pleading as new matter and which, if not pled, is waived pursuant to Pa.R.C.P. 1032. State Farm did not plead the defense of res judicata in the trial court and thus it has been waived. Callery v. Municipal Authority of Blythe Township, 432 Pa. 307, 243 A.2d 385 (1968); Lang v. Recht, 171 Pa.Super. 605, 91 A.2d 313 (1952); Margolis v. Miller, 170 Pa.Super. 148, 84 A.2d 213 (1951). State Farm raised res judicata for the first time on appeal. However, issues not raised in the lower court are waived and cannot be raised for the first time on appeal. Pa.R.A.P. 302(a). Thus, dismissal cannot be based on res judicata.
*548Lis pendens or prior action pending is a narrow doctrine. Dismissal on the grounds of lis pendens is valid only when it is established that the parties, the cause of action, the rights asserted, and the relief requested in an action are the same as those of a prior pending action. Dickerson v. Dickersons Overseas Company, 369 Pa. 244, 85 A.2d 102 (1952); Hessenbruch v. Markle, 194 Pa. 581, 45 A. 669 (1900); Glazer v. Cambridge Industries, Inc., 281 Pa.Super. 621, 422 A.2d 642 (1980); Raw v. Lehnert, 238 Pa.Super. 324, 357 A.2d 574 (1976); Taylor v. Humble Oil and Refining Co., 225 Pa.Super. 177, 311 A.2d 324 (1973). Since the cause of action, the rights asserted and the relief requested in the instant action are not the same as those of the first action, lis pendens is inapplicable.
In the first action appellant seeks recovery and asserts rights under the uninsured motorists provision of the State Farm insurance policy for injuries sustained in the July accident. In the instant action, appellant asserts in assumpsit that appellee has breached its contract and seeks damages for the breach. In trespass appellant seeks punitive damages, alleging appellee acted with malice for the purposes of harassing and frustrating appellant and with the intent of inflicting emotional distress upon him. The cause of action in the instant case arises not from the July accident but from State Farm’s alleged wrongful conduct occurring after the accident. Appellant contends that this conduct constitutes a breach of contract and a tort. Since the cause of action, rights asserted and relief requested in the two actions are not the same, the doctrine of lis pendens is inapplicable.
However, in D Ambrosio v. Pennsylvania National Mutual Insurance Co., 494 Pa. 501, 431 A.2d 966 (1981), our Supreme Court held that under Pennsylvania law there is no cause of action for punitive damages or damages for emotional distress because of an insurer’s alleged bad faith in denying a claim. In refusing to create such a cause of action in trespass, the Supreme Court recognized that an adequate remedy existed in assumpsit. Thus, in the instant *549case, I would reverse the trial court’s dismissal of the instant action, dismiss the count in trespass, but remand the assumpsit count.
Finally, in the interest of justice and judicial economy, I would stay the appeal in the first action, which is presently pending in our Court at No. 102 Philadelphia 1981, and since both that action and the instant action involve the common underlying question of Concord Mutual’s solvency pursuant to Pa.R.A.P. 513,1 would direct that the Order issued in the instant case on remand be consolidated with the pending appeal in the first case.