The budget bill just signed by President Reagan will, as finally drawn, cut federal medical aid to more than a fifth of the American population.

Largely unpublicized provisions will force some people to pay higher doctor and hospital bills. New limits will be set on what hospitals and some doctors can charge and expect the government to pay. The states will be free to eliminate medical care for some groups they are now required to serve. The federal government could actually pay to close down hospitals regarded as unneeded.

The programs affected are the government's two largest in the health field: Medicare for the elderly and disabled, Medicaid for the poor. They have grown in the last generation until they make up nearly a tenth of the federal budget. Now for the first time their growth will be restrained.

Aged and disabled persons will have to pay more themselves before Medicare starts picking up the bill; the hospital insurance deductible, now $204, will jump to at least $328 by 1984.

New limits will be placed on how much the government will pay hospitals and in some cases doctors for specific services; hospitals will have to cut services, find less costly ways to provide them or find new sources of funds. To deal with the carrying costs of excess beds and empty wards, the government will also give some hospitals money to shut down.

The government will clamp down on the states, cutting their federal share of payments for Medicaid by several percentage points. They too will have to cut services, raise more money themselves or find ways to buy more care per dollar.

The government will allow the states more selectivity in offering Medicaid services to the "medically needy"; these are people not necessarily poor enough to qualify for welfare but eligible for Medicaid anyhow because the state considers them too poor to pay their medical bills. States will no longer have to serve all those defined as medically needy if they serve any, and will no longer have to offer comparable services to all medically needy groups. This new relaxation of the rules will accelerate a trend toward service reductions for Medicaid patients that has been under way at the state level for about a year.

States for the first time will be given power to take away from the doctor or patient in Medicaid some of their freedom of choice in selection of lab services and medical devices and, under certain circumstances, even the patient's choice of doctor.

These and other amendments are expected to cut $2.5 billion from federal Medicare and Medicaid outlays in the fiscal year beginning Oct. 1. That is when most of the changes take effect.

Together Medicare and Medicaid now provide health care to more than 47 million people a year. In calendar 1980 they cost the federal and state governments an estimated $63 billion; they now pay for over one-fourth of all health care in the country. Among the aged, they pay nearly three-fifths of all health costs.

Defenders of the medical programs argued during the months of debate on the budget bill that Medicaid coverage is already spotty, that millions of poor and near-poor people already fail to qualify under state eligibility standards or receive only minimal services, and that the elderly are already required to pay burdensome amounts for health care from their own pockets. Governors objected that the states could not pick up higher Medicaid costs if a cap were put on the growth of federal contributions as the president proposed.

Congress nonetheless voted to reverse direction and begin cutting back.

One major change increases the amount a Medicare patient must pay in hospital costs per spell of illness before Medicare takes over. The patient now pays the first $204, and under former law this deductible was scheduled to rise to $228 next year and slowly thereafter. The new formula jumps it to $256 next year and then faster, to $328 by 1984.

In addition, the co-insurance that the patient must pay for an extended stay in a hospital or skilled nursing facility will automatically rise faster, since it is set at 25 percent of the deductible.

Another provision that will cost patients more involves Part B of Medicare, the optional portion covering out-of-hospital doctor costs. The Part B deductible has been $60 a year, meaning that the patient pays the first $60 before Medicare kicks in; this is being raised to $75. Moreover, in the past, the patient could include payments made in the last quarter of the preceding calendar year in satisfying the deductible; that will no longer be allowed.

A second major group of changes seeks to cap reimbursements to hospitals and other medical providers in a variety of ways.

At present under Medicare, the government reimburses hospitals for the reasonable costs of care they give Medicare patients, and this may differ from hospital to hospital since some have higher costs than others. But no hospital generally may be reimbursed at a rate more than 12 percent over the average costs for similar hospitals in its area. The new law knocks the maximum reimbursement for any hospital down to 108 percent of average, regardless of its costs, posing a stiff challenge to higher-cost hospitals to clean up their acts.

Another major change, a big money-saver resisted strenuously by nearly all hospital groups according to congressional aides, reduces a special bonus to hospitals for Medicare nursing costs. On the theory that older patients require more attention, the government has been reimbursing nursing costs for Medicare patients at 108.5 percent of normal nursing costs for all age groups; this will now be cut to 105 percent.

Another saver: if an under-65 Medicare patient under the special kidney dialysis program, which covers dialysis for people of any age, has private health insurance, that insurance will be liable for dialysis costs ahead of Medicare for the first year.

Other provisions to squeeze costs under Medicare or Medicaid: stiffer rules to force hospitals to convert excess acute-care beds to lower-cost nursing beds; lower reimbursement ranges for certain Medicare home health services; an effort to force down rates for kidney dialysis by changing reimbursement rules for certain types of dialysis facilities; civil administrative penalties of up to $2,000 and exclusion from the programs for doctors and hospitals caught cheating.

The new law also provides special payments to help hospitals eliminate excess bed capacity, convert it to other uses such as nursing, and get rid of unneeded services. This would cost small amounts at first but was added on the theory that it will save money in the long run.

Where hospitals, health centers, clinics and doctors using them provide outpatient services, the government can set a maximum charge, based on what private physicians in the area normally charge for similar services in their offices.

Some of the most significant changes give the states much more latitude to cut Medicaid benefits and exert pressure on hospitals to keep down their charges under Medicaid.

By far the most important single provision, and the one that produced the biggest fight on the whole bill, involved a proposal by Reagan to limit the increase in Medicaid reimbursements to the states to 5 percent in 1982. Since medical costs are going up much faster, this would have put great pressure on the states.

Congress ultimately rejected this cap idea, but Medicaid was still cut substantially. The final bill provided that matching payments to the states would be calculated at whatever level they would have been under existing law for each of the next three years, but then cut 3 percent from that level in 1982, 4 percent in 1983 and 4.5 percent in 1984. States that held down costs by various methods could reduce even these cuts. This compromise meant smaller cuts than the president wanted, but even so it reduces federal matching and presses the states to hold down program costs.

Coupled with this were provisions giving the states considerable leeway to reduce benefits or payments for services.

In reimbursing hospitals for Medicaid patients, the states can set rates lower than Medicare's, by law or negotiation.

The states can buy lab services or medical devices by competitive bidding and require the doctor or patient to use those particular services or devices -- a potential curb on existing rights to choose.

Another such curb allows the state, when a patient has been making multiple visits to different doctors or clinics for the same condition, to assign him to one doctor or group of specialists.

States are also permitted to provide a variety of home-care and community services to people who would otherwise require much more costly care in nursing homes and other institutions.

One of the biggest Medicaid changes virtually invites the states to cut back somewhat on coverage of the medically needy. Under the old law, if a state chose to cover medically needy people, it had to cover all within that income category and in general provide them all with the same range of inpatient and outpatient services.

The new law changes that. It allows partial coverage and partial services, so that part of the medically needy might be covered and only for some services. It provides, however, a list of priorities: if a state furnishes coverage to any medically needy group at all, it must provide outpatient services to children and prenatal and delivery services to pregnant women; if it provides institutional services for any group it must also provide outpatient services for it.