One of the toughest of the congressional budget battles involved President Reagan's proposal to lump more than two dozen major health programs, totaling over $2 billion in annual spending, into two huge block grants to the states with funding slashed to $1.4 billion.

The president said the plan wold give states more flexibility to decide where the money should go, instead of Congress earmarking how it should be spent.

But opponents of the plan, led by Rep.Henry A. Waxman (D-Calif.), chairman of the House subcommittee on public health, charged that submerging individual programs into block grants with few federal controls would wipe out separate allocations for some key programs, such as family planning, mental health and alcoholism, and allow the money to be diverted for other health purposes.

Waxman, playing David to the Reagan's Goliath, succeeded in defeating a sizable portion of the president's plan.

In the end, 10 programs were kept out of the block grants and will remain as separate categorical programs with authorizations to carry them through the next three years.

About 20 other programs, were put into four block grants, with rather severe restrictions in some cases on the states' freedom to shift money among programs within the block, or lumped together in such a way that it will virtually force the state to spend the money the same way it did before.

Overall, new authorizations were cut to about $1.6 billion for fiscal 1982, a cut several hundred million dollars less than the president had sought.

Here are the details, with program authorization figures:

Family planning -- Kept as a separate program with authorizations of $130 million for fiscal 1982, $143 million for fiscal 1983 and $155 million for fiscal 1984 for services.

Venereal disease control -- Authorized as separate program; $40 million, 1982; $46.5 million, 1983; $50 million, 1984.

Immunization -- Separate at $29.5 million, $32 million and $34.5 million.

Tuberculosis control -- Newly authorized separate program, with $9 million, $10 million and $11 million.

Migrant worker health -- Separate program with $43 million, $47.5 million, $51 million.

Adolescent pregnancy -- New program, partially duplicating an existing one that was put into one of the block grants, to provide health and nutrition services to pregnant girls and to provide chastity counseling; $30 million for each of three years.

Developmental disabilities -- Separate program with $61 million for each of the years.

Special research -- $3 million in fiscal 1982 was authorized for research and demonstration projects onprimary health care, and $30 million in fiscal 1982 for research on alcoholism and drug abuse.

Black lung -- Kept as separate program; no fixed authorization but funding has been $5 million a year.

Maternal and child health -- Seven programs were put into this block grant, with an authorization of $373 million a year from fiscal 1982 to 1984. The seven: maternal and child health, disabled children's care, lead-based paint poisoning, sudden infant death syndrome, hemophilia, genetic diseae and a version of the adolecent pregnancy program. Of the funds, up to 15 percent would be set aside for special maternal and child health, genetic disease and hemophilia demonstration projects. No funds may be transferred from this block.

Preventive health and health services -- Eight programs were put into this block grant, with $95 million authorized for fiscal 1982, $96.5 million for 1983 and $98.5 million for 1984. The eight: home health, urban rat control, fluoridation, emergency medical services, health education/risk reduction, health incentive grants, hypertension and rape crisis centers. Restrictions: in the first year, states must set aside some money to provide emergency medical services, perhaps less than now, but something. In addition, in fiscal 1982 states must spend at least 75 percent of what the federal government allocated to the hypertension program in 1981; in 1983 the figure would be 70 percent and in 1984, 60 percent. A further restriction: $3 million each year must be set aside for rape crisis centers. States would be able to shift up to 7 percent of this block to another block.

Alcohol, drug abuse and mental health block -- Unites funds for community mental health centers and drug abuse and alcoholism control, with $491 million for fiscal 1982, $511 million for 1983 and $532 million for 1984. Restrictions: 1 percent of the money will be retained at the federal level for projects to retrain mental health hospital employes losing jobs as a result of shutdowns. States must fund existing community mental health centers at some reasonable level. In 1982, states must spend the same proportion of the overall block on mental health as they had been spending when the programs were separate. But in 1983 they could shift 5 percent of the funds within the block and 15 percent in 1984. Thirty-five percent of whatever amount ended up in the "substance abuse" category would have to go to alcoholism and 35 percent to drug abuse, with the rest discretionary. The states also would have the right to shift 7 percent from the whole block into one of the other three health blocks.

Primary care block -- Community health centers would be the sole program in this block grant with funding at $280 million in 1982, $302.5 million in 1983 and $327 million in 1984. For 1982, the program would remain under federal supervision and really wouldn't be a block grant at all. However, the states could take over in 1983 as long as they maintain existing centers for one year. But states may simply leave the centers and funding under federal supervision.