change_health 4.6.0 → 4.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b91a782efe0d9f6f4d07ec367ace19adc417ada3199360f166e56ba7fba9e74
4
- data.tar.gz: 0b87d4d9de882efdb9879486fc9bfcaf005ec1ff08d08260f1845a98d452eb17
3
+ metadata.gz: da5ff0ee1c6b8a8534a94564f5b37b850144ed9af4b3f159ad64677730996147
4
+ data.tar.gz: 13086f7b6ab80de52d92d195cc15c2584140fc7e4856c76bbb6e2a09f8e02594
5
5
  SHA512:
6
- metadata.gz: 4db85de34f7588d6dd2cff48dbd4e69d5917f305ef0a173c101476b84492a0034f8c087267dee10bf1204841a54aaf8b370e559532be769d77ad388e0edc5b47
7
- data.tar.gz: 69f64924085a8b3e672923c65f62975b027042524ef36ac7d59561e99a8a3f8db421e86cfb12962ee16718e969a5b25932f748e077dfa4e169794a689eb6fdc8
6
+ metadata.gz: af2adfcd5d7c27bf96157f5443b3f0dc2255bc64a5289d7ae74a4826ef6aa7f785c8d6de043ef003c71b658a670bca0d920f2263804c644ba0f3b7a3df2b8e9f
7
+ data.tar.gz: 6db58f0baa3ee206361cffa27e1d9dd3f3c1a82554d24d96a8c302d935fb46408b7405ccd9d6f57c33e453ebe9a83ed29c8b170b38746ade32ceb36b13916e71
data/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ 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.8.0] - 2022-11-09
9
+
10
+ ### Added
11
+
12
+ * Report835Data - extract `claim_adjustments` for Report835Claim
13
+
14
+ # [4.7.0] - 2022-09-15
15
+
16
+ ### Added
17
+
18
+ * Added new attribute to Report835Payment of `payer_address`
19
+
8
20
  # [4.6.0] - 2022-09-01
9
21
 
10
22
  ### Added
@@ -430,6 +442,8 @@ Added the ability to hit professional claim submission API. For more details, se
430
442
  * Authentication
431
443
  * Configuration
432
444
 
445
+ [4.8.0]: https://github.com/WeInfuse/change_health/compare/v4.7.0...v4.8.0
446
+ [4.7.0]: https://github.com/WeInfuse/change_health/compare/v4.6.0...v4.7.0
433
447
  [4.6.0]: https://github.com/WeInfuse/change_health/compare/v4.5.0...v4.6.0
434
448
  [4.5.0]: https://github.com/WeInfuse/change_health/compare/v4.4.0...v4.5.0
435
449
  [4.4.0]: https://github.com/WeInfuse/change_health/compare/v4.3.0...v4.4.0
@@ -2,6 +2,7 @@ module ChangeHealth
2
2
  module Response
3
3
  module Claim
4
4
  class Report835Claim < ReportClaim
5
+ property :claim_adjustments, required: false
5
6
  property :claim_payment_remark_codes, required: false
6
7
  property :claim_status_code, required: false
7
8
  property :patient_control_number, required: false
@@ -35,6 +35,7 @@ module ChangeHealth
35
35
  )
36
36
  payer_identifier = transaction.dig('financialInformation', 'payerIdentifier')
37
37
  payment_method_code = transaction.dig('financialInformation', 'paymentMethodCode')
38
+ payer_address = transaction.dig('payer', 'address')
38
39
  provider_adjustments = transaction['providerAdjustments']&.map do |provider_adjustment|
39
40
  adjustments = provider_adjustment['adjustments']&.map do |adjustment|
40
41
  {
@@ -78,6 +79,8 @@ module ChangeHealth
78
79
  claim_payment_remark_codes_index += 1
79
80
  end
80
81
 
82
+ claim_adjustments = adjustments(payment_info['claimAdjustments'])
83
+
81
84
  service_date_begin = nil
82
85
  service_date_end = nil
83
86
  service_lines = payment_info['serviceLines']&.map do |service_line|
@@ -97,23 +100,7 @@ module ChangeHealth
97
100
  line_item_provider_payment_amount = service_line.dig('servicePaymentInformation',
98
101
  'lineItemProviderPaymentAmount')
99
102
 
100
- service_adjustments = service_line['serviceAdjustments']&.map do |service_adjustment|
101
- adjustments = {}
102
- service_adjustment_index = 1
103
- while service_adjustment["adjustmentReasonCode#{service_adjustment_index}"]
104
- adjustment_reason = service_adjustment["adjustmentReasonCode#{service_adjustment_index}"]
105
- adjustment_amount = service_adjustment["adjustmentAmount#{service_adjustment_index}"]
106
- adjustments[adjustment_reason] = adjustment_amount
107
- service_adjustment_index += 1
108
- end
109
-
110
- claim_adjustment_group_code = service_adjustment['claimAdjustmentGroupCode']
111
-
112
- Report835ServiceAdjustment.new(
113
- adjustments: adjustments,
114
- claim_adjustment_group_code: claim_adjustment_group_code
115
- )
116
- end
103
+ service_adjustments = adjustments(service_line['serviceAdjustments'])
117
104
 
118
105
  health_care_check_remark_codes = service_line['healthCareCheckRemarkCodes']&.map do |health_care_check_remark_code|
119
106
  Report835HealthCareCheckRemarkCode.new(
@@ -139,6 +126,7 @@ module ChangeHealth
139
126
  end
140
127
 
141
128
  Report835Claim.new(
129
+ claim_adjustments: claim_adjustments,
142
130
  claim_payment_remark_codes: claim_payment_remark_codes,
143
131
  claim_status_code: claim_status_code,
144
132
  patient_control_number: patient_control_number,
@@ -164,6 +152,7 @@ module ChangeHealth
164
152
  claims: claims,
165
153
  payer_identifier: payer_identifier,
166
154
  payer_name: payer_name,
155
+ payer_address: payer_address,
167
156
  payment_method_code: payment_method_code,
168
157
  provider_adjustments: provider_adjustments,
169
158
  report_creation_date: report_creation_date,
@@ -174,6 +163,28 @@ module ChangeHealth
174
163
 
175
164
  report_payments
176
165
  end
166
+
167
+ private
168
+
169
+ def adjustments(list)
170
+ list&.map do |adjustment|
171
+ adjustments = {}
172
+ service_adjustment_index = 1
173
+ while adjustment["adjustmentReasonCode#{service_adjustment_index}"]
174
+ adjustment_reason = adjustment["adjustmentReasonCode#{service_adjustment_index}"]
175
+ adjustment_amount = adjustment["adjustmentAmount#{service_adjustment_index}"]
176
+ adjustments[adjustment_reason] = adjustment_amount
177
+ service_adjustment_index += 1
178
+ end
179
+
180
+ claim_adjustment_group_code = adjustment['claimAdjustmentGroupCode']
181
+
182
+ Report835ServiceAdjustment.new(
183
+ adjustments: adjustments,
184
+ claim_adjustment_group_code: claim_adjustment_group_code
185
+ )
186
+ end
187
+ end
177
188
  end
178
189
  end
179
190
  end
@@ -8,6 +8,7 @@ module ChangeHealth
8
8
  property :payer_identifier, required: false
9
9
  property :payer_name, required: false
10
10
  property :payment_method_code, required: false
11
+ property :payer_address, required: false
11
12
  property :provider_adjustments, required: false
12
13
  property :report_creation_date, required: false
13
14
  property :report_name, required: false
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '4.6.0'.freeze
2
+ VERSION = '4.8.0'.freeze
3
3
  end
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.6.0
4
+ version: 4.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Crockett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-02 00:00:00.000000000 Z
11
+ date: 2022-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty