The Mayo Clinic and federal tax authorities are fighting in federal court about whether the Mayo Clinic is primarily a clinic.

While it's obvious the Mayo Clinic is a health care provider, it's not at all obvious that this is the best way to describe it. So never mind what happens to Mayo's relatively small tax refund, this technical little tax lawsuit has Mayo arguing about its core identity. That's what makes this worth paying some attention to.

This litigation has been grinding along since 2016 and started with an Internal Revenue Service audit of tax years 2005 and 2006. A trial won't take place at least until March of next year. The sparring between sides in the news recently has been over what material should be ruled in bounds as both sides seek to prepare.

Among other things, the clinic is trying to keep Mayo CEO John Noseworthy — a neurologist by background, not a tax lawyer — from being forced to answer questions from the government's lawyers in the pretrial phase.

The fight is over $11.5 million Mayo wants back as refunds for several tax years going back 15 years. That much money is not chicken feed, but neither is it going to be missed, given Mayo's $16.3 billion balance sheet as of the end of March.

It may seem odd that the nonprofit Mayo Clinic, based in Rochester, even has an income tax hassle at all. Yet nonprofits can have taxable subsidiaries and also get taxed for what's called unrelated business income, a principle in tax law that makes sense. If a nonprofit makes money at a regular activity not really related to its core nonprofit purpose, it could be fair to see it treated the same as taxable companies.

The dispute with the IRS arose over how to treat unrelated business income from debt-financed real estate investments, so this one's pretty deep in the weeds of tax law.

Based on my layman's understanding of the law, how this income was earned wouldn't matter if Mayo were the right kind of "qualified organization." One of the ways to get that status is to be an "educational organization."

That's what the IRS got wrong, according to the clinic. Mayo really is an educational organization.

So, who didn't know that in addition to running world-renowned medical centers, Mayo teaches medical students, too?

Mayo happens to have the sixth-ranked medical school for research, according to U.S. News & World Report, tied in the latest ranking with the University of Pennsylvania and well ahead of the University of Minnesota.

Mayo has pointed out to the court that it really has five distinct educational institutions, including Mayo's school of continuing medical education. Mayo has more than 3,800 enrolled students, and by counting all the practitioners coming through its continuing education programs Mayo gets the total student count up to more than 100,000.

Mayo has insisted that all the IRS needed to do was look at the plain language of the relevant statute for the definition of an educational organization. What's needed is a regular faculty and curriculum for a regularly enrolled group of students attending at a place where teaching is normally carried out. Mayo easily qualified.

Total students north of 100,000 sure sounds like a huge operation, too. Yet it's not, if you put it in the context of everything else going on at Mayo.

In the first quarter of this year, Mayo had revenue from medical services of $2.6 billion. Fees and tuition revenue were not broken out on a separate line, probably because it didn't matter enough in the financial statements of such a large patient-care organization.

Mayo declined to make an executive available to discuss the situation, given that it's an ongoing lawsuit. But a good guess is that any revenue from its educational programs had to be lumped in with "other" revenue in the quarterly financials.

The IRS apparently looked at these numbers and decided that the "primary" activity of Mayo must be patient care.

Mayo lawyers have argued that even if looking at the primary activity was the right way to decide — and it's not — the IRS still got it wrong. And here's where its case gets more interesting.

If primary means first priority, then the IRS has failed to understand something pretty fundamental about how the Mayo Clinic operates. Its first priority is education.

That's the message Mayo delivered in a number of ways, including how it filled out its own tax return. Part of the IRS Form 990 gives a nonprofit the chance to say what it does for a tax-exempt purpose and list its accomplishments. Mayo chose to lead with education on its form.

Among the facts buried in a very dense page of itty-bitty type on this section of Mayo's 2016 tax form is Mayo's boasting of more than 23,000 alumni who have come through its medical-specialty programs since 1915.

The real point here is that it's impossible to tease out education from the other activities of any organization set up and run like the Mayo Clinic. Physicians who staff the Mayo are also the faculty and often the researchers. The people enrolled in its schools see patients and assist on research.

Mayo doesn't exactly have a unique approach, either. Johns Hopkins in Maryland certainly looks much like Mayo, although it's affiliated with a major university. Johns Hopkins teaches medical students, of course, yet it also operated six hospitals and more than 40 other patient care facilities as of last count.

It would be interesting to know how the IRS treats income from a debt-financed property for Johns Hopkins.

Mayo Clinic could give up its educational mission, I suppose, maybe turning over its medical school to the University of Minnesota and winding down its other educational programs. It would still be a draw for patients from around the world.

Well, at least it would remain a destination medical center for a while. Without education it's hard to imagine how Mayo Clinic can still remain Mayo.