The Counties Manukau District Health Board spent millions on a failed IT project while putting off dealing with rotting buildings.
Spending on the IT overhaul - which was meant to revolutionise public hospital services in South Auckland - included $10,000 a month for an outside contractor to do communications for the DHB.
The overhaul - Project Swift - aimed to improve IT services to outpatients at home, and those looking after them, to reduce demands on hospital facilities from inpatients but it lasted just two years.
In 2014, the board put Swift's indicative value at $40 million to $100 million over a five to 10-year period.
The spending on it included $125,000 in 2014/15 on an outside communications contractor to promote it.
"We're on to a winner with Swift," Counties Manukau Health's chief executive Geraint Martin said in a December 2014 blog to nurses and doctors.
"We have partnered with the NZ Health Innovation Hub and IBM to deliver a major piece of work," the DHB's 2015/16 annual plan said.
However, 14 months later, the board pulled the plug.
A select committee report later said the second phase of the project showed "the DHB is not big enough to afford the level of investment needed to fund the information technology infrastructure".
Asked why it didn't work, the board said: "The significant factors reducing delivery confidence were the need to reconfigure the broader transformation, executive leadership, accountabilities, programme structure and address lack of clarity on funding."
However, information newly released by the DHB to RNZ under the Official Information Act puts the write-off at $8.6 million over 2015/16 and 2016/17.
The write-off is a major reason why the board has lurched from a surplus to a deficit at the same time as having to go to taxpayers for huge sums to fix leaky and earthquake-prone buildings.
The Health Ministry had previously told RNZ it "was aware" of a total write-off of $5.5 million; but that only accounts for last year, and not the $3.1 million the year before.
The Health Ministry said it was "unaware of any write-offs by other DHBs" due to Swift.
Treasury had given Swift an amber rating in late 2015, then a red rating for risk.
The project's write-off was a major factor behind the DHB's rapid reversal in fortunes, an official audit showed.
The board had forecast a $4 million surplus last year, but instead lurched to a $13 million deficit.
It had reported surpluses in 12 of the previous 13 years.
However, these surpluses were not spent on fixing its buildings.
Its previous facilities manager told RNZ he had just half the $15 million he needed each year for maintenance.
Other OIA documents showed the extent of the contradictions: "The majority of hospital building and plant assets are currently in very good or good condition," the 2016 Long-Term Investment Plan said.
"We have an ageing building stock that has not been adequately maintained and is no longer fit for purpose," a June 2017 risk report to top executives said.
Counties Manukau DHB said the lessons from Swift were helping it with its new Health Together Technology 2020 programme which had eight projects under way.
Counties Manukau now faces having to find savings of $30 million-a-year for three years just to break even.
District Health Board executives now say if each staff member saved $12 a day, it could manage.
A financial briefing to staff in January this year, by top executives and board members, released under the OIA said: "If you take the money we need to save in the next year and divide it by every person who works here, then every person needs to save $12 per day.
"This reveals an opportunity - if every person can look at their discretionary spending, particularly relating to use of resources, then the financial problem immediately becomes much more manageable."