change_health 4.8.0 → 4.10.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: da5ff0ee1c6b8a8534a94564f5b37b850144ed9af4b3f159ad64677730996147
4
- data.tar.gz: 13086f7b6ab80de52d92d195cc15c2584140fc7e4856c76bbb6e2a09f8e02594
3
+ metadata.gz: 7a69d56a89a1c2ed046562ff0a03ad608127e1cf0528081e5487f33146387ec0
4
+ data.tar.gz: e5642c14d9b6505265678a06851f3e76a80cbeed668c3870f13ee1c278e22baf
5
5
  SHA512:
6
- metadata.gz: af2adfcd5d7c27bf96157f5443b3f0dc2255bc64a5289d7ae74a4826ef6aa7f785c8d6de043ef003c71b658a670bca0d920f2263804c644ba0f3b7a3df2b8e9f
7
- data.tar.gz: 6db58f0baa3ee206361cffa27e1d9dd3f3c1a82554d24d96a8c302d935fb46408b7405ccd9d6f57c33e453ebe9a83ed29c8b170b38746ade32ceb36b13916e71
6
+ metadata.gz: a9e0f343efd67eef7c40de6df33b6a0766d0f0e32cfe035a1b9eff2fccbacd29b96fa0ca25554ce0070fb470fef4c2514b527ee80adf70fdba2083997219771c
7
+ data.tar.gz: b09505a0d9b2ec94ab473cb1f9bd86aaa2e689fe28b55b52aed37ddd1221968fa9b82e6d0bce62dbea659174457e9d9c52c9c24f2daeb3e9f84518bf58123831
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
+ # [4.10.0] - 2022-12-01
9
+
10
+ ### Added
11
+
12
+ * Request Report - can now pull back any kind of report, not just 277 or 835
13
+
14
+ # [4.9.0] - 2022-11-11
15
+
16
+ ### Added
17
+
18
+ * Report835Data - extract `claim_payment_amount` for Report835Claim
19
+
8
20
  # [4.8.0] - 2022-11-09
9
21
 
10
22
  ### Added
@@ -442,6 +454,8 @@ Added the ability to hit professional claim submission API. For more details, se
442
454
  * Authentication
443
455
  * Configuration
444
456
 
457
+ [4.10.0]: https://github.com/WeInfuse/change_health/compare/v4.9.0...v4.10.0
458
+ [4.9.0]: https://github.com/WeInfuse/change_health/compare/v4.8.0...v4.9.0
445
459
  [4.8.0]: https://github.com/WeInfuse/change_health/compare/v4.7.0...v4.8.0
446
460
  [4.7.0]: https://github.com/WeInfuse/change_health/compare/v4.6.0...v4.7.0
447
461
  [4.6.0]: https://github.com/WeInfuse/change_health/compare/v4.5.0...v4.6.0
@@ -7,32 +7,44 @@ module ChangeHealth
7
7
 
8
8
  def self.report_list(headers: nil)
9
9
  final_headers = ChangeHealth::Request::Claim::Report.report_headers(headers)
10
- ChangeHealth::Response::Claim::ReportListData.new(response: ChangeHealth::Connection.new.request(endpoint: ENDPOINT, verb: :get, headers: final_headers))
10
+ ChangeHealth::Response::Claim::ReportListData.new(response: ChangeHealth::Connection.new.request(
11
+ endpoint: ENDPOINT, verb: :get, headers: final_headers
12
+ ))
11
13
  end
12
14
 
13
15
  def self.get_report(report_name, as_json_report: true, headers: nil)
14
16
  return if report_name.nil? || report_name.empty?
15
- final_headers = ChangeHealth::Request::Claim::Report.report_headers(headers)
16
17
 
17
- report_type = ChangeHealth::Response::Claim::ReportData.report_type(report_name)
18
- return if report_type.nil?
18
+ final_headers = ChangeHealth::Request::Claim::Report.report_headers(headers)
19
19
 
20
- individual_report_endpoint = ENDPOINT + '/' + report_name
20
+ individual_report_endpoint = "#{ENDPOINT}/#{report_name}"
21
21
 
22
22
  # https://developers.changehealthcare.com/eligibilityandclaims/docs/what-file-types-does-this-api-get-from-the-mailbox
23
- individual_report_endpoint += '/' + report_type if as_json_report
23
+ if as_json_report
24
+ report_type = ChangeHealth::Response::Claim::ReportData.report_type(report_name)
25
+ individual_report_endpoint += "/#{report_type}"
26
+ end
24
27
 
25
- response = ChangeHealth::Connection.new.request(endpoint: individual_report_endpoint, verb: :get, headers: final_headers)
28
+ response = ChangeHealth::Connection.new.request(
29
+ endpoint: individual_report_endpoint,
30
+ verb: :get,
31
+ headers: final_headers
32
+ )
26
33
  if ChangeHealth::Response::Claim::ReportData.is_277?(report_name)
27
34
  ChangeHealth::Response::Claim::Report277Data
28
35
  .new(report_name,
29
36
  as_json_report,
30
37
  response: response)
31
- else
38
+ elsif ChangeHealth::Response::Claim::ReportData.is_835?(report_name)
32
39
  ChangeHealth::Response::Claim::Report835Data
33
40
  .new(report_name,
34
41
  as_json_report,
35
42
  response: response)
43
+ else
44
+ ChangeHealth::Response::Claim::ReportData
45
+ .new(report_name,
46
+ as_json_report,
47
+ response: response)
36
48
  end
37
49
  end
38
50
 
@@ -41,17 +53,15 @@ module ChangeHealth
41
53
  end
42
54
 
43
55
  def self.ping
44
- self.health_check
56
+ health_check
45
57
  end
46
58
 
47
59
  def self.report_headers(headers)
48
60
  if headers
49
61
  extra_headers = {}
50
- extra_headers["X-CHC-Reports-Username"] = headers[:username]
51
- extra_headers["X-CHC-Reports-Password"] = headers[:password]
62
+ extra_headers['X-CHC-Reports-Username'] = headers[:username]
63
+ extra_headers['X-CHC-Reports-Password'] = headers[:password]
52
64
  extra_headers
53
- else
54
- nil
55
65
  end
56
66
  end
57
67
  end
@@ -3,6 +3,7 @@ module ChangeHealth
3
3
  module Claim
4
4
  class Report835Claim < ReportClaim
5
5
  property :claim_adjustments, required: false
6
+ property :claim_payment_amount, required: false
6
7
  property :claim_payment_remark_codes, required: false
7
8
  property :claim_status_code, required: false
8
9
  property :patient_control_number, required: false
@@ -56,6 +56,7 @@ module ChangeHealth
56
56
  transaction.dig('financialInformation', 'totalActualProviderPaymentAmount')
57
57
  claims = transaction['detailInfo']&.flat_map do |detail_info|
58
58
  detail_info['paymentInfo']&.map do |payment_info|
59
+ claim_payment_amount = payment_info.dig('claimPaymentInfo', 'claimPaymentAmount')
59
60
  claim_status_code = payment_info.dig('claimPaymentInfo', 'claimStatusCode')
60
61
  patient_control_number = payment_info.dig('claimPaymentInfo', 'patientControlNumber')
61
62
  patient_first_name = payment_info.dig('patientName', 'firstName')
@@ -127,6 +128,7 @@ module ChangeHealth
127
128
 
128
129
  Report835Claim.new(
129
130
  claim_adjustments: claim_adjustments,
131
+ claim_payment_amount: claim_payment_amount,
130
132
  claim_payment_remark_codes: claim_payment_remark_codes,
131
133
  claim_status_code: claim_status_code,
132
134
  patient_control_number: patient_control_number,
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '4.8.0'.freeze
2
+ VERSION = '4.10.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: 4.8.0
4
+ version: 4.10.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: 2022-11-10 00:00:00.000000000 Z
11
+ date: 2022-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty