change_health 4.7.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: 865f463de53559f70c098bfcd5068729f5d0858a6939196133ce3e1c41dc53c5
4
- data.tar.gz: 8b7cad94d0cf8e68e77769dec2056fe56fc3954cd8844242c4c60f7bcbdeed20
3
+ metadata.gz: da5ff0ee1c6b8a8534a94564f5b37b850144ed9af4b3f159ad64677730996147
4
+ data.tar.gz: 13086f7b6ab80de52d92d195cc15c2584140fc7e4856c76bbb6e2a09f8e02594
5
5
  SHA512:
6
- metadata.gz: 3125d3c743247f9e69c2217f89d123e05e85f0495117361968daff2d7be12d760daaf82048c36b3abbcd5e185b31f3ffe52b8a23ff2aac5d5521acd2d92ad2cf
7
- data.tar.gz: bbd7d4eb8fd3b069ae8f94d8a1451c7a7cbc5c35e24719b128fe73a49f095a843da9e21f575b42743479642fca1c9c95fb480167c25380b040c51328945b8605
6
+ metadata.gz: af2adfcd5d7c27bf96157f5443b3f0dc2255bc64a5289d7ae74a4826ef6aa7f785c8d6de043ef003c71b658a670bca0d920f2263804c644ba0f3b7a3df2b8e9f
7
+ data.tar.gz: 6db58f0baa3ee206361cffa27e1d9dd3f3c1a82554d24d96a8c302d935fb46408b7405ccd9d6f57c33e453ebe9a83ed29c8b170b38746ade32ceb36b13916e71
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ 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
+
8
14
  # [4.7.0] - 2022-09-15
9
15
 
10
16
  ### Added
@@ -436,6 +442,7 @@ Added the ability to hit professional claim submission API. For more details, se
436
442
  * Authentication
437
443
  * Configuration
438
444
 
445
+ [4.8.0]: https://github.com/WeInfuse/change_health/compare/v4.7.0...v4.8.0
439
446
  [4.7.0]: https://github.com/WeInfuse/change_health/compare/v4.6.0...v4.7.0
440
447
  [4.6.0]: https://github.com/WeInfuse/change_health/compare/v4.5.0...v4.6.0
441
448
  [4.5.0]: https://github.com/WeInfuse/change_health/compare/v4.4.0...v4.5.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
@@ -79,6 +79,8 @@ module ChangeHealth
79
79
  claim_payment_remark_codes_index += 1
80
80
  end
81
81
 
82
+ claim_adjustments = adjustments(payment_info['claimAdjustments'])
83
+
82
84
  service_date_begin = nil
83
85
  service_date_end = nil
84
86
  service_lines = payment_info['serviceLines']&.map do |service_line|
@@ -98,23 +100,7 @@ module ChangeHealth
98
100
  line_item_provider_payment_amount = service_line.dig('servicePaymentInformation',
99
101
  'lineItemProviderPaymentAmount')
100
102
 
101
- service_adjustments = service_line['serviceAdjustments']&.map do |service_adjustment|
102
- adjustments = {}
103
- service_adjustment_index = 1
104
- while service_adjustment["adjustmentReasonCode#{service_adjustment_index}"]
105
- adjustment_reason = service_adjustment["adjustmentReasonCode#{service_adjustment_index}"]
106
- adjustment_amount = service_adjustment["adjustmentAmount#{service_adjustment_index}"]
107
- adjustments[adjustment_reason] = adjustment_amount
108
- service_adjustment_index += 1
109
- end
110
-
111
- claim_adjustment_group_code = service_adjustment['claimAdjustmentGroupCode']
112
-
113
- Report835ServiceAdjustment.new(
114
- adjustments: adjustments,
115
- claim_adjustment_group_code: claim_adjustment_group_code
116
- )
117
- end
103
+ service_adjustments = adjustments(service_line['serviceAdjustments'])
118
104
 
119
105
  health_care_check_remark_codes = service_line['healthCareCheckRemarkCodes']&.map do |health_care_check_remark_code|
120
106
  Report835HealthCareCheckRemarkCode.new(
@@ -140,6 +126,7 @@ module ChangeHealth
140
126
  end
141
127
 
142
128
  Report835Claim.new(
129
+ claim_adjustments: claim_adjustments,
143
130
  claim_payment_remark_codes: claim_payment_remark_codes,
144
131
  claim_status_code: claim_status_code,
145
132
  patient_control_number: patient_control_number,
@@ -176,6 +163,28 @@ module ChangeHealth
176
163
 
177
164
  report_payments
178
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
179
188
  end
180
189
  end
181
190
  end
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '4.7.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.7.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-15 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