[¶ 1] Dennis Stevens and Gilbert & Greif, P.A., appeal from a judgment of the Superior Court (Penobscot County, Anderson, J.) determining that the Construction Services Workers’ Compensation Group Self Insurance Trust (the Trust) was entitled to a workers’ compensation lien in the amount of $210,746.22, and that the Trust was not liable for its proportionate share of costs and attorney fees for suspended future workers’ compensation payments until those benefits accrue. On appeal, Dennis raises several issues, primarily arguing that the Superior Court erred by failing to reduce the amount of the lien by the Trust’s share of attorney fees and costs associated with the present value of the suspended future workers’ compensation payments. We vacate the judgment and remand for further proceedings.
I. BACKGROUND
[¶ 2] Dennis Stevens was employed at Thomas Dicenzo, Inc., when he suffered a work-related injury in April 2002. The *690injury was caused by the unexpected explosion of a machine part manufactured by Cedarapids, Inc. Because Thomas Dicenzo, Inc., was a member of the Trust, the Trust began payment of workers’ compensation benefits to Dennis in the amount of $459.62 per week. The record suggests that these payments were made voluntarily-
[¶ 3] Dennis brought a product liability suit against Cedarapids, alleging it was liable for his injuries, and his wife Joan asserted a claim for loss of consortium. The Stevenses were represented by the law firm of Gilbert & Greif, P.A. In June 2006, both claims were settled for a total value of $970,000, with 80% attributed to Dennis’s damages and 20% attributed to Joan’s loss of consortium claim.1 Pursuant to the terms of a structured settlement, Cedarapids paid Dennis and Joan a lump sum of $452,393.64, with the remaining $517,606.36 being used to fund an annuity that would pay Dennis monthly installments of $2550 for the remainder of his life. The Trust stopped making payments, or went “on holiday,” in August 2006 after Dennis received the settlement proceeds.
[¶ 4] In response to the settlement with Cedarapids, the Trust filed suit seeking a judgment declaring that Dennis must pay the Trust the amount of its statutory workers’ compensation lien, see 39-A M.R.S. § 107 (2009), less the Trust’s proportionate share of attorney fees and costs from the settlement proceeds, and that the Trust was entitled to receive the structured settlement payments until the lien was satisfied. The Trust also requested that the court declare that it was not responsible for paying its share of the attorney fees and costs associated with future benefits until the benefits accrue or until a final Board determination of the Trust’s future workers’ compensation liability became legally binding.
[¶ 5] Both parties filed motions for summary judgment. In response to the Trust’s motion, the Superior Court (Cud-dy, J.) concluded that there were no issues of material fact regarding the Trust’s general right to recover a workers’ compensation lien and granted a partial summary judgment for the Trust on that issue but also determined that genuine issues of material fact regarding the amount of the lien would proceed to trial. The court denied Dennis’s motion. Following a bench trial, the Superior Court {Anderson, J.) issued an order in December 2008 establishing the Trust’s lien and ordering that the Trust’s share of attorney fees and costs for future suspended workers’ compensation payments be paid as the benefits accrue.
[¶ 6] In its decision, the court applied the standard announced in McKeeman v. Cianbro Corp., 2002 ME 144, ¶ 17, 804 A.2d 406, 411, that “an employer’s proportionate share of fees and costs upon an employee’s settlement with a third party should be calculated with reference both to past benefits paid and future liability relieved, to the extent that it can be determined.” The court recognized the difficulty in applying the McKeeman standard in this case because the evidence did not establish the extent to which Dennis would be eligible to receive future benefits:
It is difficult to apply the general rule of McKeeman in the present case. While the employer’s proportionate share of costs and attorney’s fees can include both past benefits paid and future liability relieved, the proportionate share of the future liability relieved is only factored in “to the extent that it can be determined.”.... The evidence presented at trial was not sufficient to per*691mit the Court to make this determination because it is not know[n] at this time whether [Dennis] will be eligible to receive future benefits, and if eligible, what the eligibility period will be. Consequently, the only way that the court can determine [the Trust]’s proportionate share of costs and attorney fees related to future liability relieved is to require that [the Trust] pay its share as the benefit accrues periodically. The lien to which the [Trust] is entitled pursuant to section 107 is not reduced by this amount.
[¶ 7] The court determined that the total amount of past benefits paid by the Trust was $840,404.86, and that the Trust was entitled to a lien in that amount less its proportionate share of the attorney fees and costs.2 The Trust’s one-third share of the attorney fees was determined to be $113,468.28, and its proportionate share of the costs was $16,190.36. Subtracting these fees and costs from the total amount of past benefits resulted in a lien in the amount of $210,746.22.
[¶8] The court’s order also addressed the Trust’s assertion that if the funds remaining from the Stevenses’ settlement with Cedarapids were not sufficient to satisfy the lien, it should be entitled to receive the periodic payments from the annuitized portion of the settlement:
The [Trust] also requests that this Court declare that it is entitled to the periodic payments from [the] structured settlement annuity if the funds remaining from Mr. Stevens’ settlement with a third party are insufficient to cover the lien. The court is concerned that if it addresses this request it will be exceeding its powers related to declaratory judgment. Because this request could be viewed as an enforcement action in which debt collection issues could arise, it may properly require additional pleadings or hearing. The [Trust] is entitled to its lien; however, the Court does not at this time order that it be paid from annuity proceeds. Instead, the court requests that the parties confer further in an effort to settle the remaining payment issue. If those issues remain after the expiration of thirty days, either side may request that the court consider the issue and the court will decide whether it can or cannot be resolved on these pleadings, however this request must be made within 45 days, or this Order will constitute a final judgment.
[¶ 9] Because the parties were unable to settle the remaining issue, the court issued a supplemental decision in April 2009 that addressed whether the lien would attach to Dennis’s monthly annuity payments. The court found that the $452,393.64 lump sum payment was allocated as follows: “$323,333.33 as [Gilbert & Greifs] attorney’s fees, $82,925.08 held in escrow by [Gilbert & Greif], costs of $46,135.23,” and that “the only available cash that could be subject to the lien is the. escrowed $82,925.08.” The court determined that because the lien did not attach to the portion of the third-party settlement attributed to the loss of consortium claim, the lien attached to 80% of the amount held in escrow, and 80% of each annuity payment until the hen is fully satisfied:
The lien established by the court’s order of December 19, 2009 attaches to 80% of all 3rd party settlement proceeds remaining in the possession of Gilbert & Greif, P.A., and to the extent that such proceeds are not sufficient to satisfy the *692lien in full, the lien attaches to and the [Trust] is entitled to receipt of 80% of each payment from the annuity purchased with the 3rd party settlement proceeds until the lien amount is satisfied in full.
[¶ 10] As contemplated by the court’s order, the Trust would continue to issue a check to Dennis for the Trust’s attorney fees and costs related to the post-settlement holiday from paying benefits as each benefit payment would have accrued. This would mean that Joan would receive $16,585 from the escrowed lump sum and $510 per month from the annuity payments. Dennis would receive approximately $175 per week from the Trust in attorney fees and costs for as long as he remained entitled to receive workers’ compensation benefits but for the settlement. He would not be entitled to any escrowed funds or to receive any annuity payments until the hen is satisfied. This compares to the $459.62 per week Dennis had previously received in workers’ compensation benefits. The Trust would receive $66,340.06 from the escrowed lump sum and $2040 per month from the annuity payments, and the lien would be satisfied in about 5.9 years. This appeal followed.3
II. DISCUSSION
[¶ 11] Section 107 of the Workers’ Compensation Act establishes that if an employer pays or is liable for benefits under the Act, the employer “has a lien for the value of compensation paid on any damages subsequently recovered against the 3rd person liable for the injury.” 39-A M.R.S. § 107. Further, if the lien attaches, and “[i]f the employee or the employee’s beneficiary recovers damages from a 3rd person, the employee shall repay to the employer, out of the recovery against the 3rd person, the benefits paid by the employer under this Act, less the employer’s proportionate share of cost of collection, including reasonable attorney’s fees.” Id. The methods for calculating the compensation lien and the employer’s pro rata share of the costs of collection pursuant to 39-A M.R.S. § 107 are matters of statutory interpretation, and thus questions of law that we consider de novo. See McKeeman, 2002 ME 144, ¶ 7, 804 A.2d at 408; Harding v. Wal-Mart Stores, Inc., 2001 ME 13, ¶ 9, 765 A.2d 73, 75.
[¶ 12] Dennis contends that the court made several errors in connection with the lien, the most fundamental being its requirement that the Trust pay its proportionate share of attorney fees and costs periodically over time, specifically at the time of the accrual of each benefits payment from which it was relieved by the product liability settlement. Dennis asserts that the Trust should have been required to immediately account for its share of the attorney fees and costs through a reduction of the amount of its lien, with the Trust’s proportionate share of costs and attorney fees calculated based on the present value of the future benefits from which it is relieved. He also argues that because the court concluded that it lacked evidence sufficient to determine the Trust’s proportionate share of costs and attorney fees on future benefits, the court was compelled to conclude that the Trust failed to meet its burden of proof and should have found that Dennis was entitled to receive benefits indefinitely. Finally, Dennis argues that the court erred because it attached the portion of the lump sum that remained in escrow, which was legally Joan’s property due to her loss of consortium award.
*693A. Determination of Future Benefits
[¶ 13] We last considered issues associated with calculation of workers’ compensation liens in McKeeman, 2002 ME 144, 804 A.2d 406. That case concerned an employee who had died from a work-related accident. Id. ¶ 2, 804 A.2d at 407. His widow and their son began receiving workers’ compensation death benefits from the employer. Id. The widow brought a third-party action against Cianbro Corporation, which resulted in a settlement with a present value of $970,000. Id. The employer intervened in the third-party action and moved to enforce its lien pursuant to section 107. Id. ¶ 4, 804 A.2d at 408. The trial court established the lien amount based on the statutorily-fixed death benefits that are available to the survivors of an employee who dies from a work related injury.4 Id. ¶ 5, 804 A.2d at 408. The widow’s appeal presented the question of how to determine the employer’s proportionate share of the costs of settlement for purposes of applying section 107. Id. ¶ 6, 804 A.2d at 408. We held: “[A]n employer’s proportionate share of fees and costs upon an employee’s settlement with a third party should be calculated with reference both to past benefits paid and future liability relieved, to the extent that it can be determined.” Id. ¶ 17, 804 A.2d at 411 (emphasis added). In a footnote to this sentence, we “recognize [d] that, unlike the definite nature of death benefits payments as in this case, the determination of future liability to employers will often be a difficult process requiring a significant factual inquiry.” Id. ¶ 17 n. 5, 804 A.2d at 411.
[¶ 14] This case is the kind of difficult case that McKeeman anticipated. Although the Superior Court was required to assess the Trust’s “future liability relieved,” it was provided virtually no reliable evidence by either party with which to do so. Dennis’s sole witness was an attorney who practices in the areas of workers’ compensation law, social security law, and personal injury law. The court excluded the witness’s opinion regarding Dennis’s work capacity and the value of the future workers’ compensation benefits to which Dennis would be entitled, reasoning that the attorney lacked qualifications to render a disability assessment and to forecast the resulting workers’ compensation benefits that might result. The court acted well within its discretion in excluding this opinion testimony. An expert witness’s opinion may be excluded under Rule 702 if the court finds that it is not within the expert’s specialized knowledge. State v. MacDonald, 1998 ME 212, ¶ 7, 718 A.2d 195, 198. Such was the case here.
[¶ 15] The Trust offered no witnesses or exhibits on the issue of the future liability for which it has been relieved as a result of Dennis’s settlement with Cedara-pids. The record does suggest that the Trust had voluntarily paid benefits to Dennis up until the completion of the settlement, and had petitioned the Workers’ Compensation Board to determine Dennis’s entitlement to benefits due to its claim that Dennis has refused a bona fide offer of employment. Dennis had contested the petition, denying that he has refused any such bona fide offer. See 39-A M.R.S. § 214(1)(A) (2009).5 The proceeding be*694fore the Board was still pending at the time of the trial in the Superior Court, and the record suggests that it had been stayed at Dennis’s request pending the entry of a judgment in the lien action.6
[¶ 16] The Superior Court was fully justified in concluding that the evidence before it was insufficient to permit a judicial determination of the Trust’s future liability relieved by the settlement. Without a decision by the Board and without evidence presented by either party of the nature and extent of Dennis’s entitlement to future benefits in a case in which the employee claims to suffer from permanent incapacity, determining the Trust’s future liability relieved was not simply difficult, it was destined to be fruitless. The question remains: what consequences flow from this failure of proof?
B. Burdens of Production and Proof
[¶ 17] The judicial process imposes burdens of production of evidence and proof so that trial courts and juries will have a body of evidence to draw from and a standard to apply when determining facts and applying the applicable law to those facts. In this declaratory judgment action, the Trust bore the burdens of production and proof to establish the extent of its lien rights under 39-A M.R.S. § 107. As we have previously explained, “In a declaratory judgment action, the allocation of the burden of proof ... must be determined by reference to the substantive gravamen of the complaint.” Markley v. Semle, 1998 ME 145, ¶ 5, 713 A.2d 945, 947 (quotation marks omitted). Here, the Trust, as the party affirmatively seeking the protection of the lien statute, properly bore the burden of proof. See id.
[¶ 18] Because the Trust did not establish the amount of the future liability from which it had been relieved, it failed in its burden of proof, unless, as McKeeman recognized, the court also finds that that amount cannot be reasonably calculated. A determination as to an employee’s entitlement to benefits into the future — whether by the parties’ agreement, a decision of the Board, or a determination by the court based upon an adequate evidentiary record — is a necessary step to prove the total amount of a workers’ compensation lien pursuant to the McKeeman analysis. The Trust recognized this, asserting before the court that “[i]t is not possible to make a determination ... without resolving all of the issues that are currently pending before the Board” and that “the Workers’ Compensation Board, not the courts, is the appropriate forum for resolution of those issues.” The Trust was prevented, however, from satisfying its burdens of production and proof in this case, not because it *695was impractical to obtain a decision of the Board, but because the Board proceeding was stayed pending the court’s determination of this lien action. The process that resulted from these events had the effect of putting the proverbial cart before the horse.
[¶ 19] As a matter of both judicial economy and basic necessity, we hold that when: (1) the parties disagree as to an employee’s entitlement to future benefits; (2) there has been no determination of that question by the Board; and (3) the extent of future liability cannot readily be determined by the court on the record before it, it is essential that the parties obtain a decision from the Board. In such cases, the court should postpone a final determination of the lien claim and require the parties to obtain a decision from the Board, absent good cause not to require one.7 There is no good cause apparent from the record in this case.
C. Joan’s Loss of Consortium Award
[IT 20] In addition to the above-stated issues with the Superior Court’s judgment, further complications arise from Joan’s loss of consortium award. Our law does not attach a workers’ compensation lien to the portion of a settlement associated with a loss of consortium claim if that claim was expressly allocated in the settlement agreement. See Nichols v. Cantara & Sons, 659 A.2d 258, 260-61 (Me.1995); Dionne v. Libbey-Owens Ford Co., 621 A.2d 414, 417-18 (Me.1993). In this case, the settlement agreement clearly allocates 20% of the total settlement to Joan. Her award, less attorney fees and costs, totals $120,106.28. Dennis correctly notes that this award is her property and cannot legally be subject to the lien. See Dionne, 621 A.2d at 418. However, Joan was not joined in this action by any of the parties.
[¶ 21] Title 14 M.R.S. § 5963 (2009) states that when a declaratory judgment action is brought, “all persons shall be made parties who have or claim any interest which would be affected by the declaration and no declaration shall prejudice the rights of persons not parties to the proceeding.” See also Efstathiou u Payeur, 456 A.2d 891, 893 (Me.1983) (noting that joinder of all parties who have an interest in a declaratory judgment action is necessary under M.R. Civ. P. 19 to ensure effective and complete adjudication). In this case, Joan’s interest was clearly affected by the declaratory judgment issued.
[¶ 22] Although neither the parties nor the court identified this issue, we conclude that the relative rights of the parties should not be determined in Joan’s absence. See Ocwen Fed. Bank, FSB v. Gile, 2001 ME 120, ¶ 16, 777 A.2d 275, 281 (“Because we may take notice of the absence of a necessary party on our own accord, we need not address whether parties raised the joinder issue themselves.”).
[¶23] Accordingly, we vacate the declaratory judgment and remand this case for further proceedings. We recognize that the Superior Court’s task is complicated by the confused posture of this case resulting from the parties’ failure to address the lien before the finalization of the structured settlement. Once a final decision of the Board has been obtained, and Joan has been joined as a party, the Superior Court may receive and consider the Board’s decision, and, in its discretion, any additional evidence the parties might offer. The court must then decide whether the Trust’s proportionate share of attorney *696fees and costs relative to its future liability relieved can be reasonably determined. If that share can be determined, the court will arrive at a fixed amount for the hen and it must then determine whether the lien can and should be satisfied by existing funds previously received by Dennis and his attorneys, by a pan passu approach, as explained in the concurring opinion, or a combination of the two. If that share cannot be determined, a pari passu approach would be appropriate.
[¶ 24] Because we vacate the judgment for the reasons we have expressed, we do not address Dennis’s remaining claims of error.
The entry is:
Judgment vacated and remanded for further proceedings consistent with this opinion.
. The Trust was not a direct participant in the settlement.
. This amount represented the sum of the past benefits paid, totaling $334,414.86, and the taxi cab expenses paid by the Trust to transport Dennis to Boston for medical treatment, totaling $5990.
. Joan Stevens has not joined in these proceedings at any stage.
. In McKeeman, 2002 ME 144, ¶ 5, 804 A.2d at 408, the past and future death benefits were easily determined by the Superior Court because, pursuant to section 215, an employer must make death benefits payments to surviving dependents for the defined period of 500 weeks from the date of death. 39-A M.R.S. § 215(1) (2009).
. Title 39-A M.R.S. § 214(1)(A) (2009) provides:
*6941. Benefit determination. While the incapacity is partial, the employer shall pay the injured employee benefits as follows.
A. If an employee receives a bona fide offer of reasonable employment, from the previous employer or another employer or through the Bureau of Employment Services and the employee refuses that employment without good and reasonable cause, the employee is considered to have voluntarily withdrawn from the work force and is no longer entitled to any wage loss benefits under this Act during the period of the refusal.
. Dennis attempted to introduce into evidence a copy of his motion to dismiss or stay the petition to terminate benefits, arguing: “I presume that the argument, based upon the trial brief, that [the Trust] is making is that this Court should stay any decision until the later-filed action in the — before the comp commission is resolved. And I think the Court needs to be apprised of the fact that we had moved to stay the workers' comp proceeding, because there’s been some forum shopping here.” The Superior Court, noting that it "d[idn't] see how this document [was] admissible in this proceeding,” denied admission of the exhibit.
. Upon a finding of good cause, the court should proceed to decide the case based solely on the evidence offered by the parties.