OPINION
Community Care Centers, Inc., New Horizons Developmental Center, and Myron and Bonita Blackburn, the owners of the facilities during the period at issue, (collectively referred to as Community Care) appeal the summary judgment entered against them and in favor of Cheryl Sullivan in her capacity as Secretary of the Indiana Family and Social Services Administration and James Verdier in his capacity as the Indiana Director of Medicaid Policy and Planning, Family and Social Services Administration (collectively referred to as the State). We consolidate and restate the issues Community Care raises on appeal as:
1. Whether the remedy of restitution based on the reversal of a judgment can properly be granted on summary judgment without consideration of whether a health care provider was unjustly enriched as a result of the judgment which was reversed;
2. Whether a trial court can properly find unjust enrichment as a matter of law when a health care provider is reimbursed by the State pursuant to an injunction which is later reversed but when the reimbursement rates paid by the State under the injunction still do not reimburse the provider for its reasonable costs;
3. Whether the State is barred by the doctrine of “unclean hands” from seeking equitable relief from the only provider who benefitted from an injunction when it declines to seek restitution from other providers who benefitted from a different order enjoining a rule that was never applied to any provider; and
4. Whether the State’s action for restitution arising from its reimbursement contract with a provider can be properly allowed to proceed when the provider’s unjust enrichment counterclaim is dismissed on grounds that the parties’ rights were determined by the express contract between them.
We affirm.
*1237 FACTS AND PROCEDURAL HISTORY
The Medicaid program is jointly administered by the state and federal governments and provides a mechanism to reimburse certain participating health care providers for nursing home care and other services to Medicaid beneficiaries. Community Care participated in the program and operated a number of facilities which provided such services. Medicaid providers are reimbursed pursuant to provider contracts entered into with the State, in accordance with State regulations. This action arises out of two challenges Community Care mounted to the State’s reimbursement of some of the Community Care facilities.
1. The Blackford Injunctions
In an action brought in the Blackford Circuit Court, Community Care sought, and was granted, injunctions against the use of two “limiters” that were applied by the State in determining Medicaid reimbursement rates.
See Indiana Bd. of Pub. Welfare v. Tioga Pines,
The injunctions prohibited the State from using the GNP/ipd limiter as the sole determinant
1
of a provider’s reimbursement rate and from using two aspects of the “tests of reasonableness.” Specifically, the State was enjoined from comparing facilities without regard to the size of the facilities and from making line item comparisons of facilities. In response to the injunctions, the State recalculated Community Care’s rates pursuant to those state regulations which had not been enjoined,
2
using limiters other than the GNP/ipd and the two enjoined aspects of the “tests of reasonableness.” The Community Care facilities operated at a loss during the pendency of the injunctions despite the recalculation of the reimbursement rates. Our supreme court reversed the injunctions in
Tioga Pines,
holding that the “use of the GNP/ipd as a maximum annual rate limiter and the tests of reasonableness were not improper.”
2. The Federal District Court Injunction
The second action in which Community Care obtained an injunction against the State was filed on behalf of Community Care’s Hamilton Heights 3 facility and some of its residents. At the time that action was brought, the Medicaid program classified long-term care facilities into three categories: intermediate care facility (ICF), skilled nursing facility (SNF), and intermediate care facility for the mentally retarded (ICF/MR). ICF standards were less rigorous than those governing ICF/MRs, and ICF facilities were reimbursed at a lower rate.
In 1984, the Indiana State Board of Health established “Rule 7,” a level of care between ICF and ICF/MR. Hamilton Heights housed about 90 mentally retarded and developmentally disabled patients and was designated as a Rule 7 ICF. Rule 7 facilities had to meet more stringent requirements than ICFs; in particular, they were required to provide additional staff training, and to provide a program which satisfied certain requirements for the developmentally disabled residents. This, Hamilton Heights maintained, increased its costs over those incurred by an ICF. If a Rule 7 facility did not meet the more stringent standards, it could be subject to decertification.
*1238 Because the federal Medicaid program recognized no categories between ICF and ICF/ MR, and because Hamilton Heights had not been certified as an ICF/MR, 4 Hamilton Heights was being reimbursed at the lower ICF rates. It sought and obtained an injunction in the federal district court for the Southern District of Indiana ordering the State to reset Hamilton Heights’ reimbursement rate at a level equal to its documented cost rate between January 1, 1989 and July 6, 1990. The district court found that, although it cost Hamilton Heights about $82.90 per day to deliver its services to each patient, the facility was being reimbursed only $47.40 per patient per day. The district court also found that the facility’s costs were reasonable, that it delivered its services “efficiently and economically,” and that there was no evidence that it provided any excessive or unnecessary services. R. at 1599.
In
Lett v. Magnant,
3. Restitution Action
After the Blackford and Southern District injunctions were reversed on appeal, the State brought the present action for restitution in the Delaware Superior Court. That court determined on summary judgment that the State was entitled as a matter of law to recover “the difference between the sums paid to Community Care under the erroneous injunctions and the amounts it would have received under the State’s lawful rate-setting methodology in the absence of the injunctions.” R. at 938. Community Care appeals the trial court’s grant of summary judgment to the State.
Community Care also appeals the dismissal of a counterclaim it filed with regard to the Hamilton Heights facility seeking additional reimbursement from the State on an unjust enrichment theory.
STANDARD OF REVIEW
In reviewing the grant of a summary judgment motion, we apply the same standard applicable in the trial court. Summary judgment is proper only when there is no genuine issue as to any material fact and the moving party is entitled to judgment as a matter of law. Ind. Trial Rule 56(C). We do not weigh the evidence, but will consider the facts in the light most favorable to the non-
*1239
moving party.
Grose v. Bow Lanes, Inc.,
DECISION AND DISCUSSION
1. The Unjust Enrichment Requirement
The State’s argument appears to be premised on the assertion that even though the State sought the remedy of restitution, “[o]n the facts of this case, ... no special showing of unjust enrichment was required.” Brief of Appellees at 20. The State asserts that when an injunction is reversed, the party which was enjoined is entitled to restitution regardless of whether there was any showing that the other party was unjustly enriched. In other words, the State argues restitution is a matter of right where a benefit is obtained under an erroneous judgment and is not a matter of equitable discretion. We disagree, and believe that the decisions upon which the State relies do not support the State’s position.
The State relies on a statement in
P.B. v. T.D.,
We believe the equitable concept of unjust enrichment necessarily inheres any time the remedy of restitution is sought by a litigant, and we read our Indiana precedent accordingly. In
St. Mary’s Med. Ctr. v. United Farm Bur.,
As such, we believe the requirement of a showing of unjust enrichment is implicit in the decisions relied upon by the State where our courts discuss restitution without explicitly phrasing the analysis in terms of that prerequisite to restitutionary relief, unjust
*1240
enrichment.
5
We further believe the weight of authority in other jurisdictions addressing reversal of judgments is in accord with our opinions.
See, e.g., Atlantic Coast Line v. Florida,
We thus cannot accept the State’s characterization of Arkadelphia and P.B. as providing the State a remedy which is restitution-ary, yet at the same time is “mandatory,” Brief of Appellees at 12, “unconditional,” id. at 1, or “a matter of right,” id. at 15. The State invites us to completely sever, for the first time, the principles of restitutionary relief from them ancient roots in equity. We decline its invitation.
To the extent the trial court’s judgment was based on its conclusion that “the State has an unqualified right to restitution upon reversal of an erroneous injunction,” R. at 962 (emphasis supplied), the grant of summary judgment for the State was error.
2. The Unjust Enrichment Showing
The State argues in the alternative that even if a showing of unjust enrichment is a necessary basis for a restitution action, Community Care was unjustly enriched. According to the State, in the Blackford action Community Care was unjustly enriched because it was reimbursed at a higher rate than it would have been had the State’s use of the GNP/ipd and “tests of reasonableness” limiters not been enjoined to the extent they were. In the federal action, the State asserts Hamilton Heights was unjustly enriched when it was reimbursed by the State at a rate which covered the facility’s actual costs in operating its facility “efficiently and economically,” because reimbursement at that level was not required under the Boren Amendment. Noting that “unjust enrichment” can take the form of “unjust avoidance of a loss,”
e.g., Reich v. Continental Cas. Co.,
The trial court did not explicitly find that Community Care was unjustly enriched. However, after improperly determining that the State was entitled to restitution absent any showing of inequity, the trial court went on to state that “under these circumstances, justice and equity require restitution.” R. at 940. The designated evidence demonstrates that, as a matter of law, Community Care was unjustly enriched even though it was reimbursed pursuant to a formula calculated by the State according to the State’s own regulations and it operated at a loss under that formula. Similarly, Hamilton Heights was unjustly enriched as a matter of law even though it was reimbursed by the State at a rate which did not cover its reasonable costs in operating its facility “efficiently and economically.”
It is well established that one is enriched if he receives a benefit, Restatement of Restitution § 1 (1937), and that a benefit is conferred upon another not only when one adds to the property of another but also where, as here, one is saved from expense or loss.
Id.
cmt. B.
See, e.g., Omnibank v. United S. Bank,
*1241
In
Mitchell v. Riegel Textile,
A similar situation led to a similar result in
National Kidney Patients Ass’n v. Sullivan,
Community Care urges it could not have been unjustly enriched because the rates at which it was reimbursed under the injunctions were not “unreasonable.” Community Care relies on
Texaco P.R.,
where the Puerto Rico Department of Consumer Affairs sought restitution from certain gasoline wholesalers based on profits they earned while a federal district court injunction prohibited the Department from enforcing regulations which limited the wholesalers’ gross profit margins. The circuit court there first noted that restitution is founded on the concept of unjust enrichment,
The Texaco court then addressed the effect of the reasonableness of the wholesalers’ profits on the question whether the wholesalers were unjustly enriched during the pen-dency of the injunction:
[A] finding that the wholesalers’ actual profit margins were unreasonably high would assist in showing that “the money was received in such circumstances that the possessor will give offense to equity and good conscience if permitted to retain it.” The converse is equally true: the fact that the wholesalers’ profits were reasonable (or unreasonably low, for that matter), tends to make the denial of restitution more in keeping with equitable principles. Either way, the reasonableness vel non of the wholesalers’ profits is a concinnous factor for inclusion in the court’s equitable balancing.
Id. at 877 (citation omitted).
Community Care points to uncontroverted evidence in the record that its facilities covered by the Blackford injunctions lost some ten million dollars during the period they were reimbursed at rates the State calculated pursuant to those injunctions. It also notes that the federal district court found as a fact that the Hamilton Heights facility was being reimbursed at a level well below the facility’s reasonable costs of delivering its services efficiently and economically. Thus, Community Care argues, a denial of restitution is in keeping with equitable principles because it did not benefit during the pen-dency of the injunction from unreasonably high profit margins.
The Texaco case, however, did not address a situation like the one before us, where an overpayment resulted from an injunction against a state regulation which was ultimately determined to be valid. To the contrary, in Texaco, the Department of Consumer Affairs sought restitution based on permanent price control regulations it claimed it would have promulgated had not its temporary regulations been enjoined. *1242 The district court there found that the temporary regulation was a stopgap measure and that the Department would not have implemented any further regulations of a permanent nature. As a result, the gasoline companies did not receive any monetary advantage from the erroneous injunction. Id. at 876.
We believe the Texaco court properly took into account the reasonableness of the wholesalers’ profits under those circumstances. However, where, as here, the over-payments resulted from an erroneous injunction of a valid rate regulation, we do not believe the reasonableness analysis may properly be applied. In this situation, such an analysis would often be incompatible with the rule that “avoidance of a loss” may constitute the type of benefit that supports a finding of unjust enrichment.
Because the Community Care facilities were reimbursed during the pendency of the injunctions at rates higher than were required by valid rate-setting regulations, we cannot say the trial court erred to the esctent it concluded Community Care was unjustly emiched. For that reason, its grant of summary judgment was appropriate.
3. Unclean Hands
Community Care asserts the State is precluded from seeking equitable relief in the form of restitution because the State has not sought restitution from other providers who may have benefitted from one of the injunctions reversed in the Tioga Pines decision. 6 Thus, it argues, the State has “unclean hands” by virtue of its decision to target only the Community Care facilities.
“ ‘Unclean hands’ is an equitable doctrine which means that one who seeks relief in a court of equity must be free of wrongdoing
in the matter before the court." Foursquare Tabernacle v. Department of Metro. Dev.,
We do not believe Community Care’s unclean hands allegation raises an issue of wrongdoing “in the matter before the court.” The State seeks from Community Care restitution of overpayments it made after the Blackford court enjoined the State’s use of two limiters in calculating Medicaid reimbursement rates. Community Care alleges unclean hands based on the State’s failure to seek reimbursement from other Medicaid providers who Community Care asserts benefitted from a different injunction issued by the Blackford court and reversed by the Tioga Pines decision. That injunction prohibited the use of a “change of ownership” provision which would have limited the Medicaid rate increases which might otherwise have resulted when facilities changed owners. The trial court found that this provision was enjoined before it was implemented and has never been applied to any provider. By contrast, the trial court found that Community Care’s facilities were the only providers in the state which escaped the effects of the injunctions against the use of the “tests of reasonableness” and GNP/ipd *1243 limiters. 7
The State’s failure to seek restitution from facilities subject to a provision which was never implemented does not demonstrate “unclean hands” which would bar the State from seeking restitutionary relief from a provider who was the sole beneficiary of a different and unrelated injunction. The trial court did not err when it determined Community Care’s “unclean hands” defense was without merit.
4. The Community Care Counterclaim
Community Care counterclaimed for restitution, seeking to recover the full value of the services provided by its Hamilton Heights facility. It noted that the reimbursement Hamilton Heights received from the State did not fully cover its costs between 1988 and 1993 and alleged the State was unjustly enriched as a result. The State moved to dismiss the counterclaim pursuant to Indiana Trial Rule 12(B)(6) and the trial court granted the State’s motion.
A Rule 12(B)(6) motion to dismiss tests the legal sufficiency of the complaint. When reviewing a 12(B)(6) motion to dismiss, we view the pleadings in the light most favorable to the nonmoving party and we draw every reasonable inference in favor of that party. Right
Reason Publications v. Silva,
The State moved to dismiss the counterclaim on grounds Hamilton Heights had executed provider contracts for reimbursement with the State during that period, agreeing to accept the Medicaid reimbursement as payment in full for its services. It argued Hamilton Heights could not seek payment on a quasi-contractual theory of unjust enrichment when its relationship with the State was governed by an express contract. See, e.g.,
Bayh v. Sonnenburg,
Community Care argues that to the extent its claim is incompatible with the quasi-contractual remedy of restitution based on unjust enrichment, the State’s claim for restitution is equally incompatible because the overpayment alleged by the State also arose from express provider contracts. So, Community Care argues, if its counterclaim is dismissed, it is inequitable and inconsistent to allow the State’s claim to go forward. We disagree.
The State’s restitution claim is not barred by the provider contracts it entered into with Community Care under the injunctions, because the provider contracts incorporate the Medicaid regulations. Thus in that sense the reimbursement to Community Care actually exceeded the payment required by the contract to the extent the contract incorporated the regulations. Payments in excess of those required by a contract may be properly sought in a restitution action.
See, e.g., St. Mary’s Med. Ctr.,
It was not error for the trial court to dismiss Community Care’s counterclaim for restitution based on the contractual relationship between the State and Hamilton Heights while allowing the State’s restitution action to go forward.
*1244 CONCLUSION
The trial court did not err in determining that the State was entitled to summary judgment on its claim for restitution and in dismissing the Community Care unjust enrichment counterclaim. Community Care was unjustly enriched as a matter of law when its facilities subject to the Blackford injunction were reimbursed at rates greater than those the State would have been obligated to pay absent the injunctions, and the Hamilton Heights facility was unjustly enriched as a matter of law because it was reimbursed pursuant to the injunction at a rate which reflected its reasonable costs of operating its facility when the provider agreement and the governing statute permitted reimbursement at a lower rate.
The summary judgment for the State is affirmed.
Notes
.In its brief, the State represents the injunction as "exempting the Community Care facilities from the maximum annual limiter.” Brief of Appellees at 6. The injunction did not have that effect. At the time, the State applied five rate limiters to a provider's calculated rate. The State was enjoined only from using the GNP/ipd limiter as the
sole determinant
of a provider's rate.
See Tioga Pines,
. The trial court did not establish any reimbursement rate for Community Care, nor did it order the State to calculate the rates in any particular manner. Rather, the State applied its own regulations to calculate reimbursement rates that would comply with the injunction.
. The facility's name has since been changed to New Horizons.
. The State contends Hamilton Heights had not been so certified because it was not diligent about applying, because its application was for only part of its facility and the State did not recognize "partial” ICF/MRs, and because certain deficiencies at the facility needed to be corrected.
Community Care contends the State actively resisted its attempts to convert Hamilton Heights to an ICF/MR. It contends that the State refused Hamilton Heights' initial application on grounds the State's quota of ICF/MR beds had been filled; that only after lengthy administrative litigation did the State agree to accept Hamilton Heights’ application; that only after three years and additional litigation did the State actually certify the facility as an ICF/MR; but that after certification, the State refused to enter into a provider agreement with Hamilton Heights.
In an injunction dated October 6, 1993, the Delaware Circuit Court found that the State was withholding the provider agreement until Hamilton Heights repaid the allegedly excess reimbursement which is the subject of this appeal. R. at 1664-65. It ordered the State to immediately cease withholding the provider agreement. Id. at 1668. The State does not mention or address this injunction in its brief.
.
See, e.g., P.B.,
. Community Care also asserts the State had unclean hands in the Hamilton Heights litigation, as demonstrated by the State's argument of a litigation position it knew to be false. Specifically, Community Care alleges the State argued “with nefarious motive" in the federal litigation that Hamilton Heights could obtain an appropriate reimbursement rate by converting to an ICF/MR while at the same time the State was blocking Hamilton Heights’ attempts to so convert.
We believe Community Care's argument amounts to a collateral attack on the
Lett
decision and raises no issues that were not, or could not have been, raised in that litigation. For that reason, any relief available to Community Care must be sought in the
Lett
court and we decline to address here the propriety of those proceedings or the effect of the State’s strategies in the federal court.
See, e.g., Hunter v. Harrell,
. The trial courts in the other injunctions required the State to put into escrow the difference between the payments after the injunctions and the payments which would have been made without the injunctions. When the injunctions were reversed, the escrow accounts were automatically paid to the State.
