Patients were removed from official waiting list figures because of staff shortages at a Scottish hospital, prompting claims last night that the statistics were being manipulated.

People waiting for hip and knee replacements in one part of Glasgow were excluded from the Scottish Executive's much-vaunted waiting times promise. However, their counterparts on the other side of the city, where there were more specialist surgeons, were guaranteed treatment in the target time.

The situation came to light as ministers prepared to announce their latest waiting times figures. They were expected to celebrate further cuts in delays for operations when the numbers were released this morning.

Now they are facing fresh questions from the SNP about how the official data reflects the reality of patients' experiences.

The different application of waiting list guarantees in different parts of Glasgow was exposed after a GP began to wonder why his own patients were not receiving hip and knee replacements within the six-month target.

Dr Jim Finlayson, who works on the Mull of Kintyre, said: "Andy Kerr (the Health Minister) is always appearing saying it is wonderful, no-one is waiting more than six months and I have all these patients who are. Previously I have telephoned the secretaries in the orthopaedic department and they say it is an 11 to 12-month wait."

After making their own inquiries, one of Dr Finlayson's patients was informed the delay to their operation was due to the fact their case had been classed as "ASC code four". This code is given to patients whose treatment is considered "highly specialised" at the time they are placed on the waiting list.

It means they are exempt from the waiting times guarantees and excluded from the headline waiting list results.

After further investigation, Dr Finlayson placed a request under freedom of information legislation asking about the use of code fours.

He discovered that between July 1, 2006, and January 1, 2007, there were 87 knee replacements at the Southern General in Glasgow and 46 patients were given a code four. In contrast, at Glasgow Royal Infirmary, where there were 239 knee replacements, no patient was given a code four.

The situation with hip replacements was similar. At the Southern General there were 99 planned operations and 37 code fours applied. At Glasgow Royal Infirmary there were 139 hip replacements and no code fours.

Dr Finlayson said: "I am particularly shocked because it looks to me as though there is a definite attempt to fiddle the figures and make it look good on paper and it is harming the patients.

"I find it is particularly upsetting because elderly folk in rural communities tend to be quite trusting. They think the Health Minister is telling the truth."

The GP said he knew one pensioner waiting for an operation who eventually faced kidney problems because of the painkillers which had to be taken and ultimately paid to have the procedure privately.

Another pensioner, he said, had been on the waiting list since May.

Dr Finlayson added: "I think first of all Andy Kerr should stop saying everything is wonderful when it isn't. Before you can deal with a problem you have to admit there is a problem and that has to come from the top."

NHS Greater Glasgow and Clyde confirmed the code fours had been applied at the Southern General because there was "limited capacity".

When it came to the more specialist joint replacement operations, there was only one surgeon for each field of expertise at that hospital, it said, while Glasgow Royal Infirmary had more.

Nicola Sturgeon, Holyrood leader of the SNP, said: "If staff shortages are the problem in south Glasgow then Andy Kerr should come clean on that and not hide behind manipulated figures.

"The examples from the Southern General reveal the true picture of many people being made to wait for treatment, despite the claims of Andy Kerr."

The SNP is committed to giving every patient a legally enforceable waiting time guarantee.

Although the Southern General was once in a different trust from Glasgow Royal Infirmary, these were abolished in 2004.

A spokeswoman for the health board said: "The expanded NHS Greater Glasgow and Clyde orthopaedic team have been reviewing their workload to enable those surgeons who perform these complex procedures to concentrate on them thus ensuring that all patients are treated as quickly as possible."

A spokesman for the Scottish Executive said: "Audit Scotland recently carried out an investigation into our management and reporting of waiting times. Their report found that there was no evidence to suggest that ASC codes were being applied inappropriately."