P owned and operated a hospital and other health care facilities and was recognized as a charitable organization entitled to tax-exempt status under §501(c)(3). Due to financial difficulties, P concluded that it should consolidate with another health care organization. P formed a partnership with Columbia/HCA Healthcare Corporation (HCA). HCA is a for-profit company that operates 180 hospitals nationwide. HCA already owned several facilities in the same area as P and was interested in entering the central Austin market. A partnership with P would allow HCA to expand into that urban market. P contributed all of its hospital facilities to the partnership. HCA contributed its Austin-area facilities. The partnership hired Galen Health Care, Inc. (Galen), a subsidiary of HCA, to manage the day-to-day operations of the partnership medical facilities. D concluded that due to its partnership P no longer qualified as a charitable (and, thus, tax-exempt) hospital. D ordered P to pay taxes. P paid under protest, and filed this action, requesting a refund. Both parties moved for summary judgment and the court granted P's motion. D was ordered to refund the taxes paid and to also pay attorney's fees and other litigation costs in the amount of $951,569.83 because the court determined that P’s position was substantially justified. D appealed.