modules/claims_api/app/models/claims_api/auto_established_claim.rb
# EVSS requires the disability 'approximateBeginDate' to be the components of an approximated date
# We (ClaimsApi) require a date string that is then validated to be a valid date
# Convert our validated date into the components required by EVSS
EVSS requires the disability 'approximateBeginDate' to be the components of an approximated date
We (ClaimsApi) require a date string that is then validated to be a valid date
Convert our validated date into the components required by EVSS
EVSS requires the disability ' approximateBeginDate ' to be the components of an approximated date We ( ClaimsApi ) require a date string that is then validated to be a valid date Convert our validated date into the components required by EVSS
def transform_disability_approximate_begin_dates
      disabilities = form_data['disabilities']
      disabilities.map do |disability|
        next if disability['approximateBeginDate'].blank?
        disability['approximateBeginDate'] = breakout_date_components(date: disability['approximateBeginDate'])
        disability['secondaryDisabilities'] ||= []
        disability['secondaryDisabilities'].map do |secondary_disability|
          next if secondary_disability['approximateBeginDate'].blank?
          secondary_disability['approximateBeginDate'] = breakout_date_components(
            date: secondary_disability['approximateBeginDate']
          )
          secondary_disability
        end
        disability
      end
    end
def transform_disability_approximate_begin_dates disabilities = form_data [ 'disabilities' ] disabilities . map do | disability | next if disability [ 'approximateBeginDate' ] . blank? disability [ 'approximateBeginDate' ] = breakout_date_components ( date : disability [ 'approximateBeginDate' ] ) disability [ 'secondaryDisabilities' ] ||= [ ] disability [ 'secondaryDisabilities' ] . map do | secondary_disability | next if secondary_disability [ 'approximateBeginDate' ] . blank? secondary_disability [ 'approximateBeginDate' ] = breakout_date_components ( date : secondary_disability [ 'approximateBeginDate' ] ) secondary_disability end disability end end
EVSS requires the disability 'approximateBeginDate' to be the components of an approximated date
We (ClaimsApi) require a date string that is then validated to be a valid date
Convert our validated date into the components required by EVSS
EVSS requires the disability ' approximateBeginDate ' to be the components of an approximated date We ( ClaimsApi ) require a date string that is then validated to be a valid date Convert our validated date into the components required by EVSS