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 +4 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +1 -1
- data/README.md +10 -4
- data/lib/trizetto/api/eligibility/web_service/additional_info.rb +16 -0
- data/lib/trizetto/api/eligibility/web_service/patient.rb +31 -0
- data/lib/trizetto/api/eligibility/web_service/subscriber.rb +2 -0
- data/lib/trizetto/api/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87af1600bb24eae74b2716e24ed723ac8a9a1093
|
4
|
+
data.tar.gz: 5915c628da44fa3ba5d2cf0a3805e3fd82725894
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0464c10d4d023b893b0ede1d3c14e1885cea08bd653d57e70a49f4bdca77376a93d99eddaa8ae941842a0dc1534de8241698d4a1e026cee645da1276c24a7cc
|
7
|
+
data.tar.gz: 398bd1504cecb5427109de946840a69823b513e506cb0ab66043f670b97c4258f32465d20641bed2284094658365c5ff1878f64fe0b12d434b651614c461139c
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/Gemfile.lock
CHANGED
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
|
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.
|
101
|
-
response.
|
102
|
-
response.
|
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).
|
data/lib/trizetto/api/version.rb
CHANGED
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.
|
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-
|
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
|