Lebanon — A flash flood of red ink swept over Dartmouth-Hitchcock at the end of its fiscal year after the last-minute discovery of problems arising from makeovers in back-office operations and flawed financial projections, D-H officials said on Monday.

D-H, a nonprofit corporation that includes Mary Hitchcock Memorial Hospital and Dartmouth-Hitchcock Clinic, posted a $22.6 million operating loss for the quarter that ended June 30, according to unaudited results that became public on Friday in a database on the website of the Municipal Securities Rulemaking Board.

The fourth-quarter loss erased a positive, albeit tiny, operating margin posted for the first three quarters of the year and left the operator of northern New England’s largest hospital and clinic system with a $12.2 million deficit for the full year.

“The deficit was not expected,” D-H spokesman Rick Adams said.

Hospital management will take several steps to respond to the deficit, according to Adams.

“Non-essential expense items will be delayed and hiring will be held to only essential positions,” Adams said. But an $11 million commitment to fund a merit raise program that was announced last week will be met, he said.

It was only in the past month that three budget-busting problems were discovered, Adams said. At issue were efforts to simultaneously implement a new, federally mandated diagnostic coding system, integrate business and patient software platforms and contract out billing and other revenue management functions, he said in an email.

“Success required every piece to be perfectly integrated and aligned,” Adams wrote. “They were not.”

Financial modeling problems also led to overestimates of revenue and underestimates of a few expenses, Adams said.

D-H has revamped the revenue models used to monitor finances and track budget performances, and now needs to revise its budget projections for fiscal 2017, Adams said.

Dartmouth-Hitchcock Health, the nonprofit corporation that controls D-H and other health care providers in northern New England, posted a $9.3 million loss a year ago.

Operations account for a big majority of the health system’s revenue and expenses, and operating profits and losses provide a measure of the economic viability of an organization’s day-to-day activities. A 4 percent margin — operating revenue that exceeds expenses by that ratio — has been used as a target by both D-H and the analysts who follow it.

The deficit report came about five months after D-H’s credit was downgraded by Standard & Poor’s Ratings Services, a company that assesses the financial health of organizations that take on long-term debt.

In a note explaining the downgrade, S&P analyst Jennifer Soule said that she anticipated that D-H would “report a positive operating margin at the close of fiscal 2016.” That would bring to an end a series of “strained financial performance since fiscal 2014, with results that lagged budget expectations in each of those fiscal years,” she wrote in March.

But the red ink continued to flow during the final months of D-H’s fiscal year. Soule did not respond to messages left on Monday.

D-H’s financial reversal came just five weeks after it announced that Robin Kilfeather-Mackey, its $735,000-a-year chief financial officer, was leaving to study environmental science and would be replaced by Daniel Jantzen, D-H’s $835,000-a-year chief operating officer.

By comparison, the revenue management transition, in which 340 D-H employees saw their jobs moved to the Conifer Health Solutions unit of Dallas-based Tenet Healthcare Corp., was announced in May 2015 and was set to be put in motion last August.

D-H’s net revenue from patient services, a key metric of hospital financial volume, was $1.35 billion in fiscal 2016, down from $1.38 billion a year earlier. On the other side of the ledger, total operating expenses also declined, to $1.50 billion in FY 2016 from $1.56 billion in 2015.

Among the factors that reduced D-H’s spending were lower payments of the state’s Medicaid Enhancement Tax, a provider levy that the state uses to boost federal support for a program that provides health insurance to some low-income residents. Payments of the tax declined to $46.1 million in 2016 from $52 million a year earlier.

D-H’s revenue slipped even as more patients were served. Total patient discharges rose in 2016, to 26,194 from 25,113 a year earlier, as did total days of care, to 127,416 from 125,440. The number of surgical cases increased to 21,478 from 19,486, but emergency room visits declined, to 30,929 from 31,477.

D-H posted a nonoperating loss of $12 million, so that in 2016 total expenses exceeded revenue by $24.1 million.

A year ago, total revenue for Dartmouth-Hitchcock Health, the larger holding company, exceeded expenses by $70.9 million, mainly on the strength of a $92.5 million gain posted when D-H Health added to its balance sheet assets acquired in affiliation deals that gave it control of Cheshire Medical Center in Keene, N.H., and Mt. Ascutney Hospital and Health Center in Windsor.

S&P currently rates D-H’s debt “A.” That indicates a debtor with a strong capacity to meet its financial obligations but one that is “somewhat more susceptible to the adverse effects of changes in circumstances and economic conditions” than higher-rated borrowers, according to S&P. Prior to the March downgrade, the rating was “A+.”

Among D-H’s financial strengths, according to S&P, is its “extensive network of clinically and technologically integrated physicians, outpatient sites and affiliated hospitals” in the Twin States.

But weaknesses include debt obligations that could rise with interest rates and the financial impact of additions of providers to the D-H network, S&P said in March.

D-H’s long-term debt obligation was $553.2 million on June 30, up from $518.8 million a year earlier. Interest rates on D-H’s outstanding bonds range from 4 percent to 7.2 percent, according to the Municipal Securities Rulemaking Board website.

Rick Jurgens can be reached at rjurgens@vnews.com or 603-727-3229.

Correction: An earlier version of this story incorrectly attributed a $9.3 million deficit in the last fiscal year to D-H rather than to the larger D-H Health system and incorrectly described how long D-H has experienced deficits.