On one side of the courtroom, a 38-year-old Army captain is telling war stories about Vietnam. He is all spit and polish, even to wearing a metal plate on the side of his shoes so his heels make a resounding click when he comes to attention.

On the other side of the same courtroom a 33-year-old Army major is slouched in a chair, shoes unshined, studying a medical journal on radiology. He is waiting to testify in a court-martial that puts him a world apart philosophically from the infantry captain across the room.

The scene during a break in the court-martial of Army Capt. Leon T. Davis typified the split that exists between the military's line officers and its doctor corps. The division is not new, as the television series H.A.S.H. proves. But by refusing to practice medicine because he felt his contract had been breeched, Capt. Davis brought into public view the severity of that split in the era of the all-volunteer Army.

Davis, who was dismissed from the Army yesterday after being convicted on reduced charges of disobeying an order, proved he was more than a disgruntled soldier.

Davis is no crackpot. Rather, he represents hundreds of young doctors in today's volunteer military who believe they are being victimised by the government. They claim they are underpaid, overworked and being cheated out of promised benefits. Davis decided to make a stand, spotlighting in the process the widening split between combat and medical officers.

The two Army officers in the courtroom at Fort McNair dramatizedthat split.

No soldier, be he private or doctor, can just quite contended the spit-and-polish infantry officer in portraying one side of the argument. "When you put on the uniform, you take on certain obligations," he said.

This infantry officer has seen soldiers die in the mud, has eaten cold meals in dangerous places along the demilitarized zone between the two Vietnams, and has come to think of obeying orders as being vital to sustaining military life as breathing is to sustaining human life.

He cannot tolerate some young captain who happens to be a doctor quitting before his time is up just because the Army did not live up to his expectations.

Yet the rumpled major on the other side of the courtroom at Fort McNair, an outstanding radiologist, makes some compelling arguments, too.

"Doctors are independent or they wouldn't be doctors," he said."They make life and death judgments on their own about their patients. The officer with the most rank is not the one who necessarily knows the most when it comes to medicine. That makes us independent doctors and line officers, who go strictly by rank, basically incompatible."

Yet, those Army, Navy, Air Force and Marine line officers do need doctors. They cannot draft them anymore. So they have to find a way to inspire them to volunteer.

Davis said he volunteered because he believed that the Army, besides paying for much of his training, would enable him to practice medicine with the advantages of modern facilities but without the high-pressure hassle of civilian practice: malpractice insurance, overdue bills, investment tangles, and generally chasing the buck in some polluted city.

The life of an Army doctor did not live up to its advanced billing, Davis complained, so he got out the only way he could - by risking 8 1/2 years at hard labor by disobeying a series of military orders. As it turned out, Davis got off with dismissal from the service and a $2,000 fine.

But there are hundreds of other Dr. Davises in the military who plan to get out the first chance they get. The already severe shortage of military doctors will thus become critical, meaning those relatively few who do remain will have to work harder than ever.

Already more than 600 military doctors have banded together to file suit in U.S. district court demanding equal pay for equal work. Specifically, they complain that they are not getting the $9,000-a-year bonus other military doctors who came in under a different scholarship program are receiving. There are 10,768 doctors in the services, so 600 is a significant slice of the total.

Unless Congress brings back the draft, then, government leaders must either find a way to attract those independent doctors into the military or give up on the tradition of providing a care for the military by the military.

Nobody at the top of the Pentagon's health hierarchy pretends to have the cure for this grave illness of incompatibility spreading through the medical corps. The Davis case, if nothing else, showed the breadth of the problem.