HEALTH AND HAPPINESS By Diane Johnson Knopf. 256 pp. $19.95

DIANE JOHNSON's wickedly droll story of a December crowded with incident at Alta Buena, a San Francisco teaching hospital, aptly takes its epigraph and title from The Importance of Being Earnest: "A high moral tone can hardly be said to conduce very much either to one's health or one's happiness." Indeed, passages of Health and Happiness read as if Oscar Wilde had been persuaded to write several episodes of "General Hospital," with salutary results. At the other extreme, the novel recalls Frederic Wiseman's extraordinary documentary, "Near Death," very different in aim but with similar darkly comic moments, when human frailty and pride confront unassailable physical decay.

Few readers will be shocked to learn that the American medical establishment (health care delivery, as they say) is in a sorry state. And television, films and accounts of "my illness and struggle back to health" have amply exploited the drama inherent in the hospital setting, not to mention its opportunities for sexual dalliance. But no contemporary novel I know of has had at the subject with quite as much wit. Johnson unearths sophistry and moral turpitude where others merely see predictable tragedy and a sort of gruesome glamor.

Her purpose is not simply to expose institutional disarray, though, any more than The Shadow Knows and Persian Nights, two earlier novels, were solely portrayals of social and political entropy. Her abiding theme is the existential peril of ordinary life, whether that peril be localized in the body's antics, a heedless doctor, a lurking lunatic or simmering political intrigue. Inevitably her characters flounder in moral and emotional disarray, making earnest, if self-deluded, attempts to lead decent, responsible lives.

In a terse, meticulously plotted narrative, three well-meaning types watch their destinies veer out of control and change course, whether for good or for ill is ambiguous. Ivy Tarro, a fetching young restaurant hostess and new mother, is sent to Alta Buena with a mysteriously swollen arm, an ailment so mistreated as to provoke nearly fatal results. Head doctor Philip Watts is a model of rectitude and "high moral tone" -- in his view, "calm, in control, magisterial" -- until he falls in love with Ivy and, sensing "some alien chemistry of gathering forces within himself," exasperates his colleagues and wife and unwittingly sets off a nurses' strike. Mimi Franklin, head of Volunteer Services and divorced mother of college-aged children, awaits rescue from her barely acknowledged loneliness and malaise, while facing the loss of her home to the hospital's creeping lust for lucrative parking space.

Johnson cleverly draws her protagonists from three levels of the hospital stucture: (one is reminded, with a grin, of Freud's three-tiered map of the soul, of society's three estates). Philip views power as a solemn duty: "No one likes to play God," he thinks, "but someone has to do it . . . and you get so you don't mind it, and would rather it were you than someone less competent." Such unselfconscious earnestness can be noble or, at times, lethal: Philip is rather too willing to let suffering patients die. Moreover, while romance at Alta Buena may cross class lines, in the end professional allegiances are more potent, and inviolable. However appalled Philip is by Ivy's needless suffering, he cannot breach medical etiquette by challenging a colleague's faulty diagnosis.

Mimi's loyalties waver between patients and doctors, but as with any bourgeoise, it is personal life that preoccupies her. She stands ready to fall in love with almost any doctor who brushes by: white-coated, they become interchangeable. And powerless Ivy only gradually and unwillingly realizes her case has been bungled, her ordeal unnecessary. With a delectable stroke of irony, Johnson has the appealing and intelligent Ivy sublimate her chagrin, as well as her worry over the huge medical bill, in a new-found, fervent ambition to become a surgeon. In a word, they know not what they do, or what is done to them.

The individual dramas take place amid a rich cast of characters sketched in the deft strokes of a comedy of manners, with little psychological probing: Philip's fellow doctors -- some admiring, some backbiting -- are all white and male, equipped with suitable wives busy at charitable pursuits; the interns and residents are more variegated, including Dr. Lum Wei-chi, whose Chinese perspective on medical and social doings at Alta Buena provides some telling moments. The nurses are black or Filipina for the most part, and the patients primarily women or members of racial minorities -- an array that underscores Alta Buena's hierarchical structure. IF THIS brisk tale has any flaw, it is an excess of inventive energy or brio expended indiscriminately. After the dramatic, ominous opening -- naive Ivy entering Alta Buena -- the tone does not vary or build very much. Matters proceed evenly from outrage to outrage. This is a minor complaint, though, in a novel offering plenitude, wisdom and rueful farce.

For as in her earlier books (10 in all, ranging from fiction to biography to literary criticism), Diane Johnson has transcended her immediate subject. Our vaunted moral and intellectual resources, she suggests, are dreadfully taxed by the irrational menace of life itself. As the heroine of The Shadow Knows declares: "You never know, that's all, there's no way of knowing." Lynne Sharon Schwartz's most recent novel is "Leaving Brooklyn," nominated for a 1990 PEN-Faulkner Award.