change_health 5.5.0 → 5.7.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: 68c9d3df25d6f47b5a970058fc6aef97b372a605a2be2a7f81569b665b6d69ba
4
- data.tar.gz: 79b1857e502ab8e6fae635e230a5d22362c814b3aadb161d912d53d970cf00e4
3
+ metadata.gz: 2474bb16e85188bc6cd475f6d4af2171db908ebf6bbee0b8d1c4999bf3b53251
4
+ data.tar.gz: 269d3c75f370cf70828bd8b30614c00c16df551cb7c0745d4216076b7bfc6c73
5
5
  SHA512:
6
- metadata.gz: f5a37f908a5da6a9b1c2cb09bc19f94355c54b1eebea564faba52746f22c9fefce045d0f95b51a7aac932bdb6be0e953a7d945baa46f6ea66aa341fcb8a43a69
7
- data.tar.gz: 60c0fbc7030dd5caee716952620e2b09c7b7d320a7249d26f3937ee22e75164b049ac3d9b99391b8a609ca6f325eba028ef96e6033c7dccb240e407f9547caed
6
+ metadata.gz: 992532c9d41db62fc2ed362dbbda6cbadffbea55c03809733625788ec60fd490c608cf1b3eac095fb78a627cf8c9b24e5d37790f1ab1a7b62528eda7d1cf4fb2
7
+ data.tar.gz: e7b5c2aabd8a61fa9846f3605255a3b05d6a7c3ee377e68badadc1c5845c1dd938207cfb5e4f2c5a6962aaa06d74747a822673b6d917ef68f1a15d6ec02e5742
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
+ # [5.7.0] - 2024-03-07
9
+
10
+ ### Added
11
+
12
+ * providers - attending, billing, referring, rendering, and supervising - directly to ChangeHealth::Request::Claim::Submission
13
+
14
+ # [5.6.0] - 2024-03-06
15
+
16
+ ### Added
17
+
18
+ * Changed claim submission to use new endpoint override option
19
+
8
20
  # [5.5.0] - 2024-03-06
9
21
 
10
22
  ### Added
@@ -607,6 +619,8 @@ Added the ability to hit professional claim submission API. For more details, se
607
619
  * Authentication
608
620
  * Configuration
609
621
 
622
+ [5.7.0]: https://github.com/WeInfuse/change_health/compare/v5.6.0...v5.7.0
623
+ [5.6.0]: https://github.com/WeInfuse/change_health/compare/v5.5.0...v5.6.0
610
624
  [5.5.0]: https://github.com/WeInfuse/change_health/compare/v5.4.2...v5.5.0
611
625
  [5.4.2]: https://github.com/WeInfuse/change_health/compare/v5.4.1...v5.4.2
612
626
  [5.4.1]: https://github.com/WeInfuse/change_health/compare/v5.4.0...v5.4.1
@@ -21,10 +21,11 @@ module ChangeHealth
21
21
  self.class.send(verb.to_s, endpoint, query: query, body: body, headers: headers)
22
22
  end
23
23
 
24
- def self.endpoint_for(klass)
24
+ def self.endpoint_for(klass, default_endpoint: nil)
25
25
  endpoint_options = ChangeHealth.configuration.endpoints || {}
26
+ default_endpoint ||= klass::ENDPOINT
26
27
 
27
- endpoint_options[klass.to_s] || endpoint_options[klass.to_s.to_sym] || klass::ENDPOINT
28
+ endpoint_options[klass.to_s] || endpoint_options[klass.to_s.to_sym] || default_endpoint
28
29
  end
29
30
 
30
31
  private
@@ -15,20 +15,25 @@ module ChangeHealth
15
15
  VALIDATION_ENDPOINT = ENDPOINT + '/validation'.freeze
16
16
  # End Deprecated
17
17
 
18
- property :billingPayToAddressName, from: :billing_pay_to_address_name, required: false
19
- property :claimInformation, from: :claim_information, required: false
18
+ property :attending
19
+ property :billing
20
+ property :billingPayToAddressName, from: :billing_pay_to_address_name
21
+ property :claimInformation, from: :claim_information
20
22
  property :controlNumber, from: :control_number, required: true, default: ChangeHealth::Models::CONTROL_NUMBER
21
- property :dependent, required: false
22
- property :headers, required: false
23
- property :payToAddress, from: :pay_to_address, required: false
24
- property :providers, required: false
25
- property :receiver, required: false
26
- property :submitter, required: false
27
- property :subscriber, required: false
23
+ property :dependent
24
+ property :headers
25
+ property :payToAddress, from: :pay_to_address
26
+ property :providers
27
+ property :receiver
28
+ property :referring
29
+ property :rendering
30
+ property :submitter
31
+ property :subscriber
32
+ property :supervising
28
33
  # Need one or the other, trading partner id or trading partner service id
29
- property :tradingPartnerId, from: :trading_partner_id, required: false
30
- property :tradingPartnerName, from: :trading_partner_name, required: false
31
- property :tradingPartnerServiceId, from: :trading_partner_service_id, required: false
34
+ property :tradingPartnerId, from: :trading_partner_id
35
+ property :tradingPartnerName, from: :trading_partner_name
36
+ property :tradingPartnerServiceId, from: :trading_partner_service_id
32
37
 
33
38
  def add_provider(provider)
34
39
  self[:providers] ||= []
@@ -36,11 +41,12 @@ module ChangeHealth
36
41
  end
37
42
 
38
43
  def submission(is_professional: true)
39
- endpoint = is_professional ? PROFESSIONAL_ENDPOINT : INSTITUTIONAL_ENDPOINT
40
- endpoint += SUBMISSION_SUFFIX
41
44
  ChangeHealth::Response::Claim::SubmissionData.new(
42
45
  response: ChangeHealth::Connection.new.request(
43
- endpoint: endpoint,
46
+ endpoint: self.class.endpoint(
47
+ is_professional: is_professional,
48
+ suffix: SUBMISSION_SUFFIX
49
+ ),
44
50
  body: to_h,
45
51
  headers: is_professional ? professional_headers : institutional_headers
46
52
  )
@@ -48,11 +54,12 @@ module ChangeHealth
48
54
  end
49
55
 
50
56
  def validation(is_professional: true)
51
- endpoint = is_professional ? PROFESSIONAL_ENDPOINT : INSTITUTIONAL_ENDPOINT
52
- endpoint += VALIDATION_SUFFIX
53
57
  ChangeHealth::Response::Claim::SubmissionData.new(
54
58
  response: ChangeHealth::Connection.new.request(
55
- endpoint: endpoint,
59
+ endpoint: self.class.endpoint(
60
+ is_professional: is_professional,
61
+ suffix: VALIDATION_SUFFIX
62
+ ),
56
63
  body: to_h,
57
64
  headers: is_professional ? professional_headers : institutional_headers
58
65
  )
@@ -60,15 +67,29 @@ module ChangeHealth
60
67
  end
61
68
 
62
69
  def self.health_check(is_professional: true)
63
- endpoint = is_professional ? PROFESSIONAL_ENDPOINT : INSTITUTIONAL_ENDPOINT
64
- endpoint += HEALTH_CHECK_SUFFIX
65
- ChangeHealth::Connection.new.request(endpoint: endpoint, verb: :get)
70
+ ChangeHealth::Connection.new.request(
71
+ endpoint: endpoint(
72
+ is_professional: is_professional,
73
+ suffix: HEALTH_CHECK_SUFFIX
74
+ ),
75
+ verb: :get
76
+ )
66
77
  end
67
78
 
68
79
  def self.ping(is_professional: true)
69
80
  health_check(is_professional: is_professional)
70
81
  end
71
82
 
83
+ def self.endpoint(is_professional: true, suffix: '')
84
+ default_endpoint = is_professional ? PROFESSIONAL_ENDPOINT : INSTITUTIONAL_ENDPOINT
85
+ default_endpoint += suffix
86
+
87
+ ChangeHealth::Connection.endpoint_for(
88
+ ChangeHealth::Request::Claim::Submission,
89
+ default_endpoint: default_endpoint
90
+ )
91
+ end
92
+
72
93
  def professional_headers
73
94
  return unless self[:headers]
74
95
 
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '5.5.0'.freeze
2
+ VERSION = '5.7.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: 5.5.0
4
+ version: 5.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Crockett
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-06 00:00:00.000000000 Z
11
+ date: 2024-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -128,7 +128,7 @@ dependencies:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0.9'
131
- description:
131
+ description:
132
132
  email:
133
133
  - mike.crockett@weinfuse.com
134
134
  executables: []
@@ -206,7 +206,7 @@ licenses:
206
206
  - MIT
207
207
  metadata:
208
208
  allowed_push_host: https://rubygems.org
209
- post_install_message:
209
+ post_install_message:
210
210
  rdoc_options: []
211
211
  require_paths:
212
212
  - lib
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  version: '0'
223
223
  requirements: []
224
224
  rubygems_version: 3.1.6
225
- signing_key:
225
+ signing_key:
226
226
  specification_version: 4
227
227
  summary: Ruby wrapper for the ChangeHealth API
228
228
  test_files: []