The secretary of health, education and welfare was sitting in the office of the senator last Friday, and each of them wanted something.

What the senator, Edward M. Kennedy, wanted was a private screening of the new national health plan that President Carter will publicly unveil this week. He got it.

What the secretary, Joseph A. Califano Jr., wanted was a feeling for how Kennedy will react publicly once the plan is announced on Tuesday. He didn't quite get it.

But Califano made his point. And now President Carter and his highest echelon will be watching with great interest to see how Kennedy phrases his response. Their interest goes to the heart of the health care battle of 1979, but also goes far beyond it, to the heart of the Carter reelection battle of 1980.

Democratic politics of 1980 has come down largely to a matter of watching for signs - signs that Kennedy really will not challenge Carter for the presidential nomination, which is what Kennedy says indirectly whenever he is asked directly; or signs that Kennedy just might become convinced to make the run in 1980, which is what many Democrats think Kennedy is indicating by his new-tone, high-gloss rhetoric in recent criticisms of Carter policies.

"I used to think there was no way Kennedy was going to try to run against Carter in 1980 - until I heard what he had to say about Carter's energy plan," said a Capitol Hill Democrat. "Now I just don't know what to think."

At the White House, presidential assistant Hamilton Jordan has sent his boss a memo saying essentially that preoccupation with Kennedy or any other potential opponent will be self-defeating. If Carter is strong, he will be strong regardless of whether Kennedy or anyone else runs, Jordan believes; and if Carter is perceived as weak, he will be in trouble no matter who the opponent proves to be. So the issue is Carter, and obsession with Kennedy could only be counterproductive.

But a top Carter political adviser, who espouses this thinking, quickly concedes that the Kennedy factor nevertheless pressured the Carter White House into adopting a more expansive health care program than it had once proposed. "Kennedy leveraged Carter into expanding health care," the Carter adviser said. "I concede that. And I just hope it will be enough to help us with the liberals."

That was in Califano's mind last Friday as he sat in Kennedy's office and urged the Massachusetts Democrat to at least mute his criticisms of the Carter plan.

"I think it's clear that we all recognize there are differences between our plans," Califano told Kennedy, according to a source who was present during the meeting. "But just as we recognize that you have come a long way in your plan, I hope you recognize that we have come a long way in ours. The time is propitious now to do something very significant. I hope you'll recognize the similarities between the plans and not focus on the differences. That could be a great benefit to all concerned."

Kennedy conceded that the administration has expanded its program funding for health care. But he made it clear that he favors controls on cost and systems which are not in the Carter plan - chiefly, a national cap that would limit in advance the amount the nation would spend on health care each year, and a budget under which hospital costs and doctor fees would be negotiated, agreed upon and budgeted in advance.

Kennedy's position was that the cost and system controls are so important that he would even prefer to have the administration spend a little less money at first, if it would adopt the controls.

So Kennedy offered Califano no assurances of just how he will phrase his comments. "We'll just have to see on Tuesday," Kennedy said.

There has been an evolution of sorts in the way Kennedy speaks about the Carter policies he opposes.

For most of the first two years of the Carter presidency, Kennedy delivered most differences with a velvet glove. For example, on June 19, 1978, he told the U.S. Conference of Mayors:

"I urge all of you, in a special plea today, to give President Carter a chance. . . . At last, we have an administration that is trying to understand the cities and is worried about their problems. . . . We can differ about elements of the president's urban policy announced last March. We can debate the specifics of the programs and question the levels of funding. But the direct involvement of the president was a significant accomplishment and an important beginning of a new day for America's cities."

By the Democratic Party midterm convention in Memphis last December, however, his rhetoric had a different cast:

"The hopes and dreams of millions of citizens are riding on our leadership. Sometimes a party must sail against the wind. We cannot afford to drift or lie at anchor. . . . It is wrong that prices are rising as rapidly as they are. But it is also wrong that cities are struggling against decay. . . . We cannot accept a policy that asks greater sacrifice from labor than from business. We cannot accept a policy that cuts spending to the bone in areas like jobs and health, but allows billions of dollars in wasteful spending for tax subsidies to continue, and adds even greater fat and waste through inflationary spending for defense."

And by this spring, Kennedy was taking on Carter on still another political plane. He was choosing words trimmed in neon and studded with sequins and rhinestones - the sort that just leap out at headline writers and television viewers alike.

In a Senate hearing, he called the Carter energy policy a "sham."

And on April 30, in a speech to a convention of newspaper editors, he charged that:

"The overbearing power of the oil lobby has . . . intimidated the administration into throwing in the towel without even entering the ring on the issue of oil price decontrol. . . . It has also intimidated the administration into submitting a token windfall tax that is no more than a transparent fig leaf over the vast new profits the industry will reap."

Kennedy concedes that there may have been a change in the way he phrases things. "But I have not made a conscious decision to step it up," he says. "It is just that the situation - on the issues - has changed. In 1977, we were moving along on the same track. I thought we were going to be together on health, for instance. But that broke down . . ."

Kennedy says he sees no need to soften his rhetoric. "If I were silent, I'd be violating my convictions and my responsibilities as a senator to speak out on what I am for and what I am against," he said in an interview.

So compelling is the magic of Kennedy in liberal circles that at times he seems able to keep his political prospects forever boiling with only a few choice phrases for fuel.

When a handful of liberal House Democrats had breakfast not long ago, Kennedy's attack on Carter energy policies was the main topic. "Kennedy said it all," a congressman who was there said with admiration. A few days later, five of the congressmen came out publicly against Carter in 1980, with four of them urging Kennedy's nomination.

Meanwhile, incipient draft-Kennedy movements are budding in a number of states, including New Hampshire, tended in most cases by liberals outside the party mainstream. The Kennedy staff dutifully tells these people that Kennedy does not want them to do anything in his behalf. They say that Kennedy "expects" Carter to be renominated and reelected and that he "expects" to support Carter in 1980. But people realize that "expects" is being tossed into every comment, like raisins into fruitcake, and so they go right ahead with their plans.

This has bothered Democratic National Chairman John White, who recently visited Kennedy to voice concern that the liberals may be so supercharged that, even when Kennedy does not run, they will press someone else into challenging Carter.

And it has also bothered House Speaker Thomas P. O'Neill Jr.

Tip O'Neill is sitting next to Kennedy at the head table of a Democratic Party dinner in Boston, a couple of weeks ago, and it is only natural that the nature of their table talk is politics.

The speaker of the House is a longtime Kennedy friend and a longtime Democrat of the old school that believes good Democrats are loyal to their friends and to their presidents. So the speaker finds himself in an awkward position these days.

He tells Kennedy that he is going to make a lot of his old Democratic pol friends look awfully foolish if he turns around and runs for president in 1980 after leading them all to think that he was going to back Carter.

Kennedy responds with the standard line that he uses for anyone who happens to shove a microphone in his face that he expects Carter to be renominated and reelected and that he expects to support Carter.

According to a source close to O'Neill, the speaker replies: "Well, you're sure picking a funny way to do it."

To which Kennedy responds: "Well, I think the Liberals need a voice - and besides, I'm enjoying it."

Kennedy does not remember the last part of the conversation that way. As he recalls it, sitting in his office during an interview, O'Neill did indeed lean over and start talking about hearing from Democrats all over the country that Kennedy is putting them on the spot by not declaring flatly that he will - or will not - run for president in 1980. And Kennedy recalls saying, "Well, politicians do not like to make tough choices."

In his office the other day, Kennedy thought over the matter of political choices. Carter versus Jerry Brown would not be so tough for him. "I'll support Carter over Brown," Kennedy said flatly, although he could not say whether this support would be visible in a speech or a newspaper ad or whatever.

Kennedy also said he saw no other liberal alternative to Carter in 1980, and he reiterated his litany about how he expects to support Carter. Once Kennedy told a Boston columnist he would run for president in 1980 if Carter does not run. He concedes now that he said that once, but he will not repeat the assertion "because the president has said to me that he is going to run . . . and that is the current reality."

His own current reality, Kennedy says, is to spend the coming campaign season tending to his Senate business of health, energy and and chairing the Judiciary Committee.

A century ago, Gen. William Tecumseh Sherman knew how to firmly turn off talk of a presidential draft; he said flatly, in 1884, "I will not accept if nominated, and will not serve if elected." The president's advisers would be cheered to hear just such a statement from the Judiciary chairman, as the fragmentary draft-Kennedy movements grow (seemingly in direct proportion to the Carter defections).

But the chairman demurs. Ask Kennedy for a Sherman-like statement on 1980 and all you'll get is something about antitrust. "I just don't anticipate I'll have to do more to turn it off," Kennedy says.