change_health 4.12.0 → 4.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +55 -1
  3. data/README.md +174 -32
  4. data/lib/change_health/models/claim/submission/address.rb +5 -5
  5. data/lib/change_health/models/claim/submission/claim_code_information.rb +11 -0
  6. data/lib/change_health/models/claim/submission/claim_information.rb +21 -16
  7. data/lib/change_health/models/claim/submission/claim_supplemental_information.rb +12 -0
  8. data/lib/change_health/models/claim/submission/contact_information.rb +12 -0
  9. data/lib/change_health/models/claim/submission/dependent.rb +7 -7
  10. data/lib/change_health/models/claim/submission/diagnosis.rb +19 -0
  11. data/lib/change_health/models/claim/submission/drug_identification.rb +4 -4
  12. data/lib/change_health/models/claim/submission/institutional_service.rb +16 -0
  13. data/lib/change_health/models/claim/submission/line_adjudication_information.rb +17 -0
  14. data/lib/change_health/models/claim/submission/other_payer_name.rb +11 -0
  15. data/lib/change_health/models/claim/submission/other_subscriber_information.rb +17 -0
  16. data/lib/change_health/models/claim/submission/other_subscriber_name.rb +13 -0
  17. data/lib/change_health/models/claim/submission/professional_service.rb +16 -0
  18. data/lib/change_health/models/claim/submission/provider.rb +11 -11
  19. data/lib/change_health/models/claim/submission/receiver.rb +9 -0
  20. data/lib/change_health/models/claim/submission/report_information.rb +11 -0
  21. data/lib/change_health/models/claim/submission/service_facility_location.rb +12 -0
  22. data/lib/change_health/models/claim/submission/service_line.rb +7 -5
  23. data/lib/change_health/models/claim/submission/submitter.rb +3 -4
  24. data/lib/change_health/models/claim/submission/subscriber.rb +9 -9
  25. data/lib/change_health/request/submission.rb +55 -22
  26. data/lib/change_health/version.rb +1 -1
  27. data/lib/change_health.rb +14 -1
  28. metadata +15 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ddaef653d42e435de01803eb4f3a7b812967cb8d8383a21ea9e1c175e86be30
4
- data.tar.gz: 9be3f9f9bb5bb344c9bde71b8e325042f50d35ef19587b7a9f4a4cffbabe5848
3
+ metadata.gz: cefa3385bd0fc12684684383de2de39c4e0ef4ff67972ba9c81d1bc7a8345a01
4
+ data.tar.gz: 1c193080064802e59829060d926cdf3fd144d8db81699d48637138dc124acbdd
5
5
  SHA512:
6
- metadata.gz: a385d3b63df90dc06370f4574a09d374647db7ecce46c804cb9b51e5c8e163f69a407932c8834612414467b940d7d47d411b1acd277dcd0023a6378b825174b2
7
- data.tar.gz: 210616ed27e31f680a2c213f6a0de92f011b43b2c5a80f2f58a938ade23db70fa92262389eb991b8551fbc4a8873257d0137860e9c8b85ae43f1679326416a5c
6
+ metadata.gz: '08bee260e0a46761bf3dc1d25242613397a1128bd3015659aa31adc116e553699412aec0c539f92e3b87afacca3c4e66a173deebd260bfd8d3ae1886a092d1de'
7
+ data.tar.gz: 6404f63ab7ccd33e3ec8d5009ecb086b8e06abc1c5d3d55a4687baa85c126e95474a1641b3c0656af7cee549d71ff8def2d8e160166624055a2f70858b4be7b1
data/CHANGELOG.md CHANGED
@@ -5,13 +5,65 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ # [4.13.1] - 2023-08-23
9
+
10
+ ### Fixed
11
+
12
+ Added institional claim submission specific headers so that institutional claims that required headers will go through in production
13
+
14
+ # [4.13.0] - 2023-08-11
15
+
16
+ ### Added
17
+
18
+ #### Ability to submit an institutional claim
19
+
20
+ * Added the following classes
21
+ * ChangeHealth::Models::Claim::ClaimCodeInformation
22
+ * ChangeHealth::Models::Claim::InstitutionalService
23
+ * Added fields to existing submission classes
24
+ * ClaimInformation - claimCodeInformation, claimNote, claimNotes, etc
25
+ * ServiceLine - assignedNumber, institutionalService
26
+ * ChangeHealth::Request::Claim::Submission#submission now takes `is_professional` argument which defaults to `true`
27
+ * `true` for professional claim submission
28
+ * `false` for institutional claim submission
29
+
30
+
31
+ #### Added other submission classes
32
+
33
+ These are used by professional claims and sometimes institutional
34
+ * ChangeHealth::Models::Claim::ClaimSupplementalInformation
35
+ * ChangeHealth::Models::Claim::ContactInformation
36
+ * ChangeHealth::Models::Claim::Diagnosis
37
+ * ChangeHealth::Models::Claim::LineAdjudicationInformation
38
+ * ChangeHealth::Models::Claim::OtherPayerName
39
+ * ChangeHealth::Models::Claim::OtherSubscriberInformation
40
+ * ChangeHealth::Models::Claim::OtherSubscriberName
41
+ * ChangeHealth::Models::Claim::ProfessionalService
42
+ * ChangeHealth::Models::Claim::Receiver
43
+ * ChangeHealth::Models::Claim::ReportInformation
44
+ * ChangeHealth::Models::Claim::ServiceFacilityLocation
45
+
46
+
47
+ ### Deprecated
48
+
49
+ Some endpoint constants in Submission:
50
+ * ChangeHealth::Request::Claim::Submission::ENDPOINT
51
+ * ChangeHealth::Request::Claim::Submission::HEALTH_CHECK_ENDPOINT
52
+ * ChangeHealth::Request::Claim::Submission::VALIDATION_ENDPOINT
53
+ * ChangeHealth::Request::Claim::Submission::SUBMISSION_ENDPOINT
54
+
55
+ Replace with:
56
+ * ENDPOINT -> PROFESSIONAL_ENDPOINT
57
+ * HEALTH_CHECK_ENDPOINT -> PROFESSIONAL_ENDPOINT || INSTITUTIONAL_ENDPOINT + HEALTH_CHECK_SUFFIX
58
+ * VALIDATION_ENDPOINT -> PROFESSIONAL_ENDPOINT || INSTITUTIONAL_ENDPOINT + SUBMISSION_SUFFIX
59
+ * SUBMISSION_ENDPOINT -> PROFESSIONAL_ENDPOINT || INSTITUTIONAL_ENDPOINT + VALIDATION_SUFFIX
60
+
8
61
  # [4.12.0] - 2023-1-23
9
62
 
10
63
  ### Added
11
64
 
12
65
  * Property `insuranceTypeCode` for ChangeHealth::Models::Claim::Subscriber
13
66
 
14
-
15
67
  # [4.11.0] - 2022-12-30
16
68
 
17
69
  ### Added
@@ -473,6 +525,8 @@ Added the ability to hit professional claim submission API. For more details, se
473
525
  * Authentication
474
526
  * Configuration
475
527
 
528
+ [4.13.1]: https://github.com/WeInfuse/change_health/compare/v4.13.0...v4.13.1
529
+ [4.13.0]: https://github.com/WeInfuse/change_health/compare/v4.12.0...v4.13.0
476
530
  [4.12.0]: https://github.com/WeInfuse/change_health/compare/v4.11.0...v4.12.0
477
531
  [4.11.0]: https://github.com/WeInfuse/change_health/compare/v4.10.1...v4.11.0
478
532
  [4.10.1]: https://github.com/WeInfuse/change_health/compare/v4.10.0...v4.10.1
data/README.md CHANGED
@@ -98,17 +98,26 @@ trading_partners.first.service_id
98
98
  ```
99
99
 
100
100
  ## Claim Submission
101
- [Change Healthcare Claim Submission Guide](https://developers.changehealthcare.com/eligibilityandclaims/docs/professional-claims-v3-getting-started)
101
+
102
+ ### Professional Claims
103
+ [Change Healthcare Professional Claim Submission Guide](https://developers.changehealthcare.com/eligibilityandclaims/docs/professional-claims-v3-getting-started)
102
104
  ```ruby
103
105
  ChangeHealth::Request::Claim::Submission.ping # Test your connection
104
106
 
105
- contact_information = { name: "SUBMITTER CONTACT INFO", phoneNumber: "123456789"}
106
- claim_submitter = ChangeHealth::Models::Claim::Submitter.new(
107
+ contact_information = ChangeHealth::Models::Claim::ContactInformation.new(
108
+ name: "SUBMITTER CONTACT INFO",
109
+ phone_number: "123456789"
110
+ )
111
+
112
+ submitter = ChangeHealth::Models::Claim::Submitter.new(
107
113
  organization_name: "REGIONAL PPO NETWORK",
108
114
  contact_information: contact_information
109
115
  )
110
116
 
111
- receiver = { organizationName: "EXTRA HEALTHY INSURANCE"}
117
+ receiver = ChangeHealth::Models::Claim::Receiver.new(
118
+ organization_name: "EXTRA HEALTHY INSURANCE"
119
+ )
120
+
112
121
  address = ChangeHealth::Models::Claim::Address.new(
113
122
  address1: "123 address1",
114
123
  city: "city1",
@@ -145,41 +154,44 @@ provider = ChangeHealth::Models::Claim::Provider.new(
145
154
  provider_type: "BillingProvider"
146
155
  )
147
156
 
148
- health_care_code_information1 = {
149
- diagnosisTypeCode: "ABK",
150
- diagnosisCode: "S93401A"
151
- }
152
- health_care_code_information2 = {
153
- diagnosisTypeCode: "ABF",
154
- diagnosisCode: "S72044G"
157
+ diagnosis1 = ChangeHealth::Models::Claim::Diagnosis.new(
158
+ diagnosis_type_code: "ABK",
159
+ diagnosis_code: "S93401A"
160
+ )
161
+
162
+ diagnosis2 = ChangeHealth::Models::Claim::Diagnosis.new(
163
+ diagnosis_type_code: "ABF",
164
+ diagnosis_code: "S72044G"
165
+ )
155
166
 
156
- }
157
167
  service_line1 = ChangeHealth::Models::Claim::ServiceLine.new(
158
168
  service_date: "2018-05-14",
159
- professional_service: {
160
- procedureIdentifier: "HC",
161
- lineItemChargeAmount: "25",
162
- procedureCode: "E0570",
163
- measurementUnit: "UN",
164
- serviceUnitCount: "1",
165
- compositeDiagnosisCodePointers: {
169
+ professional_service: ChangeHealth::Models::Claim::ProfessionalService.new(
170
+ line_item_charge_amount: "25",
171
+ measurement_unit: "UN",
172
+ procedure_code: "E0570",
173
+ procedure_identifier: "HC",
174
+ service_unit_count: "1",
175
+ composite_diagnosis_code_pointers: {
166
176
  diagnosisCodePointers: ["1","2"]
167
177
  }
168
- }
178
+ )
169
179
  )
180
+
170
181
  service_line2 = ChangeHealth::Models::Claim::ServiceLine.new(
171
182
  service_date: "20180514",
172
- professional_service: {
173
- procedureIdentifier: "HC",
174
- lineItemChargeAmount: "3.75",
175
- procedureCode: "A7003",
176
- measurementUnit: "UN",
177
- serviceUnitCount: "1",
178
- compositeDiagnosisCodePointers: {
183
+ professional_service: ChangeHealth::Models::Claim::ProfessionalService.new(
184
+ line_item_charge_amount: "3.75",
185
+ measurement_unit: "UN",
186
+ procedure_code: "A7003",
187
+ procedure_identifier: "HC",
188
+ service_unit_count: "1",
189
+ composite_diagnosis_code_pointers: {
179
190
  diagnosisCodePointers: ["1"]
180
191
  }
181
- }
192
+ )
182
193
  )
194
+
183
195
  claim_information = ChangeHealth::Models::Claim::ClaimInformation.new(
184
196
  benefits_assignment_certification_indicator: "Y",
185
197
  claim_charge_amount: "28.75",
@@ -190,11 +202,11 @@ claim_information = ChangeHealth::Models::Claim::ClaimInformation.new(
190
202
  plan_participation_code: "A",
191
203
  release_information_code: "Y",
192
204
  signature_indicator: "Y",
193
- health_care_code_information: [health_care_code_information1, health_care_code_information2],
205
+ health_care_code_information: [diagnosis1, diagnosis2],
194
206
  service_lines: [service_line1, service_line2]
195
207
  )
196
208
 
197
- professional_headers = {
209
+ headers = {
198
210
  submitter_id: '111000',
199
211
  biller_id: '000111',
200
212
  username: '222333hey',
@@ -204,11 +216,11 @@ professional_headers = {
204
216
  claim_submission = ChangeHealth::Request::Claim::Submission.new(
205
217
  claim_information: claim_information,
206
218
  dependent: dependent,
207
- headers: professional_headers,
219
+ headers: headers,
208
220
  pay_to_address: address,
209
221
  providers: [provider],
210
222
  receiver: receiver,
211
- submitter: claim_submitter,
223
+ submitter: submitter,
212
224
  subscriber: subscriber,
213
225
  trading_partner_service_id: "9496"
214
226
  )
@@ -218,6 +230,136 @@ claim_submission_data = claim_submission.submission
218
230
  validation = claim_submission.validation
219
231
  ```
220
232
 
233
+ ### Institutional Claims
234
+ [Change Healthcare Institutional Claim Submission Guide](https://developers.changehealthcare.com/eligibilityandclaims/docs/institutional-claims-v1-api-getting-started)
235
+ ```ruby
236
+ ChangeHealth::Request::Claim::Submission.ping(is_professional: false) # Test your connection
237
+
238
+ claim_code_information = ChangeHealth::Models::Claim::ClaimCodeInformation.new(
239
+ admission_source_code: "7",
240
+ admission_type_code: "1",
241
+ patient_status_code: "10"
242
+ )
243
+
244
+ other_diagnosis_information_list = [[
245
+ ChangeHealth::Models::Claim::Diagnosis.new(
246
+ other_diagnosis_code: "S72044G",
247
+ qualifier_code: "ABF"
248
+ ),
249
+ ChangeHealth::Models::Claim::Diagnosis.new(
250
+ other_diagnosis_code: "S72044H",
251
+ qualifier_code: "ABF"
252
+ )
253
+ ]]
254
+
255
+ principal_diagnosis = ChangeHealth::Models::Claim::Diagnosis.new(
256
+ principal_diagnosis_code: "S93401A",
257
+ qualifier_code: "ABK"
258
+ )
259
+
260
+ service_line1 = ChangeHealth::Models::Claim::ServiceLine.new(
261
+ assigned_number: "1",
262
+ institutional_service: ChangeHealth::Models::Claim::InstitutionalService.new(
263
+ line_item_charge_amount: "25",
264
+ measurement_unit: "UN",
265
+ procedure_code: "E0570",
266
+ procedure_identifier: "HC",
267
+ service_line_revenue_code: "X",
268
+ service_unit_count: "1",
269
+ )
270
+ )
271
+
272
+ service_line2 = ChangeHealth::Models::Claim::ServiceLine.new(
273
+ assigned_number: "2",
274
+ institutional_service: ChangeHealth::Models::Claim::InstitutionalService.new(
275
+ line_item_charge_amount: "3.75",
276
+ measurement_unit: "UN",
277
+ procedure_code: "A7003",
278
+ procedure_identifier: "HC",
279
+ service_line_revenue_code: "Y",
280
+ service_unit_count: "1",
281
+ )
282
+ )
283
+
284
+ claim_information = ChangeHealth::Models::Claim::ClaimInformation.new(
285
+ benefits_assignment_certification_indicator: "Y",
286
+ claim_charge_amount: "28.75",
287
+ claim_code_information: claim_code_information,
288
+ claim_filing_code: "CI",
289
+ claim_frequency_code: "1",
290
+ other_diagnosis_information_list: other_diagnosis_information_list,
291
+ patient_control_number: "12345",
292
+ place_of_service_code: "11",
293
+ plan_participation_code: "A",
294
+ principal_diagnosis: principal_diagnosis,
295
+ release_information_code: "Y",
296
+ signature_indicator: "Y",
297
+ service_lines: [service_line1, service_line2]
298
+ )
299
+
300
+ headers = {
301
+ submitter_id: '111000',
302
+ biller_id: '000111',
303
+ username: '222333hey',
304
+ password: 'builder1'
305
+ }
306
+
307
+ address = ChangeHealth::Models::Claim::Address.new(
308
+ address1: "123 address1",
309
+ city: "city1",
310
+ state: "wa",
311
+ postalCode: "981010000"
312
+ )
313
+
314
+ provider = ChangeHealth::Models::Claim::Provider.new(
315
+ address: address,
316
+ employer_id: "000000000",
317
+ first_name: "johnone",
318
+ last_name: "doetwo",
319
+ npi: "1760854442",
320
+ organization_name: "EXTRA HEALTHY INSURANCE",
321
+ provider_type: "BillingProvider"
322
+ )
323
+
324
+ receiver = ChangeHealth::Models::Claim::Receiver.new(
325
+ organization_name: "EXTRA HEALTHY INSURANCE"
326
+ )
327
+
328
+ contact_information = ChangeHealth::Models::Claim::ContactInformation.new(
329
+ name: "SUBMITTER CONTACT INFO",
330
+ phone_number: "123456789"
331
+ )
332
+
333
+ submitter = ChangeHealth::Models::Claim::Submitter.new(
334
+ organization_name: "REGIONAL PPO NETWORK",
335
+ contact_information: contact_information
336
+ )
337
+
338
+ subscriber = ChangeHealth::Models::Claim::Subscriber.new(
339
+ member_id: "0000000001",
340
+ payment_responsibility_level_code: "P",
341
+ first_name: "johnone",
342
+ last_name: "doetwo",
343
+ gender: "M",
344
+ date_of_birth: "02/01/1980",
345
+ address: address
346
+ )
347
+
348
+ claim_submission = ChangeHealth::Request::Claim::Submission.new(
349
+ claim_information: claim_information,
350
+ headers: headers,
351
+ providers: [provider],
352
+ receiver: receiver,
353
+ submitter: submitter,
354
+ subscriber: subscriber,
355
+ trading_partner_service_id: "9496"
356
+ )
357
+
358
+ claim_submission_data = claim_submission.submission(is_professional: false)
359
+
360
+ validation = claim_submission.validation(is_professional: false)
361
+ ```
362
+
221
363
  ## Claim Reports
222
364
  [Change Healthcare Claim Responses and Reports Guide](https://developers.changehealthcare.com/eligibilityandclaims/docs/claims-responses-and-reports-getting-started)
223
365
 
@@ -2,11 +2,11 @@ module ChangeHealth
2
2
  module Models
3
3
  module Claim
4
4
  class Address < Model
5
- property :address1, required: false
6
- property :address2, required: false
7
- property :city, required: false
8
- property :postalCode, from: :postal_code, required: false
9
- property :state, required: false
5
+ property :address1
6
+ property :address2
7
+ property :city
8
+ property :postalCode, from: :postal_code
9
+ property :state
10
10
  end
11
11
  end
12
12
  end
@@ -0,0 +1,11 @@
1
+ module ChangeHealth
2
+ module Models
3
+ module Claim
4
+ class ClaimCodeInformation < Model
5
+ property :admissionSourceCode, from: :admission_source_code
6
+ property :admissionTypeCode, from: :admission_type_code
7
+ property :patientStatusCode, from: :patient_status_code
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,22 +1,27 @@
1
1
  module ChangeHealth
2
2
  module Models
3
3
  module Claim
4
- class ClaimInformation < Hashie::Trash
5
- property :benefitsAssignmentCertificationIndicator, from: :benefits_assignment_certification_indicator, required: false
6
- property :claimChargeAmount, from: :claim_charge_amount, required: false
7
- property :claimFilingCode, from: :claim_filing_code, required: false
8
- property :claimFrequencyCode, from: :claim_frequency_code, required: false
9
- property :claimSupplementalInformation, from: :claim_supplemental_information, required: false
10
- property :healthCareCodeInformation, from: :health_care_code_information, required: false
11
- property :patientControlNumber, from: :patient_control_number, required: false
12
- property :placeOfServiceCode, from: :place_of_service_code, required: false
13
- property :planParticipationCode, from: :plan_participation_code, required: false
14
- property :releaseInformationCode, from: :release_information_code, required: false
15
- property :serviceFacilityLocation, from: :service_facility_location, required: false
16
- property :serviceLines, from: :service_lines, required: false
17
- property :signatureIndicator, from: :signature_indicator, required: false
18
- property :otherSubscriberInformation, from: :other_subscriber_information, required: false
19
- property :claimNote, from: :claim_note, required: false
4
+ class ClaimInformation < Model
5
+ property :admittingDiagnosis, from: :admitting_diagnosis
6
+ property :benefitsAssignmentCertificationIndicator, from: :benefits_assignment_certification_indicator
7
+ property :claimChargeAmount, from: :claim_charge_amount
8
+ property :claimCodeInformation, from: :claim_code_information
9
+ property :claimFilingCode, from: :claim_filing_code
10
+ property :claimFrequencyCode, from: :claim_frequency_code
11
+ property :claimNote, from: :claim_note
12
+ property :claimNotes, from: :claim_notes
13
+ property :claimSupplementalInformation, from: :claim_supplemental_information
14
+ property :healthCareCodeInformation, from: :health_care_code_information
15
+ property :otherDiagnosisInformationList, from: :other_diagnosis_information_list
16
+ property :otherSubscriberInformation, from: :other_subscriber_information
17
+ property :patientControlNumber, from: :patient_control_number
18
+ property :placeOfServiceCode, from: :place_of_service_code
19
+ property :planParticipationCode, from: :plan_participation_code
20
+ property :principalDiagnosis, from: :principal_diagnosis
21
+ property :releaseInformationCode, from: :release_information_code
22
+ property :serviceFacilityLocation, from: :service_facility_location
23
+ property :serviceLines, from: :service_lines
24
+ property :signatureIndicator, from: :signature_indicator
20
25
 
21
26
  def add_service_line(service_line)
22
27
  self[:serviceLines] ||= []
@@ -0,0 +1,12 @@
1
+ module ChangeHealth
2
+ module Models
3
+ module Claim
4
+ class ClaimSupplementalInformation < Model
5
+ property :claimControlNumber, from: :claim_control_number
6
+ property :priorAuthorizationNumber, from: :prior_authorization_number
7
+ property :referralNumber, from: :referral_number
8
+ property :reportInformation, from: :report_information
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ module ChangeHealth
2
+ module Models
3
+ module Claim
4
+ class ContactInformation < Model
5
+ property :email
6
+ property :faxNumber, from: :fax_number
7
+ property :name
8
+ property :phoneNumber, from: :phone_number
9
+ end
10
+ end
11
+ end
12
+ end
@@ -2,13 +2,13 @@ module ChangeHealth
2
2
  module Models
3
3
  module Claim
4
4
  class Dependent < Model
5
- property :address, required: false
6
- property :dateOfBirth, from: :date_of_birth, required: false
7
- property :firstName, from: :first_name, required: false
8
- property :gender, required: false
9
- property :lastName, from: :last_name, required: false
10
- property :memberId, from: :member_id, required: false
11
- property :relationshipToSubscriberCode, from: :relationship_to_subscriber_code, required: false
5
+ property :address
6
+ property :dateOfBirth, from: :date_of_birth
7
+ property :firstName, from: :first_name
8
+ property :gender
9
+ property :lastName, from: :last_name
10
+ property :memberId, from: :member_id
11
+ property :relationshipToSubscriberCode, from: :relationship_to_subscriber_code
12
12
  end
13
13
  end
14
14
  end
@@ -0,0 +1,19 @@
1
+ module ChangeHealth
2
+ module Models
3
+ module Claim
4
+ # Can be used for
5
+ # - admittingDiagnosis
6
+ # - healthCareCodeInformation items
7
+ # - otherDiagnosisInformationList items
8
+ # - principalDiagnosis
9
+ class Diagnosis < Model
10
+ property :admittingDiagnosisCode, from: :admitting_diagnosis_code
11
+ property :diagnosisCode, from: :diagnosis_code
12
+ property :diagnosisTypeCode, from: :diagnosis_type_code
13
+ property :otherDiagnosisCode, from: :other_diagnosis_code
14
+ property :principalDiagnosisCode, from: :principal_diagnosis_code
15
+ property :qualifierCode, from: :qualifier_code
16
+ end
17
+ end
18
+ end
19
+ end
@@ -2,10 +2,10 @@ module ChangeHealth
2
2
  module Models
3
3
  module Claim
4
4
  class DrugIdentification < Model
5
- property :measurementUnitCode, from: :measurement_unit_code, required: false
6
- property :nationalDrugCode, from: :national_drug_code, required: false
7
- property :nationalDrugUnitCount, from: :national_drug_unit_count, required: false
8
- property :serviceIdQualifier, from: :service_id_qualifier, required: false
5
+ property :measurementUnitCode, from: :measurement_unit_code
6
+ property :nationalDrugCode, from: :national_drug_code
7
+ property :nationalDrugUnitCount, from: :national_drug_unit_count
8
+ property :serviceIdQualifier, from: :service_id_qualifier
9
9
  end
10
10
  end
11
11
  end
@@ -0,0 +1,16 @@
1
+ module ChangeHealth
2
+ module Models
3
+ module Claim
4
+ class InstitutionalService < Model
5
+ property :description
6
+ property :lineItemChargeAmount, from: :line_item_charge_amount
7
+ property :measurementUnit, from: :measurement_unit
8
+ property :procedureCode, from: :procedure_code
9
+ property :procedureIdentifier, from: :procedure_identifier
10
+ property :procedureModifiers, from: :procedure_modifiers
11
+ property :serviceLineRevenueCode, from: :service_line_revenue_code
12
+ property :serviceUnitCount, from: :service_unit_count
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,17 @@
1
+ module ChangeHealth
2
+ module Models
3
+ module Claim
4
+ class LineAdjudicationInformation < Model
5
+ property :adjudicationOrPaymentDate, from: :adjudication_or_payment_date
6
+ property :claimAdjustmentInformation, from: :claim_adjustment_information
7
+ property :otherPayerPrimaryIdentifier, from: :other_payer_primary_identifier
8
+ property :paidServiceUnitCount, from: :paid_service_unit_count
9
+ property :procedureCode, from: :procedure_code
10
+ property :procedureModifier, from: :procedure_modifier
11
+ property :remainingPatientLiability, from: :remaining_patient_liability
12
+ property :serviceIdQualifier, from: :service_id_qualifier
13
+ property :serviceLinePaidAmount, from: :service_line_paid_amount
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,11 @@
1
+ module ChangeHealth
2
+ module Models
3
+ module Claim
4
+ class OtherPayerName < Model
5
+ property :otherPayerIdentifier, from: :other_payer_identifier
6
+ property :otherPayerIdentifierTypeCode, from: :other_payer_identifier_type_code
7
+ property :otherPayerOrganizationName, from: :other_payer_organization_name
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,17 @@
1
+ module ChangeHealth
2
+ module Models
3
+ module Claim
4
+ class OtherSubscriberInformation < Model
5
+ property :benefitsAssignmentCertificationIndicator, from: :benefits_assignment_certification_indicator
6
+ property :claimFilingIndicatorCode, from: :claim_filing_indicator_code
7
+ property :claimLevelAdjustments, from: :claim_level_adjustments
8
+ property :individualRelationshipCode, from: :individual_relationship_code
9
+ property :otherPayerName, from: :other_payer_name
10
+ property :otherSubscriberName, from: :other_subscriber_name
11
+ property :payerPaidAmount, from: :payer_paid_amount
12
+ property :paymentResponsibilityLevelCode, from: :payment_responsibility_level_code
13
+ property :releaseOfInformationCode, from: :release_of_information_code
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ module ChangeHealth
2
+ module Models
3
+ module Claim
4
+ class OtherSubscriberName < Model
5
+ property :otherInsuredFirstName, from: :other_insured_first_nsame
6
+ property :otherInsuredIdentifier, from: :other_insured_identifier
7
+ property :otherInsuredIdentifierTypeCode, from: :other_insured_identifier_type_code
8
+ property :otherInsuredLastName, from: :other_insured_last_name
9
+ property :otherInsuredQualifier, from: :other_insured_qualifier
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,16 @@
1
+ module ChangeHealth
2
+ module Models
3
+ module Claim
4
+ class ProfessionalService < Model
5
+ property :compositeDiagnosisCodePointers, from: :composite_diagnosis_code_pointers
6
+ property :description
7
+ property :lineItemChargeAmount, from: :line_item_charge_amount
8
+ property :measurementUnit, from: :measurement_unit
9
+ property :procedureCode, from: :procedure_code
10
+ property :procedureIdentifier, from: :procedure_identifier
11
+ property :procedureModifiers, from: :procedure_modifiers
12
+ property :serviceUnitCount, from: :service_unit_count
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,17 +1,17 @@
1
1
  module ChangeHealth
2
2
  module Models
3
3
  module Claim
4
- class Provider < Hashie::Trash
5
- property :address, required: false
6
- property :contactInformation, from: :contact_information, required: false
7
- property :employerId, from: :employer_id, required: false # or ssn
8
- property :firstName, from: :first_name, required: false
9
- property :lastName, from: :last_name, required: false
10
- property :organizationName, from: :organization_name, required: false
11
- property :npi, required: false
12
- property :providerType, from: :provider_type, required: false
13
- property :taxonomyCode, from: :taxonomy_code, required: false
14
- property :ssn, required: false # or employer id
4
+ class Provider < Model
5
+ property :address
6
+ property :contactInformation, from: :contact_information
7
+ property :employerId, from: :employer_id # or ssn
8
+ property :firstName, from: :first_name
9
+ property :lastName, from: :last_name
10
+ property :npi
11
+ property :organizationName, from: :organization_name
12
+ property :providerType, from: :provider_type
13
+ property :ssn # or employer id
14
+ property :taxonomyCode, from: :taxonomy_code
15
15
  end
16
16
  end
17
17
  end
@@ -0,0 +1,9 @@
1
+ module ChangeHealth
2
+ module Models
3
+ module Claim
4
+ class Receiver < Model
5
+ property :organizationName, from: :organization_name
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ module ChangeHealth
2
+ module Models
3
+ module Claim
4
+ class ReportInformation < Model
5
+ property :attachmentControlNumber, from: :attachment_control_number
6
+ property :attachmentReportTypeCode, from: :attachment_report_type_code
7
+ property :attachmentTransmissionCode, from: :attachment_transmission_code
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ module ChangeHealth
2
+ module Models
3
+ module Claim
4
+ class ServiceFacilityLocation < Model
5
+ property :address
6
+ property :organizationName, from: :organization_name
7
+ property :npi
8
+ property :phoneNumber, from: :phone_number
9
+ end
10
+ end
11
+ end
12
+ end
@@ -2,11 +2,13 @@ module ChangeHealth
2
2
  module Models
3
3
  module Claim
4
4
  class ServiceLine < Model
5
- property :drugIdentification, from: :drug_identification, required: false
6
- property :serviceDate, from: :service_date, required: false
7
- property :professionalService, from: :professional_service, required: false
8
- property :renderingProvider, from: :rendering_provider, required: false
9
- property :lineAdjudicationInformation, from: :line_adjudication_information, required: false
5
+ property :assignedNumber, from: :assigned_number
6
+ property :drugIdentification, from: :drug_identification
7
+ property :institutionalService, from: :institutional_service
8
+ property :lineAdjudicationInformation, from: :line_adjudication_information
9
+ property :professionalService, from: :professional_service
10
+ property :renderingProvider, from: :rendering_provider
11
+ property :serviceDate, from: :service_date
10
12
  end
11
13
  end
12
14
  end
@@ -1,10 +1,9 @@
1
1
  module ChangeHealth
2
2
  module Models
3
3
  module Claim
4
- class Submitter < Hashie::Trash
5
- property :organizationName, from: :organization_name, required: false
6
- # contact information has a name & phone number inside
7
- property :contactInformation, from: :contact_information, required: false
4
+ class Submitter < Model
5
+ property :contactInformation, from: :contact_information
6
+ property :organizationName, from: :organization_name
8
7
  end
9
8
  end
10
9
  end
@@ -2,15 +2,15 @@ module ChangeHealth
2
2
  module Models
3
3
  module Claim
4
4
  class Subscriber < Model
5
- property :address, required: false
6
- property :dateOfBirth, from: :date_of_birth, required: false
7
- property :firstName, from: :first_name, required: false
8
- property :gender, required: false
9
- property :groupNumber, from: :group_number, required: false
10
- property :insuranceTypeCode, from: :insurance_type_code, required: false
11
- property :lastName, from: :last_name, required: false
12
- property :memberId, from: :member_id, required: false
13
- property :paymentResponsibilityLevelCode, from: :payment_responsibility_level_code, required: false
5
+ property :address
6
+ property :dateOfBirth, from: :date_of_birth
7
+ property :firstName, from: :first_name
8
+ property :gender
9
+ property :groupNumber, from: :group_number
10
+ property :insuranceTypeCode, from: :insurance_type_code
11
+ property :lastName, from: :last_name
12
+ property :memberId, from: :member_id
13
+ property :paymentResponsibilityLevelCode, from: :payment_responsibility_level_code
14
14
  end
15
15
  end
16
16
  end
@@ -2,20 +2,28 @@ module ChangeHealth
2
2
  module Request
3
3
  module Claim
4
4
  class Submission < Hashie::Trash
5
- ENDPOINT = '/medicalnetwork/professionalclaims/v3'.freeze
5
+ PROFESSIONAL_ENDPOINT = '/medicalnetwork/professionalclaims/v3'.freeze
6
+ INSTITUTIONAL_ENDPOINT = '/medicalnetwork/institutionalclaims/v1'.freeze
7
+ HEALTH_CHECK_SUFFIX = '/healthcheck'.freeze
8
+ SUBMISSION_SUFFIX = '/submission'.freeze
9
+ VALIDATION_SUFFIX = '/validation'.freeze
10
+
11
+ # Deprecated but still here for backwards compatibility
12
+ ENDPOINT = PROFESSIONAL_ENDPOINT
6
13
  HEALTH_CHECK_ENDPOINT = ENDPOINT + '/healthcheck'.freeze
7
14
  SUBMISSION_ENDPOINT = ENDPOINT + '/submission'.freeze
8
15
  VALIDATION_ENDPOINT = ENDPOINT + '/validation'.freeze
16
+ # End Deprecated
9
17
 
10
18
  property :claimInformation, from: :claim_information, required: false
11
19
  property :controlNumber, from: :control_number, required: true, default: ChangeHealth::Models::CONTROL_NUMBER
12
20
  property :dependent, required: false
21
+ property :headers, required: false
13
22
  property :payToAddress, from: :pay_to_address, required: false
14
23
  property :providers, required: false
15
24
  property :receiver, required: false
16
25
  property :submitter, required: false
17
26
  property :subscriber, required: false
18
- property :headers, required: false
19
27
  # Need one or the other, trading partner id or trading partner service id
20
28
  property :tradingPartnerId, from: :trading_partner_id, required: false
21
29
  property :tradingPartnerServiceId, from: :trading_partner_service_id, required: false
@@ -25,35 +33,60 @@ module ChangeHealth
25
33
  self[:providers] << provider
26
34
  end
27
35
 
28
- def submission
29
- ChangeHealth::Response::Claim::SubmissionData.new(response: ChangeHealth::Connection.new.request(
30
- endpoint: SUBMISSION_ENDPOINT, body: to_h, headers: professional_headers
31
- ))
36
+ def submission(is_professional: true)
37
+ endpoint = is_professional ? PROFESSIONAL_ENDPOINT : INSTITUTIONAL_ENDPOINT
38
+ endpoint += SUBMISSION_SUFFIX
39
+ ChangeHealth::Response::Claim::SubmissionData.new(
40
+ response: ChangeHealth::Connection.new.request(
41
+ endpoint: endpoint,
42
+ body: to_h,
43
+ headers: is_professional ? professional_headers : institutional_headers
44
+ )
45
+ )
32
46
  end
33
47
 
34
- def validation
35
- ChangeHealth::Response::Claim::SubmissionData.new(response: ChangeHealth::Connection.new.request(
36
- endpoint: VALIDATION_ENDPOINT, body: to_h, headers: professional_headers
37
- ))
48
+ def validation(is_professional: true)
49
+ endpoint = is_professional ? PROFESSIONAL_ENDPOINT : INSTITUTIONAL_ENDPOINT
50
+ endpoint += VALIDATION_SUFFIX
51
+ ChangeHealth::Response::Claim::SubmissionData.new(
52
+ response: ChangeHealth::Connection.new.request(
53
+ endpoint: endpoint,
54
+ body: to_h,
55
+ headers: is_professional ? professional_headers : institutional_headers
56
+ )
57
+ )
38
58
  end
39
59
 
40
- def self.health_check
41
- ChangeHealth::Connection.new.request(endpoint: HEALTH_CHECK_ENDPOINT, verb: :get)
60
+ def self.health_check(is_professional: true)
61
+ endpoint = is_professional ? PROFESSIONAL_ENDPOINT : INSTITUTIONAL_ENDPOINT
62
+ endpoint += HEALTH_CHECK_SUFFIX
63
+ ChangeHealth::Connection.new.request(endpoint: endpoint, verb: :get)
42
64
  end
43
65
 
44
- def self.ping
45
- health_check
66
+ def self.ping(is_professional: true)
67
+ health_check(is_professional: is_professional)
46
68
  end
47
69
 
48
70
  def professional_headers
49
- if self[:headers]
50
- extra_headers = {}
51
- extra_headers['X-CHC-ClaimSubmission-SubmitterId'] = self[:headers][:submitter_id]
52
- extra_headers['X-CHC-ClaimSubmission-BillerId'] = self[:headers][:biller_id]
53
- extra_headers['X-CHC-ClaimSubmission-Username'] = self[:headers][:username]
54
- extra_headers['X-CHC-ClaimSubmission-Pwd'] = self[:headers][:password]
55
- extra_headers
56
- end
71
+ return unless self[:headers]
72
+
73
+ {
74
+ 'X-CHC-ClaimSubmission-BillerId' => self[:headers][:biller_id],
75
+ 'X-CHC-ClaimSubmission-Pwd' => self[:headers][:password],
76
+ 'X-CHC-ClaimSubmission-SubmitterId' => self[:headers][:submitter_id],
77
+ 'X-CHC-ClaimSubmission-Username' => self[:headers][:username]
78
+ }
79
+ end
80
+
81
+ def institutional_headers
82
+ return unless self[:headers]
83
+
84
+ {
85
+ 'X-CHC-InstitutionalClaims-BillerId' => self[:headers][:biller_id],
86
+ 'X-CHC-InstitutionalClaims-Pwd' => self[:headers][:password],
87
+ 'X-CHC-InstitutionalClaims-SubmitterId' => self[:headers][:submitter_id],
88
+ 'X-CHC-InstitutionalClaims-Username' => self[:headers][:username]
89
+ }
57
90
  end
58
91
  end
59
92
  end
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '4.12.0'.freeze
2
+ VERSION = '4.13.1'.freeze
3
3
  end
data/lib/change_health.rb CHANGED
@@ -7,10 +7,23 @@ require 'change_health/connection'
7
7
  require 'change_health/extensions'
8
8
  require 'change_health/models/model'
9
9
  require 'change_health/models/claim/submission/address'
10
+ require 'change_health/models/claim/submission/claim_code_information'
10
11
  require 'change_health/models/claim/submission/claim_information'
12
+ require 'change_health/models/claim/submission/claim_supplemental_information'
13
+ require 'change_health/models/claim/submission/contact_information'
11
14
  require 'change_health/models/claim/submission/dependent'
15
+ require 'change_health/models/claim/submission/diagnosis'
12
16
  require 'change_health/models/claim/submission/drug_identification'
17
+ require 'change_health/models/claim/submission/institutional_service'
18
+ require 'change_health/models/claim/submission/line_adjudication_information'
19
+ require 'change_health/models/claim/submission/other_payer_name'
20
+ require 'change_health/models/claim/submission/other_subscriber_information'
21
+ require 'change_health/models/claim/submission/other_subscriber_name'
22
+ require 'change_health/models/claim/submission/professional_service'
13
23
  require 'change_health/models/claim/submission/provider'
24
+ require 'change_health/models/claim/submission/receiver'
25
+ require 'change_health/models/claim/submission/report_information'
26
+ require 'change_health/models/claim/submission/service_facility_location'
14
27
  require 'change_health/models/claim/submission/service_line'
15
28
  require 'change_health/models/claim/submission/submitter'
16
29
  require 'change_health/models/claim/submission/subscriber'
@@ -19,8 +32,8 @@ require 'change_health/models/eligibility/provider'
19
32
  require 'change_health/models/eligibility/subscriber'
20
33
  require 'change_health/models/trading_partner/trading_partner'
21
34
  require 'change_health/request/eligibility'
22
- require 'change_health/request/submission'
23
35
  require 'change_health/request/report'
36
+ require 'change_health/request/submission'
24
37
  require 'change_health/request/trading_partner'
25
38
  require 'change_health/response/error'
26
39
  require 'change_health/response/response_data'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: change_health
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.12.0
4
+ version: 4.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Crockett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-23 00:00:00.000000000 Z
11
+ date: 2023-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -148,10 +148,23 @@ files:
148
148
  - lib/change_health/connection.rb
149
149
  - lib/change_health/extensions.rb
150
150
  - lib/change_health/models/claim/submission/address.rb
151
+ - lib/change_health/models/claim/submission/claim_code_information.rb
151
152
  - lib/change_health/models/claim/submission/claim_information.rb
153
+ - lib/change_health/models/claim/submission/claim_supplemental_information.rb
154
+ - lib/change_health/models/claim/submission/contact_information.rb
152
155
  - lib/change_health/models/claim/submission/dependent.rb
156
+ - lib/change_health/models/claim/submission/diagnosis.rb
153
157
  - lib/change_health/models/claim/submission/drug_identification.rb
158
+ - lib/change_health/models/claim/submission/institutional_service.rb
159
+ - lib/change_health/models/claim/submission/line_adjudication_information.rb
160
+ - lib/change_health/models/claim/submission/other_payer_name.rb
161
+ - lib/change_health/models/claim/submission/other_subscriber_information.rb
162
+ - lib/change_health/models/claim/submission/other_subscriber_name.rb
163
+ - lib/change_health/models/claim/submission/professional_service.rb
154
164
  - lib/change_health/models/claim/submission/provider.rb
165
+ - lib/change_health/models/claim/submission/receiver.rb
166
+ - lib/change_health/models/claim/submission/report_information.rb
167
+ - lib/change_health/models/claim/submission/service_facility_location.rb
155
168
  - lib/change_health/models/claim/submission/service_line.rb
156
169
  - lib/change_health/models/claim/submission/submitter.rb
157
170
  - lib/change_health/models/claim/submission/subscriber.rb