
167 P.3d 1080 (2007)
2007 UT 72
EMERGENCY PHYSICIANS INTEGRATED CARE, Plaintiff and Appellant,
v.
SALT LAKE COUNTY, a political subdivision of the State of Utah, Defendant and Appellee.
No. 20060255.
Supreme Court of Utah.
September 7, 2007.
*1081 Brian S. King, James L. Harris, Jr., Salt Lake City, for plaintiff.
David E. Yocom, Donald H. Hansen, Melanie F. Mitchell, Salt Lake City, for defendant.
PARRISH, Justice:

INTRODUCTION
¶ 1 Emergency Physicians Integrated Care ("EPIC") is a Utah limited liability corporation formed for the purpose of providing billing and collection services to various *1082 emergency physicians around Utah. EPIC sued Salt Lake County (the "County") under a theory of quantum meruit, seeking compensation for medical services its physicians provided to county inmates. The district court entered summary judgment in favor of the County, holding that EPIC's services failed to "benefit" the County as required by the first prong of a quantum meruit analysis. We reverse and remand for further proceedings consistent with this opinion.

BACKGROUND
¶ 2 EPIC's suit against the County sought compensation for the value of the medical services provided by its physicians to county inmates from February 2000 to November 2004. The County denied any legal responsibility to pay for the services.
¶ 3 Prior to 2001, the County paid EPIC physicians for the care they provided to convicted and pretrial inmates in accordance with its own administrative guidelines and the applicable provisions of the Utah Code. Utah Code Ann. § 17-15-17(3) (1999).[1] In February 2001, the legislature amended the provision of the Code that lists the charges for which a county is statutorily responsible. Id. § 17-50-319 (2005). As amended, Utah Code section 17-50-319 requires counties to pay medical facilities for uncovered medical services provided to convicted and pretrial inmates at noncapitated Medicaid rates, absent a separately negotiated fee schedule between the county and the facility. Id. § 17-50-319(1)(k), (2). Following the amendment, the County began reimbursing EPIC physicians for inmate care at the noncapitated state Medicaid rates.
¶ 4 EPIC contends that section 17-50-319, which covers charges by "medical facilities," is inapplicable to charges provided by its physicians. EPIC argues that because the noncapitated state Medicaid rate is substantially less than the "usual and customary charges" for its physicians' services, it is entitled to additional compensation. EPIC further contends that the County failed to make any payments for care provided to some of the inmates.
¶ 5 In May 2005, EPIC moved for partial summary judgment, arguing that the undisputed facts entitled it to judgment against the County under the equitable theory of quantum meruit. The County filed a cross-motion for summary judgment, arguing that (1) payments to EPIC are covered under Utah Code section 17-50-319(2) and are therefore limited to the noncapitated state Medicaid rates, (2) EPIC's quantum meruit claim fails as a matter of law, and (3) EPIC's claims are barred by the notice of claim provisions of the Utah Governmental Immunity Act.
¶ 6 The district court denied EPIC's motion for partial summary judgment and granted the County's motion "to the extent that [EPIC] has not shown that it is entitled to recover under a claim of quantum meruit." Reasoning that the inmates, rather than the County, were the primary beneficiaries of the services provided by EPIC physicians, the district court held that EPIC's quantum meruit claim failed as a matter of law because EPIC conferred only an incidental benefit on the County. In support of this conclusion, the district court observed that the EPIC physicians were required to bear the cost of inmate care because they had a statutory duty to provide emergency care regardless of a patient's ability to pay under the Emergency Medical Treatment and Active Labor Act ("EMTALA"), 42 U.S.C. § 1395dd (2000). The district court also concluded that the County had no statutory obligation to pay physicians for the medical care they provided to inmates. While ostensibly considering whether EPIC was entitled to the difference between the uncapitated Medicaid rate and the rates charged by EPIC, the implication of the district court's ruling is that the County has no legal obligation to reimburse EPIC physicians at all for medical services provided to county inmates.
¶ 7 EPIC appealed to this court, arguing that (1) the County has an obligation to pay EPIC physicians for emergency medical services provided to inmates and (2) EPIC physicians are entitled to be reimbursed by the *1083 County for the reasonable value of these service. We have jurisdiction pursuant to Utah Code section 78-2-2(3)(j).

STANDARD OF REVIEW
¶ 8 "Summary judgment is appropriate when there is no issue as to any material fact and the moving party is entitled to judgment as a matter of law." Dairyland Ins. Co. v. State Farm Mut. Auto. Ins. Co., 882 P.2d 1143, 1144 (Utah 1994) (citing Utah R. Civ. P. 56(c)). When reviewing a ruling on summary judgment, this court gives no deference to the lower court's legal conclusions and reviews the issues presented under a correctness standard. Schaerrer v. Stewart's Plaza Pharm., Inc., 2003 UT 43, ¶ 14, 79 P.3d 922. Factual disputes are viewed in the light most favorable to the nonmoving party. Surety Underwriters v. E & C Trucking, Inc., 2000 UT 71, ¶ 15, 10 P.3d 338.

ANALYSIS
¶ 9 We hold that the district court erred in entering summary judgment in favor of the County. The basis for the summary judgment was the district court's holding that EPIC could not establish the elements of its quantum meruit claim because the services provided to county inmates by EPIC physicians did not confer a benefit on the County. Because we disagree with this holding, we vacate the summary judgment and remand the case to the district court for further proceedings consistent with this opinion.

I. QUANTUM MERUIT
¶ 10 Quantum meruit is an equitable tool that allows a plaintiff to receive restitution for the reasonable value of services provided to the defendant. See J & M Constr., Inc. v. Southam, 722 P.2d 779, 780 (Utah 1986) (per curiam); Christensen v. Abbott, 671 P.2d 121, 123 (Utah 1983); Foulger v. McGrath, 34 Utah 86, 95 P. 1004, 1007 (1908); Davies v. Olson, 746 P.2d 264, 269 (Utah Ct.App.1987); Black's Law Dictionary 1255 (7th ed. 1999) ("A claim or right of action for the reasonable value of services rendered."). Quantum meruit has two branches, contract implied in law (also referred to as unjust enrichment or quasi-contract) and contract implied in fact, Davies, 746 P.2d at 269.
¶ 11 To prove the existence of a contract implied in law, a plaintiff must establish the following: "(1) [T]he defendant received a benefit; (2) an appreciation or knowledge by the defendant of the benefit; (3) under circumstances that would make it unjust for the defendant to retain the benefit without paying for it." Id. The district court entered summary judgment against EPIC after it concluded that EPIC could not establish the first element of a quantum meruit claim because the emergency services its physicians provided to county inmates did not confer a benefit on the County. We accordingly focus our discussion on this element.
¶ 12 Although EPIC's claim of quantum meruit is an equitable one, the nature of the benefit conferred on the County by EPIC is informed by the County's constitutional duty and is governed by statutory law. We consequently begin with an analysis of these issues.

A. Constitutional Duty to Provide Care
¶ 13 As acknowledged by both parties, the County has a constitutional obligation to provide medical care to those in its custody. The Eighth Amendment imposes on governments a duty to provide for the "`serious medical needs of prisoners.'" City of Revere v. Ma. Gen. Hosp., 463 U.S. 239, 243-44, 103 S.Ct. 2979, 77 L.Ed.2d 605 (1983) (quoting Estelle v. Gamble, 429 U.S. 97, 104, 97 S.Ct. 285, 50 L.Ed.2d 251 (1976)). To an equal degree, the Fourteenth Amendment requires government entities to obtain medical care for injured pretrial detainees. Id. at 244-46, 103 S.Ct. 2979 ("The Due Process Clause . . . does require the responsible government or governmental agency to provide medical care to persons . . . who have been injured while being apprehended by the police."); see Bell v. Wolfish, 441 U.S. 520, 535, 99 S.Ct. 1861, 60 L.Ed.2d 447 (1979).
¶ 14 These constitutional duties, however, do not "dictate how the cost of that care should be allocated as between the [custodial government] entity and the provider of *1084 the care." Revere, 463 U.S. at 245, 103 S.Ct. 2979. In the case that drew this distinction, City of Revere v. Massachusetts General Hospital, the Supreme Court proposed several possible means by which a medical service provider could be paid, but stated that "[i]f . . . the governmental entity can obtain the medical care needed for a detainee only by paying for it, then it must pay." Id. Ultimately, however, the allocation of costs is a matter of state law. Id.

B. Statutory Duty to Pay for Medical Care
¶ 15 Because the County's duty to pay for the medical care of its inmates is a matter of state law, we consider whether Utah law allocates the costs of convicted and pretrial inmates' medical care to the County. EPIC contends that Utah Code section 17-50-319 renders the state liable for the cost of medical care provided to inmates, while the County contends that it does not.
¶ 16 Section 17-50-319 enumerates the charges for which counties are liable. Subsection (1)(c) of section 17-50-319 charges counties with the broad obligation to pay "expenses necessarily incurred in the support of persons charged with or convicted of a criminal offense and committed to the county jail." Utah Code Ann. § 17-50-319(1)(c) (2005). Subsection (1)(k) specifically renders counties liable for "expenses incurred by a health care facility in providing medical services" to convicted and pretrial inmates, and subsection (2) provides that reimbursement under subsection (1)(k) is limited to noncapitated state Medicaid rates except where there is a contract between a county jail and a health care facility establishing a fee schedule for medical services rendered. Utah Code Ann. § 17-50-319(1)(k), (2).
¶ 17 The County denies the applicability of the general obligation contained in subsection (1)(c), claiming that it is superseded by the more specific language of subsections (1)(k) and (2). In an argument that defies internal consistency, the County claims that it has no duty to pay for medical services provided by emergency physicians because they are not specifically included in the statutory scheme but then acknowledges its attempt to pay EPIC physicians noncapitated Medicaid rates based on that same statutory scheme.
¶ 18 The district court agreed with the County and found the general provisions of subsection (1)(c) inapplicable, stating that nothing in that section "specifically allocated the costs of emergency physician services to counties." We disagree. The Constitution requires that the government provide medical care to persons convicted or detained by a government entity. Revere, 463 U.S. at 243-44, 103 S.Ct. 2979. Consequently, medical care is logically included in subsection (1)(c)'s broad requirement that the County pay the expenses "necessarily incurred in the support" of pretrial or convicted inmates.[2]
¶ 19 Our conclusion in this regard is not changed by the fact that subsection (1)(k) explicitly charges the County with "expenses incurred by a health care facility in providing medical services at the request of a county sheriff for existing conditions of" convicted and pretrial inmates. Utah Code Ann. § 17-50-319(1)(k) (emphasis added). We acknowledge the well-settled principle of statutory construction that "when two provisions address the same subject matter and one provision is general while the other is specific, the specific provision controls." Dairyland Ins. Co. v. State Farm Mut. Auto. Ins. Co., 882 P.2d 1143, 1146 (Utah 1994); accord Lyon v. Burton, 2000 UT 19, ¶ 17, 5 P.3d 616. By their express terms, however, subsections (1)(k) and (2) govern only services provided by medical facilities, services that are distinct from medical care provided by physicians.
¶ 20 A facility is defined as "something (as a hospital, machinery, plumbing) *1085 that is built, constructed, installed, or established to perform some particular function or to serve or facilitate some particular end." Webster's Third New International Dictionary 812-13 (1986). Thus, under the plain language of the statute, the terms of subsections (1)(k) and (2) apply exclusively to those costs incurred by the entity associated with the physical structures in which the health care needs of the inmates are provided, rather than the costs incurred by individual health care providers. Because subsections (1)(k) and (2) do not address the County's obligation to compensate medical doctors who provide care to inmates, the County's obligation in this regard is controlled by the more general language of subsection (1)(c).
¶ 21 Although we conclude that the statute is clear on its face, thereby rendering examination of legislative history unnecessary, it is worth noting that the legislative history of Senate Bill 152, which was codified as Utah Code section 17-50-319, is consistent with our conclusion that medical services provided by physicians do not qualify under subsection (1)(k) as "expenses incurred by a health care facility" (emphasis added). The phrase "health care provider" was specifically deleted from the bill, according to the bill's statement of intent, "because of the recognition and continued commitment of counties and physicians to work out prisoner reimbursement issues without legislation and because of the considerable difference in Medicaid reimbursement rates for physicians as compared to hospitals." Utah House Journal, 54th Utah Leg., Gen. Sess., at 892-93 (Feb. 27, 2001). The legislature's distinction between health care providers and health care facilities is consistent with the separate services (and consequently, separate billing) that doctors and hospitals provide.
¶ 22 In sum, because subsections (1)(k) and (2) have no application to individual health care providers, the general provisions of subsection (1)(c) apply. Under this subsection, the County has a statutorily mandated duty to pay the physicians for the services provided.[3] We now consider how the County's constitutional and statutory obligations fit into EPIC's quantum meruit claim.

C. The Benefit the County Received from EPIC
¶ 23 We hold that EPIC physicians conferred a benefit on the County by providing the means by which it fulfilled its legal obligation to provide inmate care. While the inmates also benefitted from the services provided by EPIC physicians, it is not an element of quantum meruit that the benefit run exclusively to the party from which compensation is sought.
¶ 24 The district court acknowledged the County's constitutional duty, but held that the inmates were the true beneficiaries of EPIC's service and that any benefit to the County was merely incidental. In support of this conclusion, the district court relied on Myrtle Beach Hospital, Inc. v. City of Myrtle Beach, 341 S.C. 1, 532 S.E.2d 868, 869 (2000), in which the South Carolina Supreme Court considered the city's obligation to pay for the medical treatment of pretrial detainees. The South Carolina Supreme Court rejected the hospital's quantum meruit claim, finding that the "detainee rather than the City" received the benefit conferred by the hospital. Id. at 873. It held that the city's constitutional obligation under Revere was fulfilled by "`seeing that the detainees are taken promptly to a hospital'" for treatment. Id. (brackets omitted) (quoting Revere, 463 U.S. at 245, 103 S.Ct. 2979). And it found that the services the hospital provided to the inmates only incidentally benefitted the city by helping it fulfill its constitutional obligation. Id. at 873 n. 12.
¶ 25 We respectfully disagree with the South Carolina Supreme Court's conclusion that a government entity "receives [only] an incidental benefit" from a medical service provider treating inmates in its custody. Id.[4]
*1086 ¶ 26 The first element of quantum meruit requires the court to measure the benefit conferred on the defendant by the plaintiff. Berrett v. Stevens, 690 P.2d 553, 557 (Utah 1984). The benefit conferred satisfies this requirement if the defendant's retention of the benefit would be unjust without providing compensation. 66 Am.Jur.2d Restitution and Implied Contracts § 13 (2001) ("It is not enough that a benefit was conferred on the defendant, and rather, the enrichment to the defendant must be unjust in that the defendant received a true windfall or `something for nothing.'"); Berrett, 690 P.2d at 557 ("[T]he mere fact that a person benefits another is not by itself sufficient to require the other to make restitution."). While unjust enrichment does not result if the defendant has received only an incidental benefit from the plaintiff's service, id., this court has found that a large variety of items fall under the definition of "benefit," including an "interest in money, land, chattels, or choses in action; beneficial services conferred; satisfaction of a debt or duty owed by [the defendant]; or anything which adds to [the defendant's] security or advantage." Baugh v. Darley, 112 Utah 1, 184 P.2d 335, 337 (1947).
¶ 27 We acknowledge that EPIC provided a physical benefit to the treated inmates, but the County also benefitted from EPIC's service.[5] In providing medical care to inmates, the County is not acting as a passive third party to a primary relationship between the physicians and inmates. Instead, the County has complete control over when and where medical services are provided and therefore dictates the means by which its constitutional obligation is fulfilled. For practical purposes, the County outsourced its constitutional duty to EPIC. Had it not done so, it would have been required to employ more on-site medical staff or bear increased liability for providing inadequate care. These are real benefits that are sufficient to establish the first prong of a quantum meruit claim.
¶ 28 In concluding that the County did not benefit from emergency services provided to its inmates, the district court reasoned that because EPIC has a duty to provide treatment to county inmates under EMTALA, 42 U.S.C. § 1395dd, it is the physicians who must bear the cost of treatment, after the patients themselves.[6] The language of the statute does not support this conclusion. EMTALA requires hospital emergency departments to treat individuals who have emergency medical conditions without regard for their ability to pay. See 42 U.S.C. § 1395dd (2000). But it does not prohibit medical providers from recovering payment from emergency patients or their guardians after service has been provided.

II. REASONABLE VALUE OF CARE
¶ 29 If EPIC proves its quantum meruit claim, it is entitled to the "reasonable value" of the services it provided. Davies v. Olson, 746 P.2d 264, 269 (Utah Ct.App.1987); accord Baugh v. Darley, 112 Utah 1, 184 P.2d 335, 339 (1947) ("[I]n an action for unjust enrichment, in those cases where there is a proper equitable basis for the same, the measure of damages, by the great weight of authority, is the reasonable value of the services rendered."). The parties spent considerable time in their briefing and in oral *1087 argument debating the appropriate measure of reasonable value, specifically, whether EPIC physicians should be paid their billed charges or noncapitated state Medicaid rates. Because the determination of what constitutes a "reasonable value" for the physicians' services is dependent on the specific evidence presented and because the district court did not consider whether the evidence on this issue raised a factual dispute, we refrain from deciding this issue. Rather, we remand the matter to the district court for consideration of this argument and further proceedings consistent with this opinion.

CONCLUSION
¶ 30 We reverse the district court's grant of summary judgment to Salt Lake County. EPIC physicians provided a benefit to the County when they provided medical services to pretrial and convicted county inmates by allowing the County to discharge its constitutional obligation to provide medical care to detainees and inmates and its statutory obligation to pay for the expenses necessarily incurred in support of county inmates. We therefore remand this case for consideration of the other arguments and defenses raised by the parties.
¶ 31 Chief Justice Durham, Associate Chief Justice Wilkins, Justice Durrant, and Justice Nehring concur in Justice Parrish's opinion.
NOTES
[1]  This section was renumbered in 2000 and subsequently amended. The amended section is now found at Utah Code Ann. § 17-50-319 (2005).
[2]  We recognize that under an earlier incarnation of Utah Code section 17-50-319(1)(c), we found no statutory duty to pay an attorney for legal services rendered to a man accused of murder. Pardee v. Salt Lake County, 39 Utah 482, 118 P. 122, 124 (1911). We held in that case that the term "support" did not encompass an inmate's criminal defense. Id. Pardee is distinguishable, however, because unlike legal services, medical care does fall within the commonly understood definition of "support" as "[s]ustenance or maintenance." See Black's Law Dictionary 1453 (7th ed.1999).
[3]  Because we find a statutory duty to remunerate EPIC, we have no need to consider the possibility of a similar common law duty.
[4]  Further, we find that the facts of Myrtle Beach are distinguishable from those in this case. The City of Myrtle Beach had no statutory obligation to pay for the medical care of pretrial detainees because the statutes obligating payment covered only convicted inmates. Myrtle Beach, 532 S.E.2d at 871. As discussed above, however, Utah's statute obligates the County to pay for the medical care of pretrial and convicted inmates. See supra ¶¶ 15-22.
[5]  Under Utah Code section 17-50-319(2)(a), medical services that a health care facility provides to inmates are the responsibility of the state only to the extent that they are not covered by private insurance. With this opinion, we do not absolve inmates for potential liability for care, but merely hold that EPIC provides a benefit to the County sufficient to fulfill the first element of a claim for quantum meruit.
[6]  The Supreme Court's Revere opinion contains dicta about how the costs of inmate care might be allocated, which may have formed some of the basis for the district court's reasoning here. Revere refers to federal grant money allocated to hospitals to cover indigent care and state laws requiring treatment without regard for a patient's ability to pay. 463 U.S. at 245, 103 S.Ct. 2979. It then states that government entities might create their own hospitals or impose "on the willingness of hospitals and physicians" to treat inmates without consideration for payment. Id. The existence of these options, however, does not necessarily excuse government entities from paying for medical services provided to inmates or dictate that the cost of treatment be born by emergency physicians.
