The plaintiffs, Mary L. Perry and Catherine Rudow, are demented residents of nursing homes and through their legal guardians are seeking judicial review, pursuant to G.L.c. 30A, §14, of decisions rendered by the Division of Medical Assistance (D.M.A.) Board of Hearings, which denied their request for an allowance or deduction for guardianship expenses, authorized by the Probate Court, from their income in determining how much they are obliged to pay for their monthly nursing home care.3
BACKGROUND
The facts are undisputed and are taken from the records of each administrative proceeding, filed with the D.M.A.’s answers, as required by G.L.c. 30A, §14(4).
Mary L. Perry - In November, 1991, Mary L. Perry was a patient at the Cape Cod Hospital in Hyannis who no longer required hospitalization. Ms. Perry did need long-term nursing home care but could not be transferred from the hospital to a nursing home because she lacked the mental capacity to sign an admission contract. In addition, Ms. Perry could not complete an application for Medicaid benefits essential to pay for her care. It was, therefore, necessary to appoint a guardian for Ms. Perry so she could obtain the medical care ordered by her physician. On November 15, 1991 she was adjudged by the Barnstable County Probate Court to be incompetent and in need of a guardian.
In order to meet the primary requirement in guardianship proceedings, Ms. Perry’s treating physician completed a medical certificate in support of the petition to appoint a guardian. The Barnstable County Probate Court appointed Eileen Lopez as Ms. Perry’s guardian.
The guardian sought an order in the Probate Court for payment of attorneys fees and costs, to be paid from the income of the ward, for 10 hours at a rate of $65/hour prior to the appointment of a guardian and 2 hours/month thereafter. Pursuant to her authority *486under G.L.c. 206, §16, the Honorably Shirley R. Lewis entered an order that the requested fees and expenses be paid from the ward’s income and further ordered that the time spent on the legal affairs of the applicant be reported on the guardian’s annual fiduciary accounts, also subject to approval by the court. The guardian notified the D.M.A. of the Court’s order and requested a deduction from the resident’s income be made to determine the new PPA. The new PPA would be paid monthly to Cape End Manor Nursing Home by the guardian. The D.M.A. denied this request and disallowed the guardianship costs as a proper deduction. Later at a fair hearing, the D.M.A. determined that it could not permit a deduction for costs, including legal fees, associated with guardianship in determining the ward’s PPA.
Katherine Rudow - In February, 1992, Catherine Rudow was adjudged by the Barnstable County Probate Court to be incompetent and in need of a guardian at a time when she was a resident at Whitehall Manor Nursing Home in Hyannis, Massachusetts. The need for the immediate appointment of a guardian arose when the nursing home notified Ms. Rudow and her family that she would be discharged from the facility for nonpayment of her medical bill and failure to procure Medicaid to pay for her care. Ms. Rudow owned no home of her own and her medical condition required that she live in a skilled nursing facility where her medical care could be monitored. She was not mentally capable of consenting to medical care.
On February 25, 1992, the Barnstable County Probate Court appointed Martha T. Ramsey as Ms. Rudow’s guardian. Upon the petition of Ms. Ramsey, the Honorable Robert Terry ordered payment of attorneys fees to be paid from the income of the ward, for 10 hours at a rate of $65/hour prior to the appointment of a guardian, 10 hours at a rate of $50/hour to appeal a denial by the D.M.A. and 2 hours/month thereafter in accordance with G.L.c. 206, §16. The court further ordered that the time spent on the legal affairs of the applicant be reported on the guardian’s annual fiduciary accounts.
Ms. Ramsey notified the D.M.A. of the deduction for guardian expenses and requested that the PPA Ms. Rudow was to pay Whitehall Nursing Home be adjusted. The D.M.A. determined at a fair hearing that it could not permit a deduction from Ms. Rudow’s income for costs, including legal fees, associated with guardianship in determining her PPA.
In both cases, the D.M.A. denied the deductions for court-approved guardianship costs based on its interpretation of governing federal and state laws and regulations.
A Medicaid-eligible nursing home resident is obliged to turn over all of her income to the nursing home before Medicaid pays any subsidy to the facility. The only income which a resident is allowed to keep must be permitted by “allowances” such as the personal needs allowance (PNA) of $60 which the resident can keep and use for slippers, newspapers, non-prescription drugs, etc. Other allowances permit the resident to keep a portion of income to pay health insurance premiums, or an income allowance for a spouse at home, etc., and one allowance is one to which the plaintiffs contend they are entitled and which the defendants dispute. One additional allowance is for certain incurred medical or remedial expenses not covered by Medicaid, not subject to third-party payment and not included in the reimbursement rate to the nursing home. The genesis of this allowance is found in Federal and State law at 42 U.S.C. 1396a(r), 42 U.S.C. 435.725(c)(4), and 130 C.M.R 506.220(E) (2).
The plaintiffs contend that the costs associated with establishing and maintaining a valid and viable guardianship, which are authorized by the Probate Court, are medical necessities and therefore, a proper deduction from income when determining the PPA. The defendants contend that no such deduction for guardianship expenses is allowed.
DISCUSSION
The party appealing an administrative decision bears the burden of demonstrating the decision’s invalidity. Merisme v. Bd. of Appeals of Motor Vehicle Liab. Policies & Bonds, 27 Mass.App.Ct. 470, 474 (1989); Faith Assembly of God v. State Building Code Comm’n., 11 Mass.App.Ct. 333, 334 (1981), citing Almeida Bus Lines, Inc. v. Dept. of Pub. Utils., 348 Mass. 331, 342 (1965). In reviewing the agency decision, the court is required to give due weight to the agency’s experience, technical competence, specialized knowledge, and the discretionary authority conferred upon it by statute. Flint v. Comm'r. of Pub. Welfare, 412 Mass. 416, 420 (1992); Seagram Distillers Co. v. Alcohol Beverages Control Comm’n., 401 Mass. 713, 721 (1988); Quincy City Hospital v. Labor Relations Comm’n., 400 Mass. 745, 748-49 (1987).
The reviewing court may not substitute its judgment for that of the agency. Southern Worcester County Regional Vocational School District v. Labor Relations Comm’n., 386 Mass. 414, 420-21 (1982), citing Olde Town Liquor Stores, Inc v. Alcohol Beverages Control Comm’n., 372 Mass. 152, 154 (1977). A court may not dispute an administrative agency’s choice between two conflicting views, even though the court would justifiably have made a different choice had the matter come before it de novo. Zoning Board of Appeals of Wellesley v. Housing Appeals Comm’n., 385 Mass. 651, 657 (1982); Shamrock Liquors, Inc. v. Alcoholic Beverages Control Comm’n., 7 Mass.App.Ct. 333, 335 (1979).
The court may review and either affirm, reverse, remand, compel action or modify a state’s administrative decision if the court determines “that the substantial rights of any party may have been prejudiced because the agency decision is . . . (c) based upon an error of law . . .” G.L.c. 30A, §14(7).
*487The central issue is whether the plaintiffs are entitled to a deduction from their monthly income to pay for needed guardianship services, and more specifically, whether in these cases those services are “medical or remedial” within the meaning of governing law. Without a legal guardian, the plaintiffs may have gone without needed medical care due to their mental incapacity to assent to care and because they lacked the ability to pay for such care by virtue of their incapacity to obtain Medicaid.
The Medicaid program is a cooperative federal state cost sharing program codified at Title XIX of the Social Security Act. It is designed to enable each state to furnish medical assistance to aged, blind, disabled or dependent persons whose income is insufficient to meet the costs of necessary medical services. 42 U.S.C.A §1396.
As Medicaid eligible nursing home residents, the plaintiffs assert this right under 41 U.S.C. 1396(a)(r) which allows a deduction for:
necessary medical or remedial care recognized under State law but not covered under the State Plan under this subchapter, subject to reasonable limits the State may establish on the amount of these expenses
(r)(I)(ii) and Federal and State regulations promulgated thereunder (42 CFR 435.725 and 435.832) and 130 CMR 505.220(2), which provides:
“Deductions shall be allowed for necessary and remedial care expenses that the applicant or recipient has incurred that are not payable by a third parly. These expenses include medical or remedial care recognized under state law but not covered by the Medical Assistance Program.”
It is not disputed that costs of guardianship services are not covered by the Medicaid per diem rate paid to long-term care facilities. Nor will Medicaid pay for guardianship services directly, as it would for example, pay for a necessary taxi ride to a medical appointment, the latter being a covered expense under the “State Plan.” Nor is it disputed that guardianship expenses are not payable by a third party.
The disputed issue is whether the costs associated with guardianship (court fees and costs of publication and certified mail, costs of corporate sureties for the guardian’s bond, psychiatrist’s fees, attorneys fees, guardian’s fees) are medical expenses and, therefore, an allowable deduction in determining the plaintiffs PPA as permitted by 130 C.M.R. 506.220(E)(2).
Indigent persons have the right to medical care under Massachusetts law. The D.M.A. is the state agency charged with providing necessary medical services to Massachusetts residents whose assets and income meet the levels established by federal and state law.4
Guardianship costs, including legal fees and expenses, are required under Massachusetts law in order to provide treatment to persons who are demented. Massachusetts follows the doctrine of informed consent and of substituted judgment. When a person is determined by her physician to be demented and, therefore, incapable of giving informed consent to medical treatment, a guardian must be appointed to approve such medical treatment. If the proposed treatment is invasive or if it involves the administration of anti-psychotic medication to the ward, the court appoints counsel for the ward to make a determination by means of substituted judgment based upon an investigation of the ward’s expressed preferences and past actions.5 G.L.c. 201, § 6; Rogers v. Comm’r. of Public Health, 390 Mass. 489 (1983).
Furthermore, the Attorney General has promulgated regulations at 940 C.M.R. 4.08 which apply to nursing homes and require nursing homes to comply with the Federal Nursing Home Reform Act of 1987 (OBRA 1987) with respect to protections afforded nursing home residents. The regulations mandate that no psychotropic or anti-psychotic medication be administered to a demented nursing home resident unless a guardian is appointed by the Probate Court with authority to administer such treatment. The guardian must file treatment plans with the Probate Court and monitor the ward’s care on an ongoing basis to comply with the standards set forth in Rogers.
This court finds that the costs of guardianship must be characterized as “necessary medical expenses” when they are required under the doctrine of informed consent and when needed to furnish medical treatment to a demented nursing home resident.
Massachusetts Medicaid regulations at 130 C.M.R 506.220(E) provide that medical and remedial costs are properly deductible from the income of an institutionalized Medicaid recipient. When legal fees and costs associated with guardianship are necessary in order to authorize any medical treatment for an incompetent person under Massachusetts law, they are medical expenses, and as such are properly deductible from the income of an institutionalized Medicaid recipient pursuant to D.M.A. regulations at 130 C.M.R. 506.220.
A guardianship begins with a medical certificate which sets forth the relevant facts supporting the asserted necessity of a guardian. G.L.c. 201, §6. The only reasonable reading of 130 C.M.R. 506.220(E)(2) is that guardianship costs are deductions which qualify as necessary medical expenses. Concerning deductions for medical expenses, the regulation specifically provides:
(2) Incurred expenses
(a) Deductions shall be allowed for necessary and remedial care expenses that the applicant or recipient has incurred that are not payable by a third party. These expenses include medical or remedial care recognized under state law but not covered by *488the Medical Assistance Program. These expenses may include, but are not limited to, items listed in 130 C.M.R. 506.550(B)(1) through (4).
(b) These expenses shall be within reasonable limits as established by the Division. Expenses shall be considered to be within reasonable limits provided they are:
(i) not already covered by the Medicaid per diem rate paid to the long term care facility;
(ii) certified by a treating physician or other medical provider as being medically necessary.
Guardianship expenses are not covered by the Medicaid per diem rate paid to long-term care facilities and thus meet the first criteria of 130 C.M.R 506.220(E)(2)(b).
Since guardianship services are necessary to access medical care which is ordered by a proposed ward’s physician, the related costs meet the second criterion of 130 C.M.R 506.220(E)(2)(b). Pursuant to G.L.c. 201, §6, a guardianship may be ordered by the Probate Court when an affidavit is submitted by the proposed ward’s treating physician which sets forth the diagnosis and other factors necessitating guardianship. The foundation for the guardianship, therefore, is the treating physician’s medical affidavit.
Guardianship expenses are medical expenses which are not merely “recognized” under Massachusetts law, but are required, expenses when medical treatment is administered to a demented person. (Emphasis added.) Since they meet the criteria established by 130 C.M.R. 506.220(E)(2), the D.M.A. must permit the allowance of reasonable guardianship fees as a medical expense deduction from the monthly income of an institutionalized Medicaid recipient. The D.M.A. however, has the right to establish the reasonable limits for these necessary medical expenses consistent with 130 C.M.R 506.220(E)(2)(b).
The issue of whether guardianship expenses, including court costs and legal fees, qualify as medical expenses has been settled by case law and by a subsequent revenue ruling by the Internal Revenue Service. In Gerstacker v. Commissioner of Internal Revenue, the Court held that “where legal expenses are necessary to legitimate a method of medical treatment for mental illness” they are deductible as medical expenses. (See Gerstacker, supra at U.S. Court of Appeals, 6th Cir. No. 18870, 414 F.2d 548 (1969), Reviewing Tax Court 49 TIC. 522.) The Court recognized that the taxpayer’s medical care was dependent upon the creation of a guardianship. Since the legal expenses were necessary in order to authorize a method of medical treatment, they are properly deductible as medical expenses. The Gerstacker decision was adopted by the Internal Revenue Service in Revenue Ruling 71-281, 1971-2 CB 165.
In the instant cases, guardianship proceedings were initiated for no other reason than to obtain medical treatment for the plaintiffs at a long-term care facility. The legal expenses incurred in each situation, as in the Gerstacker case, were necessary in order to provide medical treatment to a demented person and therefore, should be characterized as necessary “medical expenses.”
In addition, the ongoing costs relating to overseeing the ward’s medical care and in obtaining Court authority to authorize the administration of anti-psychotic drug or extraordinary medical treatment for the ward (including any invasive procedure) must also be considered as medical expenses. However, as stated above, these expenses shall be ■within reasonable limits as established by the D.M.A. See 130 C.M.R 506.220(E)(2)(b).
The Health Care Financing Administration is a federal agency charged with interpreting federal law. The defendant cites HCF’s interpretation of federal law that guardianship expenses are not medical expenses as grounds for denying even a modest deduction in determining the PPA of an institutionalized Medicaid recipient. HCF’s position, however, is inconsistent with federal law concerning deductions from the income of an institutionalized Medicaid recipient and fails to take Massachusetts law into consideration. The federal law at 42 CFR 435.725 and 42 CFR 435.832 concerning post eligibility treatment of income provides that state agencies must deduct.
(4) (ii) Necessary medical or remedial care recognized under State law but not covered under trie State’s Medicaid plan, subject to reasonable limits the agency may establish on the amounts of such expenses.
The HCFA Regional Office letter dated May 10, 1994, merely states, “guardians fees are not considered medical or remedial expenses . . . for which Medicaid payment can be made.” It offers no explanation as to why these services are not considered a medical or remedial necessity. By determining that guardianship services are not medical or remedial, HCFA ignores both the federal regulatory provision concerning medical expenses which are recognized under Massachusetts law and the D.M.A. regulations at 130 C.M.R. 506.220(E) which provide for a reasonable deduction for medical expenses prescribed by a physician and not otherwise covered by the Medicaid Program or by a third party.
HCFA’s determination that guardians may not be reimbursed from the income of a Medicaid recipient ignores the obvious relationship between guardianship and medical treatment in situations such as those in these cases. Furthermore, it conflicts with federal and Massachusetts law which provides for such deductions. HCFA’s position, however, even if it were clear and consistent nationally, is not binding on this court.
In Haley v. Commissioner of Public Welfare, 394 Mass. 466 (1985) (and three companion cases), the Supreme Judicial Court determined that the Depart*489ment of Public Welfare could not argue that the interpretation by HCFA of federal law is binding on the courts. Although HCFA is a federal agency charged with interpreting the federal Medicaid statute, the court determined that its interpretation was not consistent with the specific federal provision under Title XIX which was at issue and disregarded the opinion of HCFA. Instead the court based its decision upon the applicable federal and Massachusetts law and ruled in favor of the plaintiffs because their argument was reasonable and consistent with the goals of Title X3X. Haley, supra.
This court holds that to deny any deductions for guardianship services, a pre-condition to medical care under Massachusetts law, is an error of law. Such costs must be considered medical or remedial and, subject to reasonable limits, must be allowed as a deduction from the plaintiffs income to determine their PPAs. Since the Probate Courts must approve such expenses and costs, and the D.M.Aitself may set reasonable limits, there would appear to be ample controls on such costs.
ORDER
For the foregoing reasons, it is hereby ORDERED that these matters be REMANDED to the Board of Hearings of the Division of Medical Assistance for further proceedings consistent with this opinion.
Nursing home residents who are Medicaid eligible must pay for their care at the facility by contributing a certain portion of their monthly income, called the Patient Paid Amount (PPA). The PPA consists of all of their monthly income except any amount allowed or deducted for other expenses, e.g., a personal needs allowance or an allowance to pay the premiums for Medicare supplemental health insurance.
These regulations were formerly issued at 106 CMR 501.000, et seq. They were revised and recodified under c. 130 during 1873 and the first half of 1994. Specifically, the regulations relevant to these proceedings were codified at 106 CMR 506.220 and are currently at 130 CMR 506.220.
If the ward is indigent, attorneys who are appointed by the Probate Court to represent the ward and to review a proposed treatment plan are paid by the Commonwealth. The court approves a certain number of hours and the attorney simply submits a payment voucher to the Office of the Comptroller. However, no funds are available to pay costs associated with bringing the guardianship petition.