An Auckland man had a seizure and blacked out as he drove through Auckland's Waterview Tunnel after switching epilepsy medication brands.
The brand switch came about as part of a Pharmacy cost-saving drive.
But documents released under the Official Information Act show when the New Zealand Transport Agency (NZTA) advised patients making the brand switch to consider stopping driving for two months, Pharmac questioned the decision.
Paul Thompson, who woke up in his car in the tunnel with someone banging on his window, urged people with epilepsy to take NZTA's advice if they were caught up in the Pharmac brand switch.
But an email trail released to RNZ shows the two agencies were so divided on the advice that Pharmac demanded explanations from NZTA, which responded it would not change its mind and refused to meet over the recommendation.
Mr Thompson, an architectural draftsman in his early 30s, was diagnosed with epilepsy in 2015 and had been managing his condition with the Arrow brand of lamotrigine.
In July he changed to the generic version of lamotrigine, Logem. He was one of more than 10,000 people forced to do so after Pharmac pulled funding for the two main brands of the medicine, in a move aimed to save $30 million over five years.
Mr Thompson's side effects worsened on Logem and four weeks later as he drove towards Manukau in rush hour traffic, he felt an aura coming on, signalling the start of a seizure.
"The next thing I remember was waking up and someone was knocking on the window of the car saying, are you alright, are you alright," he recalls.
He described it as miraculous that he did little damage to the car and didn't hit anyone else. "From what I heard from the witnesses, I swerved across all three lanes, so I was driving along in the far right-hand lane and ended up swerving right across into the left-hand side barrier, and then bouncing off that and coming back and coming to a stop in the right-hand lane again."
Mr Thompson lost his license for at least six months and was disappointed he was given no warning that people switching brands could lose seizure control and become a driving risk.
Read more from this investigation
While Pharmac's brand switch began in May, it was late September before NZTA advised drivers they should consider a voluntary two-month stand down if they were switching brands of lamotrigine.
The documents show NZTA initially believed there would be little impact on drivers, with its chief medical advisor saying "these particular ones are not mainstream medications for epilepsy".
In fact about 90 percent of people taking lamotrigine were taking the Lamictal and Arrow brands, which Pharmac pulled funding for, leaving 11,000 people making the switch to Logem.
NZTA became increasingly concerned after it came to the organisation's attention that Medsafe had opposed the brand switch on safety grounds, but Pharmac remained convinced there was no danger.
"It has recently come to our attention that Medsafe did not agree with the safety of Pharmac's decision," a senior NZTA manager emailed her colleagues.
"It does feel like the agency is being caught in the middle of a decision Pharmac has made to change the epilepsy drug".
When NZTA's advice that affected drivers should consider a stand down became public on September 30, Pharmac was concerned the stance could derail its message that the brand change posed no risk, emails show.
Pharmac emailed NZTA on 3 October saying they were "in the midst of the brand transition period and we are fielding a high volume of questions and concerns" about the driving stand down advice.
"This is now a significant issue of concern to our organisation and the health sector."
Pharmac requested a "direct conversation" between the medical advisors of both agencies but NZTA refused. "As the NZTA's position remains unchanged and at this stage we have nothing further to add I am declining your request to meet," NZTA responded.
Pharmac had already prepared an agenda for the meeting and had numerous questions for NZTA. They wanted to know "the rationale and evidence" for NZTA's driving stand down advice, why it had changed its position, whether this could affect other brand switches and what the consequences could be.
"What are the medico-legal implications if a patient has a seizure while driving post-brand change," Pharmac asks. "Similar questions (are) raised in relation to ACC eligibility and motor vehicle insurance".
Internal NZTA emails show staff frustration with Pharmac. One NZTA manager writes: "We are taking the heat re their decision," but later tells her colleagues "this won't reflect well on us if it hits (the) media that we are refusing to meet".
Epilepsy New Zealand chief executive Ross Smith said the issue remained unresolved, with patients caught up in a fight between government agencies over whether it was safe to drive while switching brands.
"We called on both NZTA and Pharmac to clarify the position: was the brand switch safe for people or not. Both agencies were arguing against each other and the person with epilepsy who had been seizure-free for a long time and were driving were caught in the middle."
He said one seizure could result in a person losing their license for 6-12 months. "It affects their lives in so many ways and potentially their abilities to earn a living and support their families."
Paul Thompson was acutely aware of that. He was in the process of moving from Auckland to Tauranga and being unable to drive was complicating the shift and his job prospects, as well as putting a strain on friends and family.
Despite that, he said driving while making the transition between brands of lamotrigine wasn't worth the risk.
"I would definitely recommend taking that stand down just as a precaution, especially if they're noticing pretty big changes and the side effects of the drug.That's usually a pretty telltale sign if something's not working right."
After four deaths were reported to the Centre for Adverse Reactions Monitoring on suspicion they were linked to the brand switch, Pharmac backed down on the change on 15 November.
The agency is now funding patients' original medications if they applied via their medical practitioner.
Mr Thompson applied a week ago and is now back on the Arrow brand of lamotrigine he was taking before his accident. "It's reassuring to know that I'm back on the one that I know actually works."
Pharmac and NZTA refused to be interviewed for this story, but both said now Pharmac had widened its exceptional circumstances process to allow those concerned about the brand switch to remain on their original medication, it was no longer an issue.
NZTA said it had received no notifications of crashes involving lamotrigine, but that it had received a notification that a patient had refused to stop driving when advised to by their doctor.
Pharmac also said people who were prescribed Logem should not stop taking it, and that for most people it worked in the same way as the other two lamotrigine brands. Those with concerns could see a GP and Pharmac would pay for the appointment.
Pharmac's director of operations Lisa Williams said "for most people taking it, Logem works in the same way as the other two lamotrigine brands" and is delivered to the body in the same way.