ORANGE, CALIF. -- A mentally ill AIDS patient, bleeding from open sores, wandered the Orange County streets for days after one hospital turned him away and another said it could not readmit him without a doctor's order, authorities said.

A county health official said the handling of the 37-year-old transient shows how poorly equipped the medical community is to treat infectious AIDS patients, who often suffer from dementia in later stages of the disease.

The man turned up at his guardian's Santa Ana office Oct. 26. He is under care at the University of California at Irvine Medical Center in Orange, about 30 miles southeast of downtown Los Angeles.

In Miami, meanwhile, a 37-year-old AIDS patient died in a fire in his room at Jackson Memorial Hospital. Police said he may have set the blaze on purpose. A sprinkler system doused the blaze and there were no other injuries.

In San Francisco, AIDS tests will be urged for about 30,000 patients to see if they received AIDS-tainted blood at three Kaiser health plan hospitals in the San Francisco area between 1977 and March 1985.

The alert was prompted by recent estimates that as many as 1 in every 100 units of blood supplies to the hospitals were contaminated by the AIDS virus before screening procedures were introduced.