Work to identify Scottish taxpayers before changes come into force in just over a year is proving "more complex than was initially anticipated".

Her Majesty's Revenue and Customs (HMRC) made the statement in a letter to the chairwoman of the Public Accounts Committee on work surrounding the introduction of the new Scottish Rate of Income Tax (SRIT) in 14 months' time.

The letter, obtained by Scottish Labour, also states that HMRC is working with the Scottish Government to look at whether the tax collection body can be given access to NHS Scotland data to help identify those eligible to pay the new rate.

The HMRC said the overall project is on course for successful delivery but Labour called on the Scottish and UK governments to "get a serious grip" of the situation.

The SRIT will come into effect from April next year, under which the Scottish Parliament will set the rate of tax and the HMRC will collect it on Holyrood's behalf.

HMRC will also be responsible for identifying Scottish taxpayers correctly, so that the tax can be levied accurately.

The letter to committee chairwoman Margaret Hodge, dated January 16, was written by Edward Troup, the HMRC's second permanent secretary and tax assurance commissioner.

It stated: "Our assessment is that the project is on track for successful delivery to the required timescale (April 2016) and within the original estimated budget (£40m-45m)."

A "key aspect" of ongoing work is to identify Scottish taxpayers "so that, for example, we can instruct employers to collect the correct amount of tax under PAYE".

The letter continues: "We are confident that we will be able to identify the Scottish taxpayer population correctly and are refining the detail of the strategy underpinning this work.

"This has proved more complex than was initially anticipated, which is why the rating for the risk relating to this area of work has increased during the year. The management of key risks in projects is obviously an important way to ensure resource and oversight is focussed on the right areas."

Labour's shadow Scottish secretary Margaret Curran MP said: "This letter confirms what Scottish Labour has been saying all along - that HMRC and the Scottish Government are struggling to identify all Scottish taxpayers.

"Both our governments need to get a serious grip of this. HMRC only has the equivalent of 11 staff working on the income tax changes and the project relies on one official in the Scottish Government. Despite this, HMRC are also loaning staff to the Scottish Government to cover gaps in their operation. It's not good enough."

HMRC is currently exploring the possibility of using third party data to help get the correct address information for taxpayers.

"We are examining other data sources to supplement our own data and are also working closely with the Scottish Government, in particular in looking at whether HMRC can be given access to NHS Scotland data," the letter said.

A Scottish Government consultation on the issue is continuing.

Ms Curran said: "Many people will be shocked to learn that this is even being considered. We need to have a full public debate about the use of this data.

"Similar proposals in England have been met with legal challenges. With these tax changes coming into force in 14 months, the Scottish Government can't risk lengthy legal disputes as there has been over similar decisions in England."

Speaking on the BBC's Sunday Politics Scotland, Local Government Minister Marco Biagi said of the NHS data issue: "It's out for consultation, I don't want to pre-judge the results of that."

Scottish Liberal Democrat leader Willie Rennie told the programme: "Naturally we are very cautious. We were against an ID card, a national database that had information on everybody that a whole range of organisations could get access to, so we're cautious about this. It needs to have proper oversight, proper checks and the Information Commissioner needs to be involved."

A Scottish Government spokesman said: "Implementing the Scottish Rate of Income Tax, identification of Scottish taxpayers and administering the tax are all matters for the UK Government and HMRC. There are no proposals to share medical records and any suggestion of that is simply wrong."

He added: "A consultation is ongoing as to whether HMRC should be allowed to access administrative data to assist their identification of where people should pay tax. No decision has been taken."