change_health 4.14.0 → 5.1.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: ad7028df0b8a556723c941162273ae8a9fda1c83a01dcc41939678afd631290f
4
- data.tar.gz: ae98a767647dd4ec1ec9803a547dee055c31336ef2f16829f59e23763c34c965
3
+ metadata.gz: 17ef9182c0bbc6cb41bc008db75f77faf18d53ba88e79171efd8a677c0c8c2d3
4
+ data.tar.gz: 8cb95edc95cf11df39b00f4673344164d64c463e699b625b265e0f93c10b8340
5
5
  SHA512:
6
- metadata.gz: a8cecec460c7308627ea61d7f83ad6822a2e9f72ac2259c32083f6895409c5817c989ba0ec644fc01cebaf80009b9542600c1eafa26c92743098fd337d5dc01c
7
- data.tar.gz: 81fa3d7abb6763b96c6f3f2752d9cf93d2332d09994260cae131c0601640bf778eb1be7c9258d114af17f11f00cf4bcef4c42d099fa7d927bf2cc099f748ce39
6
+ metadata.gz: 428399294a14f285bb21271350a336646a7d6e56adf4b6db56850b04414951502be25f7b26530458df447a72e9300ab9095bbcea6ad84d98e16ec8b7d9cbc9aa
7
+ data.tar.gz: c644718797d8598ea2623737f6b4b713bb0de62cb8ca82d72709bceb0eec8ddd60c253c413cb11e928e02f770adee3b67d50e9accaf2e89a3c908b35a66e4d3f
data/CHANGELOG.md CHANGED
@@ -5,6 +5,30 @@ 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.1.0] - 2023-08-31
9
+
10
+ ### Added
11
+
12
+ * added alias to trading_partner_data
13
+ * added line_of_business to trading_partner_data
14
+ * added plan_type to trading_partner_data
15
+
16
+ # [5.0.0] - 2022-08-24
17
+
18
+ ### Changed
19
+
20
+ Endpoint for trading_partner request has changed.
21
+
22
+ * **breaking:** removed medical_eligibility_enabled from trading_partners_data
23
+ * **breaking:** removed medical_eligibility_service_id from trading_partner_data
24
+ * **breaking:** removed medical_eligibility_service from trading_partner_data
25
+ * **breaking:** removed services from trading_partner_data
26
+ * updated endpoint on trading_partner
27
+ * updated params on trading_partner to only return Eligibility service types
28
+ * updated mapping on trading_partner_data for new response from endpoint
29
+ * updated tests
30
+
31
+
8
32
  # [4.14.0] - 2023-08-24
9
33
 
10
34
  ### Added
@@ -535,6 +559,8 @@ Added the ability to hit professional claim submission API. For more details, se
535
559
  * Authentication
536
560
  * Configuration
537
561
 
562
+ [5.1.0]: https://github.com/WeInfuse/change_health/compare/v5.0.0...v5.1.0
563
+ [5.0.0]: https://github.com/WeInfuse/change_health/compare/v4.14.0...v5.0.0
538
564
  [4.14.0]: https://github.com/WeInfuse/change_health/compare/v4.13.1...v4.14.0
539
565
  [4.13.1]: https://github.com/WeInfuse/change_health/compare/v4.13.0...v4.13.1
540
566
  [4.13.0]: https://github.com/WeInfuse/change_health/compare/v4.12.0...v4.13.0
@@ -4,8 +4,11 @@ module ChangeHealth
4
4
  include Hashie::Extensions::IndifferentAccess
5
5
  include Hashie::Extensions::IgnoreUndeclared
6
6
 
7
- property :service_id, required: true
7
+ property :alias, required: false
8
+ property :line_of_business, required: false
8
9
  property :name, required: true
10
+ property :plan_type, required: false
11
+ property :service_id, required: true
9
12
  end
10
13
  end
11
14
  end
@@ -1,17 +1,17 @@
1
1
  module ChangeHealth
2
2
  module Request
3
3
  class TradingPartner < Hashie::Trash
4
- ENDPOINT = '/tradingpartners/v7/partners'.freeze
4
+ ENDPOINT = '/medicalnetwork/payerfinder/v1/payers'.freeze
5
5
 
6
6
  def self.query(term)
7
7
  params = {
8
- query: term,
9
- serviceName: 'medicalEligibility',
10
- strictFilters: true
8
+ businessName: term,
9
+ serviceName: 'Eligibility'
11
10
  }
11
+
12
12
  response = ChangeHealth::Connection.new.request(endpoint: ENDPOINT, verb: :get, query: params)
13
- trading_partners_data = ChangeHealth::Response::TradingPartnersData.new(response).medical_eligibility_enabled
14
- trading_partners_data.map {|partner| ChangeHealth::Models::TradingPartner.new(name: partner.name, service_id: partner.medical_eligibility_service_id) }
13
+ trading_partners_data = ChangeHealth::Response::TradingPartnersData.new(response['payers'])
14
+ trading_partners_data.map { |partner| ChangeHealth::Models::TradingPartner.new(name: partner.name, alias: partner.alias, line_of_business: partner.line_of_business, plan_type: partner.plan_type, service_id: partner.service_id )}
15
15
  end
16
16
  end
17
17
  end
@@ -6,21 +6,27 @@ module ChangeHealth
6
6
  end
7
7
 
8
8
  def name
9
- @raw.dig('tradingPartnerName')
9
+ @raw['businessName']
10
10
  end
11
11
 
12
- def services
13
- @raw.dig('clearingHouses', 'legacyExchange')
12
+ def service_id
13
+ @raw['serviceId']
14
14
  end
15
15
 
16
- def medical_eligibility_service
17
- return nil unless services
18
- services.detect {|service| service.dig('serviceName') == 'medicalEligibility' }
16
+ def service_name
17
+ @raw['serviceName']
19
18
  end
20
19
 
21
- def medical_eligibility_service_id
22
- return nil unless medical_eligibility_service
23
- medical_eligibility_service.dig('serviceConnections', 'direct', 'serviceId')
20
+ def alias
21
+ @raw['alias']
22
+ end
23
+
24
+ def line_of_business
25
+ @raw['lineOfBusiness']
26
+ end
27
+
28
+ def plan_type
29
+ @raw['planType']
24
30
  end
25
31
  end
26
32
  end
@@ -2,11 +2,7 @@ module ChangeHealth
2
2
  module Response
3
3
  class TradingPartnersData < Array
4
4
  def initialize(trading_partners)
5
- super(trading_partners.map {|trading_partner| ChangeHealth::Response::TradingPartnerData.new(trading_partner) })
6
- end
7
-
8
- def medical_eligibility_enabled
9
- self.reject {|partner| nil == partner.medical_eligibility_service_id }
5
+ super(trading_partners.map { |trading_partner| ChangeHealth::Response::TradingPartnerData.new(trading_partner) })
10
6
  end
11
7
  end
12
8
  end
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '4.14.0'.freeze
2
+ VERSION = '5.1.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.14.0
4
+ version: 5.1.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: 2023-08-28 00:00:00.000000000 Z
11
+ date: 2023-09-05 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: []
@@ -205,7 +205,7 @@ licenses:
205
205
  - MIT
206
206
  metadata:
207
207
  allowed_push_host: https://rubygems.org
208
- post_install_message:
208
+ post_install_message:
209
209
  rdoc_options: []
210
210
  require_paths:
211
211
  - lib
@@ -220,8 +220,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
220
  - !ruby/object:Gem::Version
221
221
  version: '0'
222
222
  requirements: []
223
- rubygems_version: 3.1.6
224
- signing_key:
223
+ rubygems_version: 3.4.10
224
+ signing_key:
225
225
  specification_version: 4
226
226
  summary: Ruby wrapper for the ChangeHealth API
227
227
  test_files: []