
604 P.2d 724 (1979)
100 Idaho 710
Esther HAYMAN, Individually, and Esther Hayman, as heir of the Estate of Gordon Hayman, Deceased, Petitioner-Respondent,
v.
STATE of Idaho, DEPARTMENT OF HEALTH AND WELFARE, Respondent-Appellant.
No. 12655.
Supreme Court of Idaho.
December 17, 1979.
Rehearing Denied January 21, 1980.
*725 Wayne L. Kidwell, Atty. Gen., Boise, James T. Baird, Asst. Atty. Gen., Health and Welfare Div., Twin Falls, for respondent-appellant.
Louis Garbrecht, III, Idaho Legal Aid Services, Twin Falls, for petitioner-respondent.
McFADDEN, Justice.
This is an appeal from an order reversing the decision of a hearing officer which terminated public assistance and medical assistance to Gordon and Esther Hayman. Subsequent to the hearing in the district court Mr. Hayman passed away and Mrs. Hayman appears on this appeal individually and as an heir of Mr. Hayman.
The Haymans, husband and wife, were elderly persons (71 and 73 years of age, respectively) and in ill health when the Idaho Department of Health and Welfare (herein Department), terminated their old age assistance and medical assistance payments. In 1976 they were notified that their various grants would be terminated because it was determined by the Department that, based upon an increase in federal Social Security benefits they were receiving, no "budget deficit" existed because their income exceeded the maximum level, set by Department regulation. The Haymans appealed from this termination of benefits, and, following a hearing, the Department hearing officer affirmed the termination. The Haymans then appealed to the district court, which reversed the decision of the hearing officer, finding that it was arbitrary, capricious and unreasonable for the Department to omit medical needs from a determination of old age assistance eligibility. The Department appealed to this court.
As stated by the Department, the issue presented by this appeal is whether the Department is required by Idaho Code Title 56, Chapter 2, to provide a "medically needy" program to all aged persons in the state regardless of the level of their income or their eligibility for categorical assistance and whether the Department has acted unreasonably in failing to adopt such a program. The Haymans expand this issue by arguing, as the district court held, that the Department was unreasonable and capricious in not including medical expenses in the computation of eligibility for old age assistance.
*726 For the reasons discussed in this opinion, it is the conclusion of this court that the trial court erred in its ruling and that its order must be reversed and the order of the Department's hearing examiner reinstated.
State and federal matching funds for medical assistance provided by Title XIX of the federal social security act may be dispensed by the states through at least one of two programs. These have come to be known as "categorically needy" and "medically needy" programs. In "medically needy" programs, any person whose income and resources are insufficient to provide necessary medical services is entitled to receive medical assistance. In "categorically needy" programs the person in need of medical assistance must first qualify for one of the four varieties of public assistance, old age assistance, aid to dependent children, aid to the blind, or aid to the disabled. Only then may medical assistance be provided.
In Curtis v. Child, 95 Idaho 63, 501 P.2d 1374 (1972), the court held that Idaho had enacted a "medically needy" program. The statute which the court construed to reach its decision, I.C. § 56-209b, stated that medical assistance was to be available to persons in any of the four categories mentioned above, and also "to such other persons as may be defined under the authority of this act to be medically needy individuals." Curtis, supra, 95 Idaho at 66, 501 P.2d at 1377. Since the decision in Curtis, 56-209b has been amended. At the time pertinent to this action it reads as follows:
"Medical assistance.  Medical assistance shall be awarded to persons who are recipients of old-age assistance, aid to dependent children, aid to the blind, aid to the permanently and totally disabled, and to such persons as mandated by title XIX of the Social Security Act... . [am. 1973, ch. 161 § 2, p. 306]" (Emphasis added.)
Title XIX of the Social Security Act gives States the option of enacting either a medically needy or categorically needy program, Curtis v. Child, supra, 95 Idaho at 64-6, 501 P.2d at 1375-77 (1972). The amendments to I.C. § 56-209, enacted in 1973, have readopted a "categorically needy" program in Idaho and terminated the "medically needy" program. When the Haymans' old age assistance grant was terminated June 30, 1976, because they no longer had a budget deficit they no longer qualified for medical assistance under I.C. § 56-209b.
In 1976 qualification for old age assistance was governed in part by two Department regulations.[1] Regulation 3143 stated that in addition to other prerequisites one was required to have a "budget deficit," that is, one's income and resources could not exceed one's allowable expenses. Regulation 3120 defined those allowable expenses which could be subtracted from income and resources in determining the presence of a budget deficit. Medical expenses were not included. Under this compilation the Haymans did not have a "budget deficit" (despite the fact that they did not have sufficient income and resources to pay their medical bills) and hence were eligible neither for old age assistance, nor, as a consequence, for medical assistance. The question before this court is whether the failure to include medical expenses in the determination of a budget deficit is arbitrary and capricious. I.C. § 67-5215(g)(6).
That the setting of specific requirements for participation in public assistance programs is largely a matter of State prerogative is established both by federal statute and case law. The very language of Title XIX of the social security act states that its purpose is to enable each State to provide medical assistance to its citizens, "as far as practicable under the conditions in such State... ." 42 U.S.C. § 1396 (1965), am. Dec. 31, 1973, Pub.L. 93-233, § 13(a)(1), 87 Stat. 960. The United States *727 Supreme Court has repeatedly upheld state welfare statutes under attack for failure to reach all conceivable persons in need, noting the "undisputed power" of the states, under the Social Security Act, to "set the level of benefits and the standard of need," King v. Smith, 392 U.S. 309, 334, 88 S.Ct. 2128, 2142, 20 L.Ed.2d 1118, 1135 (1968), and that "the federal law gives each State great latitude in dispensing its available funds." Dandridge v. Williams, 397 U.S. 471, 478, 90 S.Ct. 1153, 1158, 25 L.Ed.2d 491, 498 (1970).
This is so because under Title XIX federal funds are provided on a matching basis only, pegged to the level of State expenditure; and the expenditure of State funds is first and foremost a matter of State policy. It is a familiar "concern that the Federal Government not require a state legislature to appropriate more money for welfare purposes than it is willing and able to appropriate." Dandridge, supra, 397 U.S. at 492, 90 S.Ct. at 1165, 25 L.Ed.2d at 506 (Douglas, J., dissenting).
In Dandridge, supra, the Maryland Aid to Families with Dependent Children program was challenged on constitutional and statutory grounds because it put an upper limit on the amount of aid which could be dispensed under the program per family. As a result families with a large number of children received less aid per child than those with fewer children. Upholding the program, the Court said:
"We do not decide today that the Maryland regulation is wise, that it best fulfills the relevant social and economic objectives that Maryland might ideally espouse, or that a more just and humane system could not be devised. Conflicting claims of morality and intelligence are raised by opponents and proponents of almost every measure, certainly including the one before us. But the intractable economic, social, and even philosophical problems presented by public welfare assistance programs are not the business of this Court. The Constitution may impose certain procedural safeguards upon systems of welfare administration, Goldberg v. Kelly, 397 U.S. 254, 90 S.Ct. 1011, 25 L.Ed.2d 287. But the Constitution does not empower this Court to second-guess state officials charged with the difficult responsibility of allocating limited public welfare funds among the myriad of potential recipients." 397 U.S. at 487, 90 S.Ct. at 1162-3, 25 L.Ed.2d at 503 (1970).
This great latitude is of course limited by DHW's duty to promulgate regulations in accord with both the federal act and with State statutes. Nothing in the record suggests that 3120 was in conflict with the Social Security Act. The Act requires each State to submit its plan for public assistance for approval to the Secretary of Health, Education and Welfare. 42 U.S.C. § 1396 (1965). The record indicates that Idaho's plan, including Regulation 3120, was approved by the Secretary. The Secretary's approval, while not controlling, is entitled to considerable deference. Dandridge, supra, 397 U.S. at 481-2, 90 S.Ct. at 1159-60, 25 L.Ed.2d at 499-500 (1970); Power Reactor Dev. Co. v. International Union of Electrical, Radio and Mach. Workers, 367 U.S. 396, 408, 81 S.Ct. 1529, 1535, 6 L.Ed.2d 924, 932 (1961).
Regulation 3120 was also consistent with Idaho statutes. I.C. § 56-205 states that eligibility for public assistance shall be "defined by department regulation and subject to the availability of funds." The legislature thus placed responsibility for the setting of specific standards and limits directly on the Department and stated that one of its primary concerns should be the availability of funds. In addition, I.C. §§ 67-5217-18 provide that all departmental rules and regulations shall be transmitted to the legislature for approval. Regulations of the Department of Health and Welfare were submitted pursuant to I.C. § 67-5217 by the State Law Librarian to both the Senate and the House of Representatives on January 2, 1976. See House Journal, 1976 Session of the Legislature, for January 9, 1976, p. 19; Senate Journal, 1976 Session of the Legislature, for January 6, 1976, pp. 9-10.
The district court entered a finding that the Department's exclusion of medical expenses *728 in computing a "budget deficit" is arbitrary and capricious, apparently as a matter of perceived "obligations of society to the individual." However, the regulation was directly responsive to the legislature's direction to the Department to administer the public assistance program subject to the availability of funds. It would be ideal to alleviate all need. But the plain meaning of I.C. § 56-205 is that some persons who cannot provide for themselves will nonetheless not receive public assistance if there is not enough money available to provide it to them. The legislature clearly meant to base the entitlement to public assistance first on the availability of funds rather than on some absolute standard of need. Like the Maryland program in Dandridge, supra, regulation 3120 may not be perfect, but it is consistent with the pertinent statutes, and it is not the place of this court to substitute its judgment for that of the legislature.
In any case, the termination of the Haymans' old age assistance grant did not mean that medical care was unavailable to them. Under Title 31, Chapters 34 and 35 of the Idaho Code, the Haymans may have been eligible for county assistance. See University of Utah Med. Ctr. v. Bonneville County, 96 Idaho 432, 529 P.2d 1304 (1974).
The judgment of the district court is reversed and the cause remanded with directions to enter a new judgment affirming the decision of the Department of Health and Welfare. No costs allowed.
DONALDSON, C.J., and BAKES, J., concur.
BISTLINE, Justice, dissenting.
The Haymans had applied for and received public assistance at various times since 1959. They had received old age assistance and medical assistance and food stamps from November 1, 1975, until these benefits were terminated on June 14, 1976. The reason given for the termination was that an increase of 6.4% in their federal Social Security benefits on July 1, 1976, raised their income above that established by the Department for welfare eligibility. According to the Department, $255.80 of the Haymans' income counted as "income" for eligibility. After considering the Haymans' living expenses, which did not include medical expenses, the Department determined that the maximum eligibility income for the Haymans would be $234.50. Their income exceeded this figure by $21.30, and since they no longer had a "budget deficit" they were not eligible to receive the above grants.
The Haymans appealed the decision, and a hearing was held on August 13, 1976. The hearing officer for the Department concluded that the Haymans were medically needy, but because they no longer had a "budget deficit," he affirmed the decision that they were not eligible for assistance.
The Haymans appealed the decision to the district court. In reversing the decision of the hearing officer the district court found: Haymans had a medical need of $210.00 per month, a total monthly need of $444.50, and an income of only $311.90. The court also found that the Department was arbitrary, capricious and unreasonable in omitting medical needs when determining the assistance required for a subsistence compatible with the individual's health and well being. The Department was dissatisfied and took the case on into this Court.
The underlying issue on appeal[1] is whether the Department acted in an arbitrary, capricious and unreasonable manner in its failure to consider medical needs in determining the eligibility of a party to receive public assistance benefits pursuant to Title 56, Chapter 2, I.C. In addressing this question, the trial judge stated:
"From time to time throughout man's social evolution, society has perceived various duties of the individual to society, and obligations of society to the individual. These changing perceptions are evidenced in society's written laws beginning *729 with the Code of Hammurabi through the Magna Charta, the State and Federal Constitutions and down through Title 56, Chapter 2 of the Idaho Code.
"The latter, it seems to me, produces the idea that individuals unable to provide themselves with the accouterments necessary to maintain a minimum standard of physical well-being have a right to help from society."
The Department was given the responsibility of fulfilling this Herculean task by a legislature which obviously considered need to be a primary factor. This intent is indicated in several statutes. Idaho Code § 56-202 spells out the duties of the Department and in pertinent part says: "The state department shall: (a) Administer public assistance and social services to people who are in need." I.C. § 56-203 provides the Department shall have the power to: "(i) Determine the amount, duration and scope of care and services to be purchased as medical assistance on behalf of needy eligible individuals." See I.C. §§ 56-201(j), 56-201(m), 56-205, 56-207 and 56-210.
To aid the Department in accomplishing this goal, the legislature empowered it to establish and enforce necessary rules and regulations. I.C. § 56-202(b). In regard to the rules and regulations passed by the Department, the trial court said:
"One of these rules is found in Section 3143 of the Department's Manual. It sets forth the proposition that the dollar-amount an individual needs to purchase a reasonable subsistence compatible with health and well-being is to be determined by reference to department rules and regulations. The rules and regulations just referred to are found in the Department's Manual under the general heading of `Standards of Assistance for Meeting Basic Requirements.'
"These standards begin with Section 3120 of the Department's Manual, which reads in part:
"`The Department recognizes certain requirements to a subsistence compatible with health and well-being, which are common to all people. The allowance for the requirements are shown in succeeding pages under the heading "Summary of Monthly Allowances." * * *'
"The Summary of Monthly Allowances indicates that the Department recognizes only the following items as requirements for a subsistence compatible with health and well-being:
Food
Clothing
Housing
Utilities
Fuel
Electricity
Water
Garbage Collection
Special Needs
Limited to eating in restaurants, education, and dog food for `seeing-eye' dogs.
And here the list ends.
"It seems to me that a list of requirements for the support of human life compatible with health and well-being which fails to include medical aid wholly fails to meet realities existing in 1977. That the living-expense budget of the individual in the Year 1977 must include an outlay for medical expenses, or insurance premiums to cover that expense, is a truth more self-evident today than those famous self-evident truths found to exist in 1776  that all men are created equal and they are endowed by their Creator with certain inalienable rights.
"The budget format adopted under the rules and regulation of the Department allegedly setting forth basic requirements for health and well-being fails to meet the clear and unequivocal intent expressed by the Legislature that the Department recognize ALL reasonable requirements to a subsistence compatible with health and well-being  not merely certain requirements which the Department may choose to recognize at its own discretion." (my emphasis  not Judge Cunningham's)
"I recognize that it is the Department's contention that the Legislature *730 has given it carte blanche authority to arbitrarily manage the monstrosity created by Title 56, Chapter 2, Idaho Code, because the Department points to the 1974 amendment to 56-205, Idaho Code, in which the Legislature stated:
"`Public assistance shall be awarded * * * sufficient to provide a reasonable standard of health and well being as defined by department regulation and subject to the availability of funds.' (Judge Cunningham's emphasis)
"But the Public Assistance Law clearly limits the Department's right to define standards for health and well-being to REASONABLE standards. Standards which fail to take into account man's medical needs are just as unreasonable as standards which fail to take into account man's shelter, clothing or nutritional needs. And the Department does not have the power to make unreasonable standards reasonable by simply defining them as such."
I.C. § 56-210 is, of course, the statutory mandate for that language above which I have emphasized. I.C. § 56-210 provides that the Department in determining the amount of assistance to which an individual is entitled shall consider his requirements, conditions in his case, and all available income in order "to provide him with a reasonable subsistence compatible with health and his well being ... ." (my emphasis)
The trial court accordingly was correct in modifying the conclusion of the hearing officer by adding Conclusion III which read:
"The Department's Summary of the monthly Allowance is arbitrary, capricious, and unreasonable insofar as the summary fails to include any determination of medical assistance required for a subsistence compatible with the individuals' health and well-being."
It is obvious that when Haymans' medical expenses are included, Haymans had a "budget deficit." They also meet the other requirements of I.C. § 56-207 in that they are needy people 65 or over, Idaho residents, and are not inmates of a public institution. Old age assistance includes medical care for needy aged people. I.C. § 56-201(j). Again the Haymans clearly qualify as needy aged people in that they are 65 years or older and their income and sources of subsistence are clearly insufficient to supply them with the common necessities of life commensurate with their needs and health. I.C. § 56-201(m).
The Department contends that I.C. § 56-209b is the exclusive basis for the award of medical assistance. The trial court was correct in finding otherwise. In so doing, Judge Cunningham said:
"[I]t is my view that Section 56-209b, Idaho Code, is not the exclusive authority or basis for the State granting medical aid to its citizens. The criteri[on] for granting medical aid under this Section is whether or not the person is a member of a particular group  old-age assistance recipients, blind, totally disabled, etc. It has nothing to do with the criteria set out for public assistance in Section 56-205, Idaho Code. That criterion is whether the person has available resources sufficient to provide a reasonable standard of health and well-being. If he does not have resources sufficient to provide necessities for a reasonable standard of health and well being, including medical aid, the State must consider, determine and provide that person with medical aid reasonably necessary for that person's health and well-being. And this, it seems to me, applies to all citizens and whether they are blind, recipients of old-age assistance, totally disabled or merely feeble, old, medically needy people, such as the Haymans. To interpret Section 56-205, Idaho Code, otherwise makes a mockery of the Legislative mandate."
No question is raised as to the legislature's authority to approve the kind of regulations which the Department has promulgated, and which are here under attack. Judge Cunningham did not attempt to substitute his judgment for that of the legislature as to the best allocation of resources for the needy. The trial court's holding *731 should be affirmed simply because the Department failed to follow the requirements set out by the legislature. Although the statutes are somewhat unclear as to exactly how much latitude the Department has in administering its programs, it seems highly improbable that the legislature intended elderly citizens like the Haymans to be made worse off because of the Social Security Administration's decision to adjust their payments upward because of inflation. Under the Department's guidelines, a $20 increase in the Haymans' benefits from the Social Security Administration results in a $200 drop in the Department's medical benefits. While it is understandable that the Department, working with limited funds, would reduce  even dollar for dollar  payments to the medically needy by the amount of additional funds received by the needy from other sources, the trial court was not in error in holding arbitrary and capricious a Department reduction of benefits by more than ten times the amount of collateral funds received. Concluding, it is apparent that Judge Cunningham's decision was predicated wholly upon Idaho statutory law, i.e., he did not allow his determination to become bogged down by consideration of federal law which is thought by the Court's opinion to be applicable. That Regulation 3120 may have been approved by "the Secretary" should play little part in our review of Judge Cunningham's conclusions as to what is or is not required by Idaho statutory law. Attorneys and judges could quibble forever in discussing the intertwining of Title XIX and Idaho legislative law. Meanwhile aging and sick Idaho citizens may expire because their Social Security payments were slightly raised.
The decision of the trial court is correct, just, and should be affirmed.
SHEPARD, J., concurs.
NOTES
[1]  Since 1976 the Department's regulations have been rephrased, re-numbered and re-ordered, but they appear to contain the same substance. See Department of Health and Welfare, Rules and Regulations 3-1150 to 3-1155 (1979). We will refer to the Rules and Regulations by the numbering system in use at the time this case was commenced.
[1]  The issue as stated in Haymans' brief: "Can the Idaho DEPARTMENT OF HEALTH and WELFARE enforce administrative regulations which conflict with the provisions of Title 56, Chapter 2 of the Idaho Code?"
