Plan: Disability Status on Persons
Status
| Step | Description | Status |
|---|---|---|
1 |
Database migration adding disability_status column |
Done (2026-04-06) |
2 |
Update PersonRow, Person, CreatePerson, UpdatePerson models |
Done (2026-04-06) |
3 |
Update orchestrator fetch_household_context to check disability |
Done (2026-04-06) |
4 |
Downstream: SNAP ABAWD exemptions and certification period length |
Done (2026-04-06) |
5 |
Tests |
Done (2026-04-06) |
Epic: TBD
Issues: #285
Branch: feat/disability-status
Context
The persons model currently has no disability tracking. The orchestrator in services/canopy-eligibility/src/orchestrator.rs line 100 contains a comment // Check elderly (60+) — disability status tracked in #285 and only checks age >= 60 for the has_elderly_disabled_member flag (line 105-107). Disability status is never evaluated.
This gap affects multiple SNAP policy areas:
-
ABAWD exemptions (7 CFR 273.24): Disabled individuals are exempt from the 3-month time limit for able-bodied adults without dependents. Without disability tracking, all adults 18-49 are subject to ABAWD limits regardless of disability.
-
Certification period length (7 CFR 273.10): Households with elderly or disabled members may receive 24-month certification periods instead of 12 months. The renewals service cannot differentiate.
-
Excess shelter deduction cap (7 CFR 273.9(d)(6)(ii)): Households with elderly or disabled members are exempt from the shelter deduction cap. The rules engine input
has_elderly_disabled_membercurrently only reflects age, not disability. -
Medical expense deduction (7 CFR 273.9(d)(3)): Only elderly or disabled members' medical expenses are deductible. Without disability status, medical deductions may be incorrectly applied.
The PersonRow struct at services/canopy-persons/src/store/models.rs line 12 maps 1:1 to the persons table. Adding disability_status here flows through to the API response Person struct and the create/update DTOs.
Scope
In scope:
-
New
disability_statuscolumn on thepersonstable (nullable text, defaulting toNULLfor unknown/not-reported) -
Update
PersonRow,Person,CreatePerson,UpdatePersonstructs -
Update the orchestrator’s
fetch_household_contextto check disability status when computinghas_elderly_disabled_member -
Downstream: pass disability information into SNAP context for ABAWD exemption and certification period decisions
Out of scope:
-
Disability verification (SSA SOLQ/BINDEX integration) — separate verification concern
-
UI changes in canopy-web case detail — will consume the field from the API once added
-
Medicaid disability-based eligibility categories — Medicaid service is a stub
-
Changes to the JDM rulesets — the rules engine already receives
has_elderly_disabled_member; this plan ensures that flag is correctly computed
Design
Database migration
New migration in services/canopy-persons/migrations/:
-- Add disability_status to persons table.
-- Values: NULL (unknown/not reported), 'none', 'disabled', 'disabled_veteran'
-- Nullable because existing persons records have no disability data,
-- and applicants may decline to report.
ALTER TABLE persons ADD COLUMN disability_status TEXT;
No CHECK constraint on the column itself; validation happens at the API layer to allow future expansion without a migration.
Model changes
In services/canopy-persons/src/store/models.rs:
PersonRow (line 12): Add pub disability_status: Option<String> after language_preference.
Person (line 32): Add pub disability_status: Option<String> after language_preference.
PersonRow::into_person() (line 54): Map the new field through:
Person {
// ... existing fields ...
disability_status: self.disability_status,
// ...
}
CreatePerson (line 92): Add:
#[validate(length(max = 30))]
pub disability_status: Option<String>,
UpdatePerson (line 118): Add same field.
Update all SQL queries in services/canopy-persons/src/store/ that INSERT or SELECT from persons to include the new column.
Orchestrator changes
In services/canopy-eligibility/src/orchestrator.rs fetch_household_context() (line 97-109), update the elderly/disabled check:
if let Ok(resp) = person_resp
&& let Ok(person) = resp.json::<serde_json::Value>().await
{
// Check elderly (60+)
if let Some(birth) = person["date_of_birth"]
.as_str()
.and_then(|dob| dob.parse::<chrono::NaiveDate>().ok())
{
let age = (Utc::now().date_naive() - birth).num_days() / 365;
if age >= 60 {
has_elderly_disabled = true;
}
}
// Check disability status (#285)
if let Some(status) = person["disability_status"].as_str() {
if status == "disabled" || status == "disabled_veteran" {
has_elderly_disabled = true;
}
}
}
ApplicationContext propagation
The ApplicationContext struct in the orchestrator (line 192) and in services/canopy-snap/src/determine.rs (line 22) already has has_elderly_disabled_member: bool. Once the orchestrator correctly computes this flag including disability, the SNAP rules engine receives the correct value without further changes. The JDM ruleset already uses has_elderly_disabled_member for the shelter deduction cap exemption and medical expense deduction eligibility.
Steps
Step 1: Database migration
Files: services/canopy-persons/migrations/YYYYMMDDHHMMSS_add_disability_status.sql
Create migration adding disability_status TEXT column to persons table. Use ALTER TABLE persons ADD COLUMN disability_status TEXT;.
Step 2: Update model structs
Files: services/canopy-persons/src/store/models.rs, services/canopy-persons/src/store/mod.rs
-
Add
disability_status: Option<String>toPersonRow,Person,CreatePerson,UpdatePerson. -
Add
#[validate(length(max = 30))]toCreatePerson.disability_statusandUpdatePerson.disability_status. -
Update
PersonRow::into_person()to map the field. -
Update all SQL INSERT/UPDATE/SELECT queries in the store module to include
disability_status.
Step 3: Update orchestrator
Files: services/canopy-eligibility/src/orchestrator.rs
-
In
fetch_household_context(), after the age >= 60 check (line 106), add a disability status check againstperson["disability_status"]. -
Set
has_elderly_disabled = trueif disability_status is"disabled"or"disabled_veteran".
Step 4: Downstream SNAP integration
Files: services/canopy-snap/src/determine.rs (no changes needed — already receives has_elderly_disabled_member)
Verify that the SNAP determination correctly receives the updated has_elderly_disabled_member flag. The rules engine input at line 177 already includes this field. The JDM ruleset uses it for:
-
Shelter deduction cap exemption
-
Medical expense deduction eligibility
-
Net income test threshold selection
For ABAWD exemptions: the SNAP ABAWD tracking module in services/canopy-snap/src/ should check has_elderly_disabled_member or receive disability status directly. If ABAWD currently does not check this, add a guard in the ABAWD evaluation path.
Step 5: Tests
Files: services/canopy-persons/tests/persons_test.rs, services/canopy-persons/src/store/models.rs (unit tests), services/canopy-eligibility/src/orchestrator.rs (unit tests)
-
Integration test: Create person with
disability_status: "disabled", GET person, assert field is returned. -
Integration test: Update person to set
disability_status: "disabled_veteran", assert update persists. -
Integration test: Create person without disability_status, assert field is
nullin response. -
Unit test: Verify
PersonRow::into_person()maps disability_status correctly. -
Unit test: Verify orchestrator logic would set
has_elderly_disabledfor a disabled person under 60.
Files Touched
| File | Change |
|---|---|
|
New migration adding disability_status column |
|
Add disability_status to PersonRow, Person, CreatePerson, UpdatePerson |
|
Update SQL queries to include disability_status |
|
Check disability_status in fetch_household_context |
|
Integration tests for disability_status CRUD |
|
Updated compile-time query cache files |
Verification
-
cargo nextest run --workspace --lib— unit tests pass -
cargo xtask dev restart— devstack restarts with new migration -
cargo nextest run --workspace— integration tests pass -
Manual test: POST person with
disability_status: "disabled", verify determination markshas_elderly_disabled_member: trueeven for a 25-year-old -
cargo xtask test— full test battery passes