change_health 4.9.0 → 4.10.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 +8 -1
- data/lib/change_health/request/report.rb +23 -13
- 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: 7a69d56a89a1c2ed046562ff0a03ad608127e1cf0528081e5487f33146387ec0
|
4
|
+
data.tar.gz: e5642c14d9b6505265678a06851f3e76a80cbeed668c3870f13ee1c278e22baf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9e0f343efd67eef7c40de6df33b6a0766d0f0e32cfe035a1b9eff2fccbacd29b96fa0ca25554ce0070fb470fef4c2514b527ee80adf70fdba2083997219771c
|
7
|
+
data.tar.gz: b09505a0d9b2ec94ab473cb1f9bd86aaa2e689fe28b55b52aed37ddd1221968fa9b82e6d0bce62dbea659174457e9d9c52c9c24f2daeb3e9f84518bf58123831
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,12 @@ 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
|
+
|
8
14
|
# [4.9.0] - 2022-11-11
|
9
15
|
|
10
16
|
### Added
|
@@ -448,7 +454,8 @@ Added the ability to hit professional claim submission API. For more details, se
|
|
448
454
|
* Authentication
|
449
455
|
* Configuration
|
450
456
|
|
451
|
-
[4.
|
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
|
452
459
|
[4.8.0]: https://github.com/WeInfuse/change_health/compare/v4.7.0...v4.8.0
|
453
460
|
[4.7.0]: https://github.com/WeInfuse/change_health/compare/v4.6.0...v4.7.0
|
454
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(
|
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
|
-
|
18
|
-
return if report_type.nil?
|
18
|
+
final_headers = ChangeHealth::Request::Claim::Report.report_headers(headers)
|
19
19
|
|
20
|
-
individual_report_endpoint = ENDPOINT
|
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
|
-
|
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(
|
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
|
-
|
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
|
-
|
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[
|
51
|
-
extra_headers[
|
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
|
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.
|
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
|
+
date: 2022-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|