change_health 4.10.1 → 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: 5368482e5ea5cd508f1448ea914dec036dd67db3e53c66aed82efdca2f7d4566
4
- data.tar.gz: 35464f0f12f0ccb4c1bdbf044d52fe77cb8b3c830afa2ff303e8be94821c0439
3
+ metadata.gz: 40164a2a172f23588c4183c46cc2512d88d08f143f08957bcf8a23635ec4ed2d
4
+ data.tar.gz: 3604b9f1d0f4ad9dcf5e432d0c8b0be7138e9e0559143ec090b0b97bed4fd638
5
5
  SHA512:
6
- metadata.gz: 250e8192015dfe385e6e30c0d65fa2f76a6b0ae63d3caf25de10ed9a378429414799089aeeae6b384b0f31bbd760e84b92c73553c0ee12a692c06fec1ca1b87d
7
- data.tar.gz: 6987b337861f82b104617e80c53b5c5fae07bc180c7d9774c89afdad9c464b92fec9c391842771c5585a1e06329cb7d46568e7a661506b960af0e861b7337c6d
6
+ metadata.gz: 7abd435989c842857c68753b86be56244b2869377c906708acfd0fc597942a261daa142d05663861b7204ce63148b29d4008c689e05cc57b49f305083acc5214
7
+ data.tar.gz: 62ec9fd434583efa92609f37c8d77197534c81995e77326a3dcb33beccec5e9ba726def4df381c5a8f398168271ba251c2d1ed140eed0bbd12267a948c65bb5c
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.11.0] - 2022-12-30
9
+
10
+ ### Added
11
+
12
+ * ChangeHealth::Request::Claim::Report - delete a report
13
+
8
14
  # [4.10.1] - 2022-12-29
9
15
 
10
16
  ### Fixed
@@ -460,6 +466,7 @@ Added the ability to hit professional claim submission API. For more details, se
460
466
  * Authentication
461
467
  * Configuration
462
468
 
469
+ [4.11.0]: https://github.com/WeInfuse/change_health/compare/v4.10.1...v4.11.0
463
470
  [4.10.1]: https://github.com/WeInfuse/change_health/compare/v4.10.0...v4.10.1
464
471
  [4.10.0]: https://github.com/WeInfuse/change_health/compare/v4.9.0...v4.10.0
465
472
  [4.9.0]: https://github.com/WeInfuse/change_health/compare/v4.8.0...v4.9.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
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '4.10.1'.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.1
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-30 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