
115 Cal.App.3d 270 (1981)
171 Cal. Rptr. 374
MERCY HOSPITAL AND MEDICAL CENTER, Plaintiff and Appellant,
v.
DEPARTMENT OF HEALTH SERVICES, Defendant and Respondent.
Docket No. 22345.
Court of Appeals of California, Fourth District, Division One.
January 26, 1981.
*273 COUNSEL
Memel, Jacobs, Pierno & Gersh, Arthur R. Chenen and Steven Gourley for Plaintiff and Appellant.
George Deukmejian, Attorney General, Thomas E. Warriner, Assistant Attorney General, Anne S. Pressman, Richard J. Magasin and Barbara M. Motz, Deputy Attorneys General, for Defendant and Respondent.
*274 OPINION
STANIFORTH, J.
Mercy Hospital and Medical Center Services (Mercy) sought a writ of mandate (Code Civ. Proc., § 1094.5) in the superior court to reverse the decision of the California Department of Health Services (Department) denying Mercy medical reimbursement for costs (deficits) incurred in Mercy's education clinic (outpatient) program for the fiscal years ending in 1973, 1974 and 1975.
After hearing, the trial court found "[t]he Mercy Hospital and Medical Center outpatient clinic serves a dual purpose (italics added): 1) Education and training of the interns and residents, and 2) Patient care"; but that "Medicade [sic][1]only requires inpatient hospital services to be reimbursed on the basis of reasonable cost" and then "[h]ealth insurance services such as `outpatient care' are reimbursed on the federal level at the lesser of reasonable cost or prevailing charges."
Further, the court found: "The hearing officer properly rejected the claims of the provider for reimbursement of educational costs on the basis of 20 CFR 405.421 and stated `California has elected to reimburse outpatient services during the period in question on a fixed fee basis.' (22 California Administrative Code 51509 (a)(g)." The court further noted: "Section 51509(a)(g), contains language dealing specifically with services provided by interns and residents in an outpatient clinic and is an exclusive direction for reimbursement of such services."
The Department has contended throughout the administrative and trial court proceedings that Mercy's educational clinic program was not an educational facility but merely an outpatient clinic. The trial court rejected this contention in finding the clinic served a "dual purpose," but upheld the administrative decision which has, at its root, this premise: "Since the `educational activities' for which reimbursement is sought here occurred in an outpatient clinic and California has chosen *275 not to reimburse outpatient activities on the basis of `reasonable cost,' 20 CFR Section 405.421 [authorizing reimbursement for `an appropriate part' of the net cost of an approved educational activity] is inapplicable." Upon these disconformant premises, the court found Mercy was entitled to reimbursement based only upon a fixed fee schedule for services to Medi-Cal outpatients. Mercy's appeal presents this single issue: To what extent, if any, are education costs incurred in the operation of Mercy's outpatient clinic to be reimbursed as an allowable reasonable cost of inpatient care under Medi-Cal?

FACTS
Mercy is a private hospital located in San Diego. Mercy's outpatient clinic is a multipurpose department receiving approximately 30,000 patient visits a year. It was opened and is operated as an adjunct to Mercy's educational programs and is, in fact, a necessary component if those programs are to be approved for federal funding. Outpatients are selected for their teaching value in order to provide appropriate learning experience to Mercy's interns and residents.
In conducting this educational program for its multi-speciality departments, Mercy provides thousands of opportunities for the interns and residents to learn outpatient care. Mercy was required by the American Medical Association, as a condition of accreditation of its education program, to provide an active outpatient clinic to supplement the inpatient learning experience.
The Department concedes and the trial court found the outpatient clinic to be an "educational institution" "formed for a distinct educational purpose." The Department, however, in defending nonpayment, points to Mercy's admission that it provides care for outpatients in the clinic's operation.
In seeking reimbursement of deficits incurred in conducting the outpatient clinic, Mercy filed cost reports for reimbursement as inpatient hospital expenses, services provided under Medi-Cal. These cost reports were audited by the Department of Benefit Payments (statutory predecessor to the Department of Health Services) and the education claims disallowed. Mercy exhausted its administrative appeal remedies (Cal. Admin. Code, tit. 22, §§ 51018, 51019) and then sought a writ of mandate in superior court. Upon denial of Mercy's petition, this appeal followed.


*276 DISCUSSION

I
The Medi-Cal program (chs. 7 & 8, pt. 3, div. 9 of Welf. & Inst. Code., § 14000 et seq.) was enacted to qualify California for federal Medicaid payments as authorized by title XIX of the Social Security Act, 42 United States Code section 1396 et seq. (Morris v. Williams (1967) 67 Cal.2d 733, 738-744 [63 Cal. Rptr. 689, 433 P.2d 697].) Among the benefits provided to Medi-Cal beneficiaries are outpatient care and inpatient hospital services. (Welf. & Inst. Code, § 14132.) Implementing regulations were promulgated fixing reimbursement to providers of medical services at "the lesser of the reasonable cost of such [inpatient] services or the customary charges" (Cal. Admin. Code, tit. 22, § 51508) and fixed rate schedules including overhead and professional components for services performed by outpatient departments. (Cal. Admin. Code, tit. 22, § 51509.)
Mercy argues education costs incurred in conducting their outpatient clinic are recoverable as appropriate educational costs authorized by applicable Medicare regulations. (42 C.F.R. § 405 (1979).) Medicare regulations (42 C.F.R. § 405.421(a)) authorize reimbursement to a provider of an "appropriate part" of the "net cost" of approved educational activities, declaring: "An appropriate part of the net cost of approved educational activities is an allowable cost." Approved educational activities are defined as "formally organized or planned programs of study usually engaged in by providers in order to enhance the quality of patient care in an institution. These activities must be licensed where required by State law. Where licensing is not required, the institution must receive approval from the recognized national professional organization for the particular activity." (42 C.F.R. § 405.421(b)(1).
The "net cost" of educational activities "means the cost of approved educational activities (including stipends of trainees, compensation of teachers, and other costs), less any reimbursements from grants, tuition, and specific donations." (42 C.F.R. § 405.421(b)(2).) And "[a]ppropriate part means the net cost of the activity apportioned in accordance with the methods set forth in these principles." (42 C.F.R. § 405.421(b)(3).)[2] The hearing officer found (and the trial court *277 agreed) 42 Code of Federal Regulations section 405.421 inapplicable, reasoning: "California, rather than basing its reimbursement of outpatient services on the concept of `reasonable cost' pursuant to the regulations at 20 CFR Sections 405.401-405.488, elected to reimburse outpatient services during the period in question on a fixed fee basis....
"Since the `educational activities' for which reimbursement is sought here occurred in an outpatient clinic and California has chosen not to reimburse outpatient activities on the basis of `reasonable cost', 20 CFR Section 405.421 is inapplicable.
"Since I find 20 CFR Section 405.421 inapplicable, I do not reach the issue of whether, if that section were applicable, the services provided here would be reimbursable thereunder."
Such logic has an uncomfortable circular quality which fails at several points to come to grips with the following multiple immovable legal, logical and factual premises.

II
Federal law mandates that "a state plan for medical assistance must  [42 U.S.C. § 1396a(a)(13)(D)]: "provide  for payment of the reasonable cost of inpatient hospital services provided under the plan, as determined in accordance with methods and standards, consistent with section 1320a-1 of this title, which shall be developed by the State and reviewed and approved by the Secretary and (after notice of approval by the Secretary) included in the plan, except that the reasonable cost of any such services as determined under such methods and standards shall not exceed the amount which would be determined under section 1395x(v) of this title as the reasonable cost of such services for purposes of subchapter XVIII of this chapter; ..." (Italics added.)
Secondly, 42 Code of Federal Regulations section 405.403, concerning apportionment of allowable costs, provides in part: "(b) In the study *278 and consideration devoted to the method of apportioning costs, the objective has been to adopt methods for use under title XVIII of the Act that would, to the extent reasonably possible, result in the program's share of a provider's total allowable costs being the same as the program's share of the provider's total services. This result is essential for carrying out the statutory directive that the program's payments to providers should be such that the costs of covered services for beneficiaries would not be passed on to nonbeneficiaries, nor would the cost of services for nonbeneficiaries be borne by the program." (Italics added.)
Third, an appropriate part of the net cost of an approved educational activity is conceded to be a recoverable cost where carried on in connection with inpatient services. Whether an appropriate part is recoverable where the educational activity is inextricably woven into the fabric of outpatient activity is not equally clear. However, 42 Code of Federal Regulations section 405.421(c), sheds this light upon the nature of the educational activities for which reimbursement is authorized: "Educational activities. (Italics in orig.) Many providers engage in educational activities including training programs for nurses, medical students, interns and residents, and various paramedical specialties. These programs contribute to the quality of patient care within an institution and are necessary to meet the community's needs for medical and paramedical personnel. It is recognized that the costs of such educational activities should be borne by the community. However, many communities have not assumed responsibility for financing these programs and it is necessary that support be provided by those purchasing health care. Until communities undertake to bear these costs, the program will participate appropriately in the support of these activities." (Italics added.)
Fourth, while inpatient and outpatient hospital services are separately categorized in 42 United States Code section 1396d(a), the "inpatient hospital services" for the purposes of title XVIII of the Social Security Act is defined at 42 United States Code section 1395x (b) as follows: "The term `inpatient hospital services' means the following items and services furnished to an inpatient of a hospital ... (1) bed and board; (2) such nursing services ... furnished by such hospital for the care and treatment of inpatients ...; and (3) such other diagnostic or therapeutic items or services furnished by the hospital or by others under arrangements ...; excluding, however  (4) medical or surgical services provided by a physician, resident, or intern; and
*279 ".... .... .... ...
"Paragraph (4) shall not apply to services provided in a hospital by  (6) an intern or resident-in-training under a teaching program approved by the Council on Medical Education of the American Medical Association; or ... (7) a physician where the hospital has a teaching program approved as specified in paragraph (6), ..." (Italics added.)
Finally, these hard facts cannot be ignored: "Mercy's outpatient clinic ... was opened and is operated as an adjunct to Mercy's educational programs and is, in fact, a necessary component if those programs are to be approved for Medicare purposes. Patients are selected [`Guinea Pigs'] in order to provide appropriate learning experience to Mercy's interns and residents." (Mercy Hosp. & Medical Center, San Diego v. Harris (9th Cir.1980) 625 F.2d 905, 907.)

III
The Department cites Board of Regents of State of Fla. v. Califano (5th Cir.1978) 586 F.2d 451, as compelling authority. In that case, the hospital (Shands) argued its outpatient clinical educational program benefited inpatient care in such a way that inpatient reasonable cost standards should be implicated. The court reasoned: "The hospital attempts to avoid the allocation requirement implicit in the statutory scheme and in § 405.522, and made explicit in the apportionment regulations, by a theory which might be called `transferability of skills': skills acquired by residents and interns in the outpatient clinic are ultimately applied to the benefit of inpatient beneficiaries and therefore the cost of acquiring the skills must be reimbursed at the 100% inpatient rate. This theory ignores the distinction between services and benefits. Assuming that inpatient beneficiaries derive a benefit from skills acquired by interns and residents from their outpatient training, Shands has not explained how this relates to the principle that Medicare only reimburses providers under Part A for the costs incurred for providing inpatient beneficiaries with services. [Citations; fn. omitted.] Also the argument proves too much. One may fairly assume that skills acquired in inpatient service centers of the hospital are equally as transferable to outpatient care." (Id., at p. 456.) The federal court concluded that time dedicated by interns and residents to outpatient clinic at the hospital constituted an educational cost for purpose of medicare program, yet the hospital was not entitled to 100 percent reimbursement. Rather it *280 was required to allocate cost of intern and resident programs to revenue producing departments served by that program, notwithstanding that outpatient clinic was an integrated part of inpatient facilities. (Pp. 454-457.)
Mercy relies upon St. John's Hickey Memorial Hospital v. Califano (7th Cir.1979) 599 F.2d 803, to support its contention that educational costs benefiting inpatient care are recoverable. In St. John's, supra, the federal court held a joint nursing education program (school for nurses) enhanced the quality of patient care at the St. John's Hospital "`by providing direct patient services....'" (Id., at p. 806; italics added.) The court reasoned "[t]he legislative history of the Medicare Act clearly shows that the Medicare Program was intended to pay its share of a hospital's cost of educational activities contributing to patient care...." (Id., at p. 808.) Contrary to the commissioner's finding, the federal court there held the educational costs were necessary for the hospital to meet its staffing needs and concluded that unless the claimed reimbursement was allowed, the burden of cost would fall on nonmedicare recipients in violation of 42 United States Code section 1395x(v)(1)(A).
In the midst of this most dense of statutory-regulation-case law thicket is a candle lighted by the federal appellate court in Mercy Hosp. & Medical Center, San Diego v. Harris, supra (9th Cir.1980) 625 F.2d 905, (tried sub nom. Mercy Hospital v. Califano) where the trial court had denied reimbursement of a similar claim by Mercy. The federal appeals court held (p. 906): "We reject the district court's reasoning that simply because patients are treated there Mercy could never establish that the costs of operating its outpatient clinic are reimbursable as educational costs. Nonetheless, we affirm the district court's grant of summary judgment affirming the Secretary's decision. That decision rested squarely on the Secretary's determination that Mercy's outpatient clinic is a revenue-producing center. Mercy charges the patients treated in the clinic for the services rendered to them. The regulations define revenue-producing centers in terms of whether charges for their services can be directly traced to particular patients and preclude reallocation of deficits where such is the case. Hence, Mercy's own billing practice precludes it from reallocating the clinic's cost whether it be deemed primarily educational or not." (Fn. omitted.)
In the federal court, Mercy contended it was arbitrary and capricious to apply the definitions of "usual patient care" (Soc. Sec. Manual HIM *281 15, § 502.2 where used for purposes of distinguishing between recoverable patient care costs and nonrecoverable research costs) in the context of educational activities without recognizing that a treatment program that is purely incidental to an educational program is equally distinguishable from usual patient care. (Mercy Hosp. & Medical Center, San Diego v. Harris, supra, 625 F.2d at pp. 908-909.) The federal appeals court agreed, stating: "Mercy's argument is persuasive. Because the mere presence of patients in research activities does not cause those activities to become usual patient care, by a parity of reasoning their presence in educational diagnosis and treatment planning activities should not, in itself, absolutely establish that those activities must be classified as usual patient care. A proper interpretation of HIM-15, § 502.2 as incorporated in § 402.2 should allow a hospital to avoid the apparent bar to allocating such costs as educational costs upon a showing that the patient care activities involved are primarily dictated by the objectives of an overriding educational program. The Secretary's failure to allow for such a showing is arbitrary." (Id., at p. 909; italics added.)
The appeals court (majority) went on to hold that Mercy's own accounting methods "precludes reallocation of Mercy's clinic costs" and suggested (by way of projective dicta) that Mercy could achieve reimbursement merely by "ceasing to charge" outpatients for outpatient clinic services. (P. 910.)
But continued the appeals court (p. 908): "The district court found that as long as any patient benefits directly from the services provided in the clinic, the costs of that service may not be reallocated to secondary beneficiaries as educational costs. This position is set forth in the Social Security Administrative Manual, HIM-15, which provides in § 402.2 that `The net cost of approved educational activities cannot include any cost of usual patient care as explained in § 502.2'" (Fn. omitted.)
In a most perceptive concurring opinion, Judge Sneed stated (p. 910): "I concur in the result reached by Judge Fitzgerald's opinion. However, I am reluctant to join in dicta that suggests that Mercy can achieve reimbursement merely by ceasing to charge all outpatients for outpatient clinic services. Perhaps under all the relevant facts presented by a particular case that would be a proper result; but it is better, I think, not to prejudge the issue. In addition, it is unnecessary, in my view, to charge *282 the Secretary with arbitrary conduct that does not control the judgment of this court. It would be more appropriate for us merely to suggest that it might be arbitrary under proper circumstances not to allow `a hospital to avoid the apparent bar to allocating such costs [educational diagnosis and treatment of planning activities] as educational costs upon a showing that the patient care activities involved are primarily dictated by the objectives of an overriding educational program.' See p. 909." (Italics added.)

IV
The basic flaw in the trial court's rationale is that it ignores certain regulations, creates conflicts in others. The federal regulations clearly and explicitly mandate reimbursement for "an appropriate part" of the net cost of an approved educational activity. (42 C.F.R. § 405.421(a). The Medicare regulations (42 C.F.R. § 405.421(b)(1), (c)) expressly find that training programs for interns and residents contribute to, enhance the quality of patient care within an institution.
Further, the federal regulations require accreditation for educational recovery (42 C.F.R. § 405.421) and accreditation for intern and resident programs such as Mercy's in turn requires outpatient care education to supplement inpatient experience and training. Thus, if the trial court is correct, in order to recover under 42 Code of Federal Regulations section 405.421, Mercy must have a nonreimbursable outpatient program  truly a Catch-22 situation is created.

V
The foregoing legal, logical and factual considerations compel these conclusions:
(1) 1. The fact that patients are treated at Mercy's outpatient clinic does not preclude recovery by Mercy of an appropriate part of the net cost of approved educational and training program for its interns, residents in training or physicians engaged in that learning-teaching process.
2. Any recovery must be predicated in the first instance upon a showing that "the patient care activities involved are primarily dictated by the objectives of an overriding educational program." (Mercy Hosp. & Medical Center, San Diego v. Harris, supra, p. 909; italics added.)
*283 3. The amount of recovery is not necessarily the net deficit of the outpatient clinic program, but rather only an "appropriate" part of the entire cost of that educational service.
(2) 4. The determination of that "appropriate part" is to be quantified having in contemplation the not inflexible nature of the statutory and regulatory language instructing that an appropriate part is the approximate portion of the total net costs that equals the portion of the hospital's total service that is provided to Medicare patients. The net cost of educational activities is defined as "the cost of approved educational activities (including stipends of trainees, compensation of teachers, and other costs), less any reimbursements from grants, tuition, and specific donations." (Providers Reimbursement Manual, § 402.2, quoted in Mercy Hosp. & Medical Center, San Diego v. Harris, supra, p. 907, fn. 3.)
5. That "appropriate part" when so determined is to be "allocated to various inpatient departments in the same proportion as resident and intern time is divided among those departments" and recoverable as a cost of inpatient service. (Id., at p. 908, fn. 4.)
(3) 6. The determination of the amount to be recovered as the "appropriate part" must encompass the concept that the cost of educational services allowed must not be passed on to nonbeneficiaries but at the same time recognizing that costs of services (as distinguished from cost of education) for nonbeneficiaries shall not be borne by the Medi-Cal program. (42 U.S.C.A. § 1395x(v)(1)(A)(i).)
(4) 7. Through its billing procedure, Mercy has already received a fixed fee for certain outpatient care under Medi-Cal (Cal. Admin. Code, tit. 22, § 51509, subd. (a)(1)). In arriving at an "appropriate part," such amount should be deducted from any carryover to the inpatient program. Mercy is entitled to reimbursement either as a cost of the federally funded educational program or as reimbursement of its federally funded service to indigent patients on outpatient care. To permit double reimbursement subsidizes the outpatient program in a manner never intended by the law or the regulations.
(5) 8. The determination of that "appropriate part" must recognize and resolve in favor of Mercy that dilemma posed by the federal regulations requiring accreditation by the appropriate medical authorities for *284 educational recovery and the fact that accreditation for the intern and resident in training program such as Mercy's requires outpatient care training and education to supplement inpatient services. To interpret the 42 Code of Federal Regulations section 405.425 as requiring Mercy to have a nonrecoverable outpatient program is to raise the specter of nonoperability of Mercy as a teaching hospital. Such a construction would result in a violation of the spirit of the federal laws and regulations specifically authorizing educational activities and payment therefor as well as the state laws and regulations enacted conformable thereto.
Judgment reversed and cause remanded with directions to the trial court to issue the writ of mandate to the California Department of Health Services requiring further hearing consistent with the views expressed herein.
Cologne, Acting P.J., and Wiener, J., concurred.
Respondent's petition for a hearing by the Supreme Court was denied March 25, 1981.
NOTES
[1]  A glossary of much used words may be helpful to an understanding of the problem:

(a) "Medicaid" means medical assistance provided under a state plan approved by title XIX of the Social Security Act (42 U.S.C.A. § 1396);
(b) "Medicare" means the health insurance program for the aged and disabled under title XVIII of the act (42 U.S.C.A. § 1395);
(c) "Medi-Cal" is California's designation for its federally assisted (tit. XIX) Medicaid program (Cal. Admin. Code, tit. 22 § 50003).
(d) "Provider" means any individual or entity (Mercy) providing Medicaid services under a provider agreement with the Medicaid agency  here Medi-Cal. (42 U.S.C.A. § 1395x (u).)
[2]  Other regulations aid in the measurement of the "appropriate part." For example 42 Code of Federal Regulations section 405.402(c)(1), provides in part: "An appropriate part of the net cost of approved educational activities will be included." 42 Code of Federal Regulations section 405.402(c)(9) provides the "[r]easonable cost of physicians' direct medical and surgical services (including supervision of interns and residents in the care of individual patients) rendered in a teaching hospital may be reimbursed as a provider cost (see § 405.465) where elected as provided for in § 405.521 of this Part."
