From e0ddd9ef40fc555d419294bb63722020187e9fc8 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Tue, 2 Jun 2026 02:22:47 -0400 Subject: [PATCH] feat(fusion_portal): Phase 2a - mobility scooter ADP type + power-mobility home-access rule Adds 'scooter' as a 4th ADP equipment type with a lean Express-form section (scooter type + max range) and the power-mobility home-accessibility hard rule (scooter + powerchair): "is the home usable inside and outside, no lifting?" - if No, prompts adding an accessibility item (ramp / porch lift). Captures x_fc_power_home_accessible + notes; the section toggles via the existing equipment-select JS; controller parses the new fields. NOT YET: ADP multi-device + combination rules (the bigger restructure). Untested locally (Enterprise dep) - to be verified on a westin-v19 clone. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../controllers/portal_assessment.py | 10 ++- fusion_portal/models/assessment.py | 26 ++++++++ .../views/portal_assessment_express.xml | 63 ++++++++++++++++++- 3 files changed, 96 insertions(+), 3 deletions(-) diff --git a/fusion_portal/controllers/portal_assessment.py b/fusion_portal/controllers/portal_assessment.py index 0c242f23..7a69d431 100644 --- a/fusion_portal/controllers/portal_assessment.py +++ b/fusion_portal/controllers/portal_assessment.py @@ -815,7 +815,15 @@ class AssessmentPortal(CustomerPortal): vals['wheelchair_type'] = kw.get('wheelchair_type') if kw.get('powerchair_type'): vals['powerchair_type'] = kw.get('powerchair_type') - + if kw.get('scooter_type'): + vals['scooter_type'] = kw.get('scooter_type') + if kw.get('scooter_max_range'): + vals['scooter_max_range'] = float(kw.get('scooter_max_range') or 0) + if kw.get('x_fc_power_home_accessible'): + vals['x_fc_power_home_accessible'] = kw.get('x_fc_power_home_accessible') + if kw.get('x_fc_power_home_access_notes'): + vals['x_fc_power_home_access_notes'] = kw.get('x_fc_power_home_access_notes') + # Float measurements float_fields = [ 'rollator_handle_height', 'rollator_seat_height', diff --git a/fusion_portal/models/assessment.py b/fusion_portal/models/assessment.py index 46441514..de288bee 100644 --- a/fusion_portal/models/assessment.py +++ b/fusion_portal/models/assessment.py @@ -45,6 +45,7 @@ class FusionAssessment(models.Model): ('rollator', 'Rollator'), ('wheelchair', 'Wheelchair'), ('powerchair', 'Powerchair'), + ('scooter', 'Mobility Scooter'), ], string='Equipment Type', tracking=True, index=True) # Rollator Types @@ -69,6 +70,31 @@ class FusionAssessment(models.Model): ('type_2', 'Adult Power Base Type 2'), ('type_3', 'Adult Power Base Type 3'), ], string='Powerchair Type') + + # ===== MOBILITY SCOOTER (ADP) — 2026-06 Phase 2 ===== + scooter_type = fields.Selection([ + ('travel_3', '3-Wheel Travel/Portable'), + ('travel_4', '4-Wheel Travel/Portable'), + ('standard_3', '3-Wheel Standard'), + ('standard_4', '4-Wheel Standard'), + ('heavy_duty', 'Heavy-Duty / Bariatric'), + ], string='Scooter Type') + scooter_max_range = fields.Float( + string='Maximum Range Needed (km)', digits=(10, 1), + help='Maximum distance the client needs the scooter to travel on a charge.', + ) + + # ===== POWER-MOBILITY HOME ACCESSIBILITY (ADP hard rule) ===== + # Applies to scooter + power wheelchair: ADP funds power mobility only if the + # device can enter and be used at the residence independently, without lifting. + x_fc_power_home_accessible = fields.Selection([ + ('yes', 'Yes — usable inside and outside independently'), + ('no', 'No — home needs accessibility work'), + ], string='Home accessible for power-mobility device?', + help='ADP will not fund a scooter / power wheelchair if the home cannot ' + 'take it (device left outside or in the garage). If No, the home ' + 'needs an accessibility product (ramp / porch lift).') + x_fc_power_home_access_notes = fields.Text(string='Home Access Notes') # ===== EXPRESS FORM: ROLLATOR MEASUREMENTS ===== rollator_handle_height = fields.Float(string='Handle Height (inches)', digits=(10, 2)) diff --git a/fusion_portal/views/portal_assessment_express.xml b/fusion_portal/views/portal_assessment_express.xml index d2a625d7..b265e5be 100644 --- a/fusion_portal/views/portal_assessment_express.xml +++ b/fusion_portal/views/portal_assessment_express.xml @@ -98,6 +98,7 @@ + @@ -688,8 +689,62 @@ + + +
+ + +
+ ADP funds power mobility only if the device can enter and be used at the residence independently, without lifting (not left outside / in the garage). If No, add an accessibility assessment (ramp / porch lift) for the home. +
+ +
- + + + + @@ -1278,6 +1333,7 @@ var rollatorForm = document.getElementById('rollator_form'); var wheelchairForm = document.getElementById('wheelchair_form'); var powerchairForm = document.getElementById('powerchair_form'); + var scooterForm = document.getElementById('scooter_form'); var wheelchairTypeSelect = document.querySelector('select[name="wheelchair_type"]'); var reasonSelect = document.getElementById('reason_for_application'); var previousFundingContainer = document.getElementById('previous_funding_date_container'); @@ -1339,13 +1395,16 @@ disableFormInputs(rollatorForm); disableFormInputs(wheelchairForm); disableFormInputs(powerchairForm); - + disableFormInputs(scooterForm); + if (value === 'rollator') { enableFormInputs(rollatorForm); } else if (value === 'wheelchair') { enableFormInputs(wheelchairForm); } else if (value === 'powerchair') { enableFormInputs(powerchairForm); + } else if (value === 'scooter') { + enableFormInputs(scooterForm); } }