The president of the D.C. Medical Society, in a change of the society's position, said yesterday that legislation is needed to open up District hospitals to midwives, psychologists and other nonphysician health professionals.

Dr. Dennis O'Leary, testifying before the D.C. City Council's Committee on Human Services, said it "is appropriate to mandate access to hospitals to these groups" of health providers. "We do think . . . these groups should be able to practice in hospitals."

Until yesterday, the medical society had said the decision should be left up to individual hospitals and should not be legislated.

The spacious council chamber was packed with a standing-room-only crowd of spectators and witnesses. About 65 persons, most representing a variety of medical and health professional groups, were scheduled to testify.

The bill being considered was introduced by council member Polly Shackleton (D-Ward 3), Human Services Committee chairman, and cosponsored by a majority of the City Council.

Mayor Marion Barry's administration yesterday endorsed the bill, including the section on hospital privileges for health professionals.

The main purpose of the bill is to consolidate and streamline licensing of hospitals and other health-care facilities, including some that are not now licensed.

But the most controversial of its provisions has turned out to be the section prohibiting D.C. hospitals from giving a blanket denial of clinical privileges and staff membership to five types of health professionals: nurse-practitioners, nurse-midwives, nurse-anesthetists, psychologists and podiatrists. The hospitals still would determine requirements for granting privileges on an individual basis.

Hospital policies now vary. In some cases, these professionals may work at a hospital under a doctor's supervision. In others, one type or another has been excluded as a group.

For example, physicians voted to exclude all midwives at Columbia Hospital for Women and the Washington Hospital Center.

Linda Walsh, vice president of the local chapter of the American College of Nurse-Midwives, said there are 30 midwives who practice in the District but they "have found some hospitals unsupportive of their clients' wish to have nurse-midwifery care within their facility. Certified nurse-midwives . . . are being denied access to most D.C. hospitals."

D.C. General is one of only three city hospitals where midwives can practice, she said. More than 1,500 babies have been delivered at D.C. General without any claims of malpractice, Walsh added.

Asked in an interview why the medical society was changing its position, O'Leary said his group realized "the issue wasn't going to go away. It has become an emotional issue."

He said the society always thought access for the health professionals was a good thing but did not think it should be mandated.

Now, however, he said, "I wonder if access can be assured without legislation."

The medical society still says the health professionals should be supervised by doctors at the hospitals, and this remains an area of dispute with the other groups.