change_health 5.13.0 → 5.13.2

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: a2afd60953fdaab441ccf82bcecc024147a7065df20501b41d0cfe223b658682
4
- data.tar.gz: fdbcef78612c5a0eb1f88ecd131e6eb158741f09af327483d9c2ab569586de01
3
+ metadata.gz: 0c95b37ea0d630e1b501ad965c147d322c1be1bbd9298b5c0da933fd9aa445b5
4
+ data.tar.gz: 33c0714782d1d1aca7c5ea4653ca02886287c885d66922a863ab18d5cc4a31a5
5
5
  SHA512:
6
- metadata.gz: 56f2e448c14a68c7e9b3389ac6cd2768f0e627c3a436a243cb0838e6005173b57b92024987cfd654204238c48e5729e2c731bd46822361e0b14c316bb4efcc96
7
- data.tar.gz: cf7a26b79c1b36b9656329c4420a9c494c384423ffa6e3d40db5defe8fe80d9ec2165fa58f6b275c32db0f0936acef2f34a71802cdb062cc5ffc259050bf363a
6
+ metadata.gz: 921d83689411006e810ffd34ef3bab0be2b6442ca1623f0b2be26035433d1915cb7bcd3a58e98cc61a53f0300a16766cd90215701c08a14c49b68ae258261fb0
7
+ data.tar.gz: 58ed6ee76be49d56149b2b0329a81fe5d71c9d6736170fc311f1027cf0feb304b2c5fa29f17a3965a9cf91a2b08a29f20d906223eebc3482cc619ce559c5a431
data/CHANGELOG.md CHANGED
@@ -5,6 +5,24 @@ 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
+ # [5.13.2] - 2024-05-16
9
+
10
+ ### Fixed
11
+
12
+ * For ChangeHealth::Response::Claim::Report835Data, the following lists of values will now ignore empty "" in the json, even if the WHOLE field is empty
13
+ - claim_payment_remark_codes
14
+ - claim_adjustments
15
+ - service_adjustments
16
+
17
+ # [5.13.1] - 2024-05-15
18
+
19
+ ### Fixed
20
+
21
+ * For ChangeHealth::Response::Claim::Report835Data, the following lists of values will now ignore empty "" in the json
22
+ - claim_payment_remark_codes
23
+ - claim_adjustments
24
+ - service_adjustments
25
+
8
26
  # [5.13.0] - 2024-05-13
9
27
 
10
28
  ### Added
@@ -668,6 +686,8 @@ Added the ability to hit professional claim submission API. For more details, se
668
686
  * Authentication
669
687
  * Configuration
670
688
 
689
+ [5.13.2]: https://github.com/WeInfuse/change_health/compare/v5.13.1...v5.13.2
690
+ [5.13.1]: https://github.com/WeInfuse/change_health/compare/v5.13.0...v5.13.1
671
691
  [5.13.0]: https://github.com/WeInfuse/change_health/compare/v5.12.1...v5.13.0
672
692
  [5.12.1]: https://github.com/WeInfuse/change_health/compare/v5.12.0...v5.12.1
673
693
  [5.12.0]: https://github.com/WeInfuse/change_health/compare/v5.11.0...v5.12.0
@@ -74,10 +74,16 @@ module ChangeHealth
74
74
 
75
75
  claim_payment_remark_codes = []
76
76
  claim_payment_remark_codes_index = 1
77
- while payment_info.dig('outpatientAdjudication',
78
- "claimPaymentRemarkCode#{claim_payment_remark_codes_index}")
79
- claim_payment_remark_codes << payment_info.dig('outpatientAdjudication',
80
- "claimPaymentRemarkCode#{claim_payment_remark_codes_index}")
77
+
78
+ loop do
79
+ current_claim_payment_remark_code = payment_info
80
+ .dig(
81
+ 'outpatientAdjudication',
82
+ "claimPaymentRemarkCode#{claim_payment_remark_codes_index}"
83
+ )
84
+ break unless presence(current_claim_payment_remark_code)
85
+
86
+ claim_payment_remark_codes << current_claim_payment_remark_code
81
87
  claim_payment_remark_codes_index += 1
82
88
  end
83
89
 
@@ -104,13 +110,16 @@ module ChangeHealth
104
110
 
105
111
  service_adjustments = adjustments(service_line['serviceAdjustments'])
106
112
 
107
- health_care_check_remark_codes = service_line['healthCareCheckRemarkCodes']&.map do |health_care_check_remark_code|
113
+ health_care_check_remark_codes = presence(service_line['healthCareCheckRemarkCodes']&.filter_map do |health_care_check_remark_code|
114
+ remark_code = health_care_check_remark_code['remarkCode']
115
+ next unless presence(remark_code)
116
+
108
117
  Report835HealthCareCheckRemarkCode.new(
109
118
  code_list_qualifier_code: health_care_check_remark_code['codeListQualifierCode'],
110
119
  code_list_qualifier_code_value: health_care_check_remark_code['codeListQualifierCodeValue'],
111
- remark_code: health_care_check_remark_code['remarkCode']
120
+ remark_code: remark_code
112
121
  )
113
- end
122
+ end)
114
123
 
115
124
  Report835ServiceLine.new(
116
125
  adjudicated_procedure_code: adjudicated_procedure_code,
@@ -172,23 +181,27 @@ module ChangeHealth
172
181
  private
173
182
 
174
183
  def adjustments(list)
175
- list&.map do |adjustment|
184
+ presence(list&.filter_map do |adjustment|
176
185
  adjustments = {}
177
- service_adjustment_index = 1
178
- while adjustment["adjustmentReasonCode#{service_adjustment_index}"]
179
- adjustment_reason = adjustment["adjustmentReasonCode#{service_adjustment_index}"]
180
- adjustment_amount = adjustment["adjustmentAmount#{service_adjustment_index}"]
181
- adjustments[adjustment_reason] = adjustment_amount
182
- service_adjustment_index += 1
186
+ adjustment_index = 1
187
+ loop do
188
+ current_adjustment_reason = adjustment["adjustmentReasonCode#{adjustment_index}"]
189
+ break unless presence(current_adjustment_reason)
190
+
191
+ adjustment_amount = adjustment["adjustmentAmount#{adjustment_index}"]
192
+ adjustments[current_adjustment_reason] = adjustment_amount
193
+ adjustment_index += 1
183
194
  end
184
195
 
185
196
  claim_adjustment_group_code = adjustment['claimAdjustmentGroupCode']
186
197
 
187
- Report835ServiceAdjustment.new(
188
- adjustments: adjustments,
189
- claim_adjustment_group_code: claim_adjustment_group_code
190
- )
191
- end
198
+ if presence(adjustments)
199
+ Report835ServiceAdjustment.new(
200
+ adjustments: adjustments,
201
+ claim_adjustment_group_code: claim_adjustment_group_code
202
+ )
203
+ end
204
+ end)
192
205
  end
193
206
  end
194
207
  end
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '5.13.0'.freeze
2
+ VERSION = '5.13.2'.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: 5.13.0
4
+ version: 5.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Crockett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-14 00:00:00.000000000 Z
11
+ date: 2024-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty