
    1997 ND 54
    MEDCENTER ONE, INC., Plaintiff, Appellee and Cross-Appellant, v. NORTH DAKOTA STATE BOARD OF PHARMACY, Defendant, Appellant and Cross-Appellee.
    Civil No. 960299.
    Supreme Court of North Dakota.
    April 1, 1997.
    
      Timothy D. Lervick (argued), of Rolfson Schulz Lervick & Geiermann Law Offices, P.C., Bismarck, for plaintiff, appellee, and cross-appellant.
    David A. Lindell (argued), Special Assistant Attorney General, and William F. Lin-dell (appearance), Washburn, for defendant, appellant, and cross-appellee.
   MESCHKE, Justice.

[¶ 1] The North Dakota State Board of Pharmacy appealed a summary judgment declaring a pharmacy owned by Medcenter One, Inc., exempt from the pharmacist-ownership requirements of NDCC 43-15-35(5). Medcenter cross-appealed from the trial court’s refusal to award Medcenter attorneys’ fees under NDCC 28-32-21.1. We hold Medcenter’s failure to exhaust administrative remedies does not preclude this declaratory judgment construing the unambiguous language of the statute to exempt Medcenter’s pharmacy from the pharmacist-ownership requirements. We also hold Medcenter is not entitled to attorneys’ fees. We therefore affirm.

[¶ 2] Since before 1963, Medcenter, a nonprofit corporation, has continuously operated a pharmacy at its hospital under permits renewed annually by the Board. In 1963, the Legislature adopted NDCC 43-15-35(5), which, with two exemptions in a grandfather clause, mandates that a licensed pharmacist own a majority interest in any pharmacy business for it to obtain or renew its annual permits:

The board shall issue a permit to operate a pharmacy, or a renewal permit, upon satisfactory proof of all of the following:
*****
5. The applicant for such permit is qualified to conduct the pharmacy, and is a licensed pharmacist in good standing or is a partnership, each active member of which is a licensed pharmacist in good standing, or a corporation or association, the majority stock in which is owned by licensed pharmacists in good standing, or a limited liability company, the majority membership interests in which is' owned by licensed pharmacists in good standing, actively and regularly employed in and responsible for the management, supervision, and operation of such pharmacy.
*****
The provisions of subsection 5 shall not apply to the holder of a permit on July 1, 1963, if otherwise qualified to conduct the pharmacy, provided that any such permit holder who shall discontinue operations under such permit or fail to renew such permit upon expiration shall not thereafter be exempt from the provisions of such subsection as to such discontinued or lapsed permit. The provisions of subsection 5 shall not apply to hospital pharmacies furnishing service only to patients in such hospital.

[¶ 3] After remodeling and reorganization, Medcenter decided to expand its pharmacy at the hospital on January 1, 1996, to make retail sales to the general public. Medcenter notified the Board about the planned expansion of services, and that Medcenter believed its expanded pharmacy would still be exempt from the statutory requirement for majority ownership by licensed pharmacists.

[¶ 4] In September 1995, the Board’s legal counsel informed Medcenter that the

exemption for community/retail pharmacies set forth in N.D.C.C. 43-15-35 would [not] be available to Medcenter One Hospital Pharmacy. Before July 1, 1963, there were two type of pharmacy permits for two types of pharmacy practice, one for hospitals serving only patients in that hospital and one for community/retail pharmacies. When N.D.C.C. 43-15-35 was amended effective July 1,1963, the legislature recognized that distinction in permits and pharmacy practice and codified that distinction by providing that N.D.C.C. 43-15-35 does not apply to hospital pharmacies furnishing service only to patients in such hospital or to community/retail pharmacies holding a permit on July 1, 1963. It is my opinion that Bismarck Hospital Pharmacy was the beneficiary of the hospital exemption since that was the type of pharmacy practice it was engaged in on July 1, 1963. It is my opinion that Med-center One Pharmacy is not now (32 years later) entitled to an additional exemption for community/retail pharmacies, because it was not engaged in that type of practice on July 1, 1963. On July 1, 1963, Bismarck Hospital held a hospital pharmacy permit and not a community/retail pharmacy permit. In summary, I believe that the proposed pharmacy to be known as “Health Systems Pharmacy” which will include retail sales to persons other than patients of your hospital must comply with N.D.C.C. 43-15-35(5).
* * *' ⅝ ⅜
If you disagree with my opinion or if you want a formal Board hearing on this matter, please let the Board or I know. Upon the filing of a formal application or other appropriate pleadings, this matter can be scheduled for a formal hearing perhaps at the next meeting of the Board of Pharmacy-

[¶ 5] Instead of seeking administrative remedies, Medcenter sued for declaratory relief, asserting its proposed expansion was exempt from the pharmacist-ownership requirements of NDCC 43-15-35(5). The Board answered that Medcenter’s pharmacy was not exempt, and that Medcenter had failed to exhaust its administrative remedies.

[¶ 6] The trial court granted summary judgment to Medcenter, ruling, “[sjince this case is nothing more than statutory interpretation of an unambiguous statute, the exhaustion [of administrative remedies] doctrine has no application” because it is “the court’s primary [role] in statutory construction.” The court concluded that the unambiguous language of NDCC 43-15-35 did not differentiate between hospital and retail pharmacy permits and held that Medcenter, as the continuous holder of a permit since before 1963, was exempt from the pharmacist-ownership requirements. The court also denied Medcenter’s request for attorneys’ fees.

[¶ 7] We review this declaratory judgment under the summary judgment standards of NDRCivP 56. Summary judgment is a procedure for promptly deciding an action without a trial if, after viewing the evidence and possible inferences in the light most favorable to the party opposing the motion, there is no genuine dispute about the material facts or the inferences from the undisputed facts, or if only a question of law is involved. Pear v. Grand Forks Motel Assocs., 553 N.W.2d 774 (N.D.1996). A party resisting summary judgment must present admissible and competent evidence, by affidavit or otherwise, that shows a genuine issue of material fact. Pear. As we explained in Pear, summary judgment is proper when a party fails to raise a factual dispute about an element essential to that party’s claim.

[¶ 8] The Board contends the trial court erred in deciding Medcenter was not required to exhaust administrative remedies before suing for declaratory relief. Medcen-ter responds it was not required to exhaust administrative remedies because the interpretation of an unambiguous statute is purely a question of law.

[¶ 9] The declaratory judgment act, NDCC Ch. 32-23, is remedial and is to be liberally construed to settle uncertainty concerning rights, statuses, and other legal relations. NDCC 32-23-12; In Interest of McMullen, 470 N.W.2d 196 (N.D.1991). Under NDCC 32-23-02, “[a]ny person ... whose rights, status, or other legal relations are affected by a statute ... may have determined any question of construction ... arising under the ... statute ... and may obtain a declaration of rights, status, or other legal relations thereunder.”

[¶ 10] We outlined in McMullen, 470 N.W.2d at 198-99, the basic framework from Iverson v. Tweeden, 78 N.D. 132, 48 N.W.2d 367, 370 (1951), for assessing the suitability of declaratory relief:

The requisite precedent facts or conditions which the courts generally hold must exist in order that declaratory relief may be obtained may be summarized as follows: (1) there must exist a justiciable controversy; that is to say, a controversy in which a claim of right is asserted against one who has an interest in contesting it; (2) the controversy must be between persons whose interests are adverse; (3) the party seeking declaratory relief must have a legal interest in the controversy, that is to say, a legally protectible interest; and (4) the issue involved in the controversy must be ripe for judicial determination.

Ripeness is a corollary to exhaustion of administrative remedies, see 2 Am.Jur.2d Administrative Law § 505 (1994), and is the crux of our procedural analysis in this action.

[¶ 11] Before someone may sue for declaratory relief, generally, the exhaustion of administrative remedies is required. E.g., Tooley v. Alm, 515 N.W.2d 137 (N.D.1994). The exhaustion requirement serves the dual objectives of preserving agency authority and promoting judicial efficiency. See 5 Stein, Mitchell, Mezines, Administrative Law § 49.01 (1997). The doctrine preserves agency authority by recognizing the agency’s initial decisionmaking responsibility. Id. The requirement for exhaustion is particularly weighty when the agency’s decision involves factual issues or administrative expertise. See Medical Arts Clinic, P.C. v. Franciscan Initiatives, Inc., 531 N.W.2d 289 (N.D.1995). The exhaustion prerequisite establishes an efficient method for dispute resolution by giving the agency a chance to correct its mistakes before being sued. Id. If the agency has an opportunity to correct its own errors, a judicial controversy may be mooted or, at a minimum, piecemeal appeals may be avoided. See 5 Stein, Mitchell, Mez-ines at § 49.01. And, where the dispute is not resolved at the administrative level, the exhaustion of remedies will generally develop a complete record for judicial review, especially in technical or complex factual situations. See Medical Arts. These factors recognize a vital role for exhaustion of administrative remedies in the relationship between the executive and the judicial branches of government.

[¶ 12] Notwithstanding these institutional justifications, the exhaustion doctrine has several well-recognized exceptions, including when a legal question simply involves statutory interpretation and does not need the exercise of an agency’s expertise in making factual decisions. See generally 2 Am. Jur.2d Administrative Law at § 511; 5 Stein, Mitchell, Mezines at § 49.02. In Shark Brothers, Inc. v. Cass County, 256 N.W.2d 701 (N.D.1977), we explained that application of the exhaustion doctrine depends upon a bundle of considerations, including whether the issues need the expertise of an administrative body, the interpretation of a statute, or the resolution of a pure question of law. See also Kessler v. Board of Educ. of City of Fessenden, 87 N.W.2d 743 (N.D.1958) (no requirement for exhaustion of administrative remedies where construction of statute involved pure legal question customarily decided by courts). Shark Brothers acknowledges that exhaustion of administrative remedies is not a rigid prerequisite for a statutory interpretation that does not infringe on an agency’s factual decisionmaking process.

[¶ 13] The availability of declaratory relief in this context thus requires an appraisal of the issues generated by the interpretation of the pharmacist-ownership requirements of NDCC 43-15-35(5). The interpretation of a statute is a question of law that is fully reviewable by a court. Northern X-Ray Co. v. State, 542 N.W.2d 733 (N.D.1996). The primary goal in construing a statute is to ascertain the intent of the Legislature. Id. We look first to the language of the statute to ascertain legislative intent. Id. We construe statutes as a whole to give meaning to each word and phrase, whenever fairly possible. County of Stutsman v. State Historical Society, 371 N.W.2d 321 (N.D.1985). If the language of a statute is clear and unambiguous, the legislative intent is presumed clear from the face of the statute. Id. As we explained in Northern X-Ray, a statute is ambiguous if it is susceptible to differing, but rational meanings.

[¶ 14] The plain language of the exemptions in NDCC 43-15-35 is not susceptible of two different and rational meanings. It clearly and unambiguously describes two exemptions to the pharmacist-ownership requirements. The first is for pharmacies that held permits on July 1, 1963, and have not discontinued operations or failed to renew their permit. The plain language of that exemption applies to all pharmacy permit holders on that date, not just retail or non-hospital pharmacies. The second exemption applies to hospital pharmacies furnishing service only to patients in the hospital. The plain language of NDCC 43-15-35 does not say the two exemptions are mutually exclusive. If the Legislature had intended the first exemption only to apply to retail or nonhospital pharmacies, it would have limited that exemption with appropriate language.

[¶ 15] The Board nevertheless asserts it has historically interpreted the first exemption only to apply to retail pharmacies, and argues its long-standing interpretation is entitled to administrative deference. The Board’s conclusory affidavit opposing Med-center’s motion for summary judgment avers that NDCC 43-15-35 “has always been interpreted by The Board to mean that there are two grandfather clause exemptions, one for hospital pharmacies furnishing service only to patients in its hospital and one for eommu-nity/retail pharmacies holding a permit on July 1,1963.”

[¶ 16] The Board, however, has not shown any specific examples of the claimed long-established, practical construction of NDCC 43-15-35. See City of Fargo v. Ness, 551 N.W.2d 790 (N.D.1996). Moreover, the Board has not established that it has issued two different types of permits for different categories of pharmacy practice. The permits in this record do not limit pharmacies to either a “hospital” or a “retail” operation. See NDCC 43-15-01(21) (“pharmacy” means “store or shop where drugs, medicines, or chemicals are dispensed, displayed for sale, or sold, at retail for medicinal purposes, or where prescriptions are compounded, and which is duly registered by the board.”).

[1F17] Although an agency’s longstanding and practical interpretation of a statute is entitled to deference, courts will not defer to an administrative interpretation that is contrary to the unambiguous language of the statute. Northern X-Ray. Accepting the Board’s interpretation would add the word “retail” to the first exemption to the pharmacist-ownership requirements. The Legislature did not include that language in NDCC 43-15-35, and nothing in NDCC Ch. 43-15, nor in the Board’s administrative rules, authorizes different types of permits for “retail” and for “hospital” pharmacies. Instead, the clear and unambiguous language of NDCC 43-15-35 specifies two exemptions from the pharmacist-ownership requirements, and neither exemption is explicitly limited only to a retail pharmacy.

[¶ 18] We hold the clear and unambiguous language of NDCC 43-15-35 declares two exemptions to the pharmacist-ownership requirements, and a pharmacy may be exempt from those ownership requirements if it qualifies under either exemption.

[¶ 19] The Board also asserts that the trial court interfered with the Board’s administrative decisionmaking process, because the court effectively decided Medcen-ter was “otherwise qualified” to conduct a retail pharmacy under NDCC 43-15-35 and was not required to apply for an additional permit to operate a retail pharmacy under NDCC 43-15-34.

[¶20] The Board’s argument, however, is premised on its claimed distinction between a retail and a hospital pharmacy permit. Our law does not make that distinction, and the Board has offered no evidence to show Med-center was not “otherwise qualified” to operate a pharmacy. Medcenter needs a permit to operate a pharmacy, but NDCC 43-15-34 does not require Medcenter to procure an additional or separate permit to make sales to the general public. Under these circumstances, the court’s decision does not infringe on the Board’s decisionmaking process, and we reject the Board’s attempt to posture its exhaustion argument on a purported distinction between retail and hospital pharmacy permits.

[¶ 21] Courts ordinarily should proceed cautiously in cases affecting administrative agencies. See Medical Arts; Tooley. In this case, however, the doctrine of exhaustion of administrative remedies does not require deferring a decision on the interpretation of the unambiguous language of NDCC 43-15-35 until after the administrative process has been completed. This ease involves only the interpretation of an unambiguous statute, and does not involve any issues generally reserved to an administrative decision-maker. As NDCC 32-23-05 authorizes, declaratory relief in this case will terminate the controversy. We affirm the trial court’s decision that the exhaustion doctrine does not prevent declaratory relief to construe the unambiguous language of NDCC 43-15-35, and we affirm the court’s interpretation of that statute.

[¶ 22] In its cross-appeal, Medcenter claims it was entitled to attorneys’ fees under NDCC 28-32-21.1:

1. In any civil judicial proceeding involving as adverse parties an administrative agency and a party not an administrative agency or an agent of an administrative agency, the court must award the party not an administrative agency reasonable attorneys’ fees and costs if the court finds in favor of that party and, in the case of a final agency order, determines that the administrative agency acted without substantial justification.
2. This section applies to an administrative or civil judicial proceeding brought by a party not an administrative agency against an administrative agency for judicial review of a final agency order, or for judicial review pursuant to this chapter of the legality of agency rule-making action or a rule adopted by an agency as a result of the rulemaking action being appealed.
3. Any attorneys’ fees and costs awarded pursuant to this section must be paid from funds available to the administrative agency the final order, rulemaking action, or rule of which was reviewed by the court. The court may withhold all or part of the attorneys’ fees from any award if the court finds the administrative agency’s action, in the case of a final agency order, was substantially justified or that special circumstances exist which make the award of all or a portion of the attorneys’ fees unjust.
4. Nothing in this section shall be construed to alter the rights of a party to collect any fees under other applicable law.

Medcenter argues that, because this action for declaratory relief did not involve a “final agency order,” the court was required to award it attorneys’ fees as a prevailing party under subsection (1), regardless of whether the Board acted without substantial justification. Medcenter’s argument calls upon us to interpret the scope of NDCC 28-32-21.1, and to assess its applicability to an action for declaratory relief.

[¶ 23] Similar issues were raised about the scope of NDCC 28-32-21.1 in Service Oil, Inc. v. State, 479 N.W.2d 815 (N.D.1992). There a taxpayer applied to the State for a refund of taxes collected under a concededly unconstitutional statute and sought attorneys’ fees incurred in bringing the application. The State argued that the taxpayer’s application was not made under NDCC Ch. 28-32, and that NDCC 28-32-21.1 applied only to a civil judicial proceeding to review a final administrative agency order. We did not decide the scope of NDCC 28-32-21.1, however, because, assuming the statute was applicable, we held the trial court abused its discretion in deciding the State acted without substantial justification under the circumstances of that ease.

[¶ 24] In Service Oil, too, we invited the Legislature to clarify the applicability of NDCC 28-32-21.1. Soon, as part of legislation overhauling the rulemaking procedures for administrative agencies, the Legislature added the phrase “in the case of a final agency order” to NDCC 28-32-21.1(1) and (3). See 1993 N.D. Sess. Laws, Ch. 330, § 4. • As amended, NDCC 28-32-21.1 does not yet clearly explain the relationship of its subsections, and nothing in the available legislative history clarifies the scope of that statute.

[¶ 25] Subsection (1) broadly authorizes the court to award attorneys’ fees “[i]n any civil judicial proceeding” if the court finds in favor of the nonagency party and, in the case of a final agency order, determines the agency acted without substantial justification. Subsection (2), however, says “[t]his section applies to an administrative or civil judicial proceeding ... for judicial review of a final agency order, or for judicial review pursuant to this chapter of the legality of agency rule-making action or a rule adopted by an agency as a result of the rulemaking action being appealed.” Subsection (3) says “[a]ny attorneys’ fees ... awarded pursuant to this section must be paid from funds available to the administrative agency the final order, rule-making action, or rule of which was reviewed by the court.”

[¶ 26] We believe the statutory scheme of NDCC 28-32-21.1, when read as a whole to give meaning to as much of the statute as possible, manifests a legislative intent to authorize attorneys’ fees “[i]n any civil judicial proceeding” for “judicial review of a final agency order, or for judicial review pursuant to this chapter of the legality of agency rule-making action or a rule adopted by an agency as a result of the rulemaking action being appealed,” if the court finds in favor of the nonagency party and, in the case of a final agency order, determines the agency acted without substantial justification. Construing the language about “any civil judicial proceeding” and “in the ease of a final agency order” in subsection (1) in the broad manner suggested by Medcenter would effectively negate the language in subsections (2) and (3) limiting the applicability of “this section,” and would be inconsistent with our rule of statutory construction to give meaning to each word and phrase of a statute, whenever fairly possible. See County of Stutsman (construing isolated phrase as surplusage rather than construing entire section as sur-plusage).

[¶ 27] Our decision in Aggie Invs. v. Public Serv. Comm’n, 470 N.W.2d 805 (N.D.1991), does not require a different result. In Aggie we construed NDCC 28-32-21.1 in the context of an electric rate case. We rejected the PSC argument that the Legislature did not intend NDCC 28-32-21.1 to apply to the regulation of electric utility rates, because the language of subsection (1) was not limited in that manner. We said NDCC -28-32-21.1 was “expansive and inclusive” and held it did not except administrative actions regulating electric utility rates. Our decision in Aggie, however, does not mean NDCC 28-32-21.1 is so expansive that it authorizes attorneys’ fees for any civil judicial proceeding other than for “judicial review of a final agency order or for judicial review pursuant to [NDCC Ch. 28-32] of the legality of agency rulemaking action or a rule adopted by an agency as a result of the rulemaking action being appealed.”

[¶ 28] This declaratory judgment action did not judicially review the legality of an agency rulemaking action, nor did it judicially review a final agency order. We therefore hold NDCC 28-32-21.1 does not apply to this case. Medcenter was not .entitled to attorneys’ fees under NDCC 28-32-21.1, and we affirm the court’s denial of Medcenter’s request for fees.

[¶ 29] We affirm the declaratory judgment.

[¶ 30] VANDE WALLE, C.J., and MARING, NEUMANN and SANDSTROM, JJ., concur.

SANDSTROM, Justice,

concurring.

[¶ 31] In Aggie Investments v. Public Service Commission, 470 N.W.2d 805, 809 (N.D.1991), this Court held the Commission (which had already held days of hearings on the ease) acted without reasonable justification in failing to hold yet another hearing which no one had requested. After Aggie and Service Oil, Inc. v. State, 479 N.W.2d 815 (N.D.1992), in addition to the legislative change noted in the Opinion of the Court, the next session of the legislature, by unanimous votes of both houses, adopted House Bill 1131, 1993 S.L. ch. 463, amending N.D.C.C. § 49-02-02(5), making explicit, what many considered implicit, the Public Service Commission need not hold a hearing if “no interested party has asked for a hearing.”

[¶ 32] “Substantial justification” must be reasonably assessed.

[¶ 38] I concur in the Opinion of the Court.

[¶ 34] VANDE WALLE, C.J., concurs. 
      
      . NDCC 28-32-21.1 authorizes attorneys' fees in circumstances comparable to the Federal Equal Access to Justice Act, 28 U.S.C. 2412. See Aggie Invs. v. Public Ser. Comm'n, 470 N.W.2d 805 (N.D.1991). The language of the federal law, 28 U.S.C. 2412(d)(1)(A), authorizes attorneys’ fees "in any civil action (other than cases sounding in tort), including proceedings for judicial review of agency action, brought by or against the United States in any court having jurisdiction of that action, unless the court finds that the position of the United States was substantially justified."
      The federal version, however, does not include limiting language like subsections (2) and (3) of NDCC 28-32-21.1. Although the "in any civil action” language of the federal law is arguably broader than NDCC 28-32-21.1, even the federal law does not authorize attorneys' fees for prevailing nonagency parties regardless of whether the position of the United States was substantially justified.
     
      
      . Ironically, by avoiding the administrative process and electing an action for declaratory relief, Medcenter has effectively prevented any award of attorneys’ fees to it under NDCC 28-32-21.1.
     