Skip to content

Commit 5645d75

Browse files
authored
99889 [Bug] Debt Team 5655 is mis-categorizing some forms (#20224)
1 parent 3ee29c4 commit 5645d75

File tree

7 files changed

+866
-29
lines changed

7 files changed

+866
-29
lines changed

modules/debts_api/lib/debts_api/v0/fsr_form_transform/streamlined_calculator.rb

+11-8
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@
44
require 'debts_api/v0/fsr_form_transform/income_calculator'
55
require 'debts_api/v0/fsr_form_transform/asset_calculator'
66
require 'debts_api/v0/fsr_form_transform/enhanced_expense_calculator'
7+
require 'debts_api/v0/fsr_form_transform/utils'
78

89
module DebtsApi
910
module V0
1011
module FsrFormTransform
1112
class StreamlinedCalculator
13+
include ::FsrFormTransform::Utils
1214
VHA_LIMIT = 5000
1315

1416
def initialize(form)
1517
@form = form
1618
@gmt_data = @form['gmt_data']
1719
@income_data = DebtsApi::V0::FsrFormTransform::IncomeCalculator.new(form).get_monthly_income
1820
@asset_data = DebtsApi::V0::FsrFormTransform::AssetCalculator.new(form).transform_assets
19-
@enhanced_expense_calculator =
20-
DebtsApi::V0::FsrFormTransform::EnhancedExpenseCalculator.new(form).transform_expenses
21+
@enhanced_expense_calculator = DebtsApi::V0::FsrFormTransform::EnhancedExpenseCalculator.new(
22+
re_camel(form)
23+
).transform_expenses
2124
end
2225

2326
def get_streamlined_data
@@ -64,17 +67,17 @@ def total_debt
6467
def streamlined_short_form?
6568
return false unless eligible_for_streamlined? && income_below_gmt_threshold?
6669

67-
asset_waiver_low_liquid_assets = streamlined_waiver_asset_update? && are_liquid_assets_below_gmt_threshold?
68-
cash_below_gmt_threshold? || asset_waiver_low_liquid_assets
70+
if streamlined_waiver_asset_update?
71+
are_liquid_assets_below_gmt_threshold?
72+
else
73+
cash_below_gmt_threshold?
74+
end
6975
end
7076

7177
def streamlined_long_form?
7278
return false unless eligible_for_streamlined? && are_liquid_assets_below_gmt_threshold?
7379

74-
meets_streamlined_long_form_common_conditions =
75-
!income_below_gmt_threshold? && income_below_upper_threshold? && income_below_discretionary_threshold?
76-
77-
meets_streamlined_long_form_common_conditions || streamlined_waiver_asset_update?
80+
!income_below_gmt_threshold? && income_below_upper_threshold? && income_below_discretionary_threshold?
7881
end
7982

8083
def eligible_for_streamlined?
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
{
2+
"view:enhanced_financial_status_report": true,
3+
"view:streamlined_waiver": true,
4+
"view:streamlined_waiver_asset_update": true,
5+
"view:review_page_navigation_toggle": true,
6+
"view:show_updated_expense_pages": true,
7+
"questions": {
8+
"has_repayments": false,
9+
"has_credit_card_bills": false,
10+
"has_recreational_vehicle": false,
11+
"has_vehicle": false,
12+
"has_real_estate": true,
13+
"is_married": false,
14+
"has_dependents": "0",
15+
"has_been_adjudicated_bankrupt": false,
16+
"vet_is_employed": true
17+
},
18+
"view:components": {
19+
"view:contracts_additional_info": {},
20+
"view:rec_vehicle_info": {},
21+
"view:marital_status": {},
22+
"view:veteran_info": {},
23+
"view:dependents_additional_info": {},
24+
"view:va_benefits_on_file": {}
25+
},
26+
"assets": {
27+
"real_estate_value": "200000",
28+
"monetary_assets": [
29+
{
30+
"name": "Cash on hand (not in bank)",
31+
"amount": "10000"
32+
},
33+
{
34+
"name": "Cash in a bank (savings and checkings)",
35+
"amount": "10000"
36+
}
37+
]
38+
},
39+
"benefits": {
40+
"spouse_benefits": {}
41+
},
42+
"personal_data": {
43+
"date_of_birth": "1950-09-06",
44+
"telephone_number": "4445551212",
45+
"email_address": "[email protected]",
46+
"spouse_full_name": {},
47+
"veteran_full_name": {
48+
"first": "Travis",
49+
"last": "Jones",
50+
"middle": "D"
51+
},
52+
"veteran_contact_information": {
53+
"email": "[email protected]",
54+
"mobile_phone": {
55+
"area_code": "510",
56+
"country_code": "1",
57+
"created_at": "2020-06-12T16:56:37.000+00:00",
58+
"extension": "",
59+
"effective_end_date": null,
60+
"effective_start_date": "2020-07-14T19:07:45.000+00:00",
61+
"id": 146766,
62+
"is_international": false,
63+
"is_textable": null,
64+
"is_text_permitted": null,
65+
"is_tty": null,
66+
"is_voicemailable": null,
67+
"phone_number": "9224444",
68+
"phone_type": "HOME",
69+
"source_date": "2020-07-14T19:07:45.000+00:00",
70+
"source_system_user": null,
71+
"transaction_id": "92c49d39-22b2-4bd6-92b4-0b7e7c63c6a9",
72+
"updated_at": "2020-07-14T19:07:46.000+00:00",
73+
"vet360_id": "1273780"
74+
},
75+
"address": {
76+
"address_line1": "1200 Park Ave",
77+
"address_line2": "c/o Pixar",
78+
"address_pou": "CORRESPONDENCE",
79+
"address_type": "DOMESTIC",
80+
"city": "Emeryville",
81+
"country_name": "United States",
82+
"country_code_iso2": "US",
83+
"country_code_iso3": "USA",
84+
"country_code_fips": null,
85+
"county_code": null,
86+
"county_name": null,
87+
"created_at": "2020-05-30T03:57:20.000+00:00",
88+
"effective_end_date": null,
89+
"effective_start_date": "2020-07-10T20:10:45.000+00:00",
90+
"id": 173917,
91+
"province": null,
92+
"source_date": "2020-07-10T20:10:45.000+00:00",
93+
"source_system_user": null,
94+
"state_code": "CA",
95+
"transaction_id": "7139aa82-fd06-45ea-a217-9654869924bd",
96+
"updated_at": "2020-07-10T20:10:46.000+00:00",
97+
"validation_key": null,
98+
"vet360_id": "1273780",
99+
"zip_code": "94608",
100+
"zip_code_suffix": null
101+
}
102+
},
103+
"dependents": [],
104+
"address": {
105+
"street": "375 Mountainhigh Dr",
106+
"city": "Antioch",
107+
"state": "TN",
108+
"country": "USA",
109+
"postal_code": "37013"
110+
},
111+
"employment_history": {
112+
"veteran": {
113+
"employment_records": [
114+
{
115+
"type": "Full time",
116+
"from": "2020-03-01",
117+
"to": "",
118+
"is_current": true,
119+
"employer_name": "Acme",
120+
"gross_monthly_income": "10000",
121+
"deductions": [
122+
{
123+
"name": "State tax",
124+
"amount": "100"
125+
}
126+
]
127+
}
128+
]
129+
}
130+
}
131+
},
132+
"personal_identification": {
133+
"ssn": "3018",
134+
"file_number": "3018"
135+
},
136+
"selected_debts_and_copays": [
137+
{
138+
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
139+
"resolution_waiver_check": true,
140+
"resolution_option": "waiver",
141+
"resolution_comment": "",
142+
"selected_debt_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
143+
"debt_type": "COPAY",
144+
"p_s_seq_num": 1,
145+
"p_s_tot_seq_num": 1,
146+
"p_s_facility_num": "757",
147+
"p_s_fac_phone_num": null,
148+
"p_s_tot_statement": 3,
149+
"p_s_statement_val": "0000037953E",
150+
"p_s_statement_date": "12242024",
151+
"p_s_statement_date_output": "12/24/2024",
152+
"p_s_process_date": "12102020",
153+
"p_s_process_date_output": "12/10/2020",
154+
"p_h_patient_lst_nme": "HHUFHYULSEHU",
155+
"p_h_patient_fst_nme": "CDAA",
156+
"p_h_patient_mid_nme": "A",
157+
"p_h_address1": "7780 RED MAPLE CT",
158+
"p_h_address2": null,
159+
"p_h_address3": null,
160+
"p_h_city": "HUBER HEIGHTS",
161+
"p_h_state": "OH",
162+
"p_h_zip_cde": "45424",
163+
"p_h_zip_cde_output": "45424",
164+
"p_h_ctry_nme": null,
165+
"p_h_amt_due": 105.24,
166+
"p_h_amt_due_output": "105.24  ",
167+
"p_h_prev_bal": 103.21,
168+
"p_h_prev_bal_output": "103.21  ",
169+
"p_h_tot_charges": 2.03,
170+
"p_h_tot_charges_output": "2.03  ",
171+
"p_h_tot_credits": 0,
172+
"p_h_tot_credits_output": ".00  ",
173+
"p_h_new_balance": 105.24,
174+
"p_h_new_balance_output": "105.24  ",
175+
"p_h_special_notes": null,
176+
"p_hro_para_cdes": "0125304050556065708085",
177+
"p_h_num_of_lines": 2,
178+
"p_h_dfn_number": 197750,
179+
"p_h_cerner_statement_number": 0,
180+
"p_h_cerner_patient_id": " ",
181+
"p_h_cerner_account_number": " ",
182+
"p_h_icn_number": " ",
183+
"p_h_account_number": 7570000000197750,
184+
"p_h_large_font_indcator": 0,
185+
"station": {
186+
"facilit_y_num": "757",
187+
"vis_n_num": "10",
188+
"facilit_y_desc": "CHALMERS P WYLIE VA ACC (757)",
189+
"cycl_e_num": "004",
190+
"remi_t_to_flag": "L",
191+
"mai_l_insert_flag": "0",
192+
"sta_t_address1": "420 N JAMES RD",
193+
"sta_t_address2": null,
194+
"sta_t_address3": null,
195+
"city": "Columbus",
196+
"state": "OH",
197+
"zi_p_cde": "432191834",
198+
"zi_p_cde_output": "43219-1834",
199+
"ba_r_cde": "*432191834203*",
200+
"te_l_num_flag": "S",
201+
"te_l_num": "1-866-812-0318",
202+
"te_l_num2": null,
203+
"contac_t_info": null,
204+
"d_m2_tel_num": null,
205+
"contac_t_info2": null,
206+
"to_p_tel_num": null,
207+
"lb_x_fedex_address1": null,
208+
"lb_x_fedex_address2": null,
209+
"lb_x_fedex_address3": null,
210+
"lb_x_fedex_city": null,
211+
"lb_x_fedex_state": null,
212+
"lb_x_fedex_zip_cde": null,
213+
"lb_x_fedex_bar_cde": null,
214+
"lb_x_fedex_contact": null,
215+
"lb_x_fedex_contact_tel_num": null,
216+
"facility_name": "Chalmers P. Wylie Veterans Outpatient Clinic"
217+
}
218+
}
219+
],
220+
"additional_income": {
221+
"addl_inc_records": [
222+
{
223+
"name": "Rental income",
224+
"amount": "1000"
225+
},
226+
{
227+
"name": "Irregular or “gig” income",
228+
"amount": "500"
229+
}
230+
],
231+
"spouse": {}
232+
},
233+
"expenses": {
234+
"monthly_housing_expenses": "500"
235+
},
236+
"utility_records": [
237+
{
238+
"name": "Gas",
239+
"amount": "100"
240+
},
241+
{
242+
"name": "Sewer",
243+
"amount": "200"
244+
}
245+
],
246+
"additional_data": {
247+
"additional_comments": "Cool COol",
248+
"bankruptcy": {}
249+
},
250+
"income": [
251+
{
252+
"veteran_or_spouse": "VETERAN"
253+
}
254+
],
255+
"gmt_data": {
256+
"is_eligible_for_streamlined": true,
257+
"gmt_threshold": 12000,
258+
"error": null,
259+
"income_upper_threshold": 18000,
260+
"asset_threshold": 780,
261+
"discretionary_income_threshold": 150,
262+
"income_below_gmt": false,
263+
"income_below_one_fifty_gmt": false,
264+
"liquid_assets_below_gmt": false
265+
}
266+
}

0 commit comments

Comments
 (0)