Appellants are state and local officials in charge of administering the State of Iowa’s Medicaid program. They appeal from the District Court’s1 order requiring them to reimburse Appellee-Plaintiff Pinneke $3,024.52 for her expenses incurred for sex reassignment surgery and awarding her $500 as compensation for mental anguish and suffering resulting from the wrongful denial of benefits, together with attorney fees. Appellate jurisdiction rests upon 28 U.S.C. § 1291 (1976). We affirm.
Pinneke began life as a male, but quickly became uncomfortable with the male gender identity. After extensive testing, doctors concluded that she had a transsexual personality, and required sex reassignment surgery. She underwent sex reassignment surgery on April 20,1976. As a Supplemental Security Income recipient, Pinneke was eligible for benefits under the Medicaid program, 42 U.S.C. § 1396 (1976). She applied for funding of her sex reassignment surgery under the Medicaid program, but the Cerro Gordo County office of the Iowa Department of Social Services refused funding. The Commissioner of the Iowa Department of Social Services affirmed this decision on the basis that the State of Iowa’s Medicaid plan specifically excludes coverage for sex reassignment surgery. Pinneke then filed this suit seeking remedial injunctive and declaratory relief from the denial of her constitutional rights to equal protection and due process and her statutory right to Medicaid benefits.
On May 11, 1979, the District Court declared that the policy of denying Medicaid benefits for sex reassignment surgery where it is a medical necessity for treatment of transsexualism is contrary to the provisions of Title XIX of the Social Security Act, 42 U.S.C. § 1396 (1976), and therefore violates the supremacy clause of the United States Constitution. It declared the relevant parts of the Iowa State Plan void, and permanently enjoined the administration and enforcement of the Iowa Medicaid program in a manner to deny benefits for medically necessary care and treatment incident to sex reassignment surgery or subsequent corrective surgery.
Preliminarily, appellants argue that the Supreme Court’s decision in Chapman v. Houston Welfare Rights Organization, 441 U.S. 600, 99 S.Ct. 1905, 60 L.Ed.2d 508 (1979), requires dismissal of the complaint for lack of federal jurisdiction. Chapman held that supremacy clause claims challenging the validity of state welfare regulations *548because of conflict with the Social Security Act do not fall within the ambit of the jurisdictional grant of 28 U.S.C. § 1343 (1976).
In Hagans v. Lavine, 415 U.S. 528, 536, 94 S.Ct. 1372, 1378, 39 L.Ed.2d 577 (1974), the Supreme Court held that a federal court may hear a pendent claim based on the Social Security Act when a substantial constitutional claim is also presented. In his concurring opinion in Chapman, Mr. Justice White observed that the Chapman majority did not question the continuing validity of Hagans, 441 U.S. at 661 n.33, 99 S.Ct. at 1915 (White, J., concurring in the judgment). The dissenters in Chapman noted that “even a welfare recipient with a federal statutory claim may sue in a federal court if his lawyer can link this claim to a substantial constitutional contention. And under the standard of substantiality established by Hagans v. Lavine, supra, such a constitutional claim would not be hard to construct.” Id. at 675, 99 S.Ct. at 1946. (Stewart, J., dissenting). See also Herweg v. Ray, 619 F.2d 1265, at 1269 (8th Cir. 1980); Oldham v. Ehrlich, 617 F.2d 163, at 166-168 (8th Cir. 1980).
The District Court found that by virtue of 28 U.S.C. §§ 1331 and 1343(3) and (4) it had jurisdiction over Pinneke’s complaint raising issues arising under the equal protection, due process, and supremacy clauses of the Constitution. This determination, filed a few days before the Chapman decision, is incorrect in holding that the supremacy clause allegation could provide jurisdiction under 28 U.S.C. § 1343 (1976), but the Chapman decision does not detract from the District Court’s finding that section 1343 encompasses jurisdiction of the claims regarding equal protection and due process. It is irrelevant that the District Court did not reach the merit of these claims. Hagans v. Lavine, 415 U.S. 528, 543, 94 S.Ct. 1372, 1382, 39 L.Ed.2d 577 (1974). Appellants’ jurisdictional challenge is rejected.
On the merits of the claim, appellants assert that Congress conferred upon the states considerable latitude and discretion in shaping their medical assistance programs under Title XIX, and that the State of Iowa has properly exercised this discretion to formulate an irrebuttable presumption that treatment of transsexualism by alteration of healthy tissue cannot be considered “medically necessary.”2 Appellants apparently concede that Pinneke suffers from transsexualism, but contend that the state may make an irrebuttable presumption prohibiting a certain manner of treatment, even though medical testimony establishes that this treatment, sex reassignment surgery, is the only procedure available for treatment of the condition from which Pin-neke suffers, transsexualism, and was medically necessary for her, based upon an individualized medical evaluation.
From this record, it appears that radical sex conversion surgery is the only medical treatment available to relieve or solve the problems of a true transsexual. As noted by the Minnesota Supreme Court in Doe v. Minnesota Department of Public Welfare and Hennepin County Welfare Board, 257 N.W.2d 816, 819 (Minn.1977):
Given the fact that the roots of transsexualism are generally implanted early in life, the consensus of medical literature is that psychoanalysis is not a successful mode of treatment for the adult transsexual. * * * The only medical procedure known to be successful in treating the problem of transsexualism is the radical sex conversion surgical procedure requested by Doe in the present case:
“It is the alternative that is sobering. In the light of present knowledge, there is no known approach to treat*549ment of transsexualism other than the surgical route. Nothing else holds promise. Granted that the surgical route is difficult and clearly second-best to a method of preventing these tragic reversals of gender identity and role, yet it seems to be all that there is to offer at present.” Hastings, Post-surgical Adjustment of Male Transsexual Patients, 1 Clinics in Plastic Surgery 335, 344.
* * * * * *
Thus, it is not unreasonable to conclude that transsexualism is a very complex medical and psychological problem which is generally developed by individuals early in life. By the time an individual reaches adulthood, the problem of gender role disorientation and the transsexual condition resulting therefrom are so severe that the only successful treatment known to medical science is sex conversion surgery.
The State of Iowa, in choosing to participate in Title XIX, the Medicaid program, by establishing a Medical Assistance Program, has bound itself to abide by certain provisions of the federal legislation. Title XIX, 42 U.S.C. § 1396a(13)(B), mandates that five basic categories of medical assistance be provided to all categorically needy persons when the assistance is medically necessary. These five categories, listed in section 1396d(a) include “inpatient hospital services (other than services in an institution for tuberculosis or mental diseases)” and “physicians’ services furnished by a physician (as defined in section 1395x(r)(l) of this title), whether furnished in the office, the patient’s home, a hospital, or a skilled nursing facility, or elsewhere.”
The state’s plan is subject further to regulations promulgated by the federal Department of Health, Education, and Welfare. In particular, 42 C.F.R. 449.10(a)(5)(i) (1977), now codified at 42 C.F.R. § 440.-230(c) (1979), provides in pertinent part:
[T]he State may not arbitrarily deny or reduce the amount, duration or scope of, such services to an otherwise eligible individual solely because of the diagnosis, type of illness, or condition. Appropriate limits may be placed on- services based on such criteria as medical necessity or those contained in utilization or medical review procedures.
We find that a state plan absolutely excluding the only available treatment known at this stage of the art for a particular condition must be considered an arbitrary denial of benefits based solely on the “diagnosis, type of illness, or condition.” Doe v. Minnesota Department of Public Welfare, 257 N.W.2d 816, 820 (Minn.1977); see White v. Beal, 555 F.2d 1146, 1151-52 (3d Cir. 1977). Cf. G. B. v. Lackner, 80 C.A.3d 64, 145 Cal.Rptr. 555 (1978) (classification of sex reassignment surgery as cosmetic is arbitrary).
Furthermore, Iowa’s policy is not consistent with the objectives of the Medicaid statute. Without any formal rulemaking proceedings or hearings, the Iowa Department of Social Services established an irrebuttable presumption that the procedure of sex reassignment surgery can never be medically necessary when the surgery is a treatment for transsexualism and removes healthy, undamaged organs and tissue. This approach reflects inadequate solicitude for the applicant’s diagnosed condition, the treatment prescribed by the applicant’s physicians, and the accumulated knowledge of the medical community. The Supreme Court has emphasized the importance of a professional medical judgment in this context. See Beal v. Doe, 432 U.S. 438, 445 n. 9, 97 S.Ct. 2366, 2371, 53 L.Ed.2d 464 (1977). The legislative history also supports the conclusion that Congress intended medical judgments to play a primary role in the determination of medical necessity.3 S.Rep. *550No. 404, 89th Cong., 1st Sess., reprinted in [1965] U.S.Code Cong. & Admin.News, pp. 1943, 1986-89. See also Dodson v. Parham, 427 F.Supp. 97, 108-09 (N.D.Ga.1977); Rush v. Parham, 440 F.Supp. 383, 389-91 (N.D. Ga.1977); White v. Beal, 555 F.2d 1146, 1150-51 (3d Cir. 1977); Comment, Public Welfare: Medicaid Funding for Transsexual Surgery, 63 Minn.L.Rev. 1037-48 & n.55, 1051-52 & nn.75 and 76 (1979).
The decision of whether or not certain treatment or a particular type of surgery is “medically necessary” rests with the individual recipient’s physician and not with clerical personnel or government officials. And, as stated in White v. Beal, supra, 555 F.2d at 1152, “The regulations permit discrimination in benefits based upon the degree of medical necessity but not upon the medical disorders from which the person suffers.” (Footnote omitted.) Here Pinneke proved a real need for the only medical service available to alleviate her condition, and the record indicates her condition has improved since the surgery.
Appellants lastly argue that transsexual surgery is excluded by the language of 42 U.S.C. § 1396d(a), providing two exclusions for mental diseases. The clear language of these exclusions, however, strictly limits them to situations involving payment for “services in an institution for tuberculosis or mental disease.” Appellants’ only attempt to fit within these exclusions is the suggestion that Pinneke’s medical condition requiring surgery was a mental disease. The statutory limitations, however, do not apply to mental health problems in general. Pinneke’s transsexual surgery thus comes within the medical assistance categories of “inpatient hospital services” and “physicians’ services furnished by a physician,” and must be covered under the state’s Medicaid plan unless not medically necessary.
The decision of the District Court is affirmed.
. The Honorable Donald E. O’Brien, United States District Judge, Northern District of Iowa.
. The State of Iowa does not appear to challenge the use of “medically necessary” as the standard for determining when it must provide coverage, but rather argues that sex reassignment surgery simply is considered not “medically necessary,” but more in the nature of cosmetic surgery. This standard of medical necessity is not explicit in the statute, but has become judicially accepted as implicit to the legislative scheme and is apparently endorsed by the Supreme Court. Beal v. Doe, 432 U.S. 438, 444-45 & n. 9, 97 S.Ct. 2366, 2370-71, 53 L.Ed.2d 464 (1977).
. Senate Report No. 404, 89th Congress, 1st session, U.S.Code Cong. & Admin.News 1965, p. 1986, states in part:
3(a) Conditions and limitations on payment for services.
(1) Physicians’ role
The committee’s bill provides that the physician is to be the key figure in determining utilization of health services — and provides that it is a physician who is to decide upon *550admission to a hospital, order tests, drugs and treatments, and determine the length of stay. For this reason the bill would require that payment could be made only if a physician certifies to the medical necessity of the services furnished. * * *