A journalist has fought off an attempt to force him to reveal his sources for a story about a mental hospital's treatment of Moors murderer Ian Brady.
The judge said Robin Ackroyd was a responsible journalist
A High Court judge in London rejected the argument by Ashworth Hospital in Merseyside that public interest was second to confidential medical records.
Mr Justice Tugendhat said Robin Ackroyd was "a responsible journalist", acting "in the public interest".
A trust statement said it was disappointed with the ruling.
The story was published in the Daily Mirror in December 1999.
It related to Brady being force fed and the treatment of him at the high-security hospital.
The judge granted Mersey NHS Care Trust - which runs Ashworth - leave to appeal.
Mr Justice Tugendhat said: "Considering the facts now, in my judgment it has not been convincingly established that there is today a pressing social need that the sources should be identified."
The judge stressed that nothing he had said should be taken "as providing any encouragement to those who would disclose medical records".
He said he made his decision in the light of the passage of time and because of new evidence indicating that the source did not act for money and that the material leaked was "limited".
Brady has been at Ashworth Hospital for more than 20 years
"In addition, the stance of Ian Brady has changed, and I have not found that the disclosure was made without his consent," said the judge.
A statement from Mersey Care NHS Trust said: "The confidentiality of patient notes is an underlying principle of the NHS and this breach was the first and only one of its kind to have occurred at the high secure hospital.
"This is why the Trust welcomes the ringing endorsement for the maintenance of patient confidentiality included in today's judgment.
"The judge stresses medical records are no less private, no less confidential and no less deserving of protection than previously and he warns that nothing in his judgment should be taken as providing encouragement to those who would disclose medical records."
Some of the information disclosed to Mr Ackroyd came from Brady's medical records on a database known as the Patient Administration and Clinical Information System (PACIS).
The Mirror fought unsuccessfully all the way to the House of Lords to avoid having to disclose its source - Mr Ackroyd - who then became the target of the action brought by the NHS trust to find the leak.
A High Court judge ruled in October 2002 Mr Ackroyd had no arguable defence and must reveal his source.
But in May 2003, the Court of Appeal held that he should be allowed to defend himself.
Brady, 67, was jailed for life with Myra Hindley in 1966 for the murders of five children in the Manchester area.