The NSW Supreme Court has given a chronically ill man permission to refuse medical treatment keeping him alive, granting his wish to die on his 28th birthday.

In a case which again raises the issue of assisted suicide in a therapeutic context, Justice Rowan Darke made a declaration this month that staff at John Hunter Hospital in Newcastle would be acting lawfully by switching off the ventilator that was keeping a young man known as JS alive.

The court heard JS had quadriplegia from the second vertebrae since the age of seven, meaning he could only breathe via a ventilator applied via tracheotomy.

He had been living as an outpatient until March last year when he was admitted to John Hunter's intensive care unit with ventilator-associated pneumonia and collapse of his left lung.

Over the next few months, the man suffered repeated episodes of autonomic dysreflexia, an involuntary reaction by the nervous system, associated with extreme respiratory distress. JS was discharged in February but returned after seven days with a deteriorating heart condition, recurring urinary infections and a likelihood of acute respiratory failure.