The deposed shah of Iran's doctors are preparing him to leave New York Hospital and presumably fly back to Mexico as early as Thursday if a planned surgical procedure succeeds, hospital sources said yesterday.

"I'd be surprised to see him in the hospital after Thursday and maybe after Wedensday," said a hospital administrator who requested anonymity.

The last obstacle to the shah's departure is the removal of a gallstone. It was learned yesterday that a noted Vancouver specialist in gallstone removal was expected to fly to New York last night. He is expected to conduct -- perhaps Wednesday -- the tricky attempt to remove a troublesome stone lodged in the shah's bile duct and liver.

Doctors often allow a patient to leave the hospital the day after this procedure, if it succeeds.

The shah's doctors have said the shah cannot leave the hospital before this gallstone operation to receive treatment elsewhere for his serious lymph gland cancer.

The timing of the gallstone procedure was still a closely guarded secret, and so were any precise plans for the shah's departure.

"Everybody is conscious of D-Day approaching" -- the day when the shah can leave -- and officials are becoming very security-conscious, according to the same hospital administrator.

The shah's doctors had not made any public statements yesterday evening. Some sources close to the hospital said it would possible there could be some public statements or leaks intended to create confusion about the shah's exact status and possible date of departure.

Sources said doctors at adjoining Memorial-Sloan Kettering Cancer Center had completed radiation treatment of a lymphoma, or cancerous growth, in the shah's neck.

His doctors at New York Hospital Cornell Medical Center were preparing to remove the gallstone, which remained after they performed gallbladder surgery on the shah Oct. 24.

Until this stone is removed, it has been stated, the shah's malfunctioning liver and adjoining ducts prevent him from reciving the anti-cancer chemicals that probably are needed for further treatment of his lymphoma.

Some doctors not connected with the shah's case have questioned this explanation for not giving the shah anticancer chemicals. And some have wondered how serious and widespread the shah's cancer is, in view of the almost complete lack of detailed public information so far about his condition. a

The expert who is expected to try to remove the shah's gallstone is Dr. H. Joachim Burhenne. He designed the technique that will be tried on the shah -- snaking a long catheter through a tube in the shah's side, then attempting to snare the stone in a tiny basket on the end ot the catheter.

Burhenne said in an interview last week he has done this 800 times in several countries, with 80 percent success in the shah's type of case.

If this procedure fails, doctors could insert a balloon through the same tube to try to move the gallstone within reach of the Burhenne basket snare.

If this also fails, the shah's doctors would have to attempt standard surgery, and this could keep him in the New York hospital much longer.