Health Secretary Alex Neil has given a guarantee that all out-patients in Scotland will be seen within 12 weeks.
The Scottish Government and the NHS “are going to get 100%” compliance with the legally binding treatment time, he told Holyrood’s public audit committee.
Mr Neil admitted it may not be possible to ensure there are no breaches of the waiting time guarantee.
MSPs heard that Scottish patients used to wait years for treatments now available within 12 weeks, while waiting times in Wales were “out of control”.
Mr Neil told the committee that when dealing with the number of patients that the NHS handles there was always a risk the 12-week guarantee would be missed.
“However, up till now across the health service as a whole we have achieved over 98% in terms of achieving the treatment time guarantee, even with the problems with Grampian and Lothian, and I think by any standard most folk would accept that that is a very credible performance,” he said.
“But the law says that we must get to 100% and we are going to get to 100%.”
Labour MSP Hugh Henry said while someone on a high salary might be able to challenge a missed waiting time guarantee with a judicial review, that option was not open to most people. “Why bother to put this into legislation in the first place when it’s so complicated?” Mr Henry said.
“When there’s no evident easy route for patients to exercise their legal right and where there doesn’t appear to be any impact on health boards that fail, it becomes a farce.”
Mr Neil replied: “To describe this as a farce is ridiculous. The farce was when people had to wait months for this kind of treatment.”
An NHS Grampian spokesman said: “We are committed to meeting the 12-week waiting time guarantee for all patients, but acknowledge local capacity issues may mean there are some breaches.
“Three new theatres in Aberdeen, currently being built at a cost of £16million, will improve capacity and in the meantime some patients may be offered a referral to other centres.”
An NHS Highland spokeswoman said: “We have achieved 99% compliance with the guarantee over the last six months.
“Where we are not able to offer local treatment within 12 weeks we will whenever possible seek to offer the patient treatment at an alternative location.”
Sacked or disgruntled NHS Scotland staff are almost automatically subject to confidentiality agreements, according to NHS Scotland chief executive Paul Gray.
He told the committee that all but one of the 148 settlement agreements signed since 2011-12 contained confidentiality clauses and the vast majority of the 697 from the last five years probably did too.
Confidentiality clauses appear to be almost automatic policy at NHS Scotland, he said.
Settlement agreements set out the terms of a termination of employment or a dispute resolution, and can include confidentiality agreements.