change_health 4.7.0 → 4.9.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: d4c832c6b386d23d0dcd5ed9458a532e18e544e91f4aa14705e54731343a1da3
4
+ data.tar.gz: 3db73ca5d441099f1e692a8380f2f133ca50ef9b6324618a3360f052924cbef3
5
5
  SHA512:
6
- metadata.gz: 3125d3c743247f9e69c2217f89d123e05e85f0495117361968daff2d7be12d760daaf82048c36b3abbcd5e185b31f3ffe52b8a23ff2aac5d5521acd2d92ad2cf
7
- data.tar.gz: bbd7d4eb8fd3b069ae8f94d8a1451c7a7cbc5c35e24719b128fe73a49f095a843da9e21f575b42743479642fca1c9c95fb480167c25380b040c51328945b8605
6
+ metadata.gz: 6f790ed0a6496d1b535c51a28fa9598928d6e71b99626c545f411ce180e0c4f8e92504950ba7e37c184fa25a96a4c35a3fd5b3d5bed89418008429dd09f2652f
7
+ data.tar.gz: 841f4642ec6bcbacef9e0c10ad174b26968ffd58ea7d93077e800b4ef20fb02abd73c91cc5bd4bf4dab0872384c24d32c1be7105ffa2afe3ce0fffb97de95b57
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.9.0] - 2022-11-11
9
+
10
+ ### Added
11
+
12
+ * Report835Data - extract `claim_payment_amount` for Report835Claim
13
+
14
+ # [4.8.0] - 2022-11-09
15
+
16
+ ### Added
17
+
18
+ * Report835Data - extract `claim_adjustments` for Report835Claim
19
+
8
20
  # [4.7.0] - 2022-09-15
9
21
 
10
22
  ### Added
@@ -436,6 +448,8 @@ Added the ability to hit professional claim submission API. For more details, se
436
448
  * Authentication
437
449
  * Configuration
438
450
 
451
+ [4.8.0]: https://github.com/WeInfuse/change_health/compare/v4.8.0...v4.9.0
452
+ [4.8.0]: https://github.com/WeInfuse/change_health/compare/v4.7.0...v4.8.0
439
453
  [4.7.0]: https://github.com/WeInfuse/change_health/compare/v4.6.0...v4.7.0
440
454
  [4.6.0]: https://github.com/WeInfuse/change_health/compare/v4.5.0...v4.6.0
441
455
  [4.5.0]: https://github.com/WeInfuse/change_health/compare/v4.4.0...v4.5.0
@@ -2,6 +2,8 @@ module ChangeHealth
2
2
  module Response
3
3
  module Claim
4
4
  class Report835Claim < ReportClaim
5
+ property :claim_adjustments, required: false
6
+ property :claim_payment_amount, required: false
5
7
  property :claim_payment_remark_codes, required: false
6
8
  property :claim_status_code, required: false
7
9
  property :patient_control_number, required: false
@@ -56,6 +56,7 @@ module ChangeHealth
56
56
  transaction.dig('financialInformation', 'totalActualProviderPaymentAmount')
57
57
  claims = transaction['detailInfo']&.flat_map do |detail_info|
58
58
  detail_info['paymentInfo']&.map do |payment_info|
59
+ claim_payment_amount = payment_info.dig('claimPaymentInfo', 'claimPaymentAmount')
59
60
  claim_status_code = payment_info.dig('claimPaymentInfo', 'claimStatusCode')
60
61
  patient_control_number = payment_info.dig('claimPaymentInfo', 'patientControlNumber')
61
62
  patient_first_name = payment_info.dig('patientName', 'firstName')
@@ -79,6 +80,8 @@ module ChangeHealth
79
80
  claim_payment_remark_codes_index += 1
80
81
  end
81
82
 
83
+ claim_adjustments = adjustments(payment_info['claimAdjustments'])
84
+
82
85
  service_date_begin = nil
83
86
  service_date_end = nil
84
87
  service_lines = payment_info['serviceLines']&.map do |service_line|
@@ -98,23 +101,7 @@ module ChangeHealth
98
101
  line_item_provider_payment_amount = service_line.dig('servicePaymentInformation',
99
102
  'lineItemProviderPaymentAmount')
100
103
 
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
104
+ service_adjustments = adjustments(service_line['serviceAdjustments'])
118
105
 
119
106
  health_care_check_remark_codes = service_line['healthCareCheckRemarkCodes']&.map do |health_care_check_remark_code|
120
107
  Report835HealthCareCheckRemarkCode.new(
@@ -140,6 +127,8 @@ module ChangeHealth
140
127
  end
141
128
 
142
129
  Report835Claim.new(
130
+ claim_adjustments: claim_adjustments,
131
+ claim_payment_amount: claim_payment_amount,
143
132
  claim_payment_remark_codes: claim_payment_remark_codes,
144
133
  claim_status_code: claim_status_code,
145
134
  patient_control_number: patient_control_number,
@@ -176,6 +165,28 @@ module ChangeHealth
176
165
 
177
166
  report_payments
178
167
  end
168
+
169
+ private
170
+
171
+ def adjustments(list)
172
+ list&.map do |adjustment|
173
+ adjustments = {}
174
+ service_adjustment_index = 1
175
+ while adjustment["adjustmentReasonCode#{service_adjustment_index}"]
176
+ adjustment_reason = adjustment["adjustmentReasonCode#{service_adjustment_index}"]
177
+ adjustment_amount = adjustment["adjustmentAmount#{service_adjustment_index}"]
178
+ adjustments[adjustment_reason] = adjustment_amount
179
+ service_adjustment_index += 1
180
+ end
181
+
182
+ claim_adjustment_group_code = adjustment['claimAdjustmentGroupCode']
183
+
184
+ Report835ServiceAdjustment.new(
185
+ adjustments: adjustments,
186
+ claim_adjustment_group_code: claim_adjustment_group_code
187
+ )
188
+ end
189
+ end
179
190
  end
180
191
  end
181
192
  end
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '4.7.0'.freeze
2
+ VERSION = '4.9.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.9.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-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty