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