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,209 @@
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 ContactInformation
19
+ attr_accessor :email, :fax_number, :name, :phone_number, :valid_contact
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ email: :email,
25
+ fax_number: :faxNumber,
26
+ name: :name,
27
+ phone_number: :phoneNumber,
28
+ valid_contact: :validContact
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ email: :String,
36
+ fax_number: :String,
37
+ name: :String,
38
+ phone_number: :String,
39
+ valid_contact: :BOOLEAN
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ return unless attributes.is_a?(Hash)
47
+
48
+ # convert string to symbol for hash key
49
+ attributes = attributes.transform_keys(&:to_sym)
50
+
51
+ self.email = attributes[:email] if attributes.key?(:email)
52
+
53
+ self.fax_number = attributes[:faxNumber] if attributes.key?(:faxNumber)
54
+
55
+ self.name = attributes[:name] if attributes.key?(:name)
56
+
57
+ self.phone_number = attributes[:phoneNumber] if attributes.key?(:phoneNumber)
58
+
59
+ self.valid_contact = attributes[:validContact] if attributes.key?(:validContact)
60
+ end
61
+
62
+ # Show invalid properties with the reasons. Usually used together with valid?
63
+ # @return Array for valid properties with the reasons
64
+ def list_invalid_properties
65
+ []
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ true
72
+ end
73
+
74
+ # Checks equality by comparing each attribute.
75
+ # @param [Object] Object to be compared
76
+ def ==(other)
77
+ return true if equal?(other)
78
+
79
+ self.class == other.class &&
80
+ email == other.email &&
81
+ fax_number == other.fax_number &&
82
+ name == other.name &&
83
+ phone_number == other.phone_number &&
84
+ valid_contact == other.valid_contact
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(other)
90
+ self == other
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Fixnum] Hash code
95
+ def hash
96
+ [email, fax_number, name, phone_number, valid_contact].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def build_from_hash(attributes)
103
+ return nil unless attributes.is_a?(Hash)
104
+
105
+ self.class.swagger_types.each_pair do |key, type|
106
+ if type =~ /\AArray<(.*)>/i
107
+ # check to ensure the input is an array given that the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
111
+ _deserialize(Regexp.last_match(1), v)
112
+ end)
113
+ end
114
+ elsif !attributes[self.class.attribute_map[key]].nil?
115
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
+ end
117
+ end
118
+
119
+ self
120
+ end
121
+
122
+ # Deserializes the data based on type
123
+ # @param string type Data type
124
+ # @param string value Value to be deserialized
125
+ # @return [Object] Deserialized data
126
+ def _deserialize(type, value)
127
+ case type.to_sym
128
+ when :DateTime
129
+ DateTime.parse(value)
130
+ when :Date
131
+ Date.parse(value)
132
+ when :String
133
+ value.to_s
134
+ when :Integer
135
+ value.to_i
136
+ when :Float
137
+ value.to_f
138
+ when :BOOLEAN
139
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
140
+ true
141
+ else
142
+ false
143
+ end
144
+ when :Object
145
+ # generic object (usually a Hash), return directly
146
+ value
147
+ when /\AArray<(?<inner_type>.+)>\z/
148
+ inner_type = Regexp.last_match[:inner_type]
149
+ value.map { |v| _deserialize(inner_type, v) }
150
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
151
+ k_type = Regexp.last_match[:k_type]
152
+ v_type = Regexp.last_match[:v_type]
153
+ {}.tap do |hash|
154
+ value.each do |k, v|
155
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
156
+ end
157
+ end
158
+ else # model
159
+ temp_model = SwaggerClient.const_get(type).new
160
+ temp_model.build_from_hash(value)
161
+ end
162
+ end
163
+
164
+ # Returns the string representation of the object
165
+ # @return [String] String presentation of the object
166
+ def to_s
167
+ to_hash.to_s
168
+ end
169
+
170
+ # to_body is an alias to to_hash (backward compatibility)
171
+ # @return [Hash] Returns the object in the form of hash
172
+ def to_body
173
+ to_hash
174
+ end
175
+
176
+ # Returns the object in the form of hash
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_hash
179
+ hash = {}
180
+ self.class.attribute_map.each_pair do |attr, param|
181
+ value = send(attr)
182
+ next if value.nil?
183
+
184
+ hash[param] = _to_hash(value)
185
+ end
186
+ hash
187
+ end
188
+
189
+ # Outputs non-array value in the form of hash
190
+ # For object, use to_hash. Otherwise, just return the value
191
+ # @param [Object] value Any valid value
192
+ # @return [Hash] Returns the value in the form of hash
193
+ def _to_hash(value)
194
+ if value.is_a?(Array)
195
+ value.compact.map { |v| _to_hash(v) }
196
+ elsif value.is_a?(Hash)
197
+ {}.tap do |hash|
198
+ value.each { |k, v| hash[k] = _to_hash(v) }
199
+ end
200
+ elsif value.respond_to? :to_hash
201
+ value.to_hash
202
+ else
203
+ value
204
+ end
205
+ end
206
+ end
207
+ end
208
+ end
209
+ end
@@ -0,0 +1,255 @@
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 ContractInformation
19
+ attr_accessor :contract_amount, :contract_code, :contract_percentage, :contract_version_identifier,
20
+ :terms_discount_percentage
21
+
22
+ # Allowed Values are: '01' Diagnosis Related Group (DRG), '02' Per Diem, '03' Variable Per Diem, '04' Flat, '05' Capitated, '06' Percent, '07' Other
23
+ attr_accessor :contract_type_code
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype, :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ contract_amount: :contractAmount,
50
+ contract_code: :contractCode,
51
+ contract_percentage: :contractPercentage,
52
+ contract_type_code: :contractTypeCode,
53
+ contract_version_identifier: :contractVersionIdentifier,
54
+ terms_discount_percentage: :termsDiscountPercentage
55
+ }
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.swagger_types
60
+ {
61
+ contract_amount: :String,
62
+ contract_code: :String,
63
+ contract_percentage: :String,
64
+ contract_type_code: :String,
65
+ contract_version_identifier: :String,
66
+ terms_discount_percentage: :String
67
+ }
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ return unless attributes.is_a?(Hash)
74
+
75
+ # convert string to symbol for hash key
76
+ attributes = attributes.transform_keys(&:to_sym)
77
+
78
+ self.contract_amount = attributes[:contractAmount] if attributes.key?(:contractAmount)
79
+
80
+ self.contract_code = attributes[:contractCode] if attributes.key?(:contractCode)
81
+
82
+ self.contract_percentage = attributes[:contractPercentage] if attributes.key?(:contractPercentage)
83
+
84
+ self.contract_type_code = attributes[:contractTypeCode] if attributes.key?(:contractTypeCode)
85
+
86
+ self.contract_version_identifier = attributes[:contractVersionIdentifier] if attributes.key?(:contractVersionIdentifier)
87
+
88
+ self.terms_discount_percentage = attributes[:termsDiscountPercentage] if attributes.key?(:termsDiscountPercentage)
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ []
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ contract_type_code_validator = EnumAttributeValidator.new('String', %w[01 02 03 04 05 06 09])
101
+ return false unless contract_type_code_validator.valid?(@contract_type_code)
102
+
103
+ true
104
+ end
105
+
106
+ # Custom attribute writer method checking allowed values (enum).
107
+ # @param [Object] contract_type_code Object to be assigned
108
+ def contract_type_code=(contract_type_code)
109
+ validator = EnumAttributeValidator.new('String', %w[01 02 03 04 05 06 09])
110
+ unless validator.valid?(contract_type_code)
111
+ raise ArgumentError,
112
+ %(invalid value for "contract_type_code", must be one of #{validator.allowable_values}.)
113
+ end
114
+
115
+ @contract_type_code = contract_type_code
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(other)
121
+ return true if equal?(other)
122
+
123
+ self.class == other.class &&
124
+ contract_amount == other.contract_amount &&
125
+ contract_code == other.contract_code &&
126
+ contract_percentage == other.contract_percentage &&
127
+ contract_type_code == other.contract_type_code &&
128
+ contract_version_identifier == other.contract_version_identifier &&
129
+ terms_discount_percentage == other.terms_discount_percentage
130
+ end
131
+
132
+ # @see the `==` method
133
+ # @param [Object] Object to be compared
134
+ def eql?(other)
135
+ self == other
136
+ end
137
+
138
+ # Calculates hash code according to all attributes.
139
+ # @return [Fixnum] Hash code
140
+ def hash
141
+ [contract_amount, contract_code, contract_percentage, contract_type_code, contract_version_identifier,
142
+ terms_discount_percentage].hash
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def build_from_hash(attributes)
149
+ return nil unless attributes.is_a?(Hash)
150
+
151
+ self.class.swagger_types.each_pair do |key, type|
152
+ if type =~ /\AArray<(.*)>/i
153
+ # check to ensure the input is an array given that the attribute
154
+ # is documented as an array but the input is not
155
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
156
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
157
+ _deserialize(Regexp.last_match(1), v)
158
+ end)
159
+ end
160
+ elsif !attributes[self.class.attribute_map[key]].nil?
161
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
162
+ end
163
+ end
164
+
165
+ self
166
+ end
167
+
168
+ # Deserializes the data based on type
169
+ # @param string type Data type
170
+ # @param string value Value to be deserialized
171
+ # @return [Object] Deserialized data
172
+ def _deserialize(type, value)
173
+ case type.to_sym
174
+ when :DateTime
175
+ DateTime.parse(value)
176
+ when :Date
177
+ Date.parse(value)
178
+ when :String
179
+ value.to_s
180
+ when :Integer
181
+ value.to_i
182
+ when :Float
183
+ value.to_f
184
+ when :BOOLEAN
185
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
+ true
187
+ else
188
+ false
189
+ end
190
+ when :Object
191
+ # generic object (usually a Hash), return directly
192
+ value
193
+ when /\AArray<(?<inner_type>.+)>\z/
194
+ inner_type = Regexp.last_match[:inner_type]
195
+ value.map { |v| _deserialize(inner_type, v) }
196
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
+ k_type = Regexp.last_match[:k_type]
198
+ v_type = Regexp.last_match[:v_type]
199
+ {}.tap do |hash|
200
+ value.each do |k, v|
201
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
+ end
203
+ end
204
+ else # model
205
+ temp_model = SwaggerClient.const_get(type).new
206
+ temp_model.build_from_hash(value)
207
+ end
208
+ end
209
+
210
+ # Returns the string representation of the object
211
+ # @return [String] String presentation of the object
212
+ def to_s
213
+ to_hash.to_s
214
+ end
215
+
216
+ # to_body is an alias to to_hash (backward compatibility)
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_body
219
+ to_hash
220
+ end
221
+
222
+ # Returns the object in the form of hash
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_hash
225
+ hash = {}
226
+ self.class.attribute_map.each_pair do |attr, param|
227
+ value = send(attr)
228
+ next if value.nil?
229
+
230
+ hash[param] = _to_hash(value)
231
+ end
232
+ hash
233
+ end
234
+
235
+ # Outputs non-array value in the form of hash
236
+ # For object, use to_hash. Otherwise, just return the value
237
+ # @param [Object] value Any valid value
238
+ # @return [Hash] Returns the value in the form of hash
239
+ def _to_hash(value)
240
+ if value.is_a?(Array)
241
+ value.compact.map { |v| _to_hash(v) }
242
+ elsif value.is_a?(Hash)
243
+ {}.tap do |hash|
244
+ value.each { |k, v| hash[k] = _to_hash(v) }
245
+ end
246
+ elsif value.respond_to? :to_hash
247
+ value.to_hash
248
+ else
249
+ value
250
+ end
251
+ end
252
+ end
253
+ end
254
+ end
255
+ end