THERE'S AN ISOLATION notice on the hospital room door. Inside, the silence is violated by the ragged, agonal breathing of a 55-year-old man I've known for a year. The staff doctors tell me he's sunk into a coma, ravaged by an infected brain, paralyzed on one side and unable to talk. He has AIDS.

I stand at his bedside. His head is skewed to one side, his breaths are rapid and rasping and his face is pale and soaked with sweat. Expecting no response, I say his name. But he opens his eyes and looks at me, an intelligent look. One brow goes up.

The look tears through me like a knife. A few minutes later, I creep out of the room, feeling like the worst doctor ever created. It's not that we aren't giving him every appropriate medicine. It's not even knowing that we cannot cure AIDS. But when I see intelligent awareness in the midst of the pain of that ravaged body, I cannot bear not being able to relieve it.

I want to be a "good" doctor, and "good" doctors relieve suffering. I want desperately to be able to give him enough narcotics to stop his suffering -- whether that pain is physical or simply the agony of not knowing whether you will be able to manage another breath. Of course, that much narcotics might also end his life, and "good" doctors are not supposed to kill.

Furthermore, I don't know that he'd wish it of me -- and he cannot say.

His family and I have decided that we will not interfere when he stops breathing, but now, all I can do is shift his pillow, touch his shoulder, check the medications, wonder how long this can go on -- and feel like a very bad doctor.

People in and out of medicine have very definite ideas about what makes a bad doctor. Some, incompetent because of alcohol or drug abuse, injure or kill their patients. Others are sufficiently unscrupulous to deliberately perform faulty, dangerous procedures -- like incomplete abortions -- so they will have to be repeated at additional cost. It has been estimated that between 5 and 10 percent of the nearly half-million doctors practicing in the United States are incompetent or unscrupulous.

We read about some of these people. Their outrages make headlines -- like the specialist who was videotaped sedating a patient and preparing to rape her; or a psychiatrist who settled out of court after being accused of having sexual relations with his patients, or a so-called cancer doctor who sold "cures" to the terminally ill, taking the last of their money before they lost their lives.

A bad doctor may be mentally, professionally or physically incompetent, or suffering from ignorance or stupidity, according to Dr. Robert Derbyshire, former president of the Federation of State Medical Boards, in a report compiled by the Senate Special Committee on Aging last year. That first group -- including impaired physicians whose safe, skillful practice of medicine is hampered by drunkenness, drug abuse, mental illness, disease or senility -- is the largest, he says. Unscrupulous doctors -- the worst of the lot -- are those who realize they are impaired but continue to do what they know they cannot do safely, or those who chose to practice bad medicine -- like trading narcotics for sexual favors -- for pleasure or profit.

Most people are not able to judge a physician's professional competence, so perhaps it's natural that they put greater weight on warmth, reassurance, effective communication and caring. From a patient's point of view, a doctor who makes you feel good is good. But other doctors, in a better position to evaluate technical competence, look out for unreliability, sloppy practice, poor judgment, outmoded training or poor technique.

A colleague remembers being told 20 years ago in New York, "Look, we have a few doctors on the staff who won't be around many years more because, frankly, they're turkeys. If they're scheduled to operate, be sure you're in there with them -- and that you're doing the work."

We doctors like to think that physicians no longer have to protect their own that way -- that the conspiracy of silence has long past. But it's hard to tell. "Either we're doing a fantastic job of choosing who will enter our medical schools, or we just aren't catching the bad ones who make it through," wryly commented a physician and administrator who serves on the Education Evaluation Committee at George Washington, the committee responsible for making determinations about the competence or professional comportment of medical students who get into trouble.

"You know, I greatly admire airline pilots," he adds. "They police themselves very seriously. They're required to be recertified for competence every six months. I wonder how many of us doctors, myself included, would be able to pass such exams."

Personally, I feel like a bad doctor more often than I'd like. Sometimes I feel inadequate; others, impotent. As this man lays dying, I'm plagued by both. Colleagues, pained by difficult cases, have expressed the same feeling. Moreover, I think most good doctors actually do practice bad medicine occasionally. It's almost impossible to be appropriate all the time. That's why, in trying to judge medical care, we have accepted the notion of "standard of care."

No one can be expected to solve every problem, get every diagnosis right. If a doctor offers at least the level of care in any situation offered by most doctors in the medical community, he's not considered to be at blame if the outcome is not good.

The principle sounds simple, but it isn't always. Sometimes there are many appropriate approaches to a problem and none of them gives the right answer. Other times, the approach can be all wrong, the thinking off -- but the problem gets solved anyway.

During my residency training, a young woman was admitted to my service by a private physician, with the diagnosis "fever of unknown origin." That is a technical diagnosis only applied appropriately under certain circumstances -- not hers. Four days earlier, this private physician had seen her in the office and she'd had a fever. When she called saying her temperature was still high, he simply admitted her to the hospital without reevaluating her first.

Young doctors in training are notoriously self-righteous about such cases; they think the outside physician hasn't done his homework. In this instance, I spoke for a few minutes with the woman, put a hand on her belly, swallowed my irritation and called her doctor to get the name of the surgeon he'd prefer. She had acute appendicitis.

"He got her into the hospital, where she needed to be, didn't he? And on time," another resident pointed out. "He must be doing something right." Before my training ended, we came to regard that as a joke: there were two or three doctors whom we considered bizarrely reliable in that a person they admitted to our hospital always needed to be in there -- but never for the reason the doctor considered to be the diagnosis.

Some of those doctors probably managed to keep out of trouble because they recognized their own limitations, I've since decided. When they didn't know what to do, they hospitalized someone or sent him to an expert. Their training may not have been up to date, but they did know when someone was genuinely sick, and they knew how to signal for help when they required it.

The more often I run into diagnostic puzzles myself, the less of that old self-right- eousness I find I retain. It's still easy for me to censure bad doctors, but less simple to assume that inadequate medicine always means a bad doctor -- sometimes its a good doctor who doesn't have all the answers.

Of course there are those utterly horrifying cases of doctors who end up killing their patients because of repeated ineptness or venality. We wonder how these people ever made it through training and into practice without getting caught. We read that their malfeasance actually took place over more than 10 years, or that they were sued for malpractice many times, and ask, astonished, "Didn't anyone complain? Why wasn't this person caught?"

For some, problems may have been evident in medical school. Every year, a few people get into trouble at George Washington because of poor academic performance or inappropriate professional behavior -- cheating, shoplifting or taking drugs, for example. Complaints against students which carry a threat of dismissal trigger investigations by the Education Evaluation Committee. But the committee needs concrete, adequate evidence of bad performance. Indignant students may report others cheating on exams, or concerned friends may talk about a fellow student's drug or alcohol problem. But that happens infrequently, and definitive evidence is scarce.

Not infrequently, lawsuits are brought against the medical school by those students who have been dismissed. They will go to all ends to gain reentry, and the legal actions are time-consuming and very expensive for the medical school. "But we take our obligation to turn out competent, honest doctors extremely seriously," comments one of the medical school administrators. "We don't hesitate to act if we think the public would be threatened by inappropriate or unprofessional behavior on the part of one of our potential doctors."

A person whose drug abuse actually led her to demand a urine specimen from a patient to pass off as her own was dismissed several years ago. So was a person who falsified credentials to state she'd graduated from a professional school -- she had actually dropped out. Others simply flunk out.

But even dismissal from medical school may fail to short-circuit the careers of people with problems. Almost all the medical students who've been dismissed in recent years at George Washington have ended up in offshore medical schools, which can provide a path back into the American medical system. One, we recently learned about quite by accident. He was about to be fired from a residency program elsewhere, which he had entered without ever revealing that he'd been dropped from an American medical school. Persistent incompetence was what got him in trouble there -- yet the residency program only discovered accidentally that he'd ever had problems before.

"You know, if we paid more attention to the reasons for program-hopping, or for doctors moving from state to state, we might do a more effective job of keeping these people out of medicine," one committee member commented. "But no matter what these people do, someone seems to write letters for them, recommendations that get them another spot." In fact, according to Derbyshire, sometimes an agreement with an incompetent doctor to get him out of a hospital or a state includes concealment of malfeasance or providing good recommendations.

One reason so few doctors are drummed out of the system is that others are often reluctant to come forward and testify for fear of a retaliatory slander suit. A doctor who did file complaints in a case involving illegal abortions and serious injury to some of the victims says ruefully, "I did it because I think it was right and I was the appropriate person. But I'll tell you, I got threatening phone calls every night until this man finally surrendered his license -- and the FBI told me if anyone suspicious came too close to my house, I should take out my rifle and shoot."

This doctor became involved when information was brought to him about a woman who'd had an abortion that appeared to be botched in a number of ways. First, the abortion was attempted much too late in the pregnancy -- the fetus might have lived. Moreover, the membranes protecting it had been ruptured, creating a massive infection that proved fatal to the fetus. He reported the case to the police, but the doctor involved was not prosecuted at the time.

Months later, another woman, with a pelvic abscess and a disfigured vagina after a botched abortion by the same doctor, came to GW seriously ill. On top of everything else, this doctor had given her the wrong antibiotics. This time, the George Washington staff doctor went to the head of the D.C. Healing Arts Commission -- the board that licenses District doctors and hears complaints against them. A year later, the physician at fault finally surrendered his license.

Over the years, the Healing Arts Commission has been plagued by too little money -- from 1977 through 1983 there were just 11 such cases. But this year, with better funding from the city government, and the staff attorney they have desperately needed, the commission has already held six hearings in the last seven months; six more are scheduled and eight others are planned.

Even with the increased hearings this year, however, the District barely meets the 1981 annual average per state of about 11 actions with serious consequences -- loss of license or probation. And those actions represented investigation of less than 1 percent of doctors assumed to be incompetent, according to Dr. Derbyshire.

The D.C. Medical Society used to monitor complaints, frequently about fees, but cannot independently do that any longer, because antitrust questions were raised about doctors telling other doctors how much to charge. But the society still receives and forwards complaints to the Healing Arts Commission and may be empowered by the commission to investigate those complaints. Society members worry, however, about protection against ruinous slander suits for individual doctors who bring complaints or testify. The medical society is looking into legislation in the District that would protect individual doctors who do testify.

One commission staff person adds, "Some have begun to say that maybe a requirement of getting your license should be that a doctor be required to step forward and testify" if he sees wrongdoing. In Arizona, where physicians are compelled to report malfactors and are legally immune from suits, the number of reports has quadrupled.

Another George Washington doctor, one who testified recently in a case concerning the competency of a heart and lung surgeon, says flatly, "If we don't police ourselves, somebody else is going to do it for us. Most of us do feel we need some kind of internal policing -- but, of course, 'bounty hunters' are not highly regarded."

I think to myself that were I put in the position, I would find it difficult to do my duty and testify. I remember ruefully how difficult it is for me to make critical comments about residents and medical students I've come to know and like. I am glad I've not been tested by circumstance, I conclude.

It's May 24, graduation day for the medical school. A group of 152 new doctors solemnly repeat the words of the Hippocratic Oath -- "Do no harm." I cannot help wondering: Will they all be good? Did we catch the problem people? Did anyone who shouldn't have, slip through? We'll find out, but maybe not soon enough.