Maryland's highest court has ruled that Prince George's Doctors' Hospital will have to reduce its rates to make up for $21 million in excess charges, but a spokesman for a California firm interested in buying the Lanham hospital said the decision will not deter the firm from negotiating.

The ruling last week by the Maryland Court of Appeals upholds a lower court ruling on fees charged by Doctors' Hospital as well as a 1983 ruling by the state's hospital rate-setting commission.

Dr. Leon Levitsky, principal owner of the hospital, could not be reached for comment this week. Hospital attorney Leonard Baxt said the owners have not decided whether to fight the decision. But, he said, the financial impact of the latest ruling has "forced the hospital to seriously consider a sale."

The financial liability apparently has not discouraged American Medical International from pursuing its interest in purchasing the 240-bed facility. According to Julian Stein, Washington representative for the California company, AMI is involved in "intense conversations" with the owners of the hospital. AMI is also the leading contender for purchase of the George Washington University Medical Center in the District.

Stein said AMI had anticipated that the appeals court would uphold the original decision. The ruling "does not make it buying the hospital a less attractive possibility," because that debt will be taken into consideration in discussions of the purchase price, he said.

The rate battle began in November 1983 when the state Hospital Cost Review Commission determined that Doctors' Hospital was overcharging for its services. The commission told the hospital to reduce its rates instead of reimbursing patients and insurance companies.

For example, the hospital had been charging $225 a day for a medical/surgical room -- more than other county hospitals, according to cost commission officials. The commission said the appropriate price should have been $195 and the facility would have to lower its rate to $145 to compensate for the $21 million in overcharges. The hospital in September lowered its rates while awaiting a high court decision.

The Court of Appeals said the commission had acted within its legal bounds in ordering Doctors' Hospital to reduce charges.

"This decision is a very strong ratification of the commission's authority to set rates," said Jack C. Keane, deputy director of the state Hospital Cost Review Commission.

Richard Wade, a spokesman for the Maryland Hospital Association, said, "Most of the hospitals in Maryland are relieved to see that decision," because it upholds the commission's right to set rates based on each hospital's needs and abilities.