modules/covid_research/app/serializers/covid_research/genisis_serializer.rb
def formatted_qs(data)
      data.keys.map do |key|
        if key == 'veteranFullName'
          translate_name(data[key])
        elsif data[key].instance_of?(Hash)
          formatted_qs(data[key])
        else
          {
            QuestionName: key,
            QuestionValue: value(data[key])
          }
        end
      end.flatten
    end
# There is some nesting in the submitted form data that doesn't
#  map to genISIS well.  With this in mind we are recursively
#  flattening the form submission into a list of key value pairs.
#  There is currently nothing on the form nested more than one
#  level deep.
There is some nesting in the submitted form data that doesn't
map to genISIS well.  With this in mind we are recursively
flattening the form submission into a list of key value pairs.
There is currently nothing on the form nested more than one
level deep.
There is some nesting in the submitted form data that doesn ' t map to genISIS well . With this in mind we are recursively flattening the form submission into a list of key value pairs . There is currently nothing on the form nested more than one level deep .
def formatted_qs(data)
      data.keys.map do |key|
        if key == 'veteranFullName'
          translate_name(data[key])
        elsif data[key].instance_of?(Hash)
          formatted_qs(data[key])
        else
          {
            QuestionName: key,
            QuestionValue: value(data[key])
          }
        end
      end.flatten
    end
def formatted_qs ( data ) data . keys . map do | key | if key == 'veteranFullName' translate_name ( data [ key ] ) elsif data [ key ] . instance_of? ( Hash ) formatted_qs ( data [ key ] ) else { QuestionName : key , QuestionValue : value ( data [ key ] ) } end end . flatten end
There is some nesting in the submitted form data that doesn't
map to genISIS well.
There is some nesting in the submitted form data that doesn ' t map to genISIS well .
data