
369 N.W.2d 379 (1985)
Paul E. NELSON d/b/a Nelson Construction Company, Plaintiff and Appellant,
v.
HAWKEYE SECURITY INSURANCE COMPANY, Defendant and Appellee.
No. 14699.
Supreme Court of South Dakota.
Argued April 10, 1985.
Decided June 12, 1985.
Richard J. Helsper, Brookings, for plaintiff and appellant.
Ellsworth E. Evans, Sioux Falls, for defendant and appellee.
FOSHEIM, Chief Justice.
Paul E. Nelson, d/b/a Paul E. Nelson Construction (Nelson) appeals from a summary judgment granted in favor of Hawkeye Security Insurance Company (Hawkeye). We affirm.
The facts are undisputed. Nelson is a Brookings County building and plumbing contractor. Hawkeye is his insurer. On January 3, 1981, Sandy L. Schultz (Schultz), a Kingsbury County hog producer, sued Nelson for negligence, breach of express and implied warranties, and strict liability in the construction of a hog farrowing, gestation and nursery facility. (Schultz v. Nelson). Schultz alleged that because Nelson had failed to properly vent portable heaters used during the pouring and hardening of the concrete floor and foundation, the floor crumbled and deteriorated. Schultz further alleged that the structure was "unsuitable for use in connection with a hog farrowing, gestation and nursery facility." Nelson promptly tendered the defense of this suit to Hawkeye. Hawkeye *380 investigated the claim, refused the defense, and denied coverage.
On January 27, 1981, Nelson moved for a more definite statement of Schultz's damages. Schultz produced a Bill of Particulars on January 28, 1981. This document included $232,260 for "estimated loss of production."
Nelson then instituted a declaratory judgment against Hawkeye (Nelson v. Hawkeye I) on February 10, 1981. Trial was held on June 2, 1981. Neither Hawkeye or Nelson called Schultz as a witness or took discovery testimony to determine the precise nature of the damage claim in Schultz v. Nelson. From this record, the trial court held that there was no coverage and that Hawkeye had no duty to defend, relying on two exclusions in Nelson's policy.[1] The court's judgment was docketed on August 18, 1981 and Nelson's attorney received the Notice of Entry of Judgment on August 20, 1981. The Schultz v. Nelson action was then still pending.
On March 19, 1982, seven months after the Nelson v. Hawkeye I Judgment, Schultz filed an Amended Bill of Particulars, which detailed the elements of the loss of production claim. The more detailed loss of production claim included a $11,480 item for death loss of pigs, allegedly caused by Nelson's negligence. A death loss admittedly would be a covered claim under the policy. Nelson and his attorney nevertheless settled Schultz v. Nelson three weeks later.
On May 23, 1983 (one year and nine months after the Notice of Entry of Judgment in Nelson v. Hawkeye I, and fourteen months after filing the Amended Bill of Particulars in Schultz v. Nelson) Nelson commenced the present action against Hawkeye. (Nelson v. Hawkeye II). This action seeks reimbursement of counsel fees incurred in Schultz v. Nelson and a judgment for the $11,480 death loss of the pigs. On May 25, 1984, summary judgment was granted in favor of Hawkeye. The Court concluded the judgment in Nelson v. Hawkeye I was res judicata. The Court also determined that Nelson had no basis for an independent action to relieve him from the Nelson v. Hawkeye I judgment pursuant to the last sentence of SDCL 15-6-60(b).[2] Since we find res judicata dispositive, we do not address whether a right to an independent action exists under SDCL 15-6-60(b) for reasons other than fraud upon the court or a defendant not actually personally notified as provided by statute.
Res judicata and collateral estoppel are distinguished. See Schell v. Walker, 305 N.W.2d 920, 922 (S.D.1981); see also, Melbourn v. Benham, 292 N.W.2d 335, 337 (S.D.1980); Gottschalk v. South Dakota Real Estate Commission, 264 N.W.2d 905 (S.D.1978). Res judicata is founded upon two premises: "A person should not be twice vexed for the same cause and public policy is best served when litigation has a repose." Black Hills Jewelry Mfg. v. Felco Jewel Ind., 336 N.W.2d 153, 157 (S.D.1983). While res judicata and *381 collateral estoppel are very close in nature, they produce different results. Schell, supra. Collateral estoppel prevents relitigation only of issues actually litigated in a prior proceeding. Id. Res judicata precludes relitigation of a claim or issue "actually litigated or which could have been properly raised." Id.; see also, Keith v. Willers Truck Serv. Inc., 64 S.D. 274, 266 N.W. 256 (1936). Res judicata thus has broader issue preclusion than collateral estoppel. Black Hills Jewelry Mfg., supra.
For purposes of res judicata, a cause of action is comprised of facts which establish or give rise to the right a party seeks to enforce. Schell supra; Golden v. Oahe Enterprises, Inc., 90 S.D. 263, 240 N.W.2d 102 (1976); Carr v. Preslar, 73 S.D. 610, 47 N.W.2d 497 (1951); Jerome v. Rust, 23 S.D. 409, 122 N.W. 344 (1909). We have often applied the test expressed in Hanson v. Hunt Oil Co., 505 F.2d 1237 (8th Cir.1974), to determine whether two causes of action are the same. See, Black Hills Jewelry Mfg., supra; Schell, supra; Golden v. Oahe Enterprises Inc., supra; Melbourn v. Benham, supra. That test is "whether the wrong for which redress is sought is the same in both actions." Hanson, supra at 1240. A judgment on the merits is one which is based on legal rights rather than matters of procedure and jurisdiction. Chicago and North Western Railway Co. v. Gillis, 80 S.D. 617, 129 N.W.2d 532 (1964).
In Nelson v. Hawkeye I and II the parties were identical. Schell, supra. In both actions, Nelson sought a declaration that Hawkeye had a duty to defend and to pay. It appears Hawkeye investigated the claim, but either failed to discover or reveal[3] the death loss. Nelson likewise did not call Schultz as a witness. Had he done so, the death loss would have been readily ascertainable. The death loss consequently was an existing fact which was either known or should have been known and litigated in the first declaratory judgment action. That a party could have raised an issue but failed to do so will not prevent the application of res judicata. Black Hills Jewelry Mfg., supra; Matter of Estate of Nelson, 330 N.W.2d 151 (S.D. 1983); Schell, supra, Adam v. Adam, 254 N.W.2d 123, 129 (S.D.1977). From the record on appeal we must conclude the trial court properly applied the doctrine of res judicata.
The judgment of the trial court is affirmed.
WOLLMAN and MORGAN, JJ., and WUEST, Circuit Judge, Acting as a Supreme Court Justice, concur.
HENDERSON, J., concurs specially.
HENDERSON, Justice (specially concurring).
Essentially, plaintiff slept on his rights and now seeks to bring an independent action to attack a judgment entered twenty-one months earlier which was adverse to him. Nelson failed to develop testimony and evidence at the first trial detailing his alleged damages. Now, in an independent equitable action, he seeks to do so by developing new evidentiary facts. Nelson wants to go into the pig loss but he had an opportunity to do this in prior litigation and did not do so.
When a party fails to fully develop all of the issues and evidence available in a case, he is not justified in later trying the omitted issues or facts in a second action based upon the same claim. Cory v. Commissioner of Internal Revenue, 159 F.2d 391, 392 (3rd Cir.1947).
A party, having suffered an adverse determination and having litigated the ultimate issue, cannot thereafter produce new evidentiary facts to obtain a different determination. He has had his day in court. See 18 Wright, Miller & Cooper, Federal Practice and Procedure: Jurisdiction § 4416, at 141 n. 20 (1981).
NOTES
[1]  "Exclusions.

This insurance does not apply:
....
(o) to property damage for work performed by or on behalf of the named insured arising out of the work or any portion thereof, or out of materials, parts or equipment furnished in connection therewith.
(p) to damages claimed for the withdrawal, inspection, repair, replacement or loss of use of the named insured's products of work completed by or for the named insured or of any property of which such products or work form a part, if such products, work or property are withdrawn from the market or from use because of any known or suspected defect of deficiency herein."
[2]  The last sentence of SDCL 15-6-60(b) provides:

Section 15-6-60 does not limit the power of a court to entertain an independent action to relieve a party from a judgment, order, or proceeding, or to grant relief to a defendant not actually personally notified as provided by statute or to set aside a judgment for fraud upon the court.
Nelson apparently brought the independent action because he was precluded from filing a motion for relief from the original declaratory judgment by the self-contained one-year statute of limitation of 15-6-60(b)(1), (2), and (3).
[3]  Nelson, however, did not allege any fraud or deception on the part of Hawkeye.
