''Your lungs are about as bad as they can get,'' the nurse explains to the 83-year-old man. ''Your lungs aren't going to get better, and so the act of putting you on the machine is almost a futile effort.'' In a long conversation, the nurse lets this patient know what his options are and tries to determine his wishes, as kindly as possible but with the suggestion that she has done this many times before. ''I want to help you, but I only want to help you in the manner in which you want to be helped,'' she says. ''I don't want to keep you alive unless you like living.'' A half-dozen young medical professionals gather around the bed of an old woman, a stroke victim who cannot speak and can communicate only by means of the faintest movements. They want to discuss the possibility of removing her breathing tube and the machine to which it is connected. Does she understand what the consequences of this may be? Is she prepared for the worst? Is she worried about the way her death may affect her devoted husband? The woman attempts to answer this barrage of difficult questions by weakly signaling yes or no, but she is soon exhausted. She indicates that she would like the conversation to stop. A semiconscious man who will die within a matter of days is being groomed by a slightly impatient young nurse. He looks momentarily startled as she adjusts his head so that he can be shaved. It looks as if moving the tubes attached to his face is slightly painful. It's hard to tell. The man gives the nurse one more startled look as she perfunctorily runs a comb through his hair. In a room filled with medical machinery, the line on a monitor goes flat. A nurse stands by, still holding the patient's hand. A doctor touches the patient efficiently, then checks for breath from her open mouth. ''Okay, she's dead,'' he says. ''7:53.'' These are the unforgettably sobering sights and sounds of ''Near Death,'' Frederick Wiseman's great, fearless and monumental six-hour documentary chronicling the workings of the medical intensive care unit at Boston's Beth Israel Hospital. They are the sorts of images that become grimly commonplace during the course of a film that is less a viewing experience than a total immersion. It isn't the running time that makes ''Near Death'' so overwhelming; it's the subject itself. But at this length, the film has time to carry its audience from an initially raw emotional response to a calmer consideration of the difficult issues raised here, and finally on to some sort of resolution. It is Mr. Wiseman's method to make himself an extremely attentive fly on the wall, observing long exchanges between doctors and patients, doctors and family members, and among the various members of the unit's medical staff. This particular intensive care unit is not a place for emergency surgery or for treating sudden illnesses; it's a place offering medically sophisticated treatment to people whose final days mark the last stage of slow, agonizing decline. Everyone the camera observes has spent time watching life erode and has had extensive experience with debilitating pain. One of the doctors has a sister who practices medicine at another hospital. ''She doesn't say 'What do you think?' - she says 'You're father's dying,' '' he tells a colleague. But at this particular ward, great care is taken to talk more humanely and less abrubtly about what the terminally ill patient's prospects really are, and to try to involve patients and family members in making life-or-death decisions. This is even harder than it sounds. Patients who thought they would never want heroic measures can sometimes feel differently when their worst fears become reality; relatives who want everything possible done for their loved ones reach a point where they may feel the dying patient has been through enough. The doctors have their own perspective. Experience has inevitably touched some of them with cynicism, however hard they fight against their own pessimism. ''I really believe that from the moment that diagnosis was made - like in 'Treasure Island,' when that old captain got handed a black spot? She got handed a black spot,'' a doctor tells a colleague about one patient. ''It's not clear we have anything to offer,'' this same doctor subsequently acknowledges. ''But in this day and age, we're extremely reluctant to say 'We can't do anything for that.' '' The doctors are always first to recognize hopeless situations, and they find themselves gently trying to steer patients toward the recognition that high-tech life-prolonging efforts may be futile and self-defeating. Phrases like ''We never know the future for sure, but. . . .'' and ''a borderline situation between surviving and not surviving'' have become delicate staples of their conversation. Among themselves, the doctors talk differently; they may use less gentle euphemisms, like ''just call it a day.'' ('' 'Quality of life' is for furniture salesmen,'' one says.) For the most part, the doctors in the film are as young and energetic as their patients are weak and old, and at times it is difficult not to regard as cavalier the very hardiness that allows them to do this work at all. One of the things that emerges over six hours is an enormous appreciation of the doctors' stamina and tact. As ''Near Death'' focuses attention on questions of just where life ends and how its ending can best be handled, it flinches at nothing. It's not for the timid. Though there is no full autopsy sequence depicted here, doctors are seen studying diseased organs in a post-autopsy evaluation session; another section of the film shows exactly how nurses remove the dead from their rooms and transport them inconspicuously to the morgue. The nurses' casualness about this is at least as chilling as the process itself. And if squeamishness is not spared, neither is pure emotion. There are scenes of heartbreaking tenderness in which longtime spouses, soon to be left alone, try to comfort the people they love. The families who allowed Mr. Wiseman to film long, uninterrupted takes chronicling such private and painful moments have made an invaluable contribution. ''Near Death'' will be shown today at 11:30 as part of the New York Film Festival. Those who see it will find themselves irrevocably altered by the experience. 'We Never Know' NEAR DEATH, directed, produced and edited by Frederick Wiseman; photography by John Davey; production company, Exit Films; a Zipporah Films Release. At Alice Tully Hall, as part of the 27th New York Film Festival. Running time: 350 minutes. This film has no rating.