Skip to content

Commit

Permalink
91997: Fix checkbox mapping (#18297)
Browse files Browse the repository at this point in the history
  • Loading branch information
balexandr authored Sep 4, 2024
1 parent 99befc0 commit 65e8b95
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions modules/ivc_champva/app/form_mappings/vha_10_7959c.json.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"form1[0].#subform[0].applicantFirstName2[0]": "<%= form.data.dig('applicant_name', 'first') %>",
"form1[0].#subform[0].applicantMiddleInitial2[0]": "<%= form.data.dig('applicant_name', 'middle') %>",
"form1[0].#subform[0].applicantSocialSecurityNumber2[0]": "<%= form.data.dig('applicant_ssn') %>",
"form1[0].#subform[0].#area[0].Doyouhaveotherinsyesno[0]": "<%= form.data.dig('has_other_health_insurance') ? 0 : 1 %>",
"form1[0].#subform[0].#area[0].Doyouhaveotherinsyesno[0]": "<%= ['true', true].include?(form.data.dig('has_other_health_insurance')) ? 0 : 1 %>",
"form1[0].#subform[0].applicantStreetAddress2[0]": "<%= form.data.dig('applicant_address', 'street_combined') %>",
"form1[0].#subform[0].applicantCity2[0]": "<%= form.data.dig('applicant_address', 'city') %>",
"form1[0].#subform[0].applicantState2[0]": "<%= form.data.dig('applicant_address', 'state') %>",
Expand All @@ -12,46 +12,46 @@
"form1[0].#subform[0].#area[4].applicantSexRadioButtons2[0]": "<%= form.data.dig('applicant_gender') == 'male' ? 1 : 2 %>",
"form1[0].#subform[0].#area[0]": "<%= form.data.dig('') %>",
"form1[0].#subform[0].NewAddressBox-1[0]": "<%= form.data.dig('applicant_new_address') != 'no' ? 1 : 0 %>",
"form1[0].#subform[0].PartABDBkgrnd[0].PartARadioButtonList[0]": "<%= form.data.dig('applicant_medicare_status') ? 0 : 1 %>",
"form1[0].#subform[0].PartABDBkgrnd[0].PartBRadioButtonList[0]": "<%= form.data.dig('applicant_medicare_status') ? 0 : 1 %>",
"form1[0].#subform[0].PartABDBkgrnd[0].PartDRadioButtonList[0]": "<%= form.data.dig('applicant_medicare_status_d') ? 0 : 1 %>",
"form1[0].#subform[0].PartABDBkgrnd[0].PartARadioButtonList[0]": "<%= ['true', true].include?(form.data.dig('applicant_medicare_status')) ? 0 : 1 %>",
"form1[0].#subform[0].PartABDBkgrnd[0].PartBRadioButtonList[0]": "<%= ['true', true].include?(form.data.dig('applicant_medicare_status')) ? 0 : 1 %>",
"form1[0].#subform[0].PartABDBkgrnd[0].PartDRadioButtonList[0]": "<%= ['true', true].include?(form.data.dig('applicant_medicare_status_d')) ? 0 : 1 %>",
"form1[0].#subform[0].PartABDBkgrnd[0]": "<%= form.data.dig('') %>",
"form1[0].#subform[0].Date-PartA[0]": "<%= form.data.dig('applicant_medicare_part_a_effective_date') %>",
"form1[0].#subform[0].Date-PartB[0]": "<%= form.data.dig('applicant_medicare_part_b_effective_date') %>",
"form1[0].#subform[0].PartA_CarrierName[0]": "<%= form.data.dig('applicant_medicare_part_a_carrier') %>",
"form1[0].#subform[0].PartB_CarrierName[0]": "<%= form.data.dig('applicant_medicare_part_b_carrier') %>",
"form1[0].#subform[0].PharmacyBenefitsRadioButtonList[0]": "<%= form.data.dig('applicant_medicare_pharmacy_benefits') ? 0 : 1 %>",
"form1[0].#subform[0].MedicareAdvantageRadioButtonList[0]": "<%= form.data.dig('applicant_medicare_advantage') ? 0 : 1 %>",
"form1[0].#subform[0].PharmacyBenefitsRadioButtonList[0]": "<%= ['true', true].include?(form.data.dig('applicant_medicare_pharmacy_benefits')) ? 0 : 1 %>",
"form1[0].#subform[0].MedicareAdvantageRadioButtonList[0]": "<%= ['true', true].include?(form.data.dig('applicant_medicare_advantage')) ? 0 : 1 %>",
"form1[0].#subform[0].Date-PartD[0]": "<%= form.data.dig('applicant_medicare_part_d_effective_date') %>",
"form1[0].#subform[0].PartD_CarrierName[0]": "<%= form.data.dig('applicant_medicare_part_d_carrier') %>",
"form1[0].#subform[0].NameofInsurance-1[0]": "<%= form.data.dig('applicant_primary_provider') %>",
"form1[0].#subform[0].Date-NameInsurance-1[0]": "<%= form.data.dig('applicant_primary_effective_date') %>",
"form1[0].#subform[0].Date-TermnNameInsurance-1[0]": "<%= form.data.dig('applicant_primary_expiration_date') %>",
"form1[0].#subform[0].#area[2].CheckBox-HMO-1[0]": "<%= form.data.dig('applicant_primary_insurance_type') == 'hmo' ? 1 : 0%>",
"form1[0].#subform[0].#area[2].CheckBox-PPO-1[0]": "<%= form.data.dig('applicant_primary_insurance_type') == 'ppo' ? 1 : 0%>",
"form1[0].#subform[0].#area[2].CheckBox1-MedicaidSA-1[0]": "<%= form.data.dig('applicant_primary_insurance_type') == 'medicaid' ? 1 : 0%>",
"form1[0].#subform[0].#area[2].CheckBox-RxDiscount-1[0]": "<%= form.data.dig('applicant_primary_insurance_type') == 'rxDiscount' ? 1 : 0%>",
"form1[0].#subform[0].#area[2].#area[3].CheckBox-Medigap-1[0]": "<%= form.data.dig('applicant_primary_insurance_type') == 'medigap' ? 1 : 0%>",
"form1[0].#subform[0].#area[2].CheckBox-HMO-1[0]": "<%= form.data.dig('applicant_primary_insurance_type') == 'hmo' ? 1 : 0 %>",
"form1[0].#subform[0].#area[2].CheckBox-PPO-1[0]": "<%= form.data.dig('applicant_primary_insurance_type') == 'ppo' ? 1 : 0 %>",
"form1[0].#subform[0].#area[2].CheckBox1-MedicaidSA-1[0]": "<%= form.data.dig('applicant_primary_insurance_type') == 'medicaid' ? 1 : 0 %>",
"form1[0].#subform[0].#area[2].CheckBox-RxDiscount-1[0]": "<%= form.data.dig('applicant_primary_insurance_type') == 'rxDiscount' ? 1 : 0 %>",
"form1[0].#subform[0].#area[2].#area[3].CheckBox-Medigap-1[0]": "<%= form.data.dig('applicant_primary_insurance_type') == 'medigap' ? 1 : 0 %>",
"form1[0].#subform[0].#area[2].#area[3].DropDownList-Medigap-1[0]": "<%= form.data.dig('primary_medigap_plan') %>",
"form1[0].#subform[0].#area[2].CheckBox-Other-1[0]": "<%= form.data.dig('applicant_primary_insurance_type') == 'other' ? 1 : 0%>",
"form1[0].#subform[0].#area[2].CheckBox-Other-1[0]": "<%= form.data.dig('applicant_primary_insurance_type') == 'other' ? 1 : 0 %>",
"form1[0].#subform[0].Comments-Ins-1[0]": "<%= form.data.dig('primary_additional_comments' ) %>",
"form1[0].#subform[0].#area[6].#area[7].RadioButtonList[1]": "<%= form.data.dig('applicant_primary_through_employer') ? 0 : 1 %>",
"form1[0].#subform[0].RadioButtonList[0]": "<%= form.data.dig('applicant_primary_eob') ? 0 : 1 %>",
"form1[0].#subform[0].RadioButtonList[2]": "<%= form.data.dig('applicant_primary_has_prescription') ? 0 : 1 %>",
"form1[0].#subform[0].#area[8].CheckBox-HMO-2[0]": "<%= form.data.dig('applicant_secondary_insurance_type') == 'hmo' ? 1 : 0%>",
"form1[0].#subform[0].#area[8].CheckBox-PPO-2[0]": "<%= form.data.dig('applicant_secondary_insurance_type') == 'ppo' ? 1 : 0%>",
"form1[0].#subform[0].#area[8].CheckBox1-MedicaidSA-2[0]": "<%= form.data.dig('applicant_secondary_insurance_type') == 'medicaid' ? 1 : 0%>",
"form1[0].#subform[0].#area[8].CheckBox-RxDiscount-2[0]": "<%= form.data.dig('applicant_secondary_insurance_type') == 'rxDiscount' ? 1 : 0%>",
"form1[0].#subform[0].#area[8].#area[9].CheckBox-Medigap-2[0]": "<%= form.data.dig('applicant_secondary_insurance_type') == 'medigap' ? 1 : 0%>",
"form1[0].#subform[0].#area[6].#area[7].RadioButtonList[1]": "<%= ['true', true].include?(form.data.dig('applicant_primary_through_employer')) ? 0 : 1 %>",
"form1[0].#subform[0].RadioButtonList[0]": "<%= ['true', true].include?(form.data.dig('applicant_primary_eob')) ? 0 : 1 %>",
"form1[0].#subform[0].RadioButtonList[2]": "<%= ['true', true].include?(form.data.dig('applicant_primary_has_prescription')) ? 0 : 1 %>",
"form1[0].#subform[0].#area[8].CheckBox-HMO-2[0]": "<%= form.data.dig('applicant_secondary_insurance_type') == 'hmo' ? 1 : 0 %>",
"form1[0].#subform[0].#area[8].CheckBox-PPO-2[0]": "<%= form.data.dig('applicant_secondary_insurance_type') == 'ppo' ? 1 : 0 %>",
"form1[0].#subform[0].#area[8].CheckBox1-MedicaidSA-2[0]": "<%= form.data.dig('applicant_secondary_insurance_type') == 'medicaid' ? 1 : 0 %>",
"form1[0].#subform[0].#area[8].CheckBox-RxDiscount-2[0]": "<%= form.data.dig('applicant_secondary_insurance_type') == 'rxDiscount' ? 1 : 0 %>",
"form1[0].#subform[0].#area[8].#area[9].CheckBox-Medigap-2[0]": "<%= form.data.dig('applicant_secondary_insurance_type') == 'medigap' ? 1 : 0 %>",
"form1[0].#subform[0].#area[8].#area[9].DropDownList-Medigap-2[0]": "<%= form.data.dig('secondary_medigap_plan') %>",
"form1[0].#subform[0].#area[8].CheckBox-Other-2[0]": "<%= form.data.dig('applicant_secondary_insurance_type') == 'other' ? 1 : 0%>",
"form1[0].#subform[0].#area[8].CheckBox-Other-2[0]": "<%= form.data.dig('applicant_secondary_insurance_type') == 'other' ? 1 : 0 %>",
"form1[0].#subform[0].Comments-Ins-2[0]": "<%= form.data.dig('secondary_additional_comments' ) %>",
"form1[0].#subform[0].NameofInsurance-2[0]": "<%= form.data.dig('applicant_secondary_provider') %>",
"form1[0].#subform[0].Date-NameInsurance-2[0]": "<%= form.data.dig('applicant_secondary_effective_date') %>",
"form1[0].#subform[0].Date-TermnNameInsurance-2[0]": "<%= form.data.dig('applicant_secondary_expiration_date') %>",
"form1[0].#subform[0].RadioButtonList[3]": "<%= form.data.dig('applicant_secondary_eob') ? 0 : 1 %>",
"form1[0].#subform[0].RadioButtonList[4]": "<%= form.data.dig('applicant_secondary_through_employer') ? 0 : 1 %>",
"form1[0].#subform[0].RadioButtonList[5]": "<%= form.data.dig('applicant_secondary_has_prescription') ? 0 : 1 %>",
"form1[0].#subform[0].RadioButtonList[3]": "<%= ['true', true].include?(form.data.dig('applicant_secondary_eob')) ? 0 : 1 %>",
"form1[0].#subform[0].RadioButtonList[4]": "<%= ['true', true].include?(form.data.dig('applicant_secondary_through_employer')) ? 0 : 1 %>",
"form1[0].#subform[0].RadioButtonList[5]": "<%= ['true', true].include?(form.data.dig('applicant_secondary_has_prescription')) ? 0 : 1 %>",
"form1[0].#subform[0].Signature[0]": "<%= form.data['statement_of_truth_signature'] %>",
"form1[0].#subform[0].DateTimeField1[0]": "<%= form.data.dig('certification_date') %>",
"form1[0]": "<%= form.data.dig('form1') %>",
Expand Down

0 comments on commit 65e8b95

Please sign in to comment.