The General Accounting Office said yesterday that nearly a third of the patients it studied in Veterans Administration hospitals in 1984 did not need to be there, and the VA could save billions of dollars by cutting medically unnecessary admissions and excessive stays.

The GAO said a review of 350 patients treated at seven VA hospitals in 1982 found that 43 percent of the total days spent in hospitals by these patients were "medically avoidable."

About half the excess days resulted from poor patient management techniques, such as admitting the patient and then needlessly waiting several days before performing surgery.

The other half involved putting the patient in the hospital, or keeping him there, because cheaper alternative facilities such as nursing homes and hospice beds were not available. The GAO said the VA service chiefs themselves agreed with most of the GAO evaluations.

Administrator Harry N. Walters, in a letter to the GAO, said some of the VA management, scheduling and discharge problems cited were already being corrected. But he challenged whether savings on construction of new beds would be as great as the GAO suggested because VA's cost estimates for construction of new facilities assume some length-of-stay and management improvements; moreover, Walters said savings from shifting people to less costly out-of-hospital facilities could not be achieved if the facilities were not available.

The GAO chief medical adviser evaluated the cases of 800 patients treated at six VA hospitals in 1984, and concluded that 244 of them, or 31 percent, did not belong in medical and surgical acute-care beds and could have been treated in less costly facilities if available.

The report said he found that 58 could have been in nursing homes, 56 could have used outpatient clinics, 29 could have been in hospices, 64 in minimum care facilities (providing less than full hospital service), 27 at home, and so forth.

The GAO said that VA physicians agreed in almost all cases but pointed out that space in such alternative places was not available in many cases.

The GAO gave these examples of wasteful practices:

*A man with blood in his urine was admitted for two days for diagnostic tests that could have been done on an outpatient basis.

*A woman was admitted for seven days for cancer tests that could have been done on an outpatient basis.

*A man was admitted on a Friday and remained in the VA hospital over the weekend awaiting a Tuesday operation.

*A man who had an elective eye operation was kept in the hospital for four days after his condition stabilized and he could have been discharged.

*A man was kept 10 unnecessary days before being sent to a nursing home.

The GAO said that in fiscal 1984, the VA spent $8.3 billion on medical care of veterans at 172 hospitals, 226 outpatient clinics, 105 nursing homes and 16 domiciliary homes. Under current rules, the VA provides free care to eligible veterans on a space-available basis; priority goes to those with service-connected disabilities. The VA also will care for veterans 65 and over with nonservice-connected disabilities who are unable to defray expenses.

In 1980 there were 3 million veterans 65 and older. By 1990 there will be 7.2 million and by the year 2000 the number will peak at about 9 million, with an estimated two-thirds eligible for free care if space is available.

To provide hospital and long-term care for all of them -- unless the rules are changed to eliminate free care for all but the poorest, as President Reagan proposed in his budget -- the VA has estimated would cost from $5.9 billion to $24.5 billion to construct added facilities.

The GAO said that if lengths of stay and needless hospitalization could be averted, much of the added cost could be avoided.