''Pumpkin, that's modern medicine,'' says an experienced doctor to a new medical intern. ''Advances that keep people alive who should have died a long time ago, back when they lost what made them people. Your job is to stay sane enough so that when someone does come in that you actually can help, you're not so brain dead you can't function.''

That cynical assessment may sound like a line from ''E.R.'' or ''Chicago Hope,'' but it's spoken in a funny and appealing new NBC sitcom called ''Scrubs.'' Bill Lawrence, its creator and executive producer, was co-creator of ''Spin City,'' and his new enterprise has a similar combination of glib, comic exaggeration and darkly clever humor. But it's not as reliant on zippy one-liners, at least not for now. It does have a sweet, puppyish main character, the innocent intern, J. D. Dorian, played by Zach Braff. He's charming.

The hospital world unfolds through J. D.'s hopeful eyes. He's the perfect candidate for humiliation, being empathetic, insecure and possessed of a vivid imagination. His fantasies are projected onto the screen. When he lusts after a pretty blond intern, a woman called Elliott, he imagines her ripping open her shirt to reveal a red bra before she kisses him. In reality this ambitious doctor in training flirts with him and then upstages him during rounds. She's played with wit by Sarah Chalke, who for several years portrayed Becky Conner, a daughter on ''Roseanne.''

Like the medical dramas, this comedy capitalizes on the inherent power of illness and death. The grimness lingering in the background gives the humor a jolt. No one is more aware of that sober reality than J. D., who is so apprehensive on his first day that he avoids any procedures that would require him to touch patients. It's not that he disdains them. On the contrary. He's appalled when he hears doctors refer to sick people in rude ways. He's just afraid that he's incapable of adhering to the Hippocratic oath. (''First do no harm.'')