The Supreme Court has ruled a hospital's ban on smoking in its mental health units does not breach patients' rights.
It has also ruled that district health boards are not legally obliged to provide dedicated smoking rooms.
The case was taken by a man, whose name is suppressed, who spent two weeks in Waitemata District Health Board's acute adult inpatient units in 2012.
The DHB's smoke-free policy specifies that staff, patients and visitors are not allowed to smoke inside its buildings or in external areas on its premises.
Those patients admitted to intensive care units in the board's mental health facility are confined to the unit, so they cannot smoke while they are held there.
The appellant spent about 11 days in the units in 2012 and was not allowed to smoke.
At earlier hearings in the High Court and the Court of Appeal the man claimed the DHB's smoke-free policy breached his rights under the Bill of Rights Act.
He also said the policy was inconsistent with legislation controlling the Waitemata District Health Board.
Both those courts rejected his claims.
Last November he took his legal battle to the Supreme Court, where he claimed the DHB was obliged under the Smoke-free Environments Act to establish dedicated smoking rooms in its mental health units.
He also raised the Bill of Rights issues again claiming that, in not allowing him to smoke the DHB had breached his right to be treated with humanity and respect for dignity; his right not to be subjected to cruel or disproportionately severe treatment; and the right to be free from discrimination on the basis of disability.
The appellant also claimed the Waitemata District Health Board had breached what he described as his common law right to a home or private life, which he said included the right to choose to smoke.
In today's decision the Supreme Court unanimously rejected the appeal.
It said while the Smoke-free Environments Act allowed for dedicated smoking rooms in institutions, including hospitals, it did not impose an obligation on health boards to provide such facilities.
The Supreme Court also rejected the man's Bill of Rights claims, saying Waitemata District Health Board followed a careful process, including providing patients with nicotine replacement therapy, meaning it did not breach the appellant's right to be treated with humanity and respect for dignity.
It also said the hospital's smoke-free policy did not breach the man's right not to be subjected to cruel or disproportionately severe treatment.
"The appellant was treated in the same way as all others required, for any reason, to be in the Intensive Care Unit.
"The treatment arose out of the appropriate operation of the treatment regime for compulsorily detained patients and there was no different treatment on a prohibited ground."
The Supreme Court has also ruled there is no existing right to home or private life encompassing the right to choose to smoke while confined to a mental health intensive care unit for short periods.
Waitemata DHB chief executive Dale Bramley said it was heartening that the court has ruled in favour of its policy, which supports positive health outcomes for patients and the wellbeing of staff, visitors and the wider community.
"To allow patients to smoke in our facilities when we know this is damaging to health is inconsistent with our goals. I believe the healthcare sector must lead by example and this decision enables us to do so."
Dr Bramley said Waitemata DHB's mental health units went completely smokefree in 2009 and care has been taken to provide patients with smoking cessation assessment and support, including nicotine replacement therapy.
"Smoking kills around 5000 people each year in New Zealand and district health boards play a key role in promoting and supporting better health outcomes."
"Today's decision allows Waitemata DHB to continue its focus on caring for patients and we are pleased that the lengthy court process is now finalised".