Plan Facts Parsing Analysis · v1
One plan with three per-class variables (benefit %, max benefit, tax treatment). The parser captures exactly those for each class and stores everything else as plan-level — matching Plansight's domain model.
Implements the domain model correctly.
An ST disability plan in Plansight is treated as one plan with three per-class variables: benefit percentage, maximum weekly benefit, and tax treatment. The parser captures exactly those for each class. Everything else is plan-level — taken from class 1 — which is intentional. The parser even comments this in line 3134: "Use the first class for the rest of the quote."
The three variables that differ per class.
| Variable | Quote field | Plan Facts source |
|---|---|---|
| Benefit percentage paid | stDisabilityBenefitPercentage-N | Benefit Schedule.[Class].Benefit Amount |
| Maximum weekly benefit | stDisabilityMaxWeeklyBenefit-N | Benefit Schedule.[Class].Benefit Maximum |
| Tax treatment | stDisabilityTaxFreeBenefit-N | Contributions.[Class].Tax Treatment |
Class label format observed: 1 - FTE, 2 - MGMT. Loop: PlanfactService.php:3094–3132.
All Plan Facts fields the ST parser captures into the Quote (per-class above; rest are plan-level via class 1).
| Plan Facts field | Quote field | Notes |
|---|---|---|
| Plan Name | name | Direct |
| Benefit Schedule.[Class].Benefit Amount | stDisabilityBenefitPercentage-N | Per-class |
| Benefit Schedule.[Class].Benefit Maximum | stDisabilityMaxWeeklyBenefit-N | Per-class; regex strips $ |
| Benefit Schedule.[Class].Benefit Minimum | stDisabilityMinimumWeeklyBenefit | Plan-level (class 1) |
| Benefit Schedule.[Class].Injury Elimination Period | stDisabilityInjuryEliminationPeriod | Plan-level |
| Benefit Schedule.[Class].Sickness Elimination Period | stDisabilityMaximumBenefitDuration | Plan-level |
| Benefit Schedule.[Class].Earnings Definition | stDisabilityEarningsDefinition | Plan-level |
| Contributions.[Class].Contribution Type | contributionVoluntary | Plan-level enum |
| Contributions.[Class].Tax Treatment | stDisabilityTaxFreeBenefit-N | Per-class |
| Participation.[Class].Minimum Enrolled Lives | stDisabilityParticipationRequirementsLives | Plan-level |
| Participation.[Class].Minimum Participation % | stDisabilityParticipationRequirementsPercentage | Plan-level |
| Definition of Disability.[Class].Definition of Disability | stDisabilityDefinitionOfDisability | Plan-level enum (Duties AND/OR/Only Income) |
| Definition of Disability.[Class].Earnings Test | stDisabilityEarningsTest + stDisabilityEarningTestElimPer | Plan-level |
| Definition of Disability.[Class].First Day Hospital | stDisabilityFirstDayHospital | Plan-level |
| Definition of Disability.[Class].Routine Pregnancy | stDisabilityRoutinePregnancy | Plan-level |
| Definition of Disability.[Class].Zero Day Residual | stDisabilityZeroDayResidual | Plan-level |
| Definition of Disability.[Class].Partial Disability Formula | stDisabilityPartialDisability | Plan-level (inverted: "total only" → "Yes") |
| Pre-existing Conditions.[Class].Look-back Period | stDisabilityPreExistingLimitationsMonthsLookback | Plan-level |
| Pre-existing Conditions.[Class].Exclusion Period | stDisabilityPreExistingLimitationsMonthsExclusion | Plan-level |
| Portability.[Class].Portability | stDisabilityPortability | Plan-level (implied) |
| FICA Match | stDisabilityFicaMatch | Global |
| W-2 Prep | stDisabilityW2Prep | Global |
| Rates.[Class].Composite Rate.Rate | Y19_Under + rateStructure = "Composite" | Plan-level (class 1 rates only) |
| Rates.[Class].Step-rates | Y19_Under, Y20_24, … Y70_Above | Plan-level (class 1 rates only) |
Plan Facts returns these per-class; Plansight stores them as plan-level (class 1's value is the plan value).
This is intentional, not a gap.
Plansight collapses disability plans into one plan with three per-class variables. Other fields — including rates, elimination periods, participation, definition of disability, etc. — are stored once per plan. Plan Facts returning per-class variation on these is information richer than the broker model needs.
Two small items worth a verify.
Inside the LT Disability parse method, the assignment for "Definition of Disability" appears to target stDisabilityDefinitionOfDisability (the ST field). It may be intentional shared usage — or it may be a copy-paste from the ST parser. Worth a quick check; if it isn't intentional, it's a one-line edit. (Listed here because it affects the ST field value during LT parsing.)
In app/Services/PlanfactService.php at around line 3676, inside parseQuoteLtDisability(), there's an assignment that writes to stDisabilityDefinitionOfDisability (the ST field) instead of ltDisabilityDefinitionOfDisability (the LT field). Please: 1. Open that line and confirm the field name being assigned. 2. If it's writing to the ST field, change it to the LT field name. 3. Then grep this file for any other places where the LT parser writes to an ST-prefixed field, or vice versa, in case there are similar copy-paste artifacts.
The Quote form asks for two more per-class fields beyond the canonical three: Benefit Change (Decrease / No Decrease) and Min Benefit Percentage. Confirmed by the team as effectively unused in practice. Candidates for removal in any future cleanup of the disability quote workflow.
I'd like to remove two unused per-class fields from the Short-Term Disability Quote form: - "Benefit Change" (Decrease / No Decrease) - "Min Benefit Percentage" Please: 1. Find the Blade template (or Vue/JS component) that renders the ST Disability quote form per-class inputs. 2. Find the Quote model field definitions for stDisabilityBenefitChange-N and stDisabilityMinBenefitPercentage-N (or similar names). 3. Show me what removing both would touch — form template, validation, parser logic, any Excel export, any presentation rendering — before making changes. Don't change anything yet, just produce the list.
Quote fields the form expects but Plan Facts doesn't return.
Reference: app/Console/Commands/QuoteUpdateForStDisabilityPS3190.php:127 describes the schema migration that introduced these fields.
Confirm whether the LT parser writing to stDisabilityDefinitionOfDisability is intentional. If not, one-line fix.
Steve confirmed Benefit Change and Min Benefit Percentage are effectively unused. If removed, the form gets simpler and the parse stays the same.
If Plan Facts returns differing elimination periods (or any plan-level field) per class, surface a small note: "Class 1 used as the plan value — review if needed." No data-model change.
| File | Lines | Purpose |
|---|---|---|
| app/Services/PlanfactService.php | 185–199, 230 | classes_override request; /std endpoint |
| app/Services/PlanfactService.php | 454 | parseQuote() dispatch to ST parser |
| app/Services/PlanfactService.php | 3061–3447 | parseQuoteStDisability() — full parser |
| app/Services/PlanfactService.php | 3094–3132 | Per-class loop |
| app/Services/PlanfactService.php | 3134–3137 | "Use the first class for the rest of the quote" |
| app/Http/Controllers/PlanfactsController.php | 165 | Stage parsed result on QuoteAi->aiResponseParsed |
| app/Http/Controllers/Rest/App/QuoteController.php | 501 | $model->fill($aiQuote->aiResponseParsed[$index]) |