Cmdr. Donal M. Billig testified yesterday in his fifth and final appearance at his court-martial in the deaths of five patients that Bethesda Naval Hospital had itself to blame for a controversy surrounding his right to perform surgery.

Billig, who is accused of performing heart surgery in 1983 without formal permission to do so, declared that "no one took the trouble" to properly document the point at which he gained permission to operate alone. He rejected claims by his former superior officers at the hospital that he did not have full operating privileges until September 1983 and said he was given the kind of credentials "that evolved" and that "no one took the trouble to write them down on paper."

Billig, who turned 55 yesterday, was particularly sharp spoken during the six hours he answered questions from prosecutor Lt. Cmdr. Joseph VanWinkle and then his own counsel. He rebuked VanWinkle repeatedly, saying once, "Don't diddle with me," in response to one question and then, "I've had enough of these shenanigans," to another.

Later, he apologized to the panel of nine Navy officers hearing the testimony and said his "argumentative demeanor" was caused by inaccurate questions from VanWinkle.

One more witness is expected to be called today by the defense. Billig, the former head of heart surgery at Bethesda, has been charged with five counts of involuntary manslaughter and 24 counts of dereliction of duty in connection with operations that he performed in 1983. Closing arguments are expected to be heard next week in the trial that began in January.

Yesterday Billig disputed testimony from his former secretary that he told her to destroy operating room records from 1983. Billig said he wanted the files cleared because he needed more filing space. "I'm not stupid enough to destroy one copy" of operative notes maintained in other hospital offices, he said.

Questioned about his ability to see with his right eye, which functions at a 20/400 correctable level, Billig said he did not tell top officials at Bethesda about his eye problem but did tell other surgeons who operated at Bethesda during early 1983.

Asked why he did not tell top officials, Billig said he had told the Navy about the sight problem during his commission review. "They offered me a commission. I assumed they reviewed it . . . . What the Navy did with it is the Navy's problem. If there is some dereliction of duty here, it's not my dereliction of duty," he said.

Billig admitted that he had, on a limited basis, used amphetamines during past years as a resident completing his medical training and smoked marijuana in the late 1970s. The prosecution pointed out he had not included that information on his application form to the Navy in 1982.