change_health 3.3.0 → 3.5.1

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: 771e550998ba619e8f20ad0482df45d2414f106588d674e8764fbe9af1fbd4d7
4
- data.tar.gz: 3c35d671b8cecbc38e9d5984756c5af8f0e4c18ed4e86ed2877f30d670ef1146
3
+ metadata.gz: e7885934a9f3e1fba5250c70c43ebcc0ed9b4df5b4bf78e832e6f542efa20923
4
+ data.tar.gz: e5eb64dc022f02cbee0ac756823bf66fe8857f7fa00e0bd4e1249ddda57b0823
5
5
  SHA512:
6
- metadata.gz: 3ece66009484991d0be79850df3b8327449099b5829c26100ddd0304ec6759be8a12e4bc0e348c044f5d2247cc8f4e923aa4a26dea5f59a008786d5d42f8fb6f
7
- data.tar.gz: d598da2e9b5051bfee077aa7da86ed663befc801d68efb6a29a476a5e6655fdeb886f62be843a65316a6e03cd8ef83a2c845d8bad05a70d7cc42fb2d78727369
6
+ metadata.gz: 9016ac80c8164a66cab62a1a2078bbcbcbb53f0249d37c2214954a5a7e9c0f5f40bebf173ce37275e219b785dcc31a912e4e21a86657e377ad832f07084cd76f
7
+ data.tar.gz: 57cab83269d9615344adeef02b4c6f7b021c0604368cff9966697595fc75243e02cfcb62f8aef7c4334215a92f49a2f1740d5e8cbb6ebafc247967844b3c4a23
data/CHANGELOG.md CHANGED
@@ -1,23 +1,47 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
7
 
8
+ # [3.5.1] - 2022-04-12
9
+
10
+ * Added properties of `lineAdjudicationInformation` and `otherSubscriberInformation` so they can serialize correctly into JSON
11
+
12
+ # [3.5.0] - 2022-04-08
13
+
14
+ ### Added
15
+
16
+ * Report835Claim - added payer_identifier property
17
+ * Report835ServiceLine - Dynamically creates line_adjustments for remark codes and adjustments that are needed for secondary claims
18
+
19
+ # [3.4.0] - 2022-03-23
20
+
21
+ ### Added
22
+ * Report835Claim - check_or_eft_trace_number & check_issue_or_eft_effective_date
23
+
7
24
  # [3.3.0] - 2022-02-11
25
+
8
26
  ### Added
27
+
9
28
  * Report277Claim - 'message' from informationClaimStatuses, clearinghouse_trace_number, patient_account_number, referenced_transaction_trace_number, trading_partner_claim_number
10
29
  * Report835Claim - patient_control_number
11
30
  * ReportClaim - report_name, patient_member_id
12
31
 
13
32
  ## [3.2.0] - 2021-12-23
33
+
14
34
  ### Added
35
+
15
36
  * Report835HealthCareCheckRemarkCode
16
37
  * Report835Claim - added claim_payment_remark_codes
17
38
 
18
39
  ## [3.1.0] - 2021-12-21
40
+
19
41
  ### Added
42
+
20
43
  #### Claim Submission
44
+
21
45
  * ServiceLine - drugIdentification & renderingProvider
22
46
  * Subscriber - groupNumber
23
47
  * Address model w/ postalCode that is formatted to remove dashes, '-'
@@ -25,21 +49,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
25
49
  * Auto formatting of postal code fields
26
50
 
27
51
  ## [3.0.0] - 2021-12-08
52
+
28
53
  ### Added
54
+
29
55
  * Report277Claim - specific to claims from 277 reports
30
56
  * Report835Claim - specific to claims from 835 reports
31
57
  * Report835ServiceAdjustment & Report835ServiceLine - helper classes for readability of claims from 835 reports
32
58
 
33
59
  ### Changed
60
+
34
61
  * ReportClaim - removed 277 report unique fields
35
62
 
36
63
  #### Namespace
64
+
37
65
  | Previous | Current |
38
66
  |-|-|
39
67
  | ChangeHealth::Models::Error | ChangeHealth::Response::Error |
40
68
  | ChangeHealth::Response::Claim::ReportInfoClaimStatus | ChangeHealth::Response::Claim::Report277InfoClaimStatus|
41
69
 
42
70
  #### Methods
71
+
43
72
  | Previous | Current |
44
73
  |-|-|
45
74
  | Report277Data#payer_org_name | Report277Data#payer_name |
@@ -51,38 +80,54 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
51
80
  | ReportClaim#subscriber_last_name | ReportClaim#patient_last_name |
52
81
  | ReportClaim#transaction_set_creation_date | ReportClaim#report_creation_date |
53
82
 
54
-
55
83
  ## [2.3.0] - 2021-11-18
84
+
56
85
  ### Added
86
+
57
87
  * Report277Data & Report835Data - Specific classes for 277 & 835 reports
58
88
  * ReportClaim & ReportInfoClaimStatus - only works for json 277 reports
59
89
 
60
90
  ### Fixed
91
+
61
92
  * Headers can now be nil for requests
62
93
 
63
94
  ## [2.2.1] - 2021-11-15
95
+
64
96
  ### Added
97
+
65
98
  Custom Headers for Reports API and Professional Claims API
99
+
66
100
  * Report
67
101
  * Submission
68
102
 
69
103
  ## [2.2.0] - 2021-11-04
104
+
70
105
  ### Added
106
+
71
107
  Ability to hit [Claim Responses and Reports](https://developers.changehealthcare.com/eligibilityandclaims/docs/claims-responses-and-reports-getting-started)
108
+
72
109
  * Report
73
110
  * ReportListData
74
111
  * ReportData
75
112
 
76
113
  ## [2.1.0] - 2021-10-12
114
+
77
115
  ### Changed
116
+
78
117
  Model#to_h enhanced to change empty values AKA "" to nil. Reason: If a field is empty, Change Healthcare responds with an error - `Invalid value. Item must not be blank value.`. If the empty field is optional, Change Healthcare will accept the field as nil without error. If the empty field is required, Change Healthcare will return an error if the value is empty or nil.
79
118
 
80
119
  ## [2.0.0] - 2021-10-08
120
+
81
121
  ### Added
122
+
82
123
  #### Models
124
+
83
125
  * ResponseData - for responses from calling change healthcare api used by EligibilityData and SubmissionData
126
+
84
127
  #### Claim Submission
128
+
85
129
  Added the ability to hit professional claim submission API. For more details, see [Change Healthcare documentation here](https://developers.changehealthcare.com/eligibilityandclaims/docs/professional-claims-v3-getting-started)
130
+
86
131
  * ClaimInformation
87
132
  * Provider
88
133
  * ServiceLine
@@ -90,11 +135,15 @@ Added the ability to hit professional claim submission API. For more details, se
90
135
  * SubmissionData
91
136
  * Submitter
92
137
  * Subscriber
138
+
93
139
  ### Changed
94
- * Using new Change Healthcare url. From apis to apigw. For more info see [change log here](https://developers.changehealthcare.com/eligibilityandclaims/docs/change-logrelease-notes-1)
95
- * PARSE_DATE moved from ChangeHealth::Models::EligibilityData to ChangeHealth::Models
96
- * Moved Error class into its own file
140
+
141
+ * Using new Change Healthcare url. From apis to apigw. For more info see [change log here](https://developers.changehealthcare.com/eligibilityandclaims/docs/change-logrelease-notes-1)
142
+ * PARSE_DATE moved from ChangeHealth::Models::EligibilityData to ChangeHealth::Models
143
+ * Moved Error class into its own file
144
+
97
145
  #### Namespace
146
+
98
147
  Many classes moved namespaces to be more consistent across the many endpoints in Change Healthcare
99
148
  | Previous | Current |
100
149
  |-|-|
@@ -105,137 +154,200 @@ Added the ability to hit professional claim submission API. For more details, se
105
154
  | ChangeHealth::Models::EligibilityBenefit | ChangeHealth::Response::EligibilityBenefit|
106
155
  | ChangeHealth::Models::EligibilityBenefits | ChangeHealth::Response::EligibilityBenefits|
107
156
  | ChangeHealth::Models::EligibilityData | ChangeHealth::Response::EligibilityData|
157
+
108
158
  ### Fixed
109
- * Eligibility#add_dependent actually works
159
+
160
+ * Eligibility#add_dependent actually works
110
161
 
111
162
  ## [1.0.3] - 2021-04-26
163
+
112
164
  ### Added
113
- - Model::Error#represents_down? - adds ability to distinguish error representing down state
114
- - Model::Error#retryable? - retryable when down
115
- - EligibilityData#recommend_retry? - recommend retry when down
165
+
166
+ * Model::Error#represents_down? - adds ability to distinguish error representing down state
167
+
168
+ * Model::Error#retryable? - retryable when down
169
+ * EligibilityData#recommend_retry? - recommend retry when down
116
170
 
117
171
  ## [1.0.2] - 2021-04-06
172
+
118
173
  ### Added
119
- - EligibilityData#recommend_retry? - fix a bug in the search statement
174
+
175
+ * EligibilityData#recommend_retry? - fix a bug in the search statement
120
176
 
121
177
  ## [1.0.1] - 2021-03-24
178
+
122
179
  ### Added
123
- - EligibilityData#plan_status - adds ability to select instead of find
124
- - EligibilityData#inactive? active? - use new plan_status select
180
+
181
+ * EligibilityData#plan_status - adds ability to select instead of find
182
+
183
+ * EligibilityData#inactive? active? - use new plan_status select
125
184
 
126
185
  ## [1.0.0] - 2021-03-17
186
+
127
187
  ### Added
128
- - Model::Error - help with error codes
129
- - EligibilityData#recommend_retry? - if it looks like you can retry the exact same request
130
- - EligibilityData#inactive? - looks for plan status 6
188
+
189
+ * Model::Error - help with error codes
190
+
191
+ * EligibilityData#recommend_retry? - if it looks like you can retry the exact same request
192
+ * EligibilityData#inactive? - looks for plan status 6
131
193
 
132
194
  ## [0.15.0] - 2020-06-12
195
+
133
196
  ### Added
134
- - Extensions - InNetworkMissing for plans that don't provide in network indicators.
197
+
198
+ * Extensions - InNetworkMissing for plans that don't provide in network indicators.
135
199
 
136
200
  ### Fixed
137
- - Bug where active codes with no service codes cause exception.
201
+
202
+ * Bug where active codes with no service codes cause exception.
138
203
 
139
204
  ## [0.14.0] - 2020-05-07
205
+
140
206
  ### Added
141
- - Extensions - mixins for common overrides
207
+
208
+ * Extensions - mixins for common overrides
142
209
 
143
210
  ## [0.13.0] - 2020-05-05
211
+
144
212
  ### Changed
145
- - Removed `alias_method` for `where` helpers so you can override a single method
146
- - Added type Year to Date type 24
147
- - Added type Day type 7
213
+
214
+ * Removed `alias_method` for `where` helpers so you can override a single method
215
+
216
+ * Added type Year to Date type 24
217
+ * Added type Day type 7
148
218
 
149
219
  ## [0.12.0] - 2020-04-30
220
+
150
221
  ### Added
151
- - EligibilityData#errors
152
- - EligibilityData#errors?
222
+
223
+ * EligibilityData#errors
224
+
225
+ * EligibilityData#errors?
153
226
 
154
227
  ## [0.11.0] - 2020-04-24
228
+
155
229
  ### Added
156
- - EligibilityData#medicare?
157
- - EligibilityData#plan\_id
158
- - EligibilityData#plan?
159
- - EligibilityBenefits#where\_not
160
- - EligibilityBenefits#+
161
- - EligibilityBenefit#additional\_info
162
- - EligibilityBenefit#descriptions
230
+
231
+ * EligibilityData#medicare?
232
+
233
+ * EligibilityData#plan\_id
234
+ * EligibilityData#plan?
235
+ * EligibilityBenefits#where\_not
236
+ * EligibilityBenefits#+
237
+ * EligibilityBenefit#additional\_info
238
+ * EligibilityBenefit#descriptions
163
239
 
164
240
  ### Changed
165
- - EligibilityData initialize now checks for sub-classes of EligibilityBenefits with trading partner
166
- - EligibilityData initialize now checks for sub-classes of EligibilityBenefits with trading partner responds to `factory` to choose sub-class
167
- - EligibilityBenefits initializes `self.class` type in case it's a subclass
241
+
242
+ * EligibilityData initialize now checks for sub-classes of EligibilityBenefits with trading partner
243
+
244
+ * EligibilityData initialize now checks for sub-classes of EligibilityBenefits with trading partner responds to `factory` to choose sub-class
245
+ * EligibilityBenefits initializes `self.class` type in case it's a subclass
168
246
 
169
247
  ## [0.10.0] - 2020-04-09
248
+
170
249
  ### Added
171
- - Add Trading Partner API querying capability
172
- - Request::TradingPartner
173
- - Response::TradingPartnerData
174
- - Response::TradingPartnersData
175
- - Models::TradingPartner
250
+
251
+ * Add Trading Partner API querying capability
252
+
253
+ * Request::TradingPartner
254
+ * Response::TradingPartnerData
255
+ * Response::TradingPartnersData
256
+ * Models::TradingPartner
176
257
 
177
258
  ## [0.9.0] - 2020-04-08
259
+
178
260
  ### Added
179
- - Added EligibilityBenefit#medicare?
180
- - Added EligibilityData#medicare?
261
+
262
+ * Added EligibilityBenefit#medicare?
263
+
264
+ * Added EligibilityData#medicare?
181
265
 
182
266
  ### Changed
183
- - EligibilityBenefit(s)#individual returns true for medicare in benefit and queries that look for 'IND'
184
- - EligibilityBenefit(s)#in\_network returns true for medicare in benefit and queries that look for 'Y'
267
+
268
+ * EligibilityBenefit(s)#individual returns true for medicare in benefit and queries that look for 'IND'
269
+
270
+ * EligibilityBenefit(s)#in\_network returns true for medicare in benefit and queries that look for 'Y'
185
271
 
186
272
  ## [0.8.0] - 2020-04-04
273
+
187
274
  ### Changed
188
- - Attempt to serialize all properties with 'date' in the name to ChangeHealth date format
275
+
276
+ * Attempt to serialize all properties with 'date' in the name to ChangeHealth date format
189
277
 
190
278
  ## [0.7.0] - 2020-04-03
279
+
191
280
  ### Changed
192
- - Fixed bug in serializing date on subscriber and encounter
281
+
282
+ * Fixed bug in serializing date on subscriber and encounter
193
283
 
194
284
  ## [0.6.0] - 2020-04-02
285
+
195
286
  ### Changed
196
- - Added Indifferent Access to hashes
197
- - Fixed bug with Authentication endpoint
287
+
288
+ * Added Indifferent Access to hashes
289
+
290
+ * Fixed bug with Authentication endpoint
198
291
 
199
292
  ## [0.5.0] - 2020-03-11
293
+
200
294
  ### Added
201
- - EligibilityBenefit Deductible information
202
- - EligibilityBenefit benefits date information
203
- - EligibilityBenefit(s) child
204
- - EligibilityBenefit(s) employee
205
- - EligibilityBenefit(s) family
206
- - EligibilityBenefit(s) employee and child
295
+
296
+ * EligibilityBenefit Deductible information
297
+
298
+ * EligibilityBenefit benefits date information
299
+ * EligibilityBenefit(s) child
300
+ * EligibilityBenefit(s) employee
301
+ * EligibilityBenefit(s) family
302
+ * EligibilityBenefit(s) employee and child
207
303
 
208
304
  ### Changed
209
- - Broke EligibilityBenefit and EligibilityBenefits into separate files
305
+
306
+ * Broke EligibilityBenefit and EligibilityBenefits into separate files
210
307
 
211
308
  ## [0.4.0] - 2020-03-10
309
+
212
310
  ### Added
213
- - EligibilityBenefit(s) Employee information
214
- - EligibilityData plan date information
215
- - EligibilityData eligibility, plan and service date helpers on date info
311
+
312
+ * EligibilityBenefit(s) Employee information
313
+
314
+ * EligibilityData plan date information
315
+ * EligibilityData eligibility, plan and service date helpers on date info
216
316
 
217
317
  ## [0.3.0] - 2020-03-09
318
+
218
319
  ### Added
219
- - Production endpoint
320
+
321
+ * Production endpoint
220
322
 
221
323
  ## [0.0.2] - 2020-03-09
324
+
222
325
  ### Added
223
- - EligibilityData
224
- - EligibilityBenefit
225
- - EligibilityBenefits
326
+
327
+ * EligibilityData
328
+
329
+ * EligibilityBenefit
330
+ * EligibilityBenefits
226
331
 
227
332
  ### Changed
228
- - Eligibility.query returns EligibilityData object
333
+
334
+ * Eligibility.query returns EligibilityData object
229
335
 
230
336
  ## [0.0.1] - 2020-03-04
337
+
231
338
  ### Added
232
- - Provider
233
- - Subscriber
234
- - Encounter
235
- - Eligibility
236
- - Authentication
237
- - Configuration
238
339
 
340
+ * Provider
341
+
342
+ * Subscriber
343
+ * Encounter
344
+ * Eligibility
345
+ * Authentication
346
+ * Configuration
347
+
348
+ [3.5.1]: https://github.com/WeInfuse/change_health/compare/v3.4.0...v3.5.1
349
+ [3.5.0]: https://github.com/WeInfuse/change_health/compare/v3.4.0...v3.5.0
350
+ [3.4.0]: https://github.com/WeInfuse/change_health/compare/v3.3.0...v3.4.0
239
351
  [3.3.0]: https://github.com/WeInfuse/change_health/compare/v3.2.0...v3.3.0
240
352
  [3.2.0]: https://github.com/WeInfuse/change_health/compare/v3.1.0...v3.2.0
241
353
  [3.1.0]: https://github.com/WeInfuse/change_health/compare/v3.0.0...v3.1.0
@@ -15,6 +15,7 @@ module ChangeHealth
15
15
  property :serviceFacilityLocation, from: :service_facility_location, required: false
16
16
  property :serviceLines, from: :service_lines, required: false
17
17
  property :signatureIndicator, from: :signature_indicator, required: false
18
+ property :otherSubscriberInformation, from: :other_subscriber_information, required: false
18
19
 
19
20
  def add_service_line(service_line)
20
21
  self[:serviceLines] ||= []
@@ -6,6 +6,7 @@ module ChangeHealth
6
6
  property :serviceDate, from: :service_date, required: false
7
7
  property :professionalService, from: :professional_service, required: false
8
8
  property :renderingProvider, from: :rendering_provider, required: false
9
+ property :lineAdjudicationInformation, from: :line_adjudication_information, required: false
9
10
  end
10
11
  end
11
12
  end
@@ -2,9 +2,12 @@ module ChangeHealth
2
2
  module Response
3
3
  module Claim
4
4
  class Report835Claim < ReportClaim
5
+ property :check_issue_or_eft_effective_date, required: false
6
+ property :check_or_eft_trace_number, required: false
5
7
  property :claim_payment_remark_codes, required: false
6
8
  property :patient_control_number, required: false
7
9
  property :payer_claim_control_number, required: false
10
+ property :payer_identifier, required: false
8
11
  property :payment_method_code, required: false
9
12
  property :service_lines, required: false
10
13
  property :total_actual_provider_payment_amount, required: false
@@ -7,11 +7,27 @@ module ChangeHealth
7
7
  @raw['transactions']
8
8
  end
9
9
 
10
+ def check_or_eft_trace_number
11
+ transactions&.first&.dig('paymentAndRemitReassociationDetails', 'checkOrEFTTraceNumber')
12
+ end
13
+
14
+ def check_issue_or_eft_effective_date
15
+ ChangeHealth::Models::PARSE_DATE.call(transactions&.first&.dig('financialInformation', 'checkIssueOrEFTEffectiveDate'))
16
+ end
17
+
18
+ def payer_identification
19
+ transactions&.first&.dig('payer', 'payerIdentificationNumber')
20
+ end
21
+
10
22
  # Only one payer per report
11
23
  def payer_name
12
24
  transactions&.first&.dig('payer')&.dig('name')
13
25
  end
14
26
 
27
+ def payer_identifier
28
+ ChangeHealth::Models::PARSE_DATE.call(transactions&.first&.dig('financialInformation', 'payerIdentifier'))
29
+ end
30
+
15
31
  def payment_method_code
16
32
  transactions&.first&.dig('financialInformation', 'paymentMethodCode')
17
33
  end
@@ -28,13 +44,6 @@ module ChangeHealth
28
44
  report_claims = []
29
45
 
30
46
  transactions&.each do |transaction|
31
- payment_method_code = transaction.dig('financialInformation', 'paymentMethodCode')
32
- payer_name = transaction.dig('payer', 'name')
33
- payer_identification = transaction.dig('payer', 'payerIdentificationNumber')
34
- report_creation_date = ChangeHealth::Models::PARSE_DATE.call(transaction['productionDate'])
35
- total_actual_provider_payment_amount = transaction.dig('financialInformation',
36
- 'totalActualProviderPaymentAmount')
37
-
38
47
  transaction['detailInfo']&.each do |detail_info|
39
48
  detail_info['paymentInfo']&.each do |payment_info|
40
49
  patient_control_number = payment_info.dig('claimPaymentInfo', 'patientControlNumber')
@@ -56,8 +65,7 @@ module ChangeHealth
56
65
 
57
66
  service_date_begin = nil
58
67
  service_date_end = nil
59
- service_lines = []
60
- payment_info['serviceLines']&.each do |service_line|
68
+ service_lines = payment_info['serviceLines']&.map do |service_line|
61
69
  service_line_date = ChangeHealth::Models::PARSE_DATE.call(service_line['serviceDate'])
62
70
  if service_date_begin.nil? || service_line_date < service_date_begin
63
71
  service_date_begin = service_line_date
@@ -70,8 +78,7 @@ module ChangeHealth
70
78
  line_item_provider_payment_amount = service_line.dig('servicePaymentInformation',
71
79
  'lineItemProviderPaymentAmount')
72
80
 
73
- service_adjustments = []
74
- service_line['serviceAdjustments']&.each do |service_adjustment|
81
+ service_adjustments = service_line['serviceAdjustments']&.map do |service_adjustment|
75
82
  adjustments = {}
76
83
  service_adjustment_index = 1
77
84
  while service_adjustment["adjustmentReasonCode#{service_adjustment_index}"]
@@ -83,22 +90,21 @@ module ChangeHealth
83
90
 
84
91
  claim_adjustment_group_code = service_adjustment['claimAdjustmentGroupCode']
85
92
 
86
- service_adjustments << Report835ServiceAdjustment.new(
93
+ Report835ServiceAdjustment.new(
87
94
  adjustments: adjustments,
88
95
  claim_adjustment_group_code: claim_adjustment_group_code
89
96
  )
90
97
  end
91
98
 
92
- health_care_check_remark_codes = []
93
- service_line['healthCareCheckRemarkCodes']&.each do |health_care_check_remark_code|
94
- health_care_check_remark_codes << Report835HealthCareCheckRemarkCode.new(
99
+ health_care_check_remark_codes = service_line['healthCareCheckRemarkCodes']&.map do |health_care_check_remark_code|
100
+ Report835HealthCareCheckRemarkCode.new(
95
101
  code_list_qualifier_code: health_care_check_remark_code['codeListQualifierCode'],
96
102
  code_list_qualifier_code_value: health_care_check_remark_code['codeListQualifierCodeValue'],
97
103
  remark_code: health_care_check_remark_code['remarkCode']
98
104
  )
99
105
  end
100
106
 
101
- service_lines << Report835ServiceLine.new(
107
+ Report835ServiceLine.new(
102
108
  adjudicated_procedure_code: adjudicated_procedure_code,
103
109
  allowed_actual: allowed_actual,
104
110
  line_item_charge_amount: line_item_charge_amount,
@@ -109,6 +115,8 @@ module ChangeHealth
109
115
  end
110
116
 
111
117
  report_claims << Report835Claim.new(
118
+ check_issue_or_eft_effective_date: check_issue_or_eft_effective_date,
119
+ check_or_eft_trace_number: check_or_eft_trace_number,
112
120
  claim_payment_remark_codes: claim_payment_remark_codes,
113
121
  patient_control_number: patient_control_number,
114
122
  patient_first_name: patient_first_name,
@@ -116,6 +124,7 @@ module ChangeHealth
116
124
  patient_member_id: patient_member_id,
117
125
  payer_claim_control_number: payer_claim_control_number,
118
126
  payer_identification: payer_identification,
127
+ payer_identifier: payer_identifier,
119
128
  payer_name: payer_name,
120
129
  payment_method_code: payment_method_code,
121
130
  report_creation_date: report_creation_date,
@@ -8,6 +8,45 @@ module ChangeHealth
8
8
  property :line_item_charge_amount, required: false
9
9
  property :line_item_provider_payment_amount, required: false
10
10
  property :service_adjustments, required: false
11
+
12
+ def create_group_adjustments(service_adjustments)
13
+ adjustment_array = service_adjustments[:adjustments].map do |key, value|
14
+ {
15
+ adjustmentReasonCode: key,
16
+ adjustmentAmount: value
17
+ }
18
+ end
19
+ {
20
+ adjustmentDetails: adjustment_array,
21
+ adjustmentGroupCode: service_adjustments[:claim_adjustment_group_code]
22
+ }
23
+ end
24
+
25
+ def create_remark_code_adjustments(remark_codes_array)
26
+ adjustment_array = remark_codes_array.map do |_key, value|
27
+ {
28
+ adjustmentReasonCode: value,
29
+ adjustmentAmount: ""
30
+ }
31
+ end
32
+ {
33
+ adjustmentDetails: adjustment_array,
34
+ adjustmentGroupCode: ""
35
+ }
36
+ end
37
+
38
+ def create_adjustment_detail_array
39
+ all_service_adjustments = self.service_adjustments
40
+ adjustment_details = all_service_adjustments.map do |service_adjustments|
41
+ create_group_adjustments(service_adjustments)
42
+ end
43
+
44
+ health_care_check_remark_codes = self[:health_care_check_remark_codes]
45
+ health_care_check_remark_codes.each do |remark_codes|
46
+ adjustment_details << create_remark_code_adjustments(remark_codes)
47
+ end
48
+ adjustment_details
49
+ end
11
50
  end
12
51
  end
13
52
  end
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '3.3.0'.freeze
2
+ VERSION = '3.5.1'.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: 3.3.0
4
+ version: 3.5.1
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-02-11 00:00:00.000000000 Z
11
+ date: 2022-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty