change_health 5.12.0 → 5.13.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: befb490616371ee0383cd25a2f9eff8a5b755afa3382a7f143c418db6237d719
4
- data.tar.gz: 935bf936aa51f76482366e313194bc6f5ac2e04114f75fadd7c4a991862ed27c
3
+ metadata.gz: a2afd60953fdaab441ccf82bcecc024147a7065df20501b41d0cfe223b658682
4
+ data.tar.gz: fdbcef78612c5a0eb1f88ecd131e6eb158741f09af327483d9c2ab569586de01
5
5
  SHA512:
6
- metadata.gz: 31bdc7fae7e01cddfab61ab8bbed0b0c121b6fd4d27f8b5fac079e5c4e85cb7d4a530eedd4a2a7230deb086a9f5c10a17e781c19839cc35038ba752619233c6d
7
- data.tar.gz: e629c5213a541f4536d4b7e7fb293230c54147b1794b9d26c6a48cfdef4e835ccc10bc43e9723594fc6bb2c3f65bf208c264444f5ca3479739ef2415787a5a99
6
+ metadata.gz: 56f2e448c14a68c7e9b3389ac6cd2768f0e627c3a436a243cb0838e6005173b57b92024987cfd654204238c48e5729e2c731bd46822361e0b14c316bb4efcc96
7
+ data.tar.gz: cf7a26b79c1b36b9656329c4420a9c494c384423ffa6e3d40db5defe8fe80d9ec2165fa58f6b275c32db0f0936acef2f34a71802cdb062cc5ffc259050bf363a
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
+ # [5.13.0] - 2024-05-13
9
+
10
+ ### Added
11
+
12
+ * Grab "id" per transaction for ChangeHealth::Response::Claim::Report835Claim, ChangeHealth::Response::Claim::Report835Payment, and ChangeHealth::Response::Claim::Report277Claim
13
+
14
+ # [5.12.1] - 2024-05-10
15
+
16
+ ### Fixed
17
+
18
+ * For ChangeHealth::Response::Claim::ReportData, if multiple json values can be used to find a value, it will now use other json values if the first choice is empty but not nil like `""`
19
+
8
20
  # [5.12.0] - 2024-04-26
9
21
 
10
22
  ### Added
@@ -656,6 +668,8 @@ Added the ability to hit professional claim submission API. For more details, se
656
668
  * Authentication
657
669
  * Configuration
658
670
 
671
+ [5.13.0]: https://github.com/WeInfuse/change_health/compare/v5.12.1...v5.13.0
672
+ [5.12.1]: https://github.com/WeInfuse/change_health/compare/v5.12.0...v5.12.1
659
673
  [5.12.0]: https://github.com/WeInfuse/change_health/compare/v5.11.0...v5.12.0
660
674
  [5.11.0]: https://github.com/WeInfuse/change_health/compare/v5.10.0...v5.11.0
661
675
  [5.10.0]: https://github.com/WeInfuse/change_health/compare/v5.9.0...v5.10.0
@@ -20,6 +20,7 @@ module ChangeHealth
20
20
  report_claims = []
21
21
 
22
22
  transactions&.each do |transaction|
23
+ id = transaction.dig('id')
23
24
  report_creation_date = ChangeHealth::Models::PARSE_DATE.call(transaction['transactionSetCreationDate'])
24
25
  transaction['payers']&.each do |payer|
25
26
  payer_identification = payer['payerIdentification']
@@ -44,8 +45,8 @@ module ChangeHealth
44
45
  referenced_transaction_trace_number = claim_status['referencedTransactionTraceNumber']
45
46
  trading_partner_claim_number = claim_status['tradingPartnerClaimNumber']
46
47
 
47
- service_date_begin = ChangeHealth::Models::PARSE_DATE.call(claim_status['claimServiceBeginDate'] || claim_status['claimServiceDate'])
48
- service_date_end = ChangeHealth::Models::PARSE_DATE.call(claim_status['claimServiceEndDate'] || claim_status['claimServiceDate'])
48
+ service_date_begin = ChangeHealth::Models::PARSE_DATE.call(presence(claim_status['claimServiceBeginDate']) || presence(claim_status['claimServiceDate']))
49
+ service_date_end = ChangeHealth::Models::PARSE_DATE.call(presence(claim_status['claimServiceEndDate']) || presence(claim_status['claimServiceDate']))
49
50
 
50
51
  info_claim_statuses = []
51
52
  claim_status['informationClaimStatuses']&.each do |info_claim_status|
@@ -67,6 +68,7 @@ module ChangeHealth
67
68
  end
68
69
  report_claims << Report277Claim.new(
69
70
  clearinghouse_trace_number: clearinghouse_trace_number,
71
+ id: id,
70
72
  info_claim_statuses: info_claim_statuses,
71
73
  patient_account_number: patient_account_number,
72
74
  patient_first_name: patient_first_name,
@@ -28,6 +28,7 @@ module ChangeHealth
28
28
  report_payments = []
29
29
 
30
30
  transactions&.each do |transaction|
31
+ id = transaction.dig('id')
31
32
  check_or_eft_trace_number = transaction.dig('paymentAndRemitReassociationDetails', 'checkOrEFTTraceNumber')
32
33
  check_issue_or_eft_effective_date =
33
34
  ChangeHealth::Models::PARSE_DATE.call(
@@ -62,13 +63,13 @@ module ChangeHealth
62
63
  patient_first_name = payment_info.dig('patientName', 'firstName')
63
64
  patient_last_name = payment_info.dig('patientName', 'lastName')
64
65
  patient_member_id =
65
- payment_info.dig('patientName', 'memberId') ||
66
- payment_info.dig('subscriber', 'memberId')
66
+ presence(payment_info.dig('patientName', 'memberId')) ||
67
+ presence(payment_info.dig('subscriber', 'memberId'))
67
68
  payer_claim_control_number = payment_info.dig('claimPaymentInfo', 'payerClaimControlNumber')
68
69
  service_provider_npi =
69
- payment_info.dig('renderingProvider', 'npi') ||
70
- detail_info.dig('providerSummaryInformation', 'providerIdentifier') ||
71
- transaction.dig('payee', 'npi')
70
+ presence(payment_info.dig('renderingProvider', 'npi')) ||
71
+ presence(detail_info.dig('providerSummaryInformation', 'providerIdentifier')) ||
72
+ presence(transaction.dig('payee', 'npi'))
72
73
  total_charge_amount = payment_info.dig('claimPaymentInfo', 'totalClaimChargeAmount')
73
74
 
74
75
  claim_payment_remark_codes = []
@@ -131,6 +132,7 @@ module ChangeHealth
131
132
  claim_payment_amount: claim_payment_amount,
132
133
  claim_payment_remark_codes: claim_payment_remark_codes,
133
134
  claim_status_code: claim_status_code,
135
+ id: id,
134
136
  patient_control_number: patient_control_number,
135
137
  patient_first_name: patient_first_name,
136
138
  patient_last_name: patient_last_name,
@@ -152,6 +154,7 @@ module ChangeHealth
152
154
  check_issue_or_eft_effective_date: check_issue_or_eft_effective_date,
153
155
  check_or_eft_trace_number: check_or_eft_trace_number,
154
156
  claims: claims,
157
+ id: id,
155
158
  payer_identifier: payer_identifier,
156
159
  payer_name: payer_name,
157
160
  payer_address: payer_address,
@@ -2,17 +2,18 @@ module ChangeHealth
2
2
  module Response
3
3
  module Claim
4
4
  class Report835Payment < Hashie::Trash
5
- property :check_issue_or_eft_effective_date, required: false
6
- property :check_or_eft_trace_number, required: false
7
- property :claims, required: false
8
- property :payer_identifier, required: false
9
- property :payer_name, required: false
10
- property :payment_method_code, required: false
11
- property :payer_address, required: false
12
- property :provider_adjustments, required: false
13
- property :report_creation_date, required: false
14
- property :report_name, required: false
15
- property :total_actual_provider_payment_amount, required: false
5
+ property :check_issue_or_eft_effective_date
6
+ property :check_or_eft_trace_number
7
+ property :claims
8
+ property :id
9
+ property :payer_identifier
10
+ property :payer_name
11
+ property :payment_method_code
12
+ property :payer_address
13
+ property :provider_adjustments
14
+ property :report_creation_date
15
+ property :report_name
16
+ property :total_actual_provider_payment_amount
16
17
  end
17
18
  end
18
19
  end
@@ -2,16 +2,17 @@ module ChangeHealth
2
2
  module Response
3
3
  module Claim
4
4
  class ReportClaim < Hashie::Trash
5
- property :patient_first_name, required: false
6
- property :patient_last_name, required: false
7
- property :patient_member_id, required: false
8
- property :payer_identification, required: false
9
- property :payer_name, required: false
10
- property :report_creation_date, required: false
11
- property :report_name, required: false
12
- property :service_date_begin, required: false
13
- property :service_date_end, required: false
14
- property :service_provider_npi, required: false
5
+ property :id
6
+ property :patient_first_name
7
+ property :patient_last_name
8
+ property :patient_member_id
9
+ property :payer_identification
10
+ property :payer_name
11
+ property :report_creation_date
12
+ property :report_name
13
+ property :service_date_begin
14
+ property :service_date_end
15
+ property :service_provider_npi
15
16
  end
16
17
  end
17
18
  end
@@ -3,7 +3,7 @@ module ChangeHealth
3
3
  module Claim
4
4
  class ReportData < ChangeHealth::Response::ResponseData
5
5
  attr_reader :report_name, :json
6
- alias_method :json?, :json
6
+ alias json? json
7
7
 
8
8
  def initialize(report_name, json, data: nil, response: nil)
9
9
  super(data: data, response: response)
@@ -39,6 +39,11 @@ module ChangeHealth
39
39
  def self.is_835?(report_name)
40
40
  report_name.start_with?('R5')
41
41
  end
42
+
43
+ # Ripped from rails Object#presence method
44
+ def presence(obj)
45
+ obj unless obj.respond_to?(:empty?) ? !!obj.empty? : !obj
46
+ end
42
47
  end
43
48
  end
44
49
  end
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '5.12.0'.freeze
2
+ VERSION = '5.13.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: 5.12.0
4
+ version: 5.13.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: 2024-04-26 00:00:00.000000000 Z
11
+ date: 2024-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty