The new UPN series "All Souls" is sort of "ER" in "The Twilight Zone." And, as far as executive producer Mark Frost is concerned, the concept of doctors operating in a haunted hospital isn't that far-fetched.

"Having been in a hospital myself once, I felt that was a pretty paranormal place," he said. "And I honestly do feel that the way medicine is going these days, you really only have to go one step further to get to the paranormal."

"Hospitals are scary places even if you're healthy (and) going to visit somebody," said executive producer/co-creator Stuart Gillard.

But few are as scary as All Souls Hospital in Boston, an institution that dates back more than three centuries. First-year resident Dr. Mitchell Grace (Grayson McCouch) arrives in high spirits only to discover that he can literally see spirits on the premises — and that something evil is going on there, something tied to his own father's death at All Souls 20 years earlier.

"It honestly felt like very fertile ground for a sort of horror/science fiction-based series," Frost said. "And I think anybody who has been in a hospital or spent a lot of time there, they have a kind of cringing feeling about the experience — particularly if they've lost someone or come close to losing their own life. So it's just taking that level of reality and moving it one step further."

Not that "All Souls" (which premieres Tuesday at 8 p.m. on Ch. 24) is exactly realistic, unless you believe in ghosts, undying evil and medical experiments carried out on unwilling patients under the noses of their loved ones. But, then again, Gillard doesn't see that as such a big leap.

"When we were doing the research before we started writing . . . it's kind of scary to find out that there are 80,000 people a year dying in hospitals that there's no explanation for," he said. "So some of the stuff we write turns out to be closer to the truth than we even thought."

(There are, however, no statistics on how may hospitals have ghosts wandering their halls.)

"All Souls" certainly looks appropriately spooky. Although it's set in Boston, it was filmed in Montreal.

"We actually found a 19th-century lunatic asylum still functioning," Frost said, "with people actually wandering in and out of shots who were inmates in some instances. So I think you start to get a pretty real feeling."

There's a touch of "The X-Files" in "All Souls" as well. There's a certain mythology to all that's happening, which is tied to Grace and his father.

"His past is linked with this institution," Frost said, "and over the course of time, he's going to discover exactly how and why."

And young Dr. Grace plays a central role in all of this.

"He's someone who's destined for the role he's going to play in this ongoing drama," Frost said. "And I think that means he's the only one, at least of his compadres, who's aware of the true extent of the evil and actually has the ability to see what's going on. It's what makes him special in the stories, and it's also why the bad guys are so interested in going after him and perhaps trying to influence him to maybe work for them."

Within the mythology of the show, Dr. Grace is trying to discover and uncover exactly what's going on at the hospital.

"As a doctor, your job is to diagnose, and in that way they're remarkably like detectives where they're faced with a mystery that they have to solve," Frost said. "And that's how he kind of functions in these stories — confronted with something that on the face of it appears inexplicable. It's his job to get to the bottom of it, and it often leads him into the supernatural."

The producers promise, however, that the mythology won't overwhelm the show — that viewers can tune in to individual episodes and not be lost if they haven't seen previous installments.

"The stories are all self-contained," Frost said.