Documents released under the Official Information Act reveal tensions between clinical staff, local managers and national health bosses over a proposal to close Dargaville Hospital due to a lack of doctors.
While staff shortages are common at rural hospitals around the country, the situation at Dargaville reached crisis level in October when no doctor could be found to work the overnight shifts.
A staff roster dated 1 October showed a doctor was available after-hours for just five of the 55 nights between 10 October and 1 December.
Health NZ, however, said doctors stepped up at the last minute to fill most of those roster gaps.
The alarm was raised on 9 September by Health NZ Te Tai Tokerau operations manager Alex Pimm, who warned no doctor would be on duty overnight from 6 October.
His report proposed closing the inpatient ward from that date, due to a "lack of sustainable medical workforce" and "inherent clinical and patient safety and reputational risk".
Most staff could be redeployed to Whangārei and Bay of Islands hospitals but a small number would be required at Dargaville to run outpatient services.
Consultation would need to be fast, and "significant public and media interest" would have to be carefully managed.
Had the closure gone ahead, Dargaville Hospital would have been downgraded to an outpatient clinic with daytime-only urgent care.
The report caused an immediate kerfuffle, with a senior manager suggesting it should be pulled, or at least noted as a draft.
The report, released under the OIA, was watermarked: "Draft for discussion - Not government policy".
A revised report, dated 19 September, spelled out the efforts made to recruit medical staff, and six options ranging from no change at one end of the scale to complete closure at the other.
The risks of the no-change option included patients deteriorating overnight and needing help that was not available; nurses feeling unsupported; patient harm; and more strikes by staff worried about health and safety.
The preferred option was to switch to an "enhanced urgent care model", which would still mean closing the ward and moving overnight patients to Whangārei.
On 2 October, Pimm emailed Chris Lowry, a senior manager at Health NZ, again explaining the situation and recommending Dargaville stop admitting new patients overnight.
He also recommended the hospital "transition to not provide an inpatient service from 7 October" while continuing to provide urgent care and booked medical procedures during the day.
Lowry emailed Health NZ chief executive Margie Apa, saying she believed Pimm's recommendations were appropriate.
In the same email, she revealed the problem had escalated in the previous 24 hours due to a senior doctor going on long-term sick leave.
Later that day, rumours of a possible closure started filtering into the public domain.
A reporter emailed then-Health Minister Shane Reti, who contacted senior executives at Health NZ.
Health NZ stated the rumours were wrong, closing Dargaville Hospital was not under consideration, and any suggestion otherwise was incorrect.
The following morning, Apa demanded assurance from Northland health managers that every avenue for maintaining overnight service had been explored.
"Please instruct the team that they must action every option to maintain overnight cover until we are able to put in place a timeframe with community to consult on changes if they are required," she wrote.
Tensions rose in the emails that followed Apa's apparent smackdown of the closure proposal.
Northland chief medical officer Jennifer Walker - who had previously issued a stark warning about the risk of keeping the hospital open - expressed her surprise and reiterated her "very significant concerns about clinical safety for inpatients at Dargaville Hospital ... when we have no access to an on-site doctor".
Responding to Apa's email, Pimm wrote: "There seems to be some suggestion that we have not been trying hard to find cover and keep the ward safely running. I hope I am misinterpreting things but I want to be very clear that the team and I have worked very hard to find medical/nurse practitioner cover.
"I understand, Margie, that you were advised on 15 August of the likely need to close the ward ... There comes a point where we have to recognise that we have reached the limit of our actions and need to make a decision."
However, by 8 October, local managers appear to have accepted Health NZ's decision to keep the hospital open, despite misgivings.
That day Pimm sent an email to staff, later leaked to RNZ, detailing how the hospital would function with no after-hours doctor.
That included the use of telehealth, a low threshold for transferring patients to Whangārei, and assessing patients to make sure they were stable and unlikely to need overnight treatment.
In an update provided to RNZ last week, Pimm said Health NZ was continuing to look at how it addressed long-standing workforce challenges to ensure community needs were prioritised.
Health NZ was still working to fill vacancies at Dargaville Hospital, and reviewing how it could "continue to support the Kaipara community in a sustainable and safe way".
Pimm said Health NZ would seek feedback on its plans later this year.
An interim plan designed to keep the hospital functioning safely, making use of an on-call doctor when available and a telehealth service on other nights, is due to come into force this Saturday.
Sign up for Ngā Pitopito Kōrero, a daily newsletter curated by our editors and delivered straight to your inbox every weekday.