Class: MHVAC::RegistrationForm

Inherits:
Common::Form show all
Includes:
ActiveModel::Validations
Defined in:
lib/mhv_ac/registration_form.rb

Overview

Models a MHVAC (MyHealtheVet Account Creation) registration form. This class is used to store form details and to generate the request for submission to the MHV service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#address1String

Returns registrant’s address line 1.

Returns:

  • (String)

    registrant’s address line 1



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#address2String

Returns registrant’s address line 2.

Returns:

  • (String)

    registrant’s address line 2



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#cityString

Returns registrant’s city.

Returns:

  • (String)

    registrant’s city



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#contact_methodString

Returns registrant’s preferred contact method.

Returns:

  • (String)

    registrant’s preferred contact method



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#countryString

Returns registrant’s country.

Returns:

  • (String)

    registrant’s country



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#emailString

Returns registrant’s email address.

Returns:

  • (String)

    registrant’s email address



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#faxString

Returns registrant’s fax number.

Returns:

  • (String)

    registrant’s fax number



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#home_phoneString

Returns registrant’s home phone number.

Returns:

  • (String)

    registrant’s home phone number



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#icnString

Returns registrant’s ICN (Integration Control Number).

Returns:

  • (String)

    registrant’s ICN (Integration Control Number)



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#is_champ_VA_beneficiaryBoolean

Returns:

  • (Boolean)


65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#is_employeeBoolean

Returns:

  • (Boolean)


65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#is_health_care_providerBoolean

Returns:

  • (Boolean)


65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#is_otherBoolean

Returns:

  • (Boolean)


65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#is_patientBoolean

Returns:

  • (Boolean)


65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#is_patient_advocateBoolean

Returns:

  • (Boolean)


65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#is_service_memberBoolean

Returns:

  • (Boolean)


65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#is_veteranBoolean

Returns:

  • (Boolean)


65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#mobile_phoneString

Returns registrant’s mobile phone number.

Returns:

  • (String)

    registrant’s mobile phone number



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#pagerString

Returns registrant’s pager phone number.

Returns:

  • (String)

    registrant’s pager phone number



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#provinceString

Returns registrant’s province.

Returns:

  • (String)

    registrant’s province



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#sign_in_partnersString

Returns which sign in partner the registrant is using.

Returns:

  • (String)

    which sign in partner the registrant is using



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#stateString

Returns registrant’s state.

Returns:

  • (String)

    registrant’s state



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#terms_accepted_dateCommon::HTTPDate

Returns date the registrant accepted the terms of agreement.

Returns:



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#terms_versionString

Returns the version of terms of agreement that the registrant recieved.

Returns:

  • (String)

    the version of terms of agreement that the registrant recieved



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#work_phoneString

Returns registrant’s work phone number.

Returns:

  • (String)

    registrant’s work phone number



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

#zipString

Returns registrant’s zip.

Returns:

  • (String)

    registrant’s zip



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mhv_ac/registration_form.rb', line 65

class RegistrationForm < Common::Form
  include ActiveModel::Validations

  attribute :icn, String
  attribute :is_patient, Boolean
  attribute :is_patient_advocate, Boolean
  attribute :is_veteran, Boolean
  attribute :is_champ_VA_beneficiary, Boolean
  attribute :is_service_member, Boolean
  attribute :is_employee, Boolean
  attribute :is_health_care_provider, Boolean
  attribute :is_other, Boolean
  attribute :address1, String
  attribute :address2, String
  attribute :city, String
  attribute :state, String
  attribute :zip, String
  attribute :country, String
  attribute :province, String
  attribute :contact_method, String
  attribute :email, String
  attribute :fax, String
  attribute :home_phone, String
  attribute :mobile_phone, String
  attribute :pager, String
  attribute :work_phone, String
  attribute :sign_in_partners, String
  attribute :terms_version, String
  attribute :terms_accepted_date, Common::HTTPDate

  ##
  # Validates form attributes and wraps each present attribute to create
  # a parameter set for MHV, stripping attribute values of nil.
  #
  # @raise [Common::Exceptions::ValidationErrors] if there are validation errors
  # @return [Hash] A hash of valid form attributes
  #
  def mhv_params
    raise Common::Exceptions::ValidationErrors, self unless valid?

    attribute_set.map do |attribute|
      value = send(attribute.name)
      [attribute.name, value] unless value.nil?
    end.compact.to_h
  end
end

Instance Method Details

#mhv_paramsHash

Validates form attributes and wraps each present attribute to create a parameter set for MHV, stripping attribute values of nil.

Returns:

  • (Hash)

    A hash of valid form attributes

Raises:



102
103
104
105
106
107
108
109
# File 'lib/mhv_ac/registration_form.rb', line 102

def mhv_params
  raise Common::Exceptions::ValidationErrors, self unless valid?

  attribute_set.map do |attribute|
    value = send(attribute.name)
    [attribute.name, value] unless value.nil?
  end.compact.to_h
end