change_health 4.10.0 → 4.11.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: 7a69d56a89a1c2ed046562ff0a03ad608127e1cf0528081e5487f33146387ec0
4
- data.tar.gz: e5642c14d9b6505265678a06851f3e76a80cbeed668c3870f13ee1c278e22baf
3
+ metadata.gz: 40164a2a172f23588c4183c46cc2512d88d08f143f08957bcf8a23635ec4ed2d
4
+ data.tar.gz: 3604b9f1d0f4ad9dcf5e432d0c8b0be7138e9e0559143ec090b0b97bed4fd638
5
5
  SHA512:
6
- metadata.gz: a9e0f343efd67eef7c40de6df33b6a0766d0f0e32cfe035a1b9eff2fccbacd29b96fa0ca25554ce0070fb470fef4c2514b527ee80adf70fdba2083997219771c
7
- data.tar.gz: b09505a0d9b2ec94ab473cb1f9bd86aaa2e689fe28b55b52aed37ddd1221968fa9b82e6d0bce62dbea659174457e9d9c52c9c24f2daeb3e9f84518bf58123831
6
+ metadata.gz: 7abd435989c842857c68753b86be56244b2869377c906708acfd0fc597942a261daa142d05663861b7204ce63148b29d4008c689e05cc57b49f305083acc5214
7
+ data.tar.gz: 62ec9fd434583efa92609f37c8d77197534c81995e77326a3dcb33beccec5e9ba726def4df381c5a8f398168271ba251c2d1ed140eed0bbd12267a948c65bb5c
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.11.0] - 2022-12-30
9
+
10
+ ### Added
11
+
12
+ * ChangeHealth::Request::Claim::Report - delete a report
13
+
14
+ # [4.10.1] - 2022-12-29
15
+
16
+ ### Fixed
17
+
18
+ * Report835ServiceLine - nil exception for create_adjustment_detail_array when there are no service_adjustments
19
+
8
20
  # [4.10.0] - 2022-12-01
9
21
 
10
22
  ### Added
@@ -454,6 +466,8 @@ Added the ability to hit professional claim submission API. For more details, se
454
466
  * Authentication
455
467
  * Configuration
456
468
 
469
+ [4.11.0]: https://github.com/WeInfuse/change_health/compare/v4.10.1...v4.11.0
470
+ [4.10.1]: https://github.com/WeInfuse/change_health/compare/v4.10.0...v4.10.1
457
471
  [4.10.0]: https://github.com/WeInfuse/change_health/compare/v4.9.0...v4.10.0
458
472
  [4.9.0]: https://github.com/WeInfuse/change_health/compare/v4.8.0...v4.9.0
459
473
  [4.8.0]: https://github.com/WeInfuse/change_health/compare/v4.7.0...v4.8.0
data/README.md CHANGED
@@ -324,6 +324,16 @@ claim835.claim_status_code
324
324
  # "19"
325
325
  ```
326
326
 
327
+ ### Delete Reports
328
+ [Delete Endpoint FAQ](https://developers.changehealthcare.com/eligibilityandclaims/docs/claims-responses-and-reports-faq#delete-http-endpoint)
329
+
330
+ [Delete Endpoint API Reference](https://developers.changehealthcare.com/eligibilityandclaims/reference/delete_single_report_v2_reports__filename__delete)
331
+
332
+
333
+ ```ruby
334
+ ChangeHealth::Request::Claim::Report.delete_report("R5000000.XY")
335
+ ```
336
+
327
337
  ## Configuration
328
338
 
329
339
  ```ruby
@@ -48,6 +48,20 @@ module ChangeHealth
48
48
  end
49
49
  end
50
50
 
51
+ def self.delete_report(report_name, headers: nil)
52
+ return if report_name.nil? || report_name.empty?
53
+
54
+ final_headers = ChangeHealth::Request::Claim::Report.report_headers(headers)
55
+
56
+ individual_report_endpoint = "#{ENDPOINT}/#{report_name}"
57
+
58
+ ChangeHealth::Connection.new.request(
59
+ endpoint: individual_report_endpoint,
60
+ verb: :delete,
61
+ headers: final_headers
62
+ )
63
+ end
64
+
51
65
  def self.health_check
52
66
  ChangeHealth::Connection.new.request(endpoint: HEALTH_CHECK_ENDPOINT, verb: :get)
53
67
  end
@@ -57,12 +71,12 @@ module ChangeHealth
57
71
  end
58
72
 
59
73
  def self.report_headers(headers)
60
- if headers
61
- extra_headers = {}
62
- extra_headers['X-CHC-Reports-Username'] = headers[:username]
63
- extra_headers['X-CHC-Reports-Password'] = headers[:password]
64
- extra_headers
65
- end
74
+ return unless headers
75
+
76
+ extra_headers = {}
77
+ extra_headers['X-CHC-Reports-Username'] = headers[:username]
78
+ extra_headers['X-CHC-Reports-Password'] = headers[:password]
79
+ extra_headers
66
80
  end
67
81
  end
68
82
  end
@@ -23,11 +23,9 @@ module ChangeHealth
23
23
  end
24
24
 
25
25
  def create_adjustment_detail_array
26
- all_service_adjustments = self.service_adjustments
27
- adjustment_details = all_service_adjustments.map do |service_adjustments|
26
+ service_adjustments&.map do |service_adjustments|
28
27
  create_group_adjustments(service_adjustments)
29
- end
30
- adjustment_details
28
+ end || []
31
29
  end
32
30
  end
33
31
  end
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '4.10.0'.freeze
2
+ VERSION = '4.11.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.10.0
4
+ version: 4.11.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-12-01 00:00:00.000000000 Z
11
+ date: 2023-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty