Bills that order people convicted of prostitution and intravenous drug use to be tested for AIDS and that require hospitals to alert morticians about people who have died of AIDS and other infectious diseases were approved yesterday by the Virginia House Committee on Health, Welfare and Institutions.

The committee defeated several other AIDS-related proposals, saying they should be shelved until a comprehensive study of AIDS is completed before next year's legislative session.

One of the rejected measures, sponsored by Del. Robert K. Cunningham (R-Springfield), would have required AIDS testing of everyone age 5 and older. Cunningham said he was surprised to learn that one of the chief witnesses in favor of his bill is associated with political extremist Lyndon H. LaRouche Jr.

Dr. John Grauerholz, who had identified himself as a Leesburg pathologist and a consultant to the National Democratic Policy Committee, said, when pressed by Del. Warren G. Stambaugh (D-Arlington), that he works for LaRouche. Stambaugh was an opponent of many of the AIDS bills.

Dr. C.M.G. Buttery, the state's health commissioner, said he was not certain how his agency would find the resources to treat prostitutes and drug addicts who test positive for AIDS. Del. David G. Brickley (D-Woodbridge), the sponsor of the bill to test prostitutes and drug abusers, yelled at Buttery, "That's the dumbest thing I've ever heard."