vericred_client 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -18
- data/docs/Applicant.md +3 -3
- data/docs/Carrier.md +1 -1
- data/docs/County.md +3 -3
- data/docs/Drug.md +3 -3
- data/docs/DrugCoverage.md +4 -4
- data/docs/DrugCoverageResponse.md +3 -1
- data/docs/DrugPackage.md +1 -1
- data/docs/DrugSearchResponse.md +2 -1
- data/docs/DrugsApi.md +71 -10
- data/docs/Meta.md +1 -1
- data/docs/Network.md +9 -0
- data/docs/NetworkSearchResponse.md +9 -0
- data/docs/NetworksApi.md +58 -0
- data/docs/Plan.md +10 -10
- data/docs/PlanCounty.md +1 -1
- data/docs/PlanCountyBulk.md +1 -1
- data/docs/{PlanFindResponse.md → PlanSearchResponse.md} +2 -1
- data/docs/PlanSearchResult.md +14 -14
- data/docs/PlansApi.md +69 -6
- data/docs/Provider.md +7 -6
- data/docs/ProvidersApi.md +39 -30
- data/docs/{ProviderResponse.md → ProvidersSearchResponse.md} +1 -1
- data/docs/RequestPlanFind.md +3 -2
- data/docs/RequestPlanFindApplicant.md +8 -0
- data/docs/RequestPlanFindProvider.md +8 -0
- data/docs/RequestProvidersSearch.md +17 -0
- data/docs/State.md +4 -4
- data/docs/ZipCountiesApi.md +11 -4
- data/docs/ZipCountiesResponse.md +11 -0
- data/docs/ZipCountyBulk.md +1 -1
- data/docs/ZipCountyResponse.md +2 -1
- data/lib/vericred_client/api/drugs_api.rb +86 -14
- data/lib/vericred_client/api/networks_api.rb +198 -0
- data/lib/vericred_client/api/plans_api.rb +134 -14
- data/lib/vericred_client/api/providers_api.rb +65 -59
- data/lib/vericred_client/api/zip_counties_api.rb +8 -5
- data/lib/vericred_client/api_client.rb +1 -1
- data/lib/vericred_client/api_error.rb +1 -1
- data/lib/vericred_client/models/applicant.rb +13 -15
- data/lib/vericred_client/models/base.rb +1 -1
- data/lib/vericred_client/models/carrier.rb +15 -15
- data/lib/vericred_client/models/carrier_subsidiary.rb +1 -1
- data/lib/vericred_client/models/county.rb +12 -16
- data/lib/vericred_client/models/county_bulk.rb +1 -1
- data/lib/vericred_client/models/drug.rb +26 -26
- data/lib/vericred_client/models/drug_coverage.rb +32 -38
- data/lib/vericred_client/models/drug_coverage_response.rb +40 -16
- data/lib/vericred_client/models/drug_package.rb +15 -15
- data/lib/vericred_client/models/drug_search_response.rb +21 -9
- data/lib/vericred_client/models/meta.rb +8 -8
- data/lib/vericred_client/models/network.rb +308 -0
- data/lib/vericred_client/models/{plan_find_response.rb → network_search_response.rb} +11 -11
- data/lib/vericred_client/models/plan.rb +62 -72
- data/lib/vericred_client/models/plan_county.rb +15 -15
- data/lib/vericred_client/models/plan_county_bulk.rb +15 -15
- data/lib/vericred_client/models/plan_search_response.rb +322 -0
- data/lib/vericred_client/models/plan_search_result.rb +102 -112
- data/lib/vericred_client/models/pricing.rb +1 -1
- data/lib/vericred_client/models/provider.rb +24 -22
- data/lib/vericred_client/models/{provider_response.rb → providers_search_response.rb} +2 -2
- data/lib/vericred_client/models/rating_area.rb +1 -1
- data/lib/vericred_client/models/request_plan_find.rb +16 -4
- data/lib/vericred_client/models/request_plan_find_applicant.rb +298 -0
- data/lib/vericred_client/models/request_plan_find_provider.rb +298 -0
- data/lib/vericred_client/models/request_providers_search.rb +372 -0
- data/lib/vericred_client/models/state.rb +25 -29
- data/lib/vericred_client/models/zip_code.rb +1 -1
- data/lib/vericred_client/models/zip_counties_response.rb +336 -0
- data/lib/vericred_client/models/zip_county.rb +1 -1
- data/lib/vericred_client/models/zip_county_bulk.rb +12 -12
- data/lib/vericred_client/models/zip_county_response.rb +21 -11
- data/lib/vericred_client/version.rb +2 -2
- data/lib/vericred_client.rb +10 -3
- data/spec/api/drugs_api_spec.rb +26 -5
- data/spec/api/networks_api_spec.rb +166 -0
- data/spec/api/plans_api_spec.rb +66 -6
- data/spec/api/providers_api_spec.rb +27 -19
- data/spec/api/zip_counties_api_spec.rb +4 -3
- metadata +22 -6
@@ -0,0 +1,198 @@
|
|
1
|
+
=begin
|
2
|
+
Vericred API
|
3
|
+
|
4
|
+
Vericred's API allows you to search for Health Plans that a specific doctor
|
5
|
+
accepts.
|
6
|
+
|
7
|
+
## Getting Started
|
8
|
+
|
9
|
+
Visit our [Developer Portal](https://vericred.3scale.net) to
|
10
|
+
create an account.
|
11
|
+
|
12
|
+
Once you have created an account, you can create one Application for
|
13
|
+
Production and another for our Sandbox (select the appropriate Plan when
|
14
|
+
you create the Application).
|
15
|
+
|
16
|
+
## Authentication
|
17
|
+
|
18
|
+
To authenticate, pass the API Key you created in the Developer Portal as
|
19
|
+
a `Vericred-Api-Key` header.
|
20
|
+
|
21
|
+
`curl -H 'Vericred-Api-Key: YOUR_KEY' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
|
22
|
+
|
23
|
+
## Versioning
|
24
|
+
|
25
|
+
Vericred's API default to the latest version. However, if you need a specific
|
26
|
+
version, you can request it with an `Accept-Version` header.
|
27
|
+
|
28
|
+
The current version is `v3`. Previous versions are `v1` and `v2`.
|
29
|
+
|
30
|
+
`curl -H 'Vericred-Api-Key: YOUR_KEY' -H 'Accept-Version: v2' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
|
31
|
+
|
32
|
+
## Pagination
|
33
|
+
|
34
|
+
Most endpoints are not paginated. It will be noted in the documentation if/when
|
35
|
+
an endpoint is paginated.
|
36
|
+
|
37
|
+
When pagination is present, a `meta` stanza will be present in the response
|
38
|
+
with the total number of records
|
39
|
+
|
40
|
+
```
|
41
|
+
{
|
42
|
+
things: [{ id: 1 }, { id: 2 }],
|
43
|
+
meta: { total: 500 }
|
44
|
+
}
|
45
|
+
```
|
46
|
+
|
47
|
+
## Sideloading
|
48
|
+
|
49
|
+
When we return multiple levels of an object graph (e.g. `Provider`s and their `State`s
|
50
|
+
we sideload the associated data. In this example, we would provide an Array of
|
51
|
+
`State`s and a `state_id` for each provider. This is done primarily to reduce the
|
52
|
+
payload size since many of the `Provider`s will share a `State`
|
53
|
+
|
54
|
+
```
|
55
|
+
{
|
56
|
+
providers: [{ id: 1, state_id: 1}, { id: 2, state_id: 1 }],
|
57
|
+
states: [{ id: 1, code: 'NY' }]
|
58
|
+
}
|
59
|
+
```
|
60
|
+
|
61
|
+
If you need the second level of the object graph, you can just match the
|
62
|
+
corresponding id.
|
63
|
+
|
64
|
+
## Selecting specific data
|
65
|
+
|
66
|
+
All endpoints allow you to specify which fields you would like to return.
|
67
|
+
This allows you to limit the response to contain only the data you need.
|
68
|
+
|
69
|
+
For example, let's take a request that returns the following JSON by default
|
70
|
+
|
71
|
+
```
|
72
|
+
{
|
73
|
+
provider: {
|
74
|
+
id: 1,
|
75
|
+
name: 'John',
|
76
|
+
phone: '1234567890',
|
77
|
+
field_we_dont_care_about: 'value_we_dont_care_about'
|
78
|
+
},
|
79
|
+
states: [{
|
80
|
+
id: 1,
|
81
|
+
name: 'New York',
|
82
|
+
code: 'NY',
|
83
|
+
field_we_dont_care_about: 'value_we_dont_care_about'
|
84
|
+
}]
|
85
|
+
}
|
86
|
+
```
|
87
|
+
|
88
|
+
To limit our results to only return the fields we care about, we specify the
|
89
|
+
`select` query string parameter for the corresponding fields in the JSON
|
90
|
+
document.
|
91
|
+
|
92
|
+
In this case, we want to select `name` and `phone` from the `provider` key,
|
93
|
+
so we would add the parameters `select=provider.name,provider.phone`.
|
94
|
+
We also want the `name` and `code` from the `states` key, so we would
|
95
|
+
add the parameters `select=states.name,staes.code`. The id field of
|
96
|
+
each document is always returned whether or not it is requested.
|
97
|
+
|
98
|
+
Our final request would be `GET /providers/12345?select=provider.name,provider.phone,states.name,states.code`
|
99
|
+
|
100
|
+
The response would be
|
101
|
+
|
102
|
+
```
|
103
|
+
{
|
104
|
+
provider: {
|
105
|
+
id: 1,
|
106
|
+
name: 'John',
|
107
|
+
phone: '1234567890'
|
108
|
+
},
|
109
|
+
states: [{
|
110
|
+
id: 1,
|
111
|
+
name: 'New York',
|
112
|
+
code: 'NY'
|
113
|
+
}]
|
114
|
+
}
|
115
|
+
```
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
OpenAPI spec version: 1.0.0
|
120
|
+
|
121
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
122
|
+
|
123
|
+
|
124
|
+
=end
|
125
|
+
|
126
|
+
require "uri"
|
127
|
+
|
128
|
+
module VericredClient
|
129
|
+
class NetworksApi
|
130
|
+
attr_accessor :api_client
|
131
|
+
|
132
|
+
def initialize(api_client = ApiClient.default)
|
133
|
+
@api_client = api_client
|
134
|
+
end
|
135
|
+
|
136
|
+
# Networks
|
137
|
+
# A network is a list of the doctors, other health care providers,
|
138
|
+
and hospitals that a plan has contracted with to provide medical care to
|
139
|
+
its members.
|
140
|
+
# @param carrier_id Carrier HIOS Issuer ID
|
141
|
+
# @param [Hash] opts the optional parameters
|
142
|
+
# @return [NetworkSearchResponse]
|
143
|
+
def list_networks(carrier_id, opts = {})
|
144
|
+
data, _status_code, _headers = list_networks_with_http_info(carrier_id, opts)
|
145
|
+
return data
|
146
|
+
end
|
147
|
+
|
148
|
+
# Networks
|
149
|
+
# A network is a list of the doctors, other health care providers,
|
150
|
+
and hospitals that a plan has contracted with to provide medical care to
|
151
|
+
its members.
|
152
|
+
# @param carrier_id Carrier HIOS Issuer ID
|
153
|
+
# @param [Hash] opts the optional parameters
|
154
|
+
# @return [Array<(NetworkSearchResponse, Fixnum, Hash)>] NetworkSearchResponse data, response status code and response headers
|
155
|
+
def list_networks_with_http_info(carrier_id, opts = {})
|
156
|
+
if @api_client.config.debugging
|
157
|
+
@api_client.config.logger.debug "Calling API: NetworksApi.list_networks ..."
|
158
|
+
end
|
159
|
+
# verify the required parameter 'carrier_id' is set
|
160
|
+
fail ArgumentError, "Missing the required parameter 'carrier_id' when calling NetworksApi.list_networks" if carrier_id.nil?
|
161
|
+
# resource path
|
162
|
+
local_var_path = "/networks".sub('{format}','json')
|
163
|
+
|
164
|
+
# query parameters
|
165
|
+
query_params = {}
|
166
|
+
query_params[:'carrier_id'] = carrier_id
|
167
|
+
|
168
|
+
# header parameters
|
169
|
+
header_params = {}
|
170
|
+
|
171
|
+
# HTTP header 'Accept' (if needed)
|
172
|
+
local_header_accept = ['application/json']
|
173
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
174
|
+
|
175
|
+
# HTTP header 'Content-Type'
|
176
|
+
local_header_content_type = ['application/json']
|
177
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
178
|
+
|
179
|
+
# form parameters
|
180
|
+
form_params = {}
|
181
|
+
|
182
|
+
# http body (model)
|
183
|
+
post_body = nil
|
184
|
+
auth_names = []
|
185
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
186
|
+
:header_params => header_params,
|
187
|
+
:query_params => query_params,
|
188
|
+
:form_params => form_params,
|
189
|
+
:body => post_body,
|
190
|
+
:auth_names => auth_names,
|
191
|
+
:return_type => 'NetworkSearchResponse')
|
192
|
+
if @api_client.config.debugging
|
193
|
+
@api_client.config.logger.debug "API called: NetworksApi#list_networks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
194
|
+
end
|
195
|
+
return data, status_code, headers
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
@@ -6,7 +6,7 @@ accepts.
|
|
6
6
|
|
7
7
|
## Getting Started
|
8
8
|
|
9
|
-
Visit our [Developer Portal](https://vericred.3scale.net
|
9
|
+
Visit our [Developer Portal](https://vericred.3scale.net) to
|
10
10
|
create an account.
|
11
11
|
|
12
12
|
Once you have created an account, you can create one Application for
|
@@ -133,27 +133,147 @@ module VericredClient
|
|
133
133
|
@api_client = api_client
|
134
134
|
end
|
135
135
|
|
136
|
-
#
|
137
|
-
#
|
136
|
+
# Find Plans
|
137
|
+
# ### Location Information
|
138
|
+
|
139
|
+
Searching for a set of plans requires a `zip_code` and `fips_code`
|
140
|
+
code. These are used to determine pricing and availabity
|
141
|
+
of health plans.
|
142
|
+
|
143
|
+
Optionally, you may provide a list of Applicants or Providers
|
144
|
+
|
145
|
+
### Applicants
|
146
|
+
|
147
|
+
This is a list of people who will be covered by the plan. We
|
148
|
+
use this list to calculate the premium. You must include `age`
|
149
|
+
and can include `smoker`, which also factors into pricing in some
|
150
|
+
states.
|
151
|
+
|
152
|
+
Applicants *must* include an age. If smoker is omitted, its value is assumed
|
153
|
+
to be false.
|
154
|
+
|
155
|
+
#### Multiple Applicants
|
156
|
+
To get pricing for multiple applicants, just append multiple sets
|
157
|
+
of data to the URL with the age and smoking status of each applicant
|
158
|
+
next to each other.
|
159
|
+
|
160
|
+
For example, given two applicants - one age 32 and a non-smoker and one
|
161
|
+
age 29 and a smoker, you could use the following request
|
162
|
+
|
163
|
+
`GET /plans?zip_code=07451&fips_code=33025&applicants[][age]=32&applicants[][age]=29&applicants[][smoker]=true`
|
164
|
+
|
165
|
+
It would also be acceptible to include `applicants[][smoker]=false` after the
|
166
|
+
first applicant's age.
|
167
|
+
|
168
|
+
### Providers
|
169
|
+
|
170
|
+
We identify Providers (Doctors) by their National Practitioner
|
171
|
+
Index number (NPI). If you pass a list of Providers, keyed by
|
172
|
+
their NPI number, we will return a list of which Providers are
|
173
|
+
in and out of network for each plan returned.
|
174
|
+
|
175
|
+
For example, if we had two providers with the NPI numbers `12345` and `23456`
|
176
|
+
you would make the following request
|
177
|
+
|
178
|
+
`GET /plans?zip_code=07451&fips_code=33025&providers[][npi]=12345&providers[][npi]=23456`
|
179
|
+
|
180
|
+
### Enrollment Date
|
181
|
+
|
182
|
+
To calculate plan pricing and availability, we default to the current date
|
183
|
+
as the enrollment date. To specify a date in the future (or the past), pass
|
184
|
+
a string with the format `YYYY-MM-DD` in the `enrollment_date` parameter.
|
185
|
+
|
186
|
+
`GET /plans?zip_code=07451&fips_code=33025&enrollment_date=2016-01-01`
|
187
|
+
|
188
|
+
### Subsidy
|
189
|
+
|
190
|
+
On-marketplace plans are eligible for a subsidy based on the
|
191
|
+
`household_size` and `household_income` of the applicants. If you
|
192
|
+
pass those values, we will calculate the `subsidized_premium`
|
193
|
+
and return it for each plan. If no values are provided, the
|
194
|
+
`subsidized_premium` will be the same as the `premium`
|
195
|
+
|
196
|
+
`GET /plans?zip_code=07451&fips_code=33025&household_size=4&household_income=40000`
|
197
|
+
|
138
198
|
# @param [Hash] opts the optional parameters
|
139
199
|
# @option opts [RequestPlanFind] :body
|
140
|
-
# @return [
|
141
|
-
def
|
142
|
-
data, _status_code, _headers =
|
200
|
+
# @return [PlanSearchResponse]
|
201
|
+
def find_plans(opts = {})
|
202
|
+
data, _status_code, _headers = find_plans_with_http_info(opts)
|
143
203
|
return data
|
144
204
|
end
|
145
205
|
|
146
|
-
#
|
147
|
-
#
|
206
|
+
# Find Plans
|
207
|
+
# ### Location Information
|
208
|
+
|
209
|
+
Searching for a set of plans requires a `zip_code` and `fips_code`
|
210
|
+
code. These are used to determine pricing and availabity
|
211
|
+
of health plans.
|
212
|
+
|
213
|
+
Optionally, you may provide a list of Applicants or Providers
|
214
|
+
|
215
|
+
### Applicants
|
216
|
+
|
217
|
+
This is a list of people who will be covered by the plan. We
|
218
|
+
use this list to calculate the premium. You must include `age`
|
219
|
+
and can include `smoker`, which also factors into pricing in some
|
220
|
+
states.
|
221
|
+
|
222
|
+
Applicants *must* include an age. If smoker is omitted, its value is assumed
|
223
|
+
to be false.
|
224
|
+
|
225
|
+
#### Multiple Applicants
|
226
|
+
To get pricing for multiple applicants, just append multiple sets
|
227
|
+
of data to the URL with the age and smoking status of each applicant
|
228
|
+
next to each other.
|
229
|
+
|
230
|
+
For example, given two applicants - one age 32 and a non-smoker and one
|
231
|
+
age 29 and a smoker, you could use the following request
|
232
|
+
|
233
|
+
`GET /plans?zip_code=07451&fips_code=33025&applicants[][age]=32&applicants[][age]=29&applicants[][smoker]=true`
|
234
|
+
|
235
|
+
It would also be acceptible to include `applicants[][smoker]=false` after the
|
236
|
+
first applicant's age.
|
237
|
+
|
238
|
+
### Providers
|
239
|
+
|
240
|
+
We identify Providers (Doctors) by their National Practitioner
|
241
|
+
Index number (NPI). If you pass a list of Providers, keyed by
|
242
|
+
their NPI number, we will return a list of which Providers are
|
243
|
+
in and out of network for each plan returned.
|
244
|
+
|
245
|
+
For example, if we had two providers with the NPI numbers `12345` and `23456`
|
246
|
+
you would make the following request
|
247
|
+
|
248
|
+
`GET /plans?zip_code=07451&fips_code=33025&providers[][npi]=12345&providers[][npi]=23456`
|
249
|
+
|
250
|
+
### Enrollment Date
|
251
|
+
|
252
|
+
To calculate plan pricing and availability, we default to the current date
|
253
|
+
as the enrollment date. To specify a date in the future (or the past), pass
|
254
|
+
a string with the format `YYYY-MM-DD` in the `enrollment_date` parameter.
|
255
|
+
|
256
|
+
`GET /plans?zip_code=07451&fips_code=33025&enrollment_date=2016-01-01`
|
257
|
+
|
258
|
+
### Subsidy
|
259
|
+
|
260
|
+
On-marketplace plans are eligible for a subsidy based on the
|
261
|
+
`household_size` and `household_income` of the applicants. If you
|
262
|
+
pass those values, we will calculate the `subsidized_premium`
|
263
|
+
and return it for each plan. If no values are provided, the
|
264
|
+
`subsidized_premium` will be the same as the `premium`
|
265
|
+
|
266
|
+
`GET /plans?zip_code=07451&fips_code=33025&household_size=4&household_income=40000`
|
267
|
+
|
148
268
|
# @param [Hash] opts the optional parameters
|
149
269
|
# @option opts [RequestPlanFind] :body
|
150
|
-
# @return [Array<(
|
151
|
-
def
|
270
|
+
# @return [Array<(PlanSearchResponse, Fixnum, Hash)>] PlanSearchResponse data, response status code and response headers
|
271
|
+
def find_plans_with_http_info(opts = {})
|
152
272
|
if @api_client.config.debugging
|
153
|
-
@api_client.config.logger.debug "Calling API: PlansApi.
|
273
|
+
@api_client.config.logger.debug "Calling API: PlansApi.find_plans ..."
|
154
274
|
end
|
155
275
|
# resource path
|
156
|
-
local_var_path = "/plans/
|
276
|
+
local_var_path = "/plans/search".sub('{format}','json')
|
157
277
|
|
158
278
|
# query parameters
|
159
279
|
query_params = {}
|
@@ -181,9 +301,9 @@ module VericredClient
|
|
181
301
|
:form_params => form_params,
|
182
302
|
:body => post_body,
|
183
303
|
:auth_names => auth_names,
|
184
|
-
:return_type => '
|
304
|
+
:return_type => 'PlanSearchResponse')
|
185
305
|
if @api_client.config.debugging
|
186
|
-
@api_client.config.logger.debug "API called: PlansApi#
|
306
|
+
@api_client.config.logger.debug "API called: PlansApi#find_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
187
307
|
end
|
188
308
|
return data, status_code, headers
|
189
309
|
end
|
@@ -6,7 +6,7 @@ accepts.
|
|
6
6
|
|
7
7
|
## Getting Started
|
8
8
|
|
9
|
-
Visit our [Developer Portal](https://vericred.3scale.net
|
9
|
+
Visit our [Developer Portal](https://vericred.3scale.net) to
|
10
10
|
create an account.
|
11
11
|
|
12
12
|
Once you have created an account, you can create one Application for
|
@@ -133,53 +133,34 @@ module VericredClient
|
|
133
133
|
@api_client = api_client
|
134
134
|
end
|
135
135
|
|
136
|
-
#
|
137
|
-
#
|
138
|
-
# @param
|
139
|
-
# @param zip_code Zip Code to search near
|
136
|
+
# Find a Provider
|
137
|
+
# To retrieve a specific provider, just perform a GET using his NPI number
|
138
|
+
# @param npi NPI number
|
140
139
|
# @param [Hash] opts the optional parameters
|
141
|
-
# @option opts [String] :
|
142
|
-
# @
|
143
|
-
|
144
|
-
|
145
|
-
# @option opts [String] :type Either organization or individual
|
146
|
-
# @return [ProviderResponse]
|
147
|
-
def get_providers(search_term, zip_code, opts = {})
|
148
|
-
data, _status_code, _headers = get_providers_with_http_info(search_term, zip_code, opts)
|
140
|
+
# @option opts [String] :vericred_api_key API Key
|
141
|
+
# @return [Provider]
|
142
|
+
def get_provider(npi, opts = {})
|
143
|
+
data, _status_code, _headers = get_provider_with_http_info(npi, opts)
|
149
144
|
return data
|
150
145
|
end
|
151
146
|
|
152
|
-
#
|
153
|
-
#
|
154
|
-
# @param
|
155
|
-
# @param zip_code Zip Code to search near
|
147
|
+
# Find a Provider
|
148
|
+
# To retrieve a specific provider, just perform a GET using his NPI number
|
149
|
+
# @param npi NPI number
|
156
150
|
# @param [Hash] opts the optional parameters
|
157
|
-
# @option opts [String] :
|
158
|
-
# @
|
159
|
-
|
160
|
-
# @option opts [String] :radius Radius (in miles) to use to limit results
|
161
|
-
# @option opts [String] :type Either organization or individual
|
162
|
-
# @return [Array<(ProviderResponse, Fixnum, Hash)>] ProviderResponse data, response status code and response headers
|
163
|
-
def get_providers_with_http_info(search_term, zip_code, opts = {})
|
151
|
+
# @option opts [String] :vericred_api_key API Key
|
152
|
+
# @return [Array<(Provider, Fixnum, Hash)>] Provider data, response status code and response headers
|
153
|
+
def get_provider_with_http_info(npi, opts = {})
|
164
154
|
if @api_client.config.debugging
|
165
|
-
@api_client.config.logger.debug "Calling API: ProvidersApi.
|
155
|
+
@api_client.config.logger.debug "Calling API: ProvidersApi.get_provider ..."
|
166
156
|
end
|
167
|
-
# verify the required parameter '
|
168
|
-
fail ArgumentError, "Missing the required parameter '
|
169
|
-
# verify the required parameter 'zip_code' is set
|
170
|
-
fail ArgumentError, "Missing the required parameter 'zip_code' when calling ProvidersApi.get_providers" if zip_code.nil?
|
157
|
+
# verify the required parameter 'npi' is set
|
158
|
+
fail ArgumentError, "Missing the required parameter 'npi' when calling ProvidersApi.get_provider" if npi.nil?
|
171
159
|
# resource path
|
172
|
-
local_var_path = "/providers".sub('{format}','json')
|
160
|
+
local_var_path = "/providers/{npi}".sub('{format}','json').sub('{' + 'npi' + '}', npi.to_s)
|
173
161
|
|
174
162
|
# query parameters
|
175
163
|
query_params = {}
|
176
|
-
query_params[:'search_term'] = search_term
|
177
|
-
query_params[:'zip_code'] = zip_code
|
178
|
-
query_params[:'accepts_insurance'] = opts[:'accepts_insurance'] if opts[:'accepts_insurance']
|
179
|
-
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
180
|
-
query_params[:'per_page'] = opts[:'per_page'] if opts[:'per_page']
|
181
|
-
query_params[:'radius'] = opts[:'radius'] if opts[:'radius']
|
182
|
-
query_params[:'type'] = opts[:'type'] if opts[:'type']
|
183
164
|
|
184
165
|
# header parameters
|
185
166
|
header_params = {}
|
@@ -191,6 +172,7 @@ module VericredClient
|
|
191
172
|
# HTTP header 'Content-Type'
|
192
173
|
local_header_content_type = []
|
193
174
|
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
175
|
+
header_params[:'Vericred-Api-Key'] = opts[:'vericred_api_key'] if opts[:'vericred_api_key']
|
194
176
|
|
195
177
|
# form parameters
|
196
178
|
form_params = {}
|
@@ -204,36 +186,60 @@ module VericredClient
|
|
204
186
|
:form_params => form_params,
|
205
187
|
:body => post_body,
|
206
188
|
:auth_names => auth_names,
|
207
|
-
:return_type => '
|
189
|
+
:return_type => 'Provider')
|
208
190
|
if @api_client.config.debugging
|
209
|
-
@api_client.config.logger.debug "API called: ProvidersApi#
|
191
|
+
@api_client.config.logger.debug "API called: ProvidersApi#get_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
210
192
|
end
|
211
193
|
return data, status_code, headers
|
212
194
|
end
|
213
195
|
|
214
|
-
#
|
215
|
-
#
|
216
|
-
|
196
|
+
# Find Providers
|
197
|
+
# All `Provider` searches require a `zip_code`, which we use for weighting
|
198
|
+
the search results to favor `Provider`s that are near the user. For example,
|
199
|
+
we would want "Dr. John Smith" who is 5 miles away to appear before
|
200
|
+
"Dr. John Smith" who is 100 miles away.
|
201
|
+
|
202
|
+
The weighting also allows for non-exact matches. In our prior example, we
|
203
|
+
would want "Dr. Jon Smith" who is 2 miles away to appear before the exact
|
204
|
+
match "Dr. John Smith" who is 100 miles away because it is more likely that
|
205
|
+
the user just entered an incorrect name.
|
206
|
+
|
207
|
+
The free text search also supports Specialty name search and "body part"
|
208
|
+
Specialty name search. So, searching "John Smith nose" would return
|
209
|
+
"Dr. John Smith", the ENT Specialist before "Dr. John Smith" the Internist.
|
210
|
+
|
217
211
|
# @param [Hash] opts the optional parameters
|
218
|
-
# @
|
219
|
-
|
220
|
-
|
212
|
+
# @option opts [RequestProvidersSearch] :body
|
213
|
+
# @return [ProvidersSearchResponse]
|
214
|
+
def get_providers(opts = {})
|
215
|
+
data, _status_code, _headers = get_providers_with_http_info(opts)
|
221
216
|
return data
|
222
217
|
end
|
223
218
|
|
224
|
-
#
|
225
|
-
#
|
226
|
-
|
219
|
+
# Find Providers
|
220
|
+
# All `Provider` searches require a `zip_code`, which we use for weighting
|
221
|
+
the search results to favor `Provider`s that are near the user. For example,
|
222
|
+
we would want "Dr. John Smith" who is 5 miles away to appear before
|
223
|
+
"Dr. John Smith" who is 100 miles away.
|
224
|
+
|
225
|
+
The weighting also allows for non-exact matches. In our prior example, we
|
226
|
+
would want "Dr. Jon Smith" who is 2 miles away to appear before the exact
|
227
|
+
match "Dr. John Smith" who is 100 miles away because it is more likely that
|
228
|
+
the user just entered an incorrect name.
|
229
|
+
|
230
|
+
The free text search also supports Specialty name search and "body part"
|
231
|
+
Specialty name search. So, searching "John Smith nose" would return
|
232
|
+
"Dr. John Smith", the ENT Specialist before "Dr. John Smith" the Internist.
|
233
|
+
|
227
234
|
# @param [Hash] opts the optional parameters
|
228
|
-
# @
|
229
|
-
|
235
|
+
# @option opts [RequestProvidersSearch] :body
|
236
|
+
# @return [Array<(ProvidersSearchResponse, Fixnum, Hash)>] ProvidersSearchResponse data, response status code and response headers
|
237
|
+
def get_providers_with_http_info(opts = {})
|
230
238
|
if @api_client.config.debugging
|
231
|
-
@api_client.config.logger.debug "Calling API: ProvidersApi.
|
239
|
+
@api_client.config.logger.debug "Calling API: ProvidersApi.get_providers ..."
|
232
240
|
end
|
233
|
-
# verify the required parameter 'npi' is set
|
234
|
-
fail ArgumentError, "Missing the required parameter 'npi' when calling ProvidersApi.get_providers_npi" if npi.nil?
|
235
241
|
# resource path
|
236
|
-
local_var_path = "/providers/
|
242
|
+
local_var_path = "/providers/search".sub('{format}','json')
|
237
243
|
|
238
244
|
# query parameters
|
239
245
|
query_params = {}
|
@@ -253,17 +259,17 @@ module VericredClient
|
|
253
259
|
form_params = {}
|
254
260
|
|
255
261
|
# http body (model)
|
256
|
-
post_body =
|
257
|
-
|
258
|
-
data, status_code, headers = @api_client.call_api(:
|
262
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
263
|
+
auth_names = []
|
264
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
259
265
|
:header_params => header_params,
|
260
266
|
:query_params => query_params,
|
261
267
|
:form_params => form_params,
|
262
268
|
:body => post_body,
|
263
269
|
:auth_names => auth_names,
|
264
|
-
:return_type => '
|
270
|
+
:return_type => 'ProvidersSearchResponse')
|
265
271
|
if @api_client.config.debugging
|
266
|
-
@api_client.config.logger.debug "API called: ProvidersApi#
|
272
|
+
@api_client.config.logger.debug "API called: ProvidersApi#get_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
267
273
|
end
|
268
274
|
return data, status_code, headers
|
269
275
|
end
|
@@ -6,7 +6,7 @@ accepts.
|
|
6
6
|
|
7
7
|
## Getting Started
|
8
8
|
|
9
|
-
Visit our [Developer Portal](https://vericred.3scale.net
|
9
|
+
Visit our [Developer Portal](https://vericred.3scale.net) to
|
10
10
|
create an account.
|
11
11
|
|
12
12
|
Once you have created an account, you can create one Application for
|
@@ -133,20 +133,22 @@ module VericredClient
|
|
133
133
|
@api_client = api_client
|
134
134
|
end
|
135
135
|
|
136
|
-
#
|
137
|
-
#
|
136
|
+
# Search for Zip Counties
|
137
|
+
# Our `Plan` endpoints require a zip code and a fips (county) code. This is because plan pricing requires both of these elements. Users are unlikely to know their fips code, so we provide this endpoint to look up a `ZipCounty` by zip code and return both the selected zip and fips codes.
|
138
138
|
# @param zip_prefix Partial five-digit Zip
|
139
139
|
# @param [Hash] opts the optional parameters
|
140
|
+
# @option opts [String] :vericred_api_key API Key
|
140
141
|
# @return [ZipCountyResponse]
|
141
142
|
def get_zip_counties(zip_prefix, opts = {})
|
142
143
|
data, _status_code, _headers = get_zip_counties_with_http_info(zip_prefix, opts)
|
143
144
|
return data
|
144
145
|
end
|
145
146
|
|
146
|
-
#
|
147
|
-
#
|
147
|
+
# Search for Zip Counties
|
148
|
+
# Our `Plan` endpoints require a zip code and a fips (county) code. This is because plan pricing requires both of these elements. Users are unlikely to know their fips code, so we provide this endpoint to look up a `ZipCounty` by zip code and return both the selected zip and fips codes.
|
148
149
|
# @param zip_prefix Partial five-digit Zip
|
149
150
|
# @param [Hash] opts the optional parameters
|
151
|
+
# @option opts [String] :vericred_api_key API Key
|
150
152
|
# @return [Array<(ZipCountyResponse, Fixnum, Hash)>] ZipCountyResponse data, response status code and response headers
|
151
153
|
def get_zip_counties_with_http_info(zip_prefix, opts = {})
|
152
154
|
if @api_client.config.debugging
|
@@ -171,6 +173,7 @@ module VericredClient
|
|
171
173
|
# HTTP header 'Content-Type'
|
172
174
|
local_header_content_type = []
|
173
175
|
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
176
|
+
header_params[:'Vericred-Api-Key'] = opts[:'vericred_api_key'] if opts[:'vericred_api_key']
|
174
177
|
|
175
178
|
# form parameters
|
176
179
|
form_params = {}
|
@@ -6,7 +6,7 @@ accepts.
|
|
6
6
|
|
7
7
|
## Getting Started
|
8
8
|
|
9
|
-
Visit our [Developer Portal](https://vericred.3scale.net
|
9
|
+
Visit our [Developer Portal](https://vericred.3scale.net) to
|
10
10
|
create an account.
|
11
11
|
|
12
12
|
Once you have created an account, you can create one Application for
|
@@ -6,7 +6,7 @@ accepts.
|
|
6
6
|
|
7
7
|
## Getting Started
|
8
8
|
|
9
|
-
Visit our [Developer Portal](https://vericred.3scale.net
|
9
|
+
Visit our [Developer Portal](https://vericred.3scale.net) to
|
10
10
|
create an account.
|
11
11
|
|
12
12
|
Once you have created an account, you can create one Application for
|