I was there for the tail end of that one.
The software was indeed good and thirty-seven million was probably an underestimate(+), but it was a little like making sausages: what comes out has hardly any resemblence to what went in.
(+) That was mostly spent before NZ's currency took a massive nosedive and would be equivalent to USD250million now.
As with the DHBs, the software suffered every manager and his dog piling hundreds of conflicting demands into the spec _after_ purchase (shifting goalposts) forcing continual rewrites.
I'm not privy to the DHB stuff(*) but in the case of the Post Office even this wasn't where most of the money went - the vast majority was soaked up in exorbitant consultant fees(**) and managerial international trips - where the manager concerned would take his family along (all flying first class) and spend a couple of weeks of that trip at various 5-star mediterannean resorts far from the software houses - all paid for by the Post Office (at that point, meaning "at taxpayer expense")
A transparency activist recently described NZ as "Having a perception of innocence, whilst actually being a nasty banana republic without the bananas" and many in the know have been calling it "The Banana Dominion" for decades.
WRT bringing in external consultants: Nice idea, but the first thing that happens is that foreigners (or long-term returning expats) who who might show up the locals are ostracised (whilst those who play the game are loved) and anyone who dares point out the emperor has no clothes usually ends up tarred, feathered and run out of town on a rail - anyone considering moving to NZ should spend time looking at http://e2nz.org/ and the "migrants tales" sections in particular.
(*) The DHB I was dealing with in the last 1990s early 2000s was running their entire financial system on Excel - yes seriously, including a number of hospitals. These was an outfit handling budgets of hundreds of millions of dollars per year, paying managers enormous figures whilst at the same time saying there was no money to replace creaking hardware (including a server room in the main hospital with a leaking roof and failing aircon)
(**) It shouldn't come as a surprise that the consultants were either close friends of senior management or were ex-management, being paid around 10 times what you'd expect as consulting fees. The building where all this was centred on in Wellington was known to most in the Post Office communications section as "Bullshit Castle" due to the antics going on inside.