change_health 5.7.0 → 5.8.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: 2474bb16e85188bc6cd475f6d4af2171db908ebf6bbee0b8d1c4999bf3b53251
4
- data.tar.gz: 269d3c75f370cf70828bd8b30614c00c16df551cb7c0745d4216076b7bfc6c73
3
+ metadata.gz: f0bf0c65663038f50cad4015b808443f1ed0f1d157021568b377358a9d5226aa
4
+ data.tar.gz: f741f92c0e951b8b8b65c10f2a3cad24dec9d211d13684d64351a3504cb1666f
5
5
  SHA512:
6
- metadata.gz: 992532c9d41db62fc2ed362dbbda6cbadffbea55c03809733625788ec60fd490c608cf1b3eac095fb78a627cf8c9b24e5d37790f1ab1a7b62528eda7d1cf4fb2
7
- data.tar.gz: e7b5c2aabd8a61fa9846f3605255a3b05d6a7c3ee377e68badadc1c5845c1dd938207cfb5e4f2c5a6962aaa06d74747a822673b6d917ef68f1a15d6ec02e5742
6
+ metadata.gz: 339019aae2ac50da301e079790af4179ee84502ae2253d6d0502ae06832e6bf7747006298fe10f9ce26816bdee53272b84308f21970278762be8a343e0fffdad
7
+ data.tar.gz: d222cbb2ffd4613fe0abd532cda576b95b5816611af2537ff1877d6be59cc32243a030038fbd1bb778185e4b1b57e07bdb6bde99520b1a5d7e8f0e98e31586f2
data/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ 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.8.1] - 2024-04-02
9
+
10
+ ### Fixed
11
+
12
+ ChangeHealth::Response::Error is retryable for retryable codes that do not have a followup action.
13
+ Previously, a followup action was required to be retryable.
14
+
15
+ # [5.8.0] - 2024-03-25
16
+
17
+ ### Added
18
+
19
+ * Added configurable endpoint overide for claim report
20
+
8
21
  # [5.7.0] - 2024-03-07
9
22
 
10
23
  ### Added
@@ -619,6 +632,8 @@ Added the ability to hit professional claim submission API. For more details, se
619
632
  * Authentication
620
633
  * Configuration
621
634
 
635
+ [5.8.1]: https://github.com/WeInfuse/change_health/compare/v5.8.0...v5.8.1
636
+ [5.8.0]: https://github.com/WeInfuse/change_health/compare/v5.7.0...v5.8.0
622
637
  [5.7.0]: https://github.com/WeInfuse/change_health/compare/v5.6.0...v5.7.0
623
638
  [5.6.0]: https://github.com/WeInfuse/change_health/compare/v5.5.0...v5.6.0
624
639
  [5.5.0]: https://github.com/WeInfuse/change_health/compare/v5.4.2...v5.5.0
@@ -6,21 +6,31 @@ module ChangeHealth
6
6
  HEALTH_CHECK_ENDPOINT = ENDPOINT + '/healthcheck'.freeze
7
7
 
8
8
  def self.report_list(headers: nil)
9
+ endpoint = ChangeHealth::Connection.endpoint_for(self)
9
10
  final_headers = ChangeHealth::Request::Claim::Report.report_headers(headers)
10
11
  ChangeHealth::Response::Claim::ReportListData.new(response: ChangeHealth::Connection.new.request(
11
- endpoint: ENDPOINT, verb: :get, headers: final_headers
12
+ endpoint: endpoint, verb: :get, headers: final_headers
12
13
  ))
13
14
  end
14
15
 
15
- def self.get_report(report_name, as_json_report: true, headers: nil)
16
+ def self.get_report(
17
+ report_name,
18
+ as_json_report: true,
19
+ headers: nil,
20
+ report_type: nil
21
+ )
16
22
  return if report_name.nil? || report_name.empty?
17
23
 
18
24
  final_headers = ChangeHealth::Request::Claim::Report.report_headers(headers)
19
25
 
20
- individual_report_endpoint = "#{ENDPOINT}/#{report_name}"
26
+ endpoint = ChangeHealth::Connection.endpoint_for(self)
27
+
28
+ individual_report_endpoint = "#{endpoint}/#{report_name}"
21
29
 
22
30
  # https://developers.changehealthcare.com/eligibilityandclaims/docs/what-file-types-does-this-api-get-from-the-mailbox
23
- if as_json_report
31
+ if report_type
32
+ individual_report_endpoint += "/#{report_type}"
33
+ elsif as_json_report
24
34
  report_type = ChangeHealth::Response::Claim::ReportData.report_type(report_name)
25
35
  individual_report_endpoint += "/#{report_type}"
26
36
  end
@@ -53,7 +63,8 @@ module ChangeHealth
53
63
 
54
64
  final_headers = ChangeHealth::Request::Claim::Report.report_headers(headers)
55
65
 
56
- individual_report_endpoint = "#{ENDPOINT}/#{report_name}"
66
+ endpoint = ChangeHealth::Connection.endpoint_for(self)
67
+ individual_report_endpoint = "#{endpoint}/#{report_name}"
57
68
 
58
69
  ChangeHealth::Connection.new.request(
59
70
  endpoint: individual_report_endpoint,
@@ -39,9 +39,7 @@ module ChangeHealth
39
39
 
40
40
  def retryable?
41
41
  represents_down? ||
42
- (code? && SIMPLE_RETRY_CODES.include?(code) && followupAction? && NO_RESUBMIT_MESSAGES.none? do |msg|
43
- followupAction.downcase.include?(msg)
44
- end)
42
+ (code? && SIMPLE_RETRY_CODES.include?(code) && can_follow_up?)
45
43
  end
46
44
 
47
45
  %w[field description code followupAction location].each do |method_name|
@@ -53,6 +51,16 @@ module ChangeHealth
53
51
  @data[method_name]
54
52
  end
55
53
  end
54
+
55
+ private
56
+
57
+ def can_follow_up?
58
+ return true if followupAction.nil? || followupAction.empty?
59
+
60
+ followupAction? && NO_RESUBMIT_MESSAGES.none? do |msg|
61
+ followupAction.downcase.include?(msg)
62
+ end
63
+ end
56
64
  end
57
65
  end
58
66
  end
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '5.7.0'.freeze
2
+ VERSION = '5.8.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: 5.7.0
4
+ version: 5.8.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: 2024-03-07 00:00:00.000000000 Z
11
+ date: 2024-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  requirements: []
224
- rubygems_version: 3.1.6
224
+ rubygems_version: 3.0.3.1
225
225
  signing_key:
226
226
  specification_version: 4
227
227
  summary: Ruby wrapper for the ChangeHealth API