G.Z., a twenty day old infant with congenital glaucoma in both eyes, underwent eye surgery that required several hours of general anesthesia. His treating physician admitted the infant for inpatient hospital care because he needed postoperative monitoring and to assure the correct positioning *806of his head to minimize the risk of bleeding or changes in in-traocular pressure.2 H.D. was seventeen years old and twenty-three weeks pregnant. She had pain in her right side and lower abdomen, had been treated for a urinary tract infection, and had experienced nausea and vomiting in the week prior to her admission. Her physician diagnosed hydronephrosis, a kidney condition resulting from obstruction of the flow of urine, and related complications. She was admitted for a likely stent placement, intravenous hydration, pain management, and because her physician believed that H.D.’s condition could significantly worsen because of her history.3
These are two of five cases of Medicaid patients in which the division of medical assistance (division) denied the treating hospital all reimbursement for the medical services provided to the patient.4 In each case the division undertook a retrospective evaluation of the admission decision and concluded that the patients had not required “inpatient” hospital care. The division did not dispute that the medical services were clinically necessary. The division nevertheless concluded that the services were not “medically necessary,” 130 Code Mass. Regs. § 450.204, because, in its judgment, each patient could have been treated as an “outpatient.”
Each hospital separately took an appeal to the division’s *807board of hearings (board), pursuant to 130 Code Mass. Regs. § 450.241. The hearing officer affirmed the denial of each claim. The hospitals filed separate actions in the Superior Court seeking review of the denials pursuant to G. L. c. 30A, § 14, and a declaration pursuant to G. L. c. 231A that the division’s administration of its utilization management program, known as the prepayment review program,5 conflicts with the Federal Medicaid program.6
On March 11, 1996, a judge in the Superior Court allowed the parties’ motion to consolidate. The parties filed cross motions for summary judgment, together with a stipulation of agreed facts and the administrative record. On July 10, 1997, a judge in the Superior Court granted the hospitals’ motion for summary judgment after a hearing, annulling the decision of the commissioner of the division of medical assistance in each case and ordering the division to pay each of the claims. The judge concluded that the prepayment review program, as currently administered with regard to its interpretation of “inpatient” and “outpatient” medical services, is an unlawful administrative agency procedure. Judgment entered on July 14, 1997. On August 15, 1997, the division filed a motion to amend the judgments, Mass. R. Civ. P. 59 (e), 365 Mass. 827 (1974), and to stay enforcement of the judgments pending appeal, Mass. R. Civ. P. 62, as amended, 423 Mass. 1409 (1996). The judge allowed the motion and entered an amended judgment on November 4, 1997. The amended judgment allowed the division to continue reviewing inpatient admissions under the prepayment review program, but required the division to reimburse providers at the outpatient rate, rather than denying all reimbursement, when it determined that an inpatient admission had not been medically necessary.
On December 23, 1997, the division filed separate notices of *808appeals of the judgment, the judge’s memorandum of decision and order, and the amended judgment. On April 8, 1998, the Appeals Court allowed the division’s motion to consolidate the cases. We granted the hospitals’ application for direct appellate review. We affirm the judgment of the Superior Court.
I. The Medicaid patients. We have summarized the case histories of two of the patients for whom reimbursement was denied. The denial of all reimbursement for medical services provided to three other patients is also challenged.
J. B. was a four year old child with a complex medical history including brain injury, severe neurodevelopmental delay, mental retardation, seizures, and severe gastric reflux. Shortly before his admission, he had developed renal failure and had pneumonia. He depended on a tracheotomy tube to breathe, and had suffered life-threatening respiratory distress after having his tracheotomy tube dislodged three months earlier. J.B. was admitted after his physician replaced his tracheotomy tube. His physician stated that admission was necessary due to J.B.’s reliance on the tracheotomy tube and “the significant difficulties encountered by his caretakers (family and home nurses) both that morning and in June” (emphasis in original). His physician also stated that J.B.’s “multiple systemic problems also raised concern regarding post-anesthesia effects, particularly in regards to his seizure disorder and renal failure status.”7 J.B. was discharged the following day.
S.P. was thirty-one years old with a history of severe migraine headaches. Her physician testified that he had attempted to treat S.P. in the emergency room prior to her admission. The physician had a long history of treating S.P. for migraines, and admitted S.P. to receive intramuscular injections of narcotics in part because he did not want to dispense narcotic medication on an outpatient basis. The treatment was unsuccessful, and S.P. was discharged after two days.
K. B. was a twenty-two year old single parent of a two year old child and was eight weeks pregnant when she was diagnosed with a right ectopic pregnancy. She underwent surgery for the removal of part of her fallopian tube. Although her treating *809physician testified that the procedure is often performed on an outpatient basis, he admitted K.B. because she did not come out of recovery until 11 p.m., and because he knew that she was the single mother of a young child and was concerned that there was no one available to care for her at home.8 She was discharged the following day.
2. The Medicaid regulations. The division employs the prepayment review program to determine the appropriateness of a provider’s decision to “admit” a Medicaid patient to the hospital as an “inpatient.”9 Division regulations do not define “inpatient” or “inpatient services.”10 The contract between the division and the hospitals states only that “[i]npatient services” are “[s]ervices reimbursable by the Division which are provided *810to recipients on an inpatient basis.” Division explanations of “outpatient” and “outpatient services” are equally devoid of content. Under division regulations, “[o]utpatient [s]ervices” are “services provided to recipients on an outpatient basis in hospital outpatient departments.” 130 Code Mass. Regs. § 410.402 (1994). A hospital outpatient department is “a department or unit within the physical framework of the hospital that operates under the hospital’s license and provides services to recipients on an outpatient basis. Hospital outpatient departments include day surgery units, primary care clinics, specialty climes, and emergency departments.”11 Id.
Once a provider submits a bill to the division for “inpatient” services, the division’s contractor, Massachusetts peer review organization (MassPRO)12 evaluates selected cases to determine whether the inpatient admission was “medically necessary.” The division’s regulation states:
“(A) A provider may furnish or prescribe medical services to a recipient, or cause a recipient to be admitted to an inpatient facility, only when, and to the extent, medically necessary. A service is ‘medically necessary’ if:
*811“(1) it is reasonably calculated to prevent, diagnose, prevent the worsening of, alleviate, correct, or cure conditions in the recipient that endanger life, cause suffering or pain, cause physical deformity or malfunction, threaten to cause or to aggravate a handicap, or result in illness or infirmity; and
“(2) there is no comparable medical service or site of service available or suitable for the recipient requesting the service that is more conservative or less costly. Medical services shall be of a quality that meets professionally recognized standards of health care, and shall be substantiated by records including evidence of such medical necessity and quality. Those records shall be made available to the Division upon request. . . .”13
130 Code Mass. Regs. § 450.204 (1997). MassPRO reviews approximately thirteen per cent of submitted claims annually. In the cases selected for review, a MassPRO nurse first examines the medical records, then either approves the admission or refers the case to a physician reviewer who may or may not be a specialist in the relevant field of medicine. If the physician reviewer denies the admission, providers may request internal reviews of the decision by physicians in the appropriate specialty. If MassPRO ultimately denies the admission, providers may then appeal to the division’s board of hearings. 130 Code Mass. Regs. § 450.241. The board may not assess the legality of the division’s regulations, and it accepts the division’s interpretation of its own regulations. 130 Code Mass. Regs. § 610.082(C)(2). If the board affirms the denial, providers are denied reimbursement for all of the medical services provided to the patient.14 130 Code Mass. Regs. § 415.414(B). They may neither receive reimbursement at the “outpatient” *812rate, nor resubmit the invoice for payment at the outpatient rate.15
In the five cases at issue the division did not dispute that the hospitals provided appropriate medical care under the first prong of the medical necessity regulation. 130 Code Mass. Regs. § 450.204(A)(1). The division also did not dispute that it was appropriate to provide the services at a hospital location and that in some cases the patient required overnight care. The division denied payment in each case after it concluded that the hospitals had not complied with the second prong of the medical necessity regulation, 130 Code Mass. Regs. § 450.204(A)(1), claiming that the hospitals could have treated each patient in a less expensive “outpatient” setting.
3. Inconsistency with Federal Medicaid standards. The hospitals argue that the prepayment review program, as currently administered by the division, conflicts with Federal Medicaid provisions for utilization review and with the specific Federal regulations defining inpatient and outpatient treatment.
Medicaid is a joint Federal and State program with the goal of providing medical assistance to those in financial need. G. L. c. 118E, § 9. Tarin v. Commissioner of the Div. of Medical Assistance, 424 Mass. 743, 746 (1997). A State that chooses to participate in the Medicaid program must comply with the Federal Medicaid Act and its implementing regulations. Id. The Federal statute provides that a “State plan for medical assistance must . . . provide such methods and procedures relating to the utilization of, and the payment for, care and services available under the plan ... as may be necessary to safeguard against unnecessary utilization of such care and services and to assure that payments are consistent with efficiency, economy, and qual*813ity of care.” 42 U.S.C. § 1396a(a)(30)(A). Consistent with that obligation, the commissioner appropriately has established a Medicaid utilization management program — the prepayment review program — and has promulgated regulations with respect thereto. See Tarin v. Commissioner of the Div. of Medical Assistance, supra at 746; Youville Hosp. v. Commonwealth, 416 Mass. 142, 146 (1993). Generally, we accord such regulations the same deference we extend to statutes, American Family Life Assur. Co. v. Commissioner of Ins., 388 Mass. 468, 477, cert. denied, 464 U.S. 850 (1983), and limit our determination to whether the State action is “arbitrary, capricious, or contrary to law.” Tarin v. Commissioner of the Div. of Medical Assistance, supra at 750, quoting Massachusetts Hosp. Ass’n v. Department of Pub. Welfare, supra at 652. To that end we “apply all rational presumptions in favor of the validity of the administrative action,” American Family Life Assur. Co., supra at 477, quoting Consolidated Cigar Corp. v. Department of Pub. Health, 372 Mass. 844, 855 (1977). See Thomas v. Commissioner of the Div. of Medical Assistance, 425 Mass. 738, 746 (1997).
There is no question that the division has the authority to deny reimbursement for services that are “unnecessary,” 42 U.S.C. § 1396a(a)(30)(A) or, as described in the Massachusetts regulation, not “medically necessary.” But for purposes of review of the cases at issue here, the division fails to define “[mjedical [njecessity” in any meaningful manner. 130 Code Mass. Regs. § 450.204 (1997). The “medical necessity” regulation, itself, appears straightforward. However, providers are required to determine on a case-by-case basis in what hospital setting medically appropriate treatment must be provided to a patient who requires overnight or short-term hospital treatment lasting longer than twenty-four hours. Thus, for health care providers to understand the meaning of “comparable medical service or site of service . . . that is more conservative or less costly,” 130 Code Mass. Regs. § 450.204(A)(2), they must also comprehend the difference between the meaning of the term “[ojutpatient” services, 130 Code Mass. Regs. § 410.402, and the term “ [ijnpatient” services, as those terms are used to elucidate a service that is “more conservative or less costly.” 130 Code Mass. Regs. § 450.204(A)(2) (1997). The division does not define the term “inpatient,” nor does it describe the level of medical acuity that determines in what circumstances an inpatient admission is appropriate. The definition of *814“[o]utpatient” services in turn is circular: outpatient services are “services provided to recipients on an outpatient basis in hospital outpatient departments.” 130 Code Mass. Regs. § 410.402. See text accompanying notes 10 and 11, supra at 809-810.
In contrast, the Federal counterparts to the Massachusetts regulation define “inpatient” and “outpatient” settings based on the actual or anticipated duration of service. See notes 10 and 11, supra. The division’s regulations need not be identical to the Federal counterparts. Indeed, those Federal regulations contemplate that a participating State will devise its own scheme. But the division must comply with the Federal statutory mandate to provide utilization review that “assure[s] that payments are consistent with efficiency, economy, and quality of care.” 42 U.S.C. § 1396a(a)(30)(A). It may not implement a utilization review program that is so lacking in standards as to be arbitrary. If the division refuses to pay for services that are medically appropriate but performed in the wrong setting, it is incumbent on the division to define the appropriate setting with clarity.
The five cases under review here illustrate starkly the problem confronted by the hospitals, and the division’s capricious denials of reimbursement. The review by the division of each inpatient admission did not focus on the appropriateness of the medical services provided: the division did not dispute that in each case the hospital rendered appropriate medical care, that the care was provided appropriately in a hospital setting, and that in some cases the patient required overnight care. The utilization review also did not depend on the application of medical judgment to individual facts. Rather, the division retrospectively determined, in light of a particular patient’s outcome, whether treatment could, in circumstances where the patient did not have postoperative complications, have been provided on an “outpatient” basis.16 In each case the division also based its decision on a retrospective evaluation of what each patient’s ailments “typically” require; the evaluations did *815not take into account the physician-assessed risk to the particular patient at the time of admission. Had any of the five patients required acute treatment services during their overnight hospitalization, there can be little doubt that the division would not have declined reimbursement retrospectively.
The division’s reliance on hindsight judgment and “average” or “typical” treatment requirements poses particular problems for patients, such as these, who have complicated medical histories, and are at risk for developing complications. The division ignored the determination by each patient’s physician that inpatient hospitalization was appropriate because of the unique requirements of that patient, rather than what a typical, or average, patient would require. That these at-risk patients had uneventful recoveries should not impact the determination whether a decision made at the time of admission was appropriate. As interpreted by the division, the regulations permit it to justify the denial of reimbursement for any short inpatient hospital stay where a patient has an uneventful recovery, regardless of the risk to the patient at the time of admission.17 SJP.’s case is illustrative. S.P. received injections of a narcotic every four hours in an attempt to break her migraine headache. At the board hearing, the division witness, a physician, stated:
“We’re saying that it did not require the hospital setting and could have been performed in a less-than-acute or what we call hospital setting, inpatient setting .... If you want a definition of what inpatient or acute hospital setting is, then I’ll refer you to the division for that rather than me give you that because there may be some disagreement to what exactly that is or isn’t.”
The hospital’s attorney asked MassPRO’s representative if she was
“suggesting that [S.P.] should have been evaluated in the Emergency room, given the Demerol, sent home, came back to the hospital, given the Demerol again, sent home, come back to the hospital or is it a situation where you would agree that it was appropriate to get the Demerol in *816the hospital, but that should have not been called an inpatient admission?”
MassPRO’s representative responded:
“We are not specifying that the patient needed to leave the hospital specifically, but that this could have been managed in the hospital outpatient setting or other outpatient settings . . . . It’s not our side to determine which outpatient setting, but certainly the hospital does have an outpatient setting of its own, and we are not suggesting that the patient neéded to be treated at home.”
The division’s standardless regulation, with its imposition of a severe all-or-nothing penalty on providers who render appropriate treatment in the “wrong” setting, is fatal to the division’s defense of its regulatory scheme. The division may impose sanctions on providers who seek reimbursement for medical services that were not necessary — either because they should not have been performed at all, or because the services could have been provided appropriately in a less costly manner, G. L. c. 118E, § 7. But the division may only do so if it defines the terms on which the sanctions will be based.18 As implemented, the regulation punishes providers who have not acted wastefully or fraudulently for rendering medically appropriate services. The denial of all reimbursement for these services “cannot by any reasonable construction be interpreted in harmony with the legislative mandate,” American Family Life Assur. Co. v. Commissioner of Ins., 388 Mass. 468, 477 (1983), *817quoting Consolidated Cigar Corp. v. Department of Pub. Health, 372 Mass. 844, 855 (1977), of “assuring] that payments are consistent with efficiency, economy, and quality of care.” 42 U.S.C. § 1396a(a)(30)(A).
4. Conclusion. The division may operate on a case-by-case basis to determine the appropriate level of care, defined in some meaningful way, and allow reimbursement at that level, provided there is adequate review of its decision. Or it may promulgate clear rules and deny all reimbursement to providers who seek reimbursement at levels not in compliance with those rules. What it may not do is promulgate criteria that are essentially tautological or meaningless, review claims on a case-by-case basis, and then deny all reimbursement to providers who have acted in good faith and guessed wrong. Whether or not such a scheme violates due process, it does not comport with the mandate of the Federal statute that utilization review standards must “assure that payments are consistent with efficiency, economy, and quality of care.” 42 U.S.C. § 1396a(a)(30)(A). So much of the amended judgment as annuls the decisions of the board of hearings because the medical necessity regulation, as implemented through the prepayment review program, conflicts with Federal Medicaid requirements, is affirmed. This case is remanded to the Superior Court for further proceedings consistent with this opinion.
So ordered.
G.Z.’s treating physician stated:
“The care of our infant children requiring glaucoma surgery is highly specialized .... The patient is at a greater- risk for injury and bleeding secondary to hypotony if the patient is discharged immediately following surgery or the day of surgery. The initial twenty-four hours following surgery is the highest risk time for complications to occur.”
H.D.’s treating physician stated:
“I don’t think [a] 23-week OB patient who has severe pain enough to require the stent and nausea and vomiting can be handled as an outpatient. If I had to do it again, I’d admit her because we can’t manage someone who can’t take in fluids, who’s pregnant, that has a kidney problem, without observing them and without taking care of the nausea and vomiting which was taken care of by making her [take nothing by mouth].”
The division denied two claims of the Massachusetts Eye and Ear Infirmary (Mass. Eye & Ear) and three of Melrose Wakefield Hospital (Melrose Wake-field) (collectively, the hospitals).
The prepayment review program is a Medicaid utilization management program, described by the division’s regulations at 130 Code Mass. Regs. §§ 450.211 et seq.
The hospitals also requested a declaration that the division’s prepayment review program is unconstitutionally vague and violative of their right to substantive due process of law under the Fourteenth Amendment to the United States Constitution as well as arts. 10, 11, and 12 of the Declaration of Rights of the Massachusetts Constitution. For the reasons discussed below, we reach neither the constitutional claims nor the issue whether the hearing officer’s decisions were supported by substantial evidence.
The physician stated: “Based on the circumstances of the patient’s clinical presentation, the patient’s quite complex medical background, the potential adverse systemic effects of anesthesia specific to this child, and his airway obstruction risk, it was my intent at the time of admission to admit this patient for postoperative overnight monitoring at the Hospital.”
The physician who performed the procedure had also treated K.B. throughout the course of her pregnancy. K.B.’s grandmother cared for K.B.’s two year old child while she underwent the procedure. Although a nursing assessment indicated that K.B. stated on the day she was admitted that she had help on discharge, her physician testified that he was not aware of this at the time he admitted her. In any event, the record was unclear whether the grandmother was available at so late an hour of the night.
For a description of the Medicaid program in Massachusetts, see Tarin v. Commissioner of the Div. of Medical Assistance, 424 Mass. 743, 746-750 (1997).
“Federal regulations do contain such definitions. An inpatient is defined as “a patient who has been admitted to a medical institution as an inpatient on recommendation of a physician or dentist and who —
“(1) Receives room, board and professional services in the institution for a 24 hour period or longer, or
“(2) Is expected by the institution to receive room, board and professional services in the institution for a 24 hour period or longer even though it later develops that the patient dies, is discharged or is transferred to another facility and does not actually stay in the institution for 24 hours.”
42 C.F.R. § 440.2(a). The division does not rely on the Federal definition.
Inpatient hospital services are defined in the Federal regulations as “services that —
“(1) Are ordinarily furnished in a hospital for the care and treatment of inpatients;
“(2) Are furnished under the direction of a physician or dentist; and “(3) Are furnished in an institution that —
“(i) Is maintained primarily for the care and treatment of patients with disorders other than mental diseases; *810“(ii) Is licensed or formally approved as a hospital by an officially designated authority for State standard-setting;
“(iii) Meets the requirements for participation in Medicare as a hospital; and
“(iv) Has in effect a utilization review plan, applicable to all Medicaid patients, that meets the requirements of § 482.30 of this chapter, unless a waiver has been granted by the Secretary.”
42 C.F.R. § 440.10(a).
“Federal regulations, in contrast, define “[o]utpatient” as “a patient of an organized medical facility, or distinct part of that facility who is expected by the facility to receive and who does receive professional services for less than a 24-hour period regardless of the hour of admission, whether or not a bed is used, or whether or not the patient remains in the facility past midnight.” 42 C.F.R. § 440.2(a) (1998).
The parties stipulated that, under regulations in effect at the time the division denied payment, some requests for payment of inpatient services undergo prepayment review “to evaluate, after the hospitalizations but prior to payment, the medical necessity of the services delivered, the appropriateness of invasive procedures, the stability of the recipient at the time of discharge, and the quality of care provided.” The division contracts with MassPRO to provide the medical review portion of the prepayment review program.
The division has modified the language of this regulation since the present dispute arose. The parties agree that the modifications up to the time of the appeal have no effect on the issues presented for review. Effective December 1, 1998, the division again modified the regulation. See 130 Code Mass. Regs. § 450.204 (1998). The parties have not made any reference to the latest changes.
Title 130 Code Mass. Regs. § 415.414(B) states: “If, as the result of a review, the Division or its agent denies an admission to an acute inpatient hospital, the Division will not pay for any part of the hospital episode, including the day of admission and any days thereafter” (emphasis added).
General Laws c. 118G, § 11, provides: “All rates of payment to acute hospitals and non-acute hospitals under Title XIX shall be established by contract between the provider of such hospital services and the division of medical assistance . . . .” General Laws c. 118G, § 11, inserted by St. 1996, c. 151, § 275, and currently in effect, replaced G. L. c. 6B, § 2, which was repealed in 1996. General Laws c. 6B, § 2, was in effect at the time the hospitals provided the disputed services. Chapter 6B, § 2, stated: “All rates of payment to acute hospitals under Title XIX of the Federal Social Security Act shall be established by contract between the provider of acute hospital services and the department of public welfare . . . .” Generally, hospitals receive a fixed amount for each inpatient admission of between one and twenty days, regardless of the length of stay or treatment provided. Reimbursement for outpatient services is typically lower than it is for inpatient services.
The division claims that in reviewing each case, it relied for its determination on information available to the treating physician and contained in each patient’s file. Whatever the validity of that claim, the division nevertheless took into account the posttreatment, actual outcome of each patient’s care, a utilization mechanism plainly inconsistent with the Federal approach that relies on actual or anticipated duration of any hospital stay.
Between August, 1994, and April, 1996, in only two out of 104 administrative hearing reviews was a decision by the division to deny reimbursement for inpatient services reversed.
A regulatory scheme that penalizes providers for rendering unnecessary medical services is not impossible to implement. For example, in Episcopal Hosp. v. Commonwealth Dep’t of Pub. Welfare, 107 Pa. 272 (1987), a Pennsylvania court upheld a regulation denying all reimbursement for medically necessary inpatient services because they could have been rendered in a “short procedure unit”; Pennsylvania Medicaid regulations specifically defined “[d]ay of inpatient hospital care," “[i]npatient hospital services,” and “[hjospital admission.” Id. at 276-277. However, in Hultzman v. Weinberger, 495 F.2d 1276 (3d Cir. 1974), the United States Court of Appeals for the Third Circuit reversed a denial of Medicare coverage for inpatient hospital services where the United States Secretary of Health, Education and Welfare had concluded that the services were not necessary because they could have been provided in a less costly setting. Id. at 1282. In that case, the court concluded that the denial was improper because the construed statute did not specify that treatment could be found medically unnecessary if it could have been provided in a less costly setting. Id.