
219 P.3d 122 (2009)
2009 WY 138
David M. BURKE, d/b/a Dave's Drug, Appellant (Defendant),
v.
STATE of Wyoming, ex rel., DEPARTMENT OF HEALTH, Office of Health Care Financing, Equality Care, Appellee (Plaintiff).
No. S-09-0022.
Supreme Court of Wyoming.
November 10, 2009.
*123 Representing Appellant: Frank J. Jones, Wheatland, Wyoming.
Representing Appellee: Bruce A. Salzburg, Wyoming Attorney General; Robin Sessions Cooley, Deputy Attorney General; Douglas J. Moench, Senior Assistant Attorney General; Michael T. Kahler, Assistant Attorney General; Shaun Wilkerson, Assistant Attorney General. Argument by Mr. Kahler.
Before VOIGT, C.J., and GOLDEN, HILL, KITE, and BURKE, JJ.
KITE, Justice.
[¶ 1] After a Wyoming Department of Health (Department) audit showed that David M. Burke, d/b/a Dave's Drug, (Mr. Burke) had been reimbursed for services provided to Medicaid recipients in excess of the amount to which he was entitled, the Department sought reimbursement from him. Mr. Burke filed a request for an administrative hearing, but later withdrew the request, and the Department dismissed the administrative action.
[¶ 2] The Department then filed an action in district court to recover the excess payments. On the Department's motion, the district court entered summary judgment against Mr. Burke, finding that he was barred from disputing the claim because he failed to exhaust his administrative remedies. The district court entered judgment against him for $164,432.24 plus costs and interest. On appeal to this Court, Mr. Burke claims essentially that the district court improperly and unfairly denied him his day in court. We affirm.

ISSUES
[¶ 3] Mr. Burke states the issues for this Court's consideration as follows:
1. Is Defendant/Appellant barred from defending this action and having his "day in court" by the doctrine of res judicata?
2. Did the trial court apply an improper interpretation when attempting to construe the Wyoming Medicaid Rules thereby creating an error of law?
3. Are the Wyoming Medicaid Rules ambiguous?
4. Are the Wyoming Medicaid Rules inconsistent?
5. Is the Appellant entitled to complete discovery before there is an entry of Summary Judgment?
Although rephrased, the Department presents essentially the same issues.

FACTS
[¶ 4] The Department operates the Wyoming Medicaid program, which provides medical care to low income individuals and families pursuant to Title XIX of the Social Security Act, 42 U.S.C. § 1396 et seq., and the Wyoming Medical Assistance and Services Act, Wyo. Stat. Ann. § 42-4-101 et seq. (LexisNexis 2007), otherwise known as the Medicaid Program. Under the program, medical care providers who provide medically necessary services to Medicaid recipients in Wyoming are reimbursed by the federal and state government. To receive reimbursement, *124 providers must sign a provider agreement with the State's Medicaid program.
[¶ 5] Mr. Burke is a pharmacist licensed in Wyoming. At the time this action arose, he owned three pharmacies in Wyoming, Dave's Drugs, located in Wheatland, Guernsey Drug, and Dave's Drug Lusk. He signed two provider agreements with the Department, the first on August 13, 1993, and the second on August 19, 1998. The Department reimbursed him for the services he provided to Medicaid recipients.
[¶ 6] In 2004, the Department requested an audit of Mr. Burke's medical records for the period from January 1, 1998, through January 31, 2003. The audit showed that the Department's payments to Mr. Burke exceeded the amounts to which he was entitled by $172,337.36. By letter dated August 3, 2004, the Department notified Mr. Burke of the excess payment and advised him that it had terminated his provider enrollment, he should not submit any further claims for services provided, and it had the right to seek recovery of the excess payments. The Department also advised Mr. Burke that he could seek reconsideration within 20 days of the Department's decision to terminate his provider agreement.
[¶ 7] Mr. Burke requested reconsideration of the Department's decision. The Department reviewed its decision and notified Mr. Burke that the decision to terminate his provider agreement was final. The Department advised Mr. Burke that he was entitled to an administrative hearing pursuant to the Wyoming Medicaid Rules, Chapter 3, Section 14(f). Mr. Burke requested a hearing on the Department's decision to terminate his agreement.
[¶ 8] Simultaneously with the administrative proceedings, federal authorities were conducting a criminal investigation of Mr. Burke's Medicaid activities. The administrative matter sat on the Office of Administrative Hearings (OAH) docket for many months and then, in February of 2006, Mr. Burke and the Department filed a joint stipulation stating that the matter was not ripe for adjudication and should be returned to the Department until such time as the federal investigation was completed. No further action occurred with respect to Mr. Burke's request for a hearing on the termination of his provider agreement.
[¶ 9] On December 13, 2006, the Department sent a certified letter to Mr. Burke requesting reimbursement of the excess payments within 30 days. The Department advised Mr. Burke that he had 20 days to seek reconsideration of the decision pursuant to Wyoming Medicaid Rules, Chapter 39, Section 14(a) and the failure to request reconsideration would preclude any further appeal. The Department further advised Mr. Burke that it would seek alternative means to recover the excess payment amount if payment was not made within 30 days.
[¶ 10] On February 23, 2007, Mr. Burke filed a request for administrative hearing. The Department referred his request to the OAH which set the matter for a pre-hearing conference. On May 22, 2007, however, Mr. Burke withdrew his request for a hearing. The OAH entered an order recommending the action be dismissed and the hearing vacated. During this same time frame, the State received notification that the criminal investigation had been completed and no criminal charges would be brought against Mr. Burke. On September 25, 2007, in accordance with the OAH recommendation, the Department dismissed the administrative action.
[¶ 11] In April of 2008, the Department filed a complaint in district court seeking judgment against Mr. Burke in the amount of the excess payments plus the costs of filing and serving the complaint. Mr. Burke filed an answer denying the claims and asserting that he owed the Department nothing. He also filed a counterclaim in which he alleged that the Department owed him $17,000 in unpaid claims and had wrongfully terminated his provider agreements causing a loss of business in an amount in excess of $200,000 per annum. The Department filed motions to dismiss the counterclaims and for summary judgment on its claim. It also filed an amended complaint reducing the amount *125 it sought to recover to $164,432.24.[1] The district court entered an order allowing the Department to file an amended complaint and, after a hearing, entered an order granting summary judgment in favor of the Department.[2] Mr. Burke timely appealed the order.

STANDARD OF REVIEW
[¶ 12] Summary judgment is appropriate when there are no genuine issues of material fact and the moving party is entitled to judgment as a matter of law. W.R.C.P. 56. A genuine issue of material fact exists when a disputed fact, if it were proven, would establish or refute an essential element of the cause of action or defense. Omohundro v. Sullivan, 2009 WY 38, ¶ 7, 202 P.3d 1077, 1081 (Wyo.2009). Because summary judgment involves a purely legal determination, our review is de novo. Id. We review a district court's order granting summary judgment using the same materials and following the same standards as the district court. Id. We examine the record from the vantage point most favorable to the party opposing the motion, affording to that party the benefit of all favorable inferences that fairly may be drawn from the record. State ex rel. Arnold v. Ommen, 2009 WY 24, ¶ 13, 201 P.3d 1127, 1132 (Wyo.2009). We may uphold the grant of summary judgment upon any proper legal ground supported by the record. Bentley v. Director of Office of State Lands and Invs., 2007 WY 94, ¶ 54, 160 P.3d 1109, 1123 (Wyo.2007).

DISCUSSION

1. Application of Res Judicata
[¶ 13] In granting summary judgment for the Department, the district court held that the doctrine of res judicata barred Mr. Burke from disputing the Department's claim. The district court concluded that Mr. Burke was required to exhaust available administrative remedies; he did not exhaust his administrative remedies because he withdrew his request for a hearing; he thereby waived his right to contest the claim; and the Department's determination that he had received excess payments became final and was not subject to challenge. Mr. Burke claims the district court's determination was incorrect, and denied him the right to present evidence showing that the Department reimbursed him in the correct amount for his services.
[¶ 14] The doctrine of res judicata bars the re-litigation of previously litigated claims or causes of action, as well as claims that could or should have been raised in the prior litigation. R.C.R., Inc. v. Deline, 2008 WY 96, ¶ 19, 190 P.3d 140, 153 (Wyo.2008). In determining whether res judicata bars a claim, we consider whether: (1) the parties are the same; (2) the subject matter is the same; (3) the issues are the same and relate to the subject matter; and (4) the capacities of the persons are identical in reference to both the subject matter and the issues between them. Id. Here, there is no dispute that the administrative proceeding and the district court action involved the same parties, subject matter and issues and the parties' capacities were the same in reference to both the subject matter and the issues between them. There also is no dispute that Mr. Burke had the opportunity to raise the claim that the Medicaid reimbursement payments were not excessive during the administrative proceedings.
[¶ 15] Mr. Burke contends, however, that res judicata should not have been applied to preclude him from presenting his defense in district court. He asserts the Wyoming Medicaid Rules, and the manner in which the Department proceeded under them, so confused the proceedings that he was not given *126 a fair opportunity to make his case at the administrative level and he should be afforded the opportunity to do so in court. Mr. Burke argues that the first notice he received from the Department stated that the audit revealed an "overpayment" which the Department intended to recover through the "claims adjustment process" provided for in the Wyoming Medicaid Rules, Chapter 39, Section 13(d)(iii). He contends that the rules governing recovery under the claims adjustment process expressly precluded him from requesting reconsideration or an administrative hearing. Because he did not have the right to a hearing, he asserts, the doctrine of res judicata cannot be applied to bar him from presenting his defense to the Department's claim in court.
[¶ 16] Mr. Burke's assertion that he first received notice of the over or excess payments in the December 13, 2006, letter is not correct. In fact, he first had notice in August of 2004 when the Department notified him that the audit revealed that his payments for drug purchases were less than the Medicaid reimbursement payments he received and the Department had the right to seek to recover the excess payments. Although the actions that followed initially focused on the termination of Mr. Burke's provider agreement rather than recovery of excess payments, Mr. Burke did have notice in 2004 of the excess payment claim and the Department's right to seek recovery.
[¶ 17] Mr. Burke is correct that thereafter, in its December 13, 2006, letter, the Department referred to the amount due as an "overpayment," rather than "excess payments," and advised him that it would be recovering the amount through the "claims adjustment process." He asserts that this terminology was confusing because the claims adjustment process precluded him from requesting reconsideration or an administrative hearing. He cites Chapter 39, Sections 13(b)(ii) and 14(e)(i) of the Wyoming Medicaid Rules, which state, just as he contends, that a provider may not request reconsideration or an administrative hearing regarding a claims adjustment.
[¶ 18] The difficulty with Mr. Burke's claimed confusion is that in its December 13, 2006, letter the Department cited as the applicable provision Chapter 39, Section 13(d)(iii) of the Wyoming Medicaid Rules, which states as follows:
(d) Recovery of excess payments. If the [Department] determines to recover excess payments pursuant to this Chapter, it shall follow the procedures specified in this subsection.
(i) Notice of excess payments. After determining that a provider has received excess payments, the Department shall send written notice to the provider stating the amount of the excess payments, the basis for the determination of excess payments, and, except in the case of a claims adjustment or a technical denial, the provider's rights to request reconsideration of that determination pursuant to Section 14.
(ii) Reimbursement of excess payments. Except as otherwise specified by the Wyoming Medicaid Rules, a provider must reimburse the Department for excess payments within 30 days after the provider receives written notice from the Department of the excess payments, even if the provider has requested reconsideration or an administrative hearing regarding the determination of excess payments.
(iii) Methods of recovery of excess payments. If a provider does not timely reimburse the Department, the Department may recover the excess payments, even if the provider has requested reconsideration, an administrative hearing, or sought judicial relief regarding the determination of excess payments, by:
(A) Withholding all or part of Medicaid payments until the excess payments are recovered;
(B) Initiating a civil lawsuit against the provider;
(C) Any other method of collecting a debt or obligation permitted by law.
[¶ 19] The letter further advised Mr. Burke as follows:
You may request reconsideration of the... decision to recover excess payments pursuant to Wyoming Medicaid Rules, Chapter 39, Section 14(a) that states:

*127 "Request for reconsideration. A provider may request that the Department reconsider a decision to recover excess payments. Such requests must be mailed to the Department by certified mail; return receipt requested within twenty days of the date the provider receives notice pursuant to Section 12. The request must state with specificity the reason for the request. Failure to provide such a statement shall result in the dismissal of the request with prejudice."
Include any additional supporting documentation along with your request for reconsideration. Failure to request reconsideration precludes any further appeal of the [Department's] decision. You may also request a contested case hearing once the Department issues its reconsideration decision to you.

Your request for reconsideration ... does not relieve you from reimbursing the Department the stated amount within thirty (30) days. The Department may seek alternative means to recover excess payments after 30 days.
(emphasis added) Regardless of the Department's references earlier in the letter to "overpayment" and recovery through the "claims adjustment process," the above paragraphs clearly informed Mr. Burke that the Department was seeking recovery of excess payments pursuant to Chapter 39 and that he had a right to request reconsideration of the decision to recover excess payments and, upon the Department's issuance of a final decision, a contested case hearing.
[¶ 20] Mr. Burke was entitled to an administrative hearing. The Department advised him that he was so entitled. Mr. Burke requested an administrative hearing and then, for reasons not apparent in the record, withdrew his request. His contention that the district court improperly applied res judicata when the Medicaid rules did not allow him to request an administrative hearing is without merit.

2. Wyoming Medicaid Rules
[¶ 21] Mr. Burke contends the Medicaid Rules are ambiguous and inconsistent because while the overpayment and excess payment provisions allow a provider to request an administrative hearing, both provisions also allow the Department to initiate a civil action to recover the payments even when the provider has requested a hearing. He asserts that the rules cannot be interpreted to require the exhaustion of administrative remedies before a civil action is filed when they clearly allow the Department to proceed in court before administrative remedies have been exhausted. He queries:
How can we reconcile the position advanced by the Department that administrative remedies must be exhausted before any action can be pursued when the Medicaid rules specifically state otherwise? How can we reconcile the fact the Department initiated a civil lawsuit against Burke for recovery of the payments without any concern being given on its part as to administrative remedies?
What could the result possibly have been if Burke had been involved in an administrative hearing at the time the Department filed this lawsuit and the hearing officer found there were no amounts due and at the same time the civil lawsuit ended in a judgment as that which was entered by the trial judge in this instance?
[¶ 22] The Department dismissed the administrative action on September 25, 2007. The Department filed its civil action on April 22, 2008. Therefore, the situation about which Mr. Burke expresses concern did not arise. There was no administrative proceeding at the time the civil lawsuit was filed. Consequently, there was no possibility of an administrative ruling in his favor and a simultaneous district court judgment in the Department's favor.

3. Discovery
[¶ 23] Mr. Burke contends summary judgment was improper because discovery was not completed and, if allowed to be completed, would demonstrate numerous questions of fact for trial concerning the accuracy of the audits. The issue before the district court was whether the Department was entitled to judgment as a matter of law on its complaint for money damages against Mr. *128 Burke in the amount of the excess payments. Resolution of that issue required the district court to decide whether the Department's order dismissing the agency action was final. The district court determined that the order was final. The district court further determined that the doctrine of res judicata applied to bar re-litigation of the claims raised in the administrative proceeding. The discovery Mr. Burke seeks to pursue was not necessary to a determination of the issues before the district court. We find no error in the district court's ruling.
[¶ 24] Affirmed.
NOTES
[1]  Wyoming Medicaid Rules, Chapter 16, Section 12(c)(iv) (1998) required the audit results to be reduced by five percent. After reducing the excess payment amount by five percent in accordance with the Rules, the Department determined the correct amount of the excess payment was $164,432.24, rather than the $172,337.36 referenced in its initial complaint.
[2]  The district court converted the Department's motion to dismiss to a motion for summary judgment under W.R.C.P. 12(b)(6) and 56, and notified the parties that, in deciding the motion, it intended to consider information filed in support of and opposition to the summary judgment motion.
