Helmeted, shotgun-wielding police, led by a k-9 dog, prowled slowly last night through a medical building on the Providence Hospital grounds, searching for two suspects in a shooting and robbery at a Northeast supermarket.

After being evacuated, some in the middle of medical consultations, doctors and patients stood outside with about two dozen police officers, watching, waiting and comparing reality with television productions.

As it turned out, while reality offered dramatic moments it lacked a satisfying climax. The police ended their search after two hours without finding their quarry.

In the incident that triggered the search, a man with a gun demanded money about 4:30 p.m. from a cashier at a Safeway store in Brookland, Impatient with the cashier's delay the robber struck him on the jaw with the gun. The gun discharged, and a shopper standing in the back of the store was hit and wounded.

Seated near the store in his parked car, waiting for a friend, an off-duty D.C. policeman became suspicious when he saw a would-be shopper approach the store at 3809 12th St.NE, peer inside, and turn back. Officer George Taylor, assigned to the 7th District, stayed in the car and watched.

When a man ran from the store, joined another man in a car parked nearby and sped off, Taylor was ready. As the suspects zig-zagged through rush-hour traffic, Taylor followed.

Suddenly the car came to a halt in a parking lot on Varnum Street near the hospital. Hoping not to alarm the occupants, Taylor stopped some yards away and asked a paserby to telephone police. Meanwhile two men were spotted entering the medical building at 1140 Varnum st. In a few minutes police filled the area and the search was on.

In an unexpected confrontation repeated many times within the next minutes, a patient in a doctor's second floor waiting room looked up to see a helmeted policeman.

"Keep the door closed," she was told. "No one can come out into the hall." A few minutes later, the building was evacuated, and the SWAT team, led by K-9 dog Charley-8, began its search.

Unaware of the cordon outside and the search inside, one woman entered. Without warning, she said, "I saw all these guns and really became hysterical. The dog was there, too." She left.

The search ended about 6:45 p.m. Charley-8 "never even got a scent," his handler said.

"Maybe they went poof," suggested Deputy Chief Robert Klotz, who headed the search party.

The cashier, Maynard Waterford was treated at Howard University Hospital for a laceration and released. The cusotmer, identified as Mohamed Amin, was reported in serious but stable condition at Washington Hospital Center.