(1) Except as provided for in subsection (2) of this section, at the conclusion of an action under RCW
7.71.030 the court shall award to the substantially prevailing party the costs of the suit attributable to any claim or defense asserted in the action by the nonprevailing party, including reasonable attorneys' fees, if the nonprevailing party's claim, defense, or conduct was frivolous, unreasonable, without foundation, or in bad faith.
(2) At the conclusion of an action under RCW
7.71.030 the court shall award to the substantially prevailing defendant the cost of the suit, including reasonable attorneys' fees, if the nonprevailing plaintiff failed to first exhaust all administrative remedies available before the professional peer review body.
(3) A party shall not be considered to have substantially prevailed if the opposing party obtains an award for damages or permanent injunctive relief under this chapter.