
536 P.2d 549 (1975)
WESTERN MERCANTILE AGENCY, INC., Plaintiff,
v.
James Wesley FROATS and Viola Froats, Appellants, and
Public Welfare Division, State of Oregon, Andrew F. Juras, Administrator, Respondent.
Court of Appeals of Oregon.
Argued and Submitted May 21, 1975.
Decided June 16, 1975.
Ira R. Zarov, Coos-Curry Counties Legal Aid, Inc., North Bend, argued the cause for appellants. On the brief were Allen G. Drescher, Coos-Curry Counties Legal Aid, Inc., North Bend, Sally Hart Wilson and Robert B. Gillan, National Senior Citizens Law Center, and Patricia A. Butler, National *550 Health Law Program, Los Angeles, Cal.
Al J. Laue, Asst. Atty. Gen., Salem, argued the cause for respondent. With him on the brief were Lee Johnson, Atty. Gen., W. Michael Gillette, Sol. Gen., and Kathryn V. Kelty, Asst. Atty. Gen., and Counsel, Salem.
Robert B. Gillan and Sally Hart Wilson, Los Angeles, Cal., filed a brief amicus curiae on behalf of National Senior Citizens Law Center.
Before SCHWAB, C.J., and LANGTRY and FORT, JJ.
LANGTRY, Judge.
The plaintiff as assignee of McAuley Hospital brought this action against the Froats and the Public Welfare Division administrator for the reasonable value of 51 days of services rendered the Froats' minor son. The Froats were welfare recipients. They cross-claimed against the administrator for all but 21 days of the hospital services, which the Welfare Division had already paid. Their son had been severely burned, which reasonably necessitated hospitalization which totaled 51 days. Welfare Division's pertinent Rule Seven provides that the maximum hospitalization for which it will pay for a general welfare recipient in any year is 21 days. The Froats contend this rule violates federal law, which they say requires the administrator to pay the entire reasonable cost of reasonably necessary hospital service. The trial court held Rule Seven to be valid, gave judgment against the Froats but not against the administrator, and denied the cross-claim. The Froats appeal, urging the same contentions in this court.
A condition for receiving federal funds for a state's medical assistance program is that it follow a state plan for medical assistance for welfare recipients including hospitals services. 42 U.S.C.A. § 1396 (1974). Federal regulations are also promulgated pursuant to the same Act. State regulations must be consistent with federal statutes and regulations to be valid, because a large part of the money comes from the federal treasury under the authorization of the federal statutes and regulations. King v. Smith, 392 U.S. 309, 88 S.Ct. 2128, 20 L.Ed.2d 1118 (1968).
The federal Act cited above provides:
"For the purpose of enabling each State, as far as practicable under the conditions in such State, to furnish (1) medical assistance on behalf of families with dependent children * * * there is hereby authorized to be appropriated * * *. The sums made available under this section shall be used for making payments to States which have submitted, and had approved by the Secretary of Health, Education, and Welfare, State plans for medical assistance." (Emphasis supplied.) 42 U.S.C.A. § 1396 (1974)
"For purposes of this subchapter 
"(a) The term `medical assistance' means payment of part or all of the cost of the following care and services * * *.
"* * *." (Emphasis supplied.) 42 U.S.C.A. § 1396d(a) (1974).
The federal regulations referred to above provide that the state plan must
"[s]pecify the amount and/or duration [of medical services] * * *. Such items must be sufficient in amount, duration and scope to reasonably achieve their purpose * * *." 45 CFR 249.10 (5)(i) (1974).
Interpretation of the last sentence presents the most thorny issue here. We think it must be interpreted in light of the statute and other decisions relative to similar and allied statutes. It also should be interpreted, if possible, in a manner consistent with the statute upon which it is based. It is agreed that Oregon's plan, including the 21-day limitation of Rule Seven, has been approved by the Secretary of Health, Education and Welfare. Rule Seven of Oregon's plan was promulgated pursuant to *551 and in conformance with ORS 411.060 et seq.
The Froats, in support of their contention that Rule Seven violates requirements of the above-cited federal statutes and regulations, point specifically to 42 U.S.C.A. § 1396a(a)(13)(D) (1974) where it states that:
"(a) A State plan * * * must 
"* * *
"(13) provide 
"(D) for payment of the reasonable cost of inpatient hospital services provided for under the plan * * *."
They also quote the language from 45 CFR 249.10 which we have quoted in the paragraph above.
Without reconciling the language in 42 U.S.C.A. § 1396 (1974) which we have quoted above with their theory ("For * * * enabling each State, as far as practicable under the conditions in such State * * *"), the Froats assert that "any arbitrary or inflexible limits which disregard medical necessity [like the 21 days' limit in Rule Seven] * * *" violate the federal guidelines. The federal statutory language quoted must be considered as a whole. The interpretation placed by the United States Supreme Court upon the same language in other parts of the Federal Social Security Act is controlling. Identical language is found is Subchapter 1, Old-Age Assistance, 42 U.S.C.A. § 301 et seq. (1974); Subchapter IV, Aid to Needy Families, 42 U.S.C.A. § 601 et seq. (1974); Subchapter X, Aid to Blind, 42 U.S.C.A. § 1201 et seq. (1974); Subchapter XIV, Aid to Disabled, 42 U.S.C.A. § 1351 et seq. (1974); and Subchapter XIX, Medical Assistance Programs, 42 U.S.C.A. § 1396 et seq. (1974) (the one here under consideration).
In Dandridge v. Williams, 397 U.S. 471, 90 S.Ct. 1153, 25 L.Ed.2d 491 (1970), Aid to Needy Families, 42 U.S.C.A. § 601 et seq. (1974) was under consideration. The state of Maryland had put an upper limit on the amount of such aid one family could receive, regardless of the number of children (after a certain number) in the family. Holding that the arbitrary limit does not violate the federal statutes and regulations, the court said:
"In King v. Smith, supra, we stressed the States' `undisputed power,' under these provisions of the Social Security Act, `to set the level of benefits and the standard of need.' Id., at 334, 88 S.Ct. [2128] at 2142. * * *.
"Congress was itself cognizant of the limitations on state resources from the very outset of the federal welfare program. The first section of the Act, 42 U.S.C. § 601 (1964 ed., Supp. IV), provides that the Act is
"`For the purpose of encouraging the care of dependent children in their own homes or in the homes of relatives by enabling each State to furnish financial assistance and rehabilitation and other services, as far as practicable under the conditions in such State, to needy * * *.' (Emphasis added.)
Thus the starting point of the statutory analysis must be a recognition that the federal law gives each State great latitude in dispensing its available funds.
"* * *
"* * * Given Maryland's finite resources, its choice is either to support some families adequately and others less adequately, or not to give sufficient support to any family * * *.
"* * * So long as some aid is provided to all eligible families and all eligible children, the statute itself is not violated." 397 U.S. at 478-81, 90 S.Ct. at 1158-1159.
The Froats' assignments of error can be understood as a constitutional challenge to Rule Seven (equal protection of the law). Dandridge rejects such a challenge:
"We do not decide today that the Maryland regulation is wise * * *. But the Constitution does not empower *552 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.
See also Rosado v. Wyman, 397 U.S. 397, 90 S.Ct. 1207, 25 L.Ed.2d 442 (1970); and King v. Smith, supra.
The reasoning of Dandridge and the emphasis it places upon the language "as far as practicable under the conditions in such State" are dispositive of questions raised at bar.
Affirmed.
