change_health 3.1.0 → 3.2.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: eef3b2530820969a781c893ec5079573073cf31124243bf781d3415186a45cb1
4
- data.tar.gz: a48072bc0dd1437314eef45596569b6be7e56200c578164b4d8ff0cd98646df8
3
+ metadata.gz: cb52acfb64f03d05c292cb41915ab6d686fae764d965e6df7df5533ad4c0e2e1
4
+ data.tar.gz: a3414ee7fe0a45c0aaf2432b83c6166ae2a07ba31a9105afee422c2189a3552c
5
5
  SHA512:
6
- metadata.gz: 2f67e82f2eb5660f767a297aa000cd4028606aab717b0db035b85b3933ad033276cb34bcb5373a5b716cd1bf611fd3b72d26fb3baae80a9d2783b2190a386179
7
- data.tar.gz: f8e33bf4dece3c99287b0474bdaadf9d3b8ac1d39dccbfb35fc43c979cbb706973c93ae07adaa9202be5e20adb2ba74766b78fa615191fa29caf548526692597
6
+ metadata.gz: 4c82b12a74d6980409e7adcb968e4defee05679be768f61e294cacbdf03bdc3c2a4f9fa579d0b6b1086c135ef70ec16ebea3e3a5d77815bf5b8d5f39e755b315
7
+ data.tar.gz: 3a092daca4789cd9972ebfb37e0337d17a43abdb8f4d05672935190a606f0c75a1450aa4f8934aeba0a5d0b2f054bb58824a6215b945aed2ab0a5a831d001db8
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [3.2.0] - 2021-12-23
8
+ ### Added
9
+ * Report835HealthCareCheckRemarkCode
10
+ * Report835Claim - added claim_payment_remark_codes
11
+
7
12
  ## [3.1.0] - 2021-12-21
8
13
  ### Added
9
14
  #### Claim Submission
@@ -225,6 +230,7 @@ Added the ability to hit professional claim submission API. For more details, se
225
230
  - Authentication
226
231
  - Configuration
227
232
 
233
+ [3.2.0]: https://github.com/WeInfuse/change_health/compare/v3.1.0...v3.2.0
228
234
  [3.1.0]: https://github.com/WeInfuse/change_health/compare/v3.0.0...v3.1.0
229
235
  [3.0.0]: https://github.com/WeInfuse/change_health/compare/v2.3.0...v3.0.0
230
236
  [2.3.0]: https://github.com/WeInfuse/change_health/compare/v2.2.1...v2.3.0
@@ -2,6 +2,7 @@ module ChangeHealth
2
2
  module Response
3
3
  module Claim
4
4
  class Report835Claim < ReportClaim
5
+ property :claim_payment_remark_codes, required: false
5
6
  property :payer_claim_control_number, required: false
6
7
  property :payment_method_code, required: false
7
8
  property :service_lines, required: false
@@ -43,6 +43,15 @@ module ChangeHealth
43
43
  total_charge_amount = payment_info.dig('claimPaymentInfo', 'totalClaimChargeAmount')
44
44
  payer_claim_control_number = payment_info.dig('claimPaymentInfo', 'payerClaimControlNumber')
45
45
 
46
+ claim_payment_remark_codes = []
47
+ claim_payment_remark_codes_index = 1
48
+ while payment_info.dig('outpatientAdjudication',
49
+ "claimPaymentRemarkCode#{claim_payment_remark_codes_index}")
50
+ claim_payment_remark_codes << payment_info.dig('outpatientAdjudication',
51
+ "claimPaymentRemarkCode#{claim_payment_remark_codes_index}")
52
+ claim_payment_remark_codes_index += 1
53
+ end
54
+
46
55
  service_date_begin = nil
47
56
  service_date_end = nil
48
57
  service_lines = []
@@ -51,9 +60,7 @@ module ChangeHealth
51
60
  if service_date_begin.nil? || service_line_date < service_date_begin
52
61
  service_date_begin = service_line_date
53
62
  end
54
- if service_date_end.nil? || service_date_end < service_line_date
55
- service_date_end = service_line_date
56
- end
63
+ service_date_end = service_line_date if service_date_end.nil? || service_date_end < service_line_date
57
64
 
58
65
  adjudicated_procedure_code = service_line.dig('servicePaymentInformation', 'adjudicatedProcedureCode')
59
66
  allowed_actual = service_line.dig('serviceSupplementalAmounts', 'allowedActual')
@@ -64,12 +71,12 @@ module ChangeHealth
64
71
  service_adjustments = []
65
72
  service_line['serviceAdjustments']&.each do |service_adjustment|
66
73
  adjustments = {}
67
- # - 2 b/c group code & value, / 2 b/c come in pairs
68
- num_adjustments = (service_adjustment.keys.size - 2) / 2
69
- (1..num_adjustments).each do |index|
70
- adjustment_reason = service_adjustment["adjustmentReasonCode#{index}"]
71
- adjustment_amount = service_adjustment["adjustmentAmount#{index}"]
74
+ service_adjustment_index = 1
75
+ while service_adjustment["adjustmentReasonCode#{service_adjustment_index}"]
76
+ adjustment_reason = service_adjustment["adjustmentReasonCode#{service_adjustment_index}"]
77
+ adjustment_amount = service_adjustment["adjustmentAmount#{service_adjustment_index}"]
72
78
  adjustments[adjustment_reason] = adjustment_amount
79
+ service_adjustment_index += 1
73
80
  end
74
81
 
75
82
  claim_adjustment_group_code = service_adjustment['claimAdjustmentGroupCode']
@@ -80,16 +87,27 @@ module ChangeHealth
80
87
  )
81
88
  end
82
89
 
90
+ health_care_check_remark_codes = []
91
+ service_line['healthCareCheckRemarkCodes']&.each do |health_care_check_remark_code|
92
+ health_care_check_remark_codes << Report835HealthCareCheckRemarkCode.new(
93
+ code_list_qualifier_code: health_care_check_remark_code['codeListQualifierCode'],
94
+ code_list_qualifier_code_value: health_care_check_remark_code['codeListQualifierCodeValue'],
95
+ remark_code: health_care_check_remark_code['remarkCode']
96
+ )
97
+ end
98
+
83
99
  service_lines << Report835ServiceLine.new(
84
100
  adjudicated_procedure_code: adjudicated_procedure_code,
85
101
  allowed_actual: allowed_actual,
86
102
  line_item_charge_amount: line_item_charge_amount,
87
103
  line_item_provider_payment_amount: line_item_provider_payment_amount,
88
- service_adjustments: service_adjustments
104
+ service_adjustments: service_adjustments,
105
+ health_care_check_remark_codes: health_care_check_remark_codes
89
106
  )
90
107
  end
91
108
 
92
109
  report_claims << Report835Claim.new(
110
+ claim_payment_remark_codes: claim_payment_remark_codes,
93
111
  patient_first_name: patient_first_name,
94
112
  patient_last_name: patient_last_name,
95
113
  payer_claim_control_number: payer_claim_control_number,
@@ -0,0 +1,11 @@
1
+ module ChangeHealth
2
+ module Response
3
+ module Claim
4
+ class Report835HealthCareCheckRemarkCode < Hashie::Trash
5
+ property :code_list_qualifier_code, required: false
6
+ property :code_list_qualifier_code_value, required: false
7
+ property :remark_code, required: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -4,6 +4,7 @@ module ChangeHealth
4
4
  class Report835ServiceLine < Hashie::Trash
5
5
  property :adjudicated_procedure_code, required: false
6
6
  property :allowed_actual, required: false
7
+ property :health_care_check_remark_codes, required: false
7
8
  property :line_item_charge_amount, required: false
8
9
  property :line_item_provider_payment_amount, required: false
9
10
  property :service_adjustments, required: false
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '3.1.0'.freeze
2
+ VERSION = '3.2.0'.freeze
3
3
  end
data/lib/change_health.rb CHANGED
@@ -32,6 +32,7 @@ require 'change_health/response/claim/report/report_claim'
32
32
  require 'change_health/response/claim/report/report_277_claim'
33
33
  require 'change_health/response/claim/report/report_277_info_claim_status'
34
34
  require 'change_health/response/claim/report/report_835_claim'
35
+ require 'change_health/response/claim/report/report_835_health_care_check_remark_code'
35
36
  require 'change_health/response/claim/report/report_835_service_adjustment'
36
37
  require 'change_health/response/claim/report/report_835_service_line'
37
38
  require 'change_health/response/eligibility/eligibility_benefit'
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: 3.1.0
4
+ version: 3.2.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: 2021-12-21 00:00:00.000000000 Z
11
+ date: 2021-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -168,6 +168,7 @@ files:
168
168
  - lib/change_health/response/claim/report/report_277_info_claim_status.rb
169
169
  - lib/change_health/response/claim/report/report_835_claim.rb
170
170
  - lib/change_health/response/claim/report/report_835_data.rb
171
+ - lib/change_health/response/claim/report/report_835_health_care_check_remark_code.rb
171
172
  - lib/change_health/response/claim/report/report_835_service_adjustment.rb
172
173
  - lib/change_health/response/claim/report/report_835_service_line.rb
173
174
  - lib/change_health/response/claim/report/report_claim.rb