change_healthcare-professional_claims 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +30 -0
  5. data/.travis.yml +6 -0
  6. data/.yardopts +1 -0
  7. data/CHANGELOG.md +0 -0
  8. data/Gemfile +6 -0
  9. data/Gemfile.lock +118 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +39 -0
  12. data/Rakefile +8 -0
  13. data/TODO.md +8 -0
  14. data/bin/console +15 -0
  15. data/bin/rspec +29 -0
  16. data/bin/setup +8 -0
  17. data/change_healthcare-professional_claims.gemspec +43 -0
  18. data/lib/change_healthcare/professional_claims.rb +16 -0
  19. data/lib/change_healthcare/professional_claims/swagger_client.rb +106 -0
  20. data/lib/change_healthcare/professional_claims/swagger_client/api_client.rb +390 -0
  21. data/lib/change_healthcare/professional_claims/swagger_client/api_error.rb +42 -0
  22. data/lib/change_healthcare/professional_claims/swagger_client/configuration.rb +204 -0
  23. data/lib/change_healthcare/professional_claims/swagger_client/models/address.rb +219 -0
  24. data/lib/change_healthcare/professional_claims/swagger_client/models/ambulance_certification.rb +247 -0
  25. data/lib/change_healthcare/professional_claims/swagger_client/models/ambulance_transport_information.rb +259 -0
  26. data/lib/change_healthcare/professional_claims/swagger_client/models/clai_request.rb +283 -0
  27. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_adjustment.rb +244 -0
  28. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_adjustment_details.rb +199 -0
  29. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_contract_information.rb +265 -0
  30. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_date_information.rb +298 -0
  31. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_information.rb +579 -0
  32. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_note.rb +216 -0
  33. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_pricing_repricing_information.rb +363 -0
  34. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_reference.rb +231 -0
  35. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_submission_request.rb +278 -0
  36. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_supplemental_information.rb +315 -0
  37. data/lib/change_healthcare/professional_claims/swagger_client/models/composite_diagnosis_code_pointers.rb +191 -0
  38. data/lib/change_healthcare/professional_claims/swagger_client/models/condition_indicator_durable_medical_equipment.rb +281 -0
  39. data/lib/change_healthcare/professional_claims/swagger_client/models/condition_information.rb +190 -0
  40. data/lib/change_healthcare/professional_claims/swagger_client/models/contact_information.rb +209 -0
  41. data/lib/change_healthcare/professional_claims/swagger_client/models/contract_information.rb +255 -0
  42. data/lib/change_healthcare/professional_claims/swagger_client/models/dependent.rb +294 -0
  43. data/lib/change_healthcare/professional_claims/swagger_client/models/drug_identification.rb +278 -0
  44. data/lib/change_healthcare/professional_claims/swagger_client/models/durable_medical_equipment_certificate_of_medical_necessity.rb +226 -0
  45. data/lib/change_healthcare/professional_claims/swagger_client/models/durable_medical_equipment_certification.rb +233 -0
  46. data/lib/change_healthcare/professional_claims/swagger_client/models/durable_medical_equipment_service.rb +243 -0
  47. data/lib/change_healthcare/professional_claims/swagger_client/models/edit_response.rb +251 -0
  48. data/lib/change_healthcare/professional_claims/swagger_client/models/epsdt_referral.rb +236 -0
  49. data/lib/change_healthcare/professional_claims/swagger_client/models/error.rb +214 -0
  50. data/lib/change_healthcare/professional_claims/swagger_client/models/failure.rb +194 -0
  51. data/lib/change_healthcare/professional_claims/swagger_client/models/form_identification.rb +240 -0
  52. data/lib/change_healthcare/professional_claims/swagger_client/models/health_care_information.rb +233 -0
  53. data/lib/change_healthcare/professional_claims/swagger_client/models/line_adjudication_information.rb +284 -0
  54. data/lib/change_healthcare/professional_claims/swagger_client/models/measurements.rb +256 -0
  55. data/lib/change_healthcare/professional_claims/swagger_client/models/medicare_outpatient_adjudication.rb +213 -0
  56. data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_billing_provider.rb +236 -0
  57. data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_name.rb +285 -0
  58. data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_referring_provider.rb +192 -0
  59. data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_rendering_provider.rb +236 -0
  60. data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_service_facility_location.rb +192 -0
  61. data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_supervising_provider.rb +192 -0
  62. data/lib/change_healthcare/professional_claims/swagger_client/models/other_subscriber_information.rb +430 -0
  63. data/lib/change_healthcare/professional_claims/swagger_client/models/other_subscriber_name.rb +288 -0
  64. data/lib/change_healthcare/professional_claims/swagger_client/models/patient_condition_information_vision.rb +259 -0
  65. data/lib/change_healthcare/professional_claims/swagger_client/models/pay_to_plan.rb +278 -0
  66. data/lib/change_healthcare/professional_claims/swagger_client/models/payer.rb +194 -0
  67. data/lib/change_healthcare/professional_claims/swagger_client/models/prior_authorization.rb +194 -0
  68. data/lib/change_healthcare/professional_claims/swagger_client/models/professional_service.rb +290 -0
  69. data/lib/change_healthcare/professional_claims/swagger_client/models/provider.rb +281 -0
  70. data/lib/change_healthcare/professional_claims/swagger_client/models/purchased_service_information.rb +194 -0
  71. data/lib/change_healthcare/professional_claims/swagger_client/models/raw_x12_request.rb +194 -0
  72. data/lib/change_healthcare/professional_claims/swagger_client/models/receiver.rb +189 -0
  73. data/lib/change_healthcare/professional_claims/swagger_client/models/reference_identification.rb +199 -0
  74. data/lib/change_healthcare/professional_claims/swagger_client/models/report_information.rb +261 -0
  75. data/lib/change_healthcare/professional_claims/swagger_client/models/response.rb +240 -0
  76. data/lib/change_healthcare/professional_claims/swagger_client/models/service_facility_location.rb +224 -0
  77. data/lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb +388 -0
  78. data/lib/change_healthcare/professional_claims/swagger_client/models/service_line_date_information.rb +236 -0
  79. data/lib/change_healthcare/professional_claims/swagger_client/models/service_line_provider.rb +293 -0
  80. data/lib/change_healthcare/professional_claims/swagger_client/models/service_line_reference_information.rb +230 -0
  81. data/lib/change_healthcare/professional_claims/swagger_client/models/spinal_manipulation_service_information.rb +238 -0
  82. data/lib/change_healthcare/professional_claims/swagger_client/models/submitter.rb +209 -0
  83. data/lib/change_healthcare/professional_claims/swagger_client/models/subscriber.rb +309 -0
  84. data/lib/change_healthcare/professional_claims/swagger_client/models/supporting_documentation.rb +249 -0
  85. data/lib/change_healthcare/professional_claims/swagger_client/professional_claims_api.rb +361 -0
  86. data/lib/change_healthcare/professional_claims/swagger_client/version.rb +19 -0
  87. data/lib/change_healthcare/professional_claims/version.rb +7 -0
  88. data/lib/change_healthcare/professional_claims/wrapper.rb +141 -0
  89. metadata +274 -0
@@ -0,0 +1,192 @@
1
+ # frozen_string_literal: true
2
+
3
+ # #Medical Network Professional Claims v3
4
+ #
5
+ # Reference for developers
6
+ #
7
+ # OpenAPI spec version: v3
8
+ #
9
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
10
+ # Swagger Codegen version: 2.4.19
11
+ #
12
+
13
+ require 'date'
14
+
15
+ module ChangeHealthcare
16
+ module ProfessionalClaims
17
+ module SwaggerClient
18
+ class OtherPayerSupervisingProvider
19
+ # Allowed Values are: '0B' State License Number, '1G' Provider UPIN Number, 'G2' Provider Commercial Number, 'LU' Location Number
20
+ attr_accessor :other_payer_supervising_provider_identifier
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ other_payer_supervising_provider_identifier: :otherPayerSupervisingProviderIdentifier
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ other_payer_supervising_provider_identifier: :'Array<ReferenceIdentification>'
33
+ }
34
+ end
35
+
36
+ # Initializes the object
37
+ # @param [Hash] attributes Model attributes in the form of hash
38
+ def initialize(attributes = {})
39
+ return unless attributes.is_a?(Hash)
40
+
41
+ # convert string to symbol for hash key
42
+ attributes = attributes.transform_keys(&:to_sym)
43
+
44
+ if attributes.key?(:otherPayerSupervisingProviderIdentifier) && (value = attributes[:otherPayerSupervisingProviderIdentifier]).is_a?(Array)
45
+ self.other_payer_supervising_provider_identifier = value
46
+ end
47
+ end
48
+
49
+ # Show invalid properties with the reasons. Usually used together with valid?
50
+ # @return Array for valid properties with the reasons
51
+ def list_invalid_properties
52
+ []
53
+ end
54
+
55
+ # Check to see if the all the properties in the model are valid
56
+ # @return true if the model is valid
57
+ def valid?
58
+ true
59
+ end
60
+
61
+ # Checks equality by comparing each attribute.
62
+ # @param [Object] Object to be compared
63
+ def ==(other)
64
+ return true if equal?(other)
65
+
66
+ self.class == other.class &&
67
+ other_payer_supervising_provider_identifier == other.other_payer_supervising_provider_identifier
68
+ end
69
+
70
+ # @see the `==` method
71
+ # @param [Object] Object to be compared
72
+ def eql?(other)
73
+ self == other
74
+ end
75
+
76
+ # Calculates hash code according to all attributes.
77
+ # @return [Fixnum] Hash code
78
+ def hash
79
+ [other_payer_supervising_provider_identifier].hash
80
+ end
81
+
82
+ # Builds the object from hash
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ # @return [Object] Returns the model itself
85
+ def build_from_hash(attributes)
86
+ return nil unless attributes.is_a?(Hash)
87
+
88
+ self.class.swagger_types.each_pair do |key, type|
89
+ if type =~ /\AArray<(.*)>/i
90
+ # check to ensure the input is an array given that the attribute
91
+ # is documented as an array but the input is not
92
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
93
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
94
+ _deserialize(Regexp.last_match(1), v)
95
+ end)
96
+ end
97
+ elsif !attributes[self.class.attribute_map[key]].nil?
98
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
99
+ end
100
+ end
101
+
102
+ self
103
+ end
104
+
105
+ # Deserializes the data based on type
106
+ # @param string type Data type
107
+ # @param string value Value to be deserialized
108
+ # @return [Object] Deserialized data
109
+ def _deserialize(type, value)
110
+ case type.to_sym
111
+ when :DateTime
112
+ DateTime.parse(value)
113
+ when :Date
114
+ Date.parse(value)
115
+ when :String
116
+ value.to_s
117
+ when :Integer
118
+ value.to_i
119
+ when :Float
120
+ value.to_f
121
+ when :BOOLEAN
122
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
123
+ true
124
+ else
125
+ false
126
+ end
127
+ when :Object
128
+ # generic object (usually a Hash), return directly
129
+ value
130
+ when /\AArray<(?<inner_type>.+)>\z/
131
+ inner_type = Regexp.last_match[:inner_type]
132
+ value.map { |v| _deserialize(inner_type, v) }
133
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
134
+ k_type = Regexp.last_match[:k_type]
135
+ v_type = Regexp.last_match[:v_type]
136
+ {}.tap do |hash|
137
+ value.each do |k, v|
138
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
139
+ end
140
+ end
141
+ else # model
142
+ temp_model = SwaggerClient.const_get(type).new
143
+ temp_model.build_from_hash(value)
144
+ end
145
+ end
146
+
147
+ # Returns the string representation of the object
148
+ # @return [String] String presentation of the object
149
+ def to_s
150
+ to_hash.to_s
151
+ end
152
+
153
+ # to_body is an alias to to_hash (backward compatibility)
154
+ # @return [Hash] Returns the object in the form of hash
155
+ def to_body
156
+ to_hash
157
+ end
158
+
159
+ # Returns the object in the form of hash
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_hash
162
+ hash = {}
163
+ self.class.attribute_map.each_pair do |attr, param|
164
+ value = send(attr)
165
+ next if value.nil?
166
+
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ # Outputs non-array value in the form of hash
173
+ # For object, use to_hash. Otherwise, just return the value
174
+ # @param [Object] value Any valid value
175
+ # @return [Hash] Returns the value in the form of hash
176
+ def _to_hash(value)
177
+ if value.is_a?(Array)
178
+ value.compact.map { |v| _to_hash(v) }
179
+ elsif value.is_a?(Hash)
180
+ {}.tap do |hash|
181
+ value.each { |k, v| hash[k] = _to_hash(v) }
182
+ end
183
+ elsif value.respond_to? :to_hash
184
+ value.to_hash
185
+ else
186
+ value
187
+ end
188
+ end
189
+ end
190
+ end
191
+ end
192
+ end
@@ -0,0 +1,430 @@
1
+ # frozen_string_literal: true
2
+
3
+ # #Medical Network Professional Claims v3
4
+ #
5
+ # Reference for developers
6
+ #
7
+ # OpenAPI spec version: v3
8
+ #
9
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
10
+ # Swagger Codegen version: 2.4.19
11
+ #
12
+
13
+ require 'date'
14
+
15
+ module ChangeHealthcare
16
+ module ProfessionalClaims
17
+ module SwaggerClient
18
+ class OtherSubscriberInformation
19
+ # Allowed Values are: 'N' No, 'W' Not Applicable, 'Y' Yes
20
+ attr_accessor :benefits_assignment_certification_indicator
21
+
22
+ # Allowed Values are: '11' Other Non-Federal Programs, '12' Preferred Provider Organization (PPO), '13' Point of Service (POS), '14' Exclusive Provider Organization (EPO), '15' Indemnity Insurance, '16' Health Maintenance Organization (HMO) Medicare Risk, '17' Dental Maintenance Organization, 'AM' Automobile Medical, 'BL' Blue Cross/Blue Shield, 'CH' Champus, 'CI' Commercial Insurance Co., 'DS' Disability, 'FI' Federal Employees Program, 'HM' Health Maintenance Organization, 'LM' Liability Medical, 'MA' Medicare Part A, 'MB' Medicare Part B, 'MC' Medicare Part C, 'OF' Other Federal Program, 'TV' Title V, 'VA' Veterans Affairs Plan, 'WC' Workers’ Compensation Health Claim, 'ZZ' Mutually Defined
23
+ attr_accessor :claim_filing_indicator_code
24
+
25
+ attr_accessor :claim_level_adjustments, :insurance_group_or_policy_number, :medicare_outpatient_adjudication,
26
+ :non_covered_charge_amount, :other_insured_group_name, :other_payer_billing_provider, :other_payer_name, :other_payer_referring_provider, :other_payer_rendering_provider, :other_payer_service_facility_location, :other_payer_supervising_provider, :other_subscriber_name, :patient_signature_generated_for_patient, :payer_paid_amount, :remaining_patient_liability
27
+
28
+ # Allowed Values are: '01' Spouse, '02' Self, '19' Child, '20' Employee, '21' Unknown, '39' Organ Donor, '40' Cadaver Donor, '53' Life Partner, 'G8' Other Relationship
29
+ attr_accessor :individual_relationship_code
30
+
31
+ # Allowed Values are: '12' Medicare Secondary Working Aged Beneficiary or Spouse with Employer Group Health Plan, '13' Medicare Secondary End-Stage Renal Disease Beneficiary in the Mandated Coordination Period, '14' Medicare Secondary, No-fault Insurance including Auto is Primary, '15' Medicare Secondary Worker’s Compensation, '16' Medicare Secondary Public Health Service (PHS)or Other Federal Agency'41' Medicare Secondary Black Lung, '42' Medicare Secondary Veteran’s Administration, '43' Medicare Secondary Disabled Beneficiary Under Age 65 with Large Group Health Plan (LGHP), '47' Medicare Secondary, Other Liability Insurance is Primary
32
+ attr_accessor :insurance_type_code
33
+
34
+ # Allowed Values are: 'A' Payer Responsibility Four, 'B' Payer Responsibility Five, 'C' Payer Responsibility Six, 'D' Payer Responsibility Seven, 'E' Payer Responsibility Eight, 'F' Payer Responsibility Nine, 'G' Payer Responsibility Ten, 'H' Payer Responsibility Eleven, 'P' Primary, 'S' Secondary, 'T' Tertiary, , 'U' Unknown
35
+ attr_accessor :payment_responsibility_level_code
36
+
37
+ # Allowed Values are: 'I' Informed Consent to Release Medical Information for Conditions or Diagnoses Regulated by Federal Statutes, 'Y' Yes, Provider has a Signed Statement Permitting Release of Medical Billing Data Related to a Claim
38
+ attr_accessor :release_of_information_code
39
+
40
+ class EnumAttributeValidator
41
+ attr_reader :datatype, :allowable_values
42
+
43
+ def initialize(datatype, allowable_values)
44
+ @allowable_values = allowable_values.map do |value|
45
+ case datatype.to_s
46
+ when /Integer/i
47
+ value.to_i
48
+ when /Float/i
49
+ value.to_f
50
+ else
51
+ value
52
+ end
53
+ end
54
+ end
55
+
56
+ def valid?(value)
57
+ !value || allowable_values.include?(value)
58
+ end
59
+ end
60
+
61
+ # Attribute mapping from ruby-style variable name to JSON key.
62
+ def self.attribute_map
63
+ {
64
+ benefits_assignment_certification_indicator: :benefitsAssignmentCertificationIndicator,
65
+ claim_filing_indicator_code: :claimFilingIndicatorCode,
66
+ claim_level_adjustments: :claimLevelAdjustments,
67
+ individual_relationship_code: :individualRelationshipCode,
68
+ insurance_group_or_policy_number: :insuranceGroupOrPolicyNumber,
69
+ insurance_type_code: :insuranceTypeCode,
70
+ medicare_outpatient_adjudication: :medicareOutpatientAdjudication,
71
+ non_covered_charge_amount: :nonCoveredChargeAmount,
72
+ other_insured_group_name: :otherInsuredGroupName,
73
+ other_payer_billing_provider: :otherPayerBillingProvider,
74
+ other_payer_name: :otherPayerName,
75
+ other_payer_referring_provider: :otherPayerReferringProvider,
76
+ other_payer_rendering_provider: :otherPayerRenderingProvider,
77
+ other_payer_service_facility_location: :otherPayerServiceFacilityLocation,
78
+ other_payer_supervising_provider: :otherPayerSupervisingProvider,
79
+ other_subscriber_name: :otherSubscriberName,
80
+ patient_signature_generated_for_patient: :patientSignatureGeneratedForPatient,
81
+ payer_paid_amount: :payerPaidAmount,
82
+ payment_responsibility_level_code: :paymentResponsibilityLevelCode,
83
+ release_of_information_code: :releaseOfInformationCode,
84
+ remaining_patient_liability: :remainingPatientLiability
85
+ }
86
+ end
87
+
88
+ # Attribute type mapping.
89
+ def self.swagger_types
90
+ {
91
+ benefits_assignment_certification_indicator: :String,
92
+ claim_filing_indicator_code: :String,
93
+ claim_level_adjustments: :'Array<ClaimAdjustment>',
94
+ individual_relationship_code: :String,
95
+ insurance_group_or_policy_number: :String,
96
+ insurance_type_code: :String,
97
+ medicare_outpatient_adjudication: :MedicareOutpatientAdjudication,
98
+ non_covered_charge_amount: :String,
99
+ other_insured_group_name: :String,
100
+ other_payer_billing_provider: :OtherPayerBillingProvider,
101
+ other_payer_name: :OtherPayerName,
102
+ other_payer_referring_provider: :'Array<OtherPayerReferringProvider>',
103
+ other_payer_rendering_provider: :OtherPayerRenderingProvider,
104
+ other_payer_service_facility_location: :OtherPayerServiceFacilityLocation,
105
+ other_payer_supervising_provider: :OtherPayerSupervisingProvider,
106
+ other_subscriber_name: :OtherSubscriberName,
107
+ patient_signature_generated_for_patient: :BOOLEAN,
108
+ payer_paid_amount: :String,
109
+ payment_responsibility_level_code: :String,
110
+ release_of_information_code: :String,
111
+ remaining_patient_liability: :String
112
+ }
113
+ end
114
+
115
+ # Initializes the object
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ def initialize(attributes = {})
118
+ return unless attributes.is_a?(Hash)
119
+
120
+ # convert string to symbol for hash key
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+
123
+ self.benefits_assignment_certification_indicator = attributes[:benefitsAssignmentCertificationIndicator] if attributes.key?(:benefitsAssignmentCertificationIndicator)
124
+
125
+ self.claim_filing_indicator_code = attributes[:claimFilingIndicatorCode] if attributes.key?(:claimFilingIndicatorCode)
126
+
127
+ if attributes.key?(:claimLevelAdjustments) && (value = attributes[:claimLevelAdjustments]).is_a?(Array)
128
+ self.claim_level_adjustments = value
129
+ end
130
+
131
+ self.individual_relationship_code = attributes[:individualRelationshipCode] if attributes.key?(:individualRelationshipCode)
132
+
133
+ self.insurance_group_or_policy_number = attributes[:insuranceGroupOrPolicyNumber] if attributes.key?(:insuranceGroupOrPolicyNumber)
134
+
135
+ self.insurance_type_code = attributes[:insuranceTypeCode] if attributes.key?(:insuranceTypeCode)
136
+
137
+ self.medicare_outpatient_adjudication = attributes[:medicareOutpatientAdjudication] if attributes.key?(:medicareOutpatientAdjudication)
138
+
139
+ self.non_covered_charge_amount = attributes[:nonCoveredChargeAmount] if attributes.key?(:nonCoveredChargeAmount)
140
+
141
+ self.other_insured_group_name = attributes[:otherInsuredGroupName] if attributes.key?(:otherInsuredGroupName)
142
+
143
+ self.other_payer_billing_provider = attributes[:otherPayerBillingProvider] if attributes.key?(:otherPayerBillingProvider)
144
+
145
+ self.other_payer_name = attributes[:otherPayerName] if attributes.key?(:otherPayerName)
146
+
147
+ if attributes.key?(:otherPayerReferringProvider) && (value = attributes[:otherPayerReferringProvider]).is_a?(Array)
148
+ self.other_payer_referring_provider = value
149
+ end
150
+
151
+ self.other_payer_rendering_provider = attributes[:otherPayerRenderingProvider] if attributes.key?(:otherPayerRenderingProvider)
152
+
153
+ self.other_payer_service_facility_location = attributes[:otherPayerServiceFacilityLocation] if attributes.key?(:otherPayerServiceFacilityLocation)
154
+
155
+ self.other_payer_supervising_provider = attributes[:otherPayerSupervisingProvider] if attributes.key?(:otherPayerSupervisingProvider)
156
+
157
+ self.other_subscriber_name = attributes[:otherSubscriberName] if attributes.key?(:otherSubscriberName)
158
+
159
+ self.patient_signature_generated_for_patient = attributes[:patientSignatureGeneratedForPatient] if attributes.key?(:patientSignatureGeneratedForPatient)
160
+
161
+ self.payer_paid_amount = attributes[:payerPaidAmount] if attributes.key?(:payerPaidAmount)
162
+
163
+ self.payment_responsibility_level_code = attributes[:paymentResponsibilityLevelCode] if attributes.key?(:paymentResponsibilityLevelCode)
164
+
165
+ self.release_of_information_code = attributes[:releaseOfInformationCode] if attributes.key?(:releaseOfInformationCode)
166
+
167
+ self.remaining_patient_liability = attributes[:remainingPatientLiability] if attributes.key?(:remainingPatientLiability)
168
+ end
169
+
170
+ # Show invalid properties with the reasons. Usually used together with valid?
171
+ # @return Array for valid properties with the reasons
172
+ def list_invalid_properties
173
+ []
174
+ end
175
+
176
+ # Check to see if the all the properties in the model are valid
177
+ # @return true if the model is valid
178
+ def valid?
179
+ benefits_assignment_certification_indicator_validator = EnumAttributeValidator.new('String', %w[N W Y])
180
+ return false unless benefits_assignment_certification_indicator_validator.valid?(@benefits_assignment_certification_indicator)
181
+
182
+ claim_filing_indicator_code_validator = EnumAttributeValidator.new('String',
183
+ %w[11 12 13 14 15 16 17 AM BL CH DS FI HM LM
184
+ MA MB MC OF TV VA WC ZZ])
185
+ return false unless claim_filing_indicator_code_validator.valid?(@claim_filing_indicator_code)
186
+
187
+ individual_relationship_code_validator = EnumAttributeValidator.new('String',
188
+ %w[01 18 19 20 21 39 40 53 G8])
189
+ return false unless individual_relationship_code_validator.valid?(@individual_relationship_code)
190
+
191
+ insurance_type_code_validator = EnumAttributeValidator.new('String',
192
+ %w[12 13 14 15 16 41 42 43 47])
193
+ return false unless insurance_type_code_validator.valid?(@insurance_type_code)
194
+
195
+ payment_responsibility_level_code_validator = EnumAttributeValidator.new('String',
196
+ %w[A B C D E F G H P S T U])
197
+ return false unless payment_responsibility_level_code_validator.valid?(@payment_responsibility_level_code)
198
+
199
+ release_of_information_code_validator = EnumAttributeValidator.new('String', %w[I Y])
200
+ return false unless release_of_information_code_validator.valid?(@release_of_information_code)
201
+
202
+ true
203
+ end
204
+
205
+ # Custom attribute writer method checking allowed values (enum).
206
+ # @param [Object] benefits_assignment_certification_indicator Object to be assigned
207
+ def benefits_assignment_certification_indicator=(benefits_assignment_certification_indicator)
208
+ validator = EnumAttributeValidator.new('String', %w[N W Y])
209
+ unless validator.valid?(benefits_assignment_certification_indicator)
210
+ raise ArgumentError,
211
+ %(invalid value for "benefits_assignment_certification_indicator", must be one of #{validator.allowable_values}.)
212
+ end
213
+
214
+ @benefits_assignment_certification_indicator = benefits_assignment_certification_indicator
215
+ end
216
+
217
+ # Custom attribute writer method checking allowed values (enum).
218
+ # @param [Object] claim_filing_indicator_code Object to be assigned
219
+ def claim_filing_indicator_code=(claim_filing_indicator_code)
220
+ validator = EnumAttributeValidator.new('String',
221
+ %w[11 12 13 14 15 16 17 AM BL CH DS FI HM LM MA MB MC OF TV VA WC ZZ])
222
+ unless validator.valid?(claim_filing_indicator_code)
223
+ raise ArgumentError,
224
+ %(invalid value for "claim_filing_indicator_code", must be one of #{validator.allowable_values}.)
225
+ end
226
+
227
+ @claim_filing_indicator_code = claim_filing_indicator_code
228
+ end
229
+
230
+ # Custom attribute writer method checking allowed values (enum).
231
+ # @param [Object] individual_relationship_code Object to be assigned
232
+ def individual_relationship_code=(individual_relationship_code)
233
+ validator = EnumAttributeValidator.new('String', %w[01 18 19 20 21 39 40 53 G8])
234
+ unless validator.valid?(individual_relationship_code)
235
+ raise ArgumentError,
236
+ %(invalid value for "individual_relationship_code", must be one of #{validator.allowable_values}.)
237
+ end
238
+
239
+ @individual_relationship_code = individual_relationship_code
240
+ end
241
+
242
+ # Custom attribute writer method checking allowed values (enum).
243
+ # @param [Object] insurance_type_code Object to be assigned
244
+ def insurance_type_code=(insurance_type_code)
245
+ validator = EnumAttributeValidator.new('String', %w[12 13 14 15 16 41 42 43 47])
246
+ unless validator.valid?(insurance_type_code)
247
+ raise ArgumentError,
248
+ %(invalid value for "insurance_type_code", must be one of #{validator.allowable_values}.)
249
+ end
250
+
251
+ @insurance_type_code = insurance_type_code
252
+ end
253
+
254
+ # Custom attribute writer method checking allowed values (enum).
255
+ # @param [Object] payment_responsibility_level_code Object to be assigned
256
+ def payment_responsibility_level_code=(payment_responsibility_level_code)
257
+ validator = EnumAttributeValidator.new('String', %w[A B C D E F G H P S T U])
258
+ unless validator.valid?(payment_responsibility_level_code)
259
+ raise ArgumentError,
260
+ %(invalid value for "payment_responsibility_level_code", must be one of #{validator.allowable_values}.)
261
+ end
262
+
263
+ @payment_responsibility_level_code = payment_responsibility_level_code
264
+ end
265
+
266
+ # Custom attribute writer method checking allowed values (enum).
267
+ # @param [Object] release_of_information_code Object to be assigned
268
+ def release_of_information_code=(release_of_information_code)
269
+ validator = EnumAttributeValidator.new('String', %w[I Y])
270
+ unless validator.valid?(release_of_information_code)
271
+ raise ArgumentError,
272
+ %(invalid value for "release_of_information_code", must be one of #{validator.allowable_values}.)
273
+ end
274
+
275
+ @release_of_information_code = release_of_information_code
276
+ end
277
+
278
+ # Checks equality by comparing each attribute.
279
+ # @param [Object] Object to be compared
280
+ def ==(other)
281
+ return true if equal?(other)
282
+
283
+ self.class == other.class &&
284
+ benefits_assignment_certification_indicator == other.benefits_assignment_certification_indicator &&
285
+ claim_filing_indicator_code == other.claim_filing_indicator_code &&
286
+ claim_level_adjustments == other.claim_level_adjustments &&
287
+ individual_relationship_code == other.individual_relationship_code &&
288
+ insurance_group_or_policy_number == other.insurance_group_or_policy_number &&
289
+ insurance_type_code == other.insurance_type_code &&
290
+ medicare_outpatient_adjudication == other.medicare_outpatient_adjudication &&
291
+ non_covered_charge_amount == other.non_covered_charge_amount &&
292
+ other_insured_group_name == other.other_insured_group_name &&
293
+ other_payer_billing_provider == other.other_payer_billing_provider &&
294
+ other_payer_name == other.other_payer_name &&
295
+ other_payer_referring_provider == other.other_payer_referring_provider &&
296
+ other_payer_rendering_provider == other.other_payer_rendering_provider &&
297
+ other_payer_service_facility_location == other.other_payer_service_facility_location &&
298
+ other_payer_supervising_provider == other.other_payer_supervising_provider &&
299
+ other_subscriber_name == other.other_subscriber_name &&
300
+ patient_signature_generated_for_patient == other.patient_signature_generated_for_patient &&
301
+ payer_paid_amount == other.payer_paid_amount &&
302
+ payment_responsibility_level_code == other.payment_responsibility_level_code &&
303
+ release_of_information_code == other.release_of_information_code &&
304
+ remaining_patient_liability == other.remaining_patient_liability
305
+ end
306
+
307
+ # @see the `==` method
308
+ # @param [Object] Object to be compared
309
+ def eql?(other)
310
+ self == other
311
+ end
312
+
313
+ # Calculates hash code according to all attributes.
314
+ # @return [Fixnum] Hash code
315
+ def hash
316
+ [benefits_assignment_certification_indicator, claim_filing_indicator_code, claim_level_adjustments,
317
+ individual_relationship_code, insurance_group_or_policy_number, insurance_type_code, medicare_outpatient_adjudication, non_covered_charge_amount, other_insured_group_name, other_payer_billing_provider, other_payer_name, other_payer_referring_provider, other_payer_rendering_provider, other_payer_service_facility_location, other_payer_supervising_provider, other_subscriber_name, patient_signature_generated_for_patient, payer_paid_amount, payment_responsibility_level_code, release_of_information_code, remaining_patient_liability].hash
318
+ end
319
+
320
+ # Builds the object from hash
321
+ # @param [Hash] attributes Model attributes in the form of hash
322
+ # @return [Object] Returns the model itself
323
+ def build_from_hash(attributes)
324
+ return nil unless attributes.is_a?(Hash)
325
+
326
+ self.class.swagger_types.each_pair do |key, type|
327
+ if type =~ /\AArray<(.*)>/i
328
+ # check to ensure the input is an array given that the attribute
329
+ # is documented as an array but the input is not
330
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
331
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
332
+ _deserialize(Regexp.last_match(1), v)
333
+ end)
334
+ end
335
+ elsif !attributes[self.class.attribute_map[key]].nil?
336
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
337
+ end
338
+ end
339
+
340
+ self
341
+ end
342
+
343
+ # Deserializes the data based on type
344
+ # @param string type Data type
345
+ # @param string value Value to be deserialized
346
+ # @return [Object] Deserialized data
347
+ def _deserialize(type, value)
348
+ case type.to_sym
349
+ when :DateTime
350
+ DateTime.parse(value)
351
+ when :Date
352
+ Date.parse(value)
353
+ when :String
354
+ value.to_s
355
+ when :Integer
356
+ value.to_i
357
+ when :Float
358
+ value.to_f
359
+ when :BOOLEAN
360
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
361
+ true
362
+ else
363
+ false
364
+ end
365
+ when :Object
366
+ # generic object (usually a Hash), return directly
367
+ value
368
+ when /\AArray<(?<inner_type>.+)>\z/
369
+ inner_type = Regexp.last_match[:inner_type]
370
+ value.map { |v| _deserialize(inner_type, v) }
371
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
372
+ k_type = Regexp.last_match[:k_type]
373
+ v_type = Regexp.last_match[:v_type]
374
+ {}.tap do |hash|
375
+ value.each do |k, v|
376
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
377
+ end
378
+ end
379
+ else # model
380
+ temp_model = SwaggerClient.const_get(type).new
381
+ temp_model.build_from_hash(value)
382
+ end
383
+ end
384
+
385
+ # Returns the string representation of the object
386
+ # @return [String] String presentation of the object
387
+ def to_s
388
+ to_hash.to_s
389
+ end
390
+
391
+ # to_body is an alias to to_hash (backward compatibility)
392
+ # @return [Hash] Returns the object in the form of hash
393
+ def to_body
394
+ to_hash
395
+ end
396
+
397
+ # Returns the object in the form of hash
398
+ # @return [Hash] Returns the object in the form of hash
399
+ def to_hash
400
+ hash = {}
401
+ self.class.attribute_map.each_pair do |attr, param|
402
+ value = send(attr)
403
+ next if value.nil?
404
+
405
+ hash[param] = _to_hash(value)
406
+ end
407
+ hash
408
+ end
409
+
410
+ # Outputs non-array value in the form of hash
411
+ # For object, use to_hash. Otherwise, just return the value
412
+ # @param [Object] value Any valid value
413
+ # @return [Hash] Returns the value in the form of hash
414
+ def _to_hash(value)
415
+ if value.is_a?(Array)
416
+ value.compact.map { |v| _to_hash(v) }
417
+ elsif value.is_a?(Hash)
418
+ {}.tap do |hash|
419
+ value.each { |k, v| hash[k] = _to_hash(v) }
420
+ end
421
+ elsif value.respond_to? :to_hash
422
+ value.to_hash
423
+ else
424
+ value
425
+ end
426
+ end
427
+ end
428
+ end
429
+ end
430
+ end