The government has released the details of deals struck with big tech firms to handle NHS data, after a legal challenge from campaigners.
The documents show the data-sharing arrangements made between the NHS and Microsoft, Google, Faculty and controversial Silicon Valley firm Palantir.
They were released to news website openDemocracy and tech campaign group Foxglove after the two organisations sent a legal letter demanding disclosure of the contracts under the Freedom of Information Act.
Over 13,000 people had signed a petition calling for publication of the documents.
A lawsuit against the government was set to be issued on Friday.
Cori Crider, founder of Foxglove, welcomed the news but said it showed the need for government transparency, especially around intellectual property.
In particular, Ms Crider questioned the government's arrangement with London-based AI firm Faculty, which was changed following the initial Freedom of Information request from openDemocracy and Foxglove.
According to a note issued with the documents, seen by Sky News, the contract was "amended to surrender all intellectual property rights from the project to the NHS", something the note said "retrospectively applies to the whole project".
Image: Matt Hancock has been sent a list of questions by Damian Collins about Palantir
Ms Crider said: "Why did the initial contracts with tech companies let them keep the intellectual property rights from their unprecedented access to NHS data?"
"Why was Faculty allowed to train its models and potentially profit off the NHS in a crisis, until Foxglove's FOI prompted them to amend the contract?"
A Faculty spokesperson told Sky News it had asked for a change to the standard contract, which gives the NHS free use of any software created for the project.
"We felt this did not go far enough," the spokesperson said.
"Faculty therefore asked for its contract to be amended to make clear that it will derive no commercial benefit from any software, including trained machine learning models, developed during the course of the project and that the use of the IP is under the sole control of the NHS.
"We have made this unprecedented move in recognition of the unique circumstances of the COVID-19 emergency and the overriding public interest in ensuring public trust in the responsible use of anonymised NHS data."
The decision to ask tech firms to build the NHS data system has been controversial, with many questioning the role of Palantir, the controversial tech company founded by Silicon Valley billionaire Peter Thiel.
Conservative MP Damian Collins, who has sent health secretary Matt Hancock a list of questions about Palantir, said the contract did not appear to show any obvious problems with the firm's use of data.
Given that, Mr Collins asked why they had taken so long to release.
"If there's nothing to hide then being more transparent about the nature of these contracts would be a good thing," he said.
:: Listen to the All Out Politics podcast on Apple Podcasts, Google Podcasts, Spotify, Spreaker
The Palantir contract shows that the firm has committed to making all its software "suitable for open source" and deleting any data it collects once the project is finished.
Dr Jeni Tennison, CEO of the Open Data Institute said it had "niggly" issues around the precise definition of open source, but "otherwise looks pretty good".
This week the government quietly published the full list of data feeds going into the NHSX data store, the existence of which was revealed by Sky News in March.
The list showed that 79 feeds were being sent to the Palantir's data-processing software, including testing booking data and data from NHS 111.
NHSX has maintained that no sensitive personal health data is sent to any of the tech firms.
In a blog post published when the data store was revealed, NHSX CEO Matthew Gould said that "essential data governance procedures and established principles of openness and transparency remain at the core of everything we do".
Mr Gould also said "once the public health emergency situation has ended, data will either be destroyed or returned in line with the law and the strict contractual agreements that are in place between the NHS and partners".
OpenDemocracy has published the documents on its website.
Editor-in-chief Mary Fitzgerald said: "It shouldn't have taken a lawsuit threat to get us these documents, but we're pleased to share them with the public now.
"Transparency is just the start of the debate we need. OpenDemocracy are studying the documents closely and will be reporting what we find, in the public interest."