Chilean military court has ruled that there is no evidence to substantiate accusations made by the Chilean government against Sheila Cassidy, a British physician who was detained for two months a year and a half ago.

Dr. Cassidy's arrest and alleged torture caused the British government to withdraw its ambassador to protest the "uncivilized brutal treatment of a British subject."

The court's ruling on May 28, made public recently was the second legal reversal by a military court of government charges involving activity of the security police. In the other case two weeks ago, a court ordered the release of three men accused of kidnaping by the police.

Dr. Cassidy was arrested Nov. 1, 1975, in a raid on the headquarters of a Catholic missionary order. During the raid, a housekeeper was fatally shot.

Dr. Cassidy's arrest was followed by the detention of a dozen priests and nuns accused of harboring leftist fugitives from the National Intelligence Directorate, known as DINA. She later said she had treated a wounded fugitive as an act of "Christian charity."

The events led to the closing of the Committee for Cooperation for Peace that helped political prisoners and their families.

A few days after the raid, the government charged that Dr. Cassidy, who worked at a first aid station in a poor neighborhood, was responsible for the housekeeper's death and the wounding of a DINA agent in the raiding party.

The military court's ruling declaring the case closed said expert testimony showed that no shots were fired from inside the house during the raid. The court called the housekeeper's death homicide, but declined to charge any new suspects because, it said, "it is not possible to determine any person as the author or accomplice" of the crime.

While clearing Dr. Cassidy, who was expelled from Chile in January of 1976, the court ruling did not draw the conclusion that the housekeeper might have been shot by the DINA agents when they stormed the house.

One of the judges, in a dissenting opinion, said the court had not called any of the DINA agents involved in the raid to testify.

"None of the members of the patrol the one who was injured," the judge said in his opinion. He called for the case to remain open and for the agents to be subpoenaed.

The British government formally protested and withdrew its ambassador. Reginald Second, after Dr. Cassidy said that she had been stripped and tortured with electric shocks by DINA agents who forced her to reveal the whereabouts of priests and nuns who had given aid to fugitives.

The DINA was looking for four leaders of the Leftist Revolutionary Movement who had escaped an attack to their secret rural hideout two weeks earlier. One of the leaders, Nelson Gutierrez, was seriously wounded in the leg during the attack.