Labour has called for the Scottish Government to drop plans to share data from NHS records with the tax collection agency HM Revenue and Customs (HMRC).
Shadow Scottish secretary Margaret Curran MP said the proposals risk “breaking down the trust” between patients and the health service.
The SNP administration said no medical records would be shared.
It is consulting on proposed changes to the NHS central register which would allow certain data, including names, dates of birth, postcodes and gender, to be passed on to public bodies including HMRC.
The Government says the changes will help identify Scottish taxpayers so that the new Scottish rate of income tax can be collected correctly.
Holyrood will set the rate of tax when it comes into effect from April 2016, with HMRC collecting it on behalf of the Scottish Parliament.
Labour has submitted a response to the consultation, which closes on Wednesday, opposing the plans.
Ms Curran said: “In recent weeks, the list of organisations opposing these changes has grown. From Scotland’s doctors to civil liberties organisations, there is now agreement that the SNP and Tory Governments need to ditch these proposals.
“As the leader of Scotland’s doctors warned, this risks breaking down the trust that exists between patients and Scotland’s NHS. The SNP should not be handing our NHS data to the tax man.
“This goes to the heart of the competence of both our governments. The SNP and Tory Governments have had since 2012 to prepare for these changes to income tax.
“They are the biggest changes to the income tax regime in Scotland that we have ever seen, but only now are they taking action to identify taxpayers.”
Previously there has been no need to identify Scottish taxpayers separately to UK taxpayers so there is currently no mechanism in place.
The changes will help trace people such as children who are missing in the education system and foreigners who received NHS treatment in Scotland and left the country with unpaid bills, according to the Government.
A spokesman said: “There are no proposals to share medical records and any suggestion of that is simply wrong. Identification of Scottish taxpayers and administering the tax are matters for the UK Government and HMRC.
“The NHS central register has existed since the 1950s, and is already used by local authorities and health boards under strictly controlled arrangements, to ensure they are dealing with the right individual and to prevent mistakes being made.”