trizetto-api 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: b3d7816b2c859d5c94ed3433e86421c54a8c2fca
4
- data.tar.gz: 1d932011c08b984fc4fc260cdf57165aedfc29df
3
+ metadata.gz: 87af1600bb24eae74b2716e24ed723ac8a9a1093
4
+ data.tar.gz: 5915c628da44fa3ba5d2cf0a3805e3fd82725894
5
5
  SHA512:
6
- metadata.gz: d5ef664108b8e07fbe0e343a4cb840bf651f27706f15e528c70b1ce60077b65bacada2d2410c9ba49f1ae3366566a918f7d7d07291b1a33d740089e5c66dd288
7
- data.tar.gz: db5f856514b0c8e4e850ba31e6b4fc5bf81ca4c97b778bedb7605f73a7c277defe46849a02d071fc70521ff952a0047841b4ff5031e79f9450ebce975720ee8e
6
+ metadata.gz: d0464c10d4d023b893b0ede1d3c14e1885cea08bd653d57e70a49f4bdca77376a93d99eddaa8ae941842a0dc1534de8241698d4a1e026cee645da1276c24a7cc
7
+ data.tar.gz: 398bd1504cecb5427109de946840a69823b513e506cb0ab66043f670b97c4258f32465d20641bed2284094658365c5ff1878f64fe0b12d434b651614c461139c
@@ -1,3 +1,17 @@
1
+ ## 0.2.3 (Feb 02, 2018) ##
2
+
3
+ * Add helpers for extracting the group number and plan number from either a
4
+ subscriber or dependent node in the response. As a remdiner, the patient is
5
+ the dependent if present, or the subscriber. Depending on the payer, the
6
+ group number might be in the subscriber or in the dependent, you can't rely
7
+ on it being in the subscriber 100%. You need to check both, starting with the
8
+ dependent to get the group number. `dependent&.group_number || subscriber&.group_number`
9
+ * Parse subscriber additional information (subscriberaddinfo) into the patient
10
+ note. For some payers, they put subscriberaddinfo in the dependent, so its
11
+ present in both subscribers and dependents.
12
+ * Turn the subscriberid node into an id. This seems to be the member number for
13
+ the insurance so make it easy to get
14
+
1
15
  ## 0.2.2 (January 19, 2018) ##
2
16
 
3
17
  * The response from the DoInquiry eligiblity check now captures the raw XML and
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trizetto-api (0.2.1)
4
+ trizetto-api (0.2.3)
5
5
  savon (~> 2.0)
6
6
  savon-multipart (~> 2.0)
7
7
 
data/README.md CHANGED
@@ -50,7 +50,7 @@ To simply check if the patient is covered by a health plan
50
50
 
51
51
  ```ruby
52
52
  response = client.do_inquiry({...})
53
- response.active_coverage_for?("30`") #=> true | false
53
+ response.active_coverage_for?("30") #=> true | false
54
54
  ```
55
55
 
56
56
  ```ruby
@@ -92,14 +92,20 @@ response.trace_number # => "88213481"
92
92
  response.payer_name # => "BLUE CROSS BLUE SHIELD OF MASSACHUSETTS"
93
93
  response.active_coverage_for?("30") # => true
94
94
 
95
+ # Did the response have group number for the subscriber or dependent?
96
+ response.subscriber&.group_number || response.dependent&.group_number # =>999999999A6AG999
97
+
98
+ # What is the subscriber's member number?
99
+ response.subscriber.id # => XXP123456789
100
+
95
101
  # Was the response rejected? We got back an eligibility response, but probably the patient wasn't found
96
102
  response.success? # => true
97
103
  response.success_code # => "Success"
98
104
  response.active_coverage_for?("30") # => false
99
105
  response.rejected? # => true
100
- response.rejectsions.count # => 1
101
- response.rejectsions.first.reason # => "Patient Birth Date Does Not Match That for the Patient on the Database"
102
- response.rejectsions.first.follow_up_action # => "Please Correct and Resubmit"
106
+ response.rejections.count # => 1
107
+ response.rejections.first.reason # => "Patient Birth Date Does Not Match That for the Patient on the Database"
108
+ response.rejections.first.follow_up_action # => "Please Correct and Resubmit"
103
109
 
104
110
  # What active insurance coverages of service_type_code=30 does this patient have?
105
111
  coverages = response.patient.benefits.select {|benefit| benefit.active_coverage? && benefit.service_type_codes.include?("30")}
@@ -0,0 +1,16 @@
1
+ module Trizetto
2
+ module Api
3
+ module Eligibility
4
+ module WebService
5
+ class AdditionalInfo < Node
6
+ KEY_CLEANUP = {
7
+ subsupplementalid: :id,
8
+ grouppolicynum: :group_policy_number,
9
+ plansponsorname: :plan_sponsor_name,
10
+ }
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+
@@ -49,6 +49,37 @@ module Trizetto
49
49
  traces[id.upcase] = trace_numbers[index]
50
50
  end
51
51
  end
52
+
53
+ if self.subscriberaddinfo.is_a?(Hash)
54
+ self.subscriberaddinfo = [self.subscriberaddinfo]
55
+ end
56
+
57
+ self.additional_info = self.subscriberaddinfo&.map do |additional_info_hash|
58
+ AdditionalInfo.new(additional_info_hash)
59
+ end || []
60
+ end
61
+
62
+ # Looks in the additional info returned with the patient for a group number
63
+ #
64
+ # The group number is the additinal infomation node with a id of 6P
65
+ # or Group Number.
66
+ #
67
+ # @see https://www.eedi.net/4010/278004010X094A1%5C29_278004010X094A1.htm
68
+ #
69
+ # @return [String]
70
+ def group_number
71
+ # it seems 6P is group number
72
+ self.additional_info.detect do |additional_info|
73
+ ["6P", "Group Number"].include?(additional_info.id)
74
+ end&.group_policy_number
75
+ end
76
+
77
+ # Looks in the additional info returned with the patient for a group number
78
+ # @return [String]
79
+ def plan_number
80
+ self.additional_info.detect do |additional_info|
81
+ additional_info.id == "Plan Number"
82
+ end&.group_policy_number
52
83
  end
53
84
 
54
85
  # Looks for a trace number by trace_id (who added the trace).
@@ -22,6 +22,8 @@ module Trizetto
22
22
  end
23
23
  end
24
24
  end
25
+
26
+ clean_hash[:id] = clean_hash.delete(:subscriberid) if clean_hash.has_key?(:subscriberid)
25
27
  super(clean_hash)
26
28
  end
27
29
  end
@@ -1,5 +1,5 @@
1
1
  module Trizetto
2
2
  module Api
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trizetto-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Naegle
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-19 00:00:00.000000000 Z
11
+ date: 2018-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -121,6 +121,7 @@ files:
121
121
  - lib/trizetto/api/eligibility/core2.wsdl
122
122
  - lib/trizetto/api/eligibility/web_service.rb
123
123
  - lib/trizetto/api/eligibility/web_service.wsdl
124
+ - lib/trizetto/api/eligibility/web_service/additional_info.rb
124
125
  - lib/trizetto/api/eligibility/web_service/benefit.rb
125
126
  - lib/trizetto/api/eligibility/web_service/benefit_entity.rb
126
127
  - lib/trizetto/api/eligibility/web_service/dependent.rb