People needing surgery were mistakenly left off waiting lists at one of the country's biggest DHBs - an oversight only discovered when one of them queried their case.
Forty-four Auckland Hospital patients were caught up in the error, the Herald can reveal.
Auckland DHB only realised there was a problem when one of the affected patients contacted them about their referral.
Further work identified a total of 44 patients across different surgical services who were mistakenly not added to waiting lists.
The DHB carried out urgent work to clinically assess the patients and said none came to harm because of the delays. All surgeries had since been booked.
Most cases were in 2017 but the DHB would not confirm how long patients had been left off waiting lists or what surgeries they needed. The problem was discovered in April - indicating some patients could have been delayed for more than a year.
An automatic report is run as a back-up to identify any patients mistakenly left off waiting lists, but failed to do so in the 44 cases.
ADHB chief medical officer Dr Margaret Wilsher said delays were taken very seriously.
"We know this can cause anxiety for our patients and their families. In this case, when we discovered a cohort of 44 patients had waited much longer than usual to be booked in for surgery we contacted these patients as a priority to schedule their treatment.
"A clinical review showed none of these patients suffered harm as a result of the delay. We have put additional checks and validations in place and continue to look into the issue."
Wilsher encouraged any patient concerned at the length of time they had waited for a surgical appointment to talk to their GP or contact the health board directly.
Health Minister David Clark said he was made aware of the issue this week.
"I'm advised the DHB says at this stage it appears no patients have suffered harm as a result of this error...I'm expecting to be updated as the DHB investigates this matter further."
Ian Powell, executive director of the Association of Salaried Medical Specialists, said the error was serious.
"I would imagine that the people who discovered it, their hearts would have stopped momentarily.
"There may well have been an enhanced risk of harm, but it would appear that didn't materialise."
Powell said the oversight highlighted the risk to patients of things going wrong with the IT systems used by health boards and professionals.
"It is a bit scary...IT systems in public hospitals are often the thing that causes immense frustration for specialists. It is not confined to Auckland at all, it is sadly quite universal."
In May the Herald reported on tensions between some of Auckland DHB's surgical teams, with some staff demanding an urgent sea change in culture.