Class: MHVAC::RegistrationForm
- Inherits:
-
Common::Form
- Object
- Common::Form
- MHVAC::RegistrationForm
- 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
-
#address1 ⇒ String
Registrant’s address line 1.
-
#address2 ⇒ String
Registrant’s address line 2.
-
#city ⇒ String
Registrant’s city.
-
#contact_method ⇒ String
Registrant’s preferred contact method.
-
#country ⇒ String
Registrant’s country.
-
#email ⇒ String
Registrant’s email address.
-
#fax ⇒ String
Registrant’s fax number.
-
#home_phone ⇒ String
Registrant’s home phone number.
-
#icn ⇒ String
Registrant’s ICN (Integration Control Number).
- #is_champ_VA_beneficiary ⇒ Boolean
- #is_employee ⇒ Boolean
- #is_health_care_provider ⇒ Boolean
- #is_other ⇒ Boolean
- #is_patient ⇒ Boolean
- #is_patient_advocate ⇒ Boolean
- #is_service_member ⇒ Boolean
- #is_veteran ⇒ Boolean
-
#mobile_phone ⇒ String
Registrant’s mobile phone number.
-
#pager ⇒ String
Registrant’s pager phone number.
-
#province ⇒ String
Registrant’s province.
-
#sign_in_partners ⇒ String
Which sign in partner the registrant is using.
-
#state ⇒ String
Registrant’s state.
-
#terms_accepted_date ⇒ Common::HTTPDate
Date the registrant accepted the terms of agreement.
-
#terms_version ⇒ String
The version of terms of agreement that the registrant recieved.
-
#work_phone ⇒ String
Registrant’s work phone number.
-
#zip ⇒ String
Registrant’s zip.
Instance Method Summary collapse
-
#mhv_params ⇒ Hash
Validates form attributes and wraps each present attribute to create a parameter set for MHV, stripping attribute values of nil.
Instance Attribute Details
#address1 ⇒ String
Returns 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 |
#address2 ⇒ String
Returns 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 |
#city ⇒ String
Returns 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_method ⇒ String
Returns 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 |
#country ⇒ String
Returns 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 |
#email ⇒ String
Returns 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 |
#fax ⇒ String
Returns 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_phone ⇒ String
Returns 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 |
#icn ⇒ String
Returns 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_beneficiary ⇒ 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_employee ⇒ 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_provider ⇒ 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_other ⇒ 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 ⇒ 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_advocate ⇒ 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_member ⇒ 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_veteran ⇒ 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_phone ⇒ String
Returns 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 |
#pager ⇒ String
Returns 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 |
#province ⇒ String
Returns 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_partners ⇒ String
Returns 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 |
#state ⇒ String
Returns 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_date ⇒ Common::HTTPDate
Returns date the registrant accepted the terms of agreement.
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_version ⇒ String
Returns 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_phone ⇒ String
Returns 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 |
#zip ⇒ String
Returns 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_params ⇒ Hash
Validates form attributes and wraps each present attribute to create a parameter set for MHV, stripping attribute values of nil.
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 |