vericred_client 0.0.1
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 +7 -0
- data/README.md +225 -0
- data/docs/Applicant.md +14 -0
- data/docs/Carrier.md +10 -0
- data/docs/CarrierSubsidiary.md +9 -0
- data/docs/County.md +16 -0
- data/docs/Drug.md +10 -0
- data/docs/DrugCoverage.md +13 -0
- data/docs/DrugCoverageApi.md +60 -0
- data/docs/InlineResponse200.md +9 -0
- data/docs/InlineResponse2001.md +8 -0
- data/docs/InlineResponse2002.md +10 -0
- data/docs/Plan.md +53 -0
- data/docs/PlanCounty.md +10 -0
- data/docs/PlanSearchResult.md +54 -0
- data/docs/PlansApi.md +118 -0
- data/docs/Pricing.md +12 -0
- data/docs/Provider.md +31 -0
- data/docs/ProvidersApi.md +135 -0
- data/docs/Query.md +15 -0
- data/docs/RatingArea.md +9 -0
- data/docs/State.md +15 -0
- data/docs/ZipCode.md +9 -0
- data/docs/ZipCountiesApi.md +63 -0
- data/docs/ZipCounty.md +10 -0
- data/lib/vericred_client/api/drug_coverage_api.rb +201 -0
- data/lib/vericred_client/api/plans_api.rb +317 -0
- data/lib/vericred_client/api/providers_api.rb +303 -0
- data/lib/vericred_client/api/zip_counties_api.rb +208 -0
- data/lib/vericred_client/api_client.rb +474 -0
- data/lib/vericred_client/api_error.rb +149 -0
- data/lib/vericred_client/configuration.rb +163 -0
- data/lib/vericred_client/models/applicant.rb +358 -0
- data/lib/vericred_client/models/carrier.rb +318 -0
- data/lib/vericred_client/models/carrier_subsidiary.rb +308 -0
- data/lib/vericred_client/models/county.rb +360 -0
- data/lib/vericred_client/models/drug.rb +318 -0
- data/lib/vericred_client/models/drug_coverage.rb +348 -0
- data/lib/vericred_client/models/inline_response_200.rb +308 -0
- data/lib/vericred_client/models/inline_response_200_1.rb +297 -0
- data/lib/vericred_client/models/inline_response_200_2.rb +321 -0
- data/lib/vericred_client/models/plan.rb +748 -0
- data/lib/vericred_client/models/plan_county.rb +318 -0
- data/lib/vericred_client/models/plan_search_result.rb +758 -0
- data/lib/vericred_client/models/pricing.rb +338 -0
- data/lib/vericred_client/models/provider.rb +528 -0
- data/lib/vericred_client/models/query.rb +364 -0
- data/lib/vericred_client/models/rating_area.rb +308 -0
- data/lib/vericred_client/models/state.rb +368 -0
- data/lib/vericred_client/models/zip_code.rb +308 -0
- data/lib/vericred_client/models/zip_county.rb +318 -0
- data/lib/vericred_client/version.rb +128 -0
- data/lib/vericred_client.rb +175 -0
- data/spec/api/drug_coverage_api_spec.rb +168 -0
- data/spec/api/plans_api_spec.rb +226 -0
- data/spec/api/providers_api_spec.rb +202 -0
- data/spec/api/zip_counties_api_spec.rb +171 -0
- data/vericred_client.gemspec +31 -0
- metadata +285 -0
@@ -0,0 +1,317 @@
|
|
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/access_code?access_code=vericred&cms_token=3545ca52af07bde85b7c0c3aa9d1985e) 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:
|
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 PlansApi
|
130
|
+
attr_accessor :api_client
|
131
|
+
|
132
|
+
def initialize(api_client = ApiClient.default)
|
133
|
+
@api_client = api_client
|
134
|
+
end
|
135
|
+
|
136
|
+
# Find a set of plans for a Zip Code and County
|
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
|
+
|
157
|
+
To get pricing for multiple applicants, just append multiple sets
|
158
|
+
of data to the URL with the age and smoking status of each applicant
|
159
|
+
next to each other.
|
160
|
+
|
161
|
+
For example, given two applicants - one age 32 and a non-smoker and one
|
162
|
+
age 29 and a smoker, you could use the following request
|
163
|
+
|
164
|
+
`GET /plans?zip_code=07451&fips_code=33025&applicants[][age]=32&applicants[][age]=29&applicants[][smoker]=true`
|
165
|
+
|
166
|
+
It would also be acceptible to include `applicants[][smoker]=false` after the
|
167
|
+
first applicant's age.
|
168
|
+
|
169
|
+
### Providers
|
170
|
+
|
171
|
+
We identify Providers (Doctors) by their National Practitioner
|
172
|
+
Index number (NPI). If you pass a list of Providers, keyed by
|
173
|
+
their NPI number, we will return a list of which Providers are
|
174
|
+
in and out of network for each plan returned.
|
175
|
+
|
176
|
+
For example, if we had two providers with the NPI numbers `12345` and `23456`
|
177
|
+
you would make the following request
|
178
|
+
|
179
|
+
`GET /plans?zip_code=07451&fips_code=33025&providers[][npi]=12345&providers[][npi]=23456`
|
180
|
+
|
181
|
+
### Enrollment Date
|
182
|
+
|
183
|
+
To calculate plan pricing and availability, we default to the current date
|
184
|
+
as the enrollment date. To specify a date in the future (or the past), pass
|
185
|
+
a string with the format `YYYY-MM-DD` in the `enrollment_date` parameter.
|
186
|
+
|
187
|
+
`GET /plans?zip_code=07451&fips_code=33025&enrollment_date=2016-01-01`
|
188
|
+
|
189
|
+
### Subsidy
|
190
|
+
|
191
|
+
On-marketplace plans are eligible for a subsidy based on the
|
192
|
+
`household_size` and `household_income` of the applicants. If you
|
193
|
+
pass those values, we will calculate the `subsidized_premium`
|
194
|
+
and return it for each plan. If no values are provided, the
|
195
|
+
`subsidized_premium` will be the same as the `premium`
|
196
|
+
|
197
|
+
`GET /plans?zip_code=07451&fips_code=33025&household_size=4&household_income=40000`
|
198
|
+
|
199
|
+
|
200
|
+
# @param query Plan query
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @return [Array<Plan>]
|
203
|
+
def plans_find_post(query, opts = {})
|
204
|
+
data, _status_code, _headers = plans_find_post_with_http_info(query, opts)
|
205
|
+
return data
|
206
|
+
end
|
207
|
+
|
208
|
+
# Find a set of plans for a Zip Code and County
|
209
|
+
# ### Location Information
|
210
|
+
|
211
|
+
Searching for a set of plans requires a `zip_code` and `fips_code`
|
212
|
+
code. These are used to determine pricing and availabity
|
213
|
+
of health plans.
|
214
|
+
|
215
|
+
Optionally, you may provide a list of Applicants or Providers
|
216
|
+
|
217
|
+
### Applicants
|
218
|
+
|
219
|
+
This is a list of people who will be covered by the plan. We
|
220
|
+
use this list to calculate the premium. You must include `age`
|
221
|
+
and can include `smoker`, which also factors into pricing in some
|
222
|
+
states.
|
223
|
+
|
224
|
+
Applicants *must* include an age. If smoker is omitted, its value is assumed
|
225
|
+
to be false.
|
226
|
+
|
227
|
+
#### Multiple Applicants
|
228
|
+
|
229
|
+
To get pricing for multiple applicants, just append multiple sets
|
230
|
+
of data to the URL with the age and smoking status of each applicant
|
231
|
+
next to each other.
|
232
|
+
|
233
|
+
For example, given two applicants - one age 32 and a non-smoker and one
|
234
|
+
age 29 and a smoker, you could use the following request
|
235
|
+
|
236
|
+
`GET /plans?zip_code=07451&fips_code=33025&applicants[][age]=32&applicants[][age]=29&applicants[][smoker]=true`
|
237
|
+
|
238
|
+
It would also be acceptible to include `applicants[][smoker]=false` after the
|
239
|
+
first applicant's age.
|
240
|
+
|
241
|
+
### Providers
|
242
|
+
|
243
|
+
We identify Providers (Doctors) by their National Practitioner
|
244
|
+
Index number (NPI). If you pass a list of Providers, keyed by
|
245
|
+
their NPI number, we will return a list of which Providers are
|
246
|
+
in and out of network for each plan returned.
|
247
|
+
|
248
|
+
For example, if we had two providers with the NPI numbers `12345` and `23456`
|
249
|
+
you would make the following request
|
250
|
+
|
251
|
+
`GET /plans?zip_code=07451&fips_code=33025&providers[][npi]=12345&providers[][npi]=23456`
|
252
|
+
|
253
|
+
### Enrollment Date
|
254
|
+
|
255
|
+
To calculate plan pricing and availability, we default to the current date
|
256
|
+
as the enrollment date. To specify a date in the future (or the past), pass
|
257
|
+
a string with the format `YYYY-MM-DD` in the `enrollment_date` parameter.
|
258
|
+
|
259
|
+
`GET /plans?zip_code=07451&fips_code=33025&enrollment_date=2016-01-01`
|
260
|
+
|
261
|
+
### Subsidy
|
262
|
+
|
263
|
+
On-marketplace plans are eligible for a subsidy based on the
|
264
|
+
`household_size` and `household_income` of the applicants. If you
|
265
|
+
pass those values, we will calculate the `subsidized_premium`
|
266
|
+
and return it for each plan. If no values are provided, the
|
267
|
+
`subsidized_premium` will be the same as the `premium`
|
268
|
+
|
269
|
+
`GET /plans?zip_code=07451&fips_code=33025&household_size=4&household_income=40000`
|
270
|
+
|
271
|
+
|
272
|
+
# @param query Plan query
|
273
|
+
# @param [Hash] opts the optional parameters
|
274
|
+
# @return [Array<(Array<Plan>, Fixnum, Hash)>] Array<Plan> data, response status code and response headers
|
275
|
+
def plans_find_post_with_http_info(query, opts = {})
|
276
|
+
if @api_client.config.debugging
|
277
|
+
@api_client.config.logger.debug "Calling API: PlansApi.plans_find_post ..."
|
278
|
+
end
|
279
|
+
# verify the required parameter 'query' is set
|
280
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling PlansApi.plans_find_post" if query.nil?
|
281
|
+
# resource path
|
282
|
+
local_var_path = "/plans/find".sub('{format}','json')
|
283
|
+
|
284
|
+
# query parameters
|
285
|
+
query_params = {}
|
286
|
+
|
287
|
+
# header parameters
|
288
|
+
header_params = {}
|
289
|
+
|
290
|
+
# HTTP header 'Accept' (if needed)
|
291
|
+
local_header_accept = []
|
292
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
293
|
+
|
294
|
+
# HTTP header 'Content-Type'
|
295
|
+
local_header_content_type = []
|
296
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
297
|
+
|
298
|
+
# form parameters
|
299
|
+
form_params = {}
|
300
|
+
|
301
|
+
# http body (model)
|
302
|
+
post_body = @api_client.object_to_http_body(query)
|
303
|
+
auth_names = []
|
304
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
305
|
+
:header_params => header_params,
|
306
|
+
:query_params => query_params,
|
307
|
+
:form_params => form_params,
|
308
|
+
:body => post_body,
|
309
|
+
:auth_names => auth_names,
|
310
|
+
:return_type => 'Array<Plan>')
|
311
|
+
if @api_client.config.debugging
|
312
|
+
@api_client.config.logger.debug "API called: PlansApi#plans_find_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
313
|
+
end
|
314
|
+
return data, status_code, headers
|
315
|
+
end
|
316
|
+
end
|
317
|
+
end
|
@@ -0,0 +1,303 @@
|
|
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/access_code?access_code=vericred&cms_token=3545ca52af07bde85b7c0c3aa9d1985e) 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:
|
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 ProvidersApi
|
130
|
+
attr_accessor :api_client
|
131
|
+
|
132
|
+
def initialize(api_client = ApiClient.default)
|
133
|
+
@api_client = api_client
|
134
|
+
end
|
135
|
+
|
136
|
+
# Find providers by term and zip code
|
137
|
+
# All `Provider` searches require a `zip_code`, which we use for weighting
|
138
|
+
the search results to favor `Provider`s that are near the user. For example,
|
139
|
+
we would want "Dr. John Smith" who is 5 miles away to appear before
|
140
|
+
"Dr. John Smith" who is 100 miles away.
|
141
|
+
|
142
|
+
The weighting also allows for non-exact matches. In our prior example, we
|
143
|
+
would want "Dr. Jon Smith" who is 2 miles away to appear before the exact
|
144
|
+
match "Dr. John Smith" who is 100 miles away because it is more likely that
|
145
|
+
the user just entered an incorrect name.
|
146
|
+
|
147
|
+
The free text search also supports Specialty name search and "body part"
|
148
|
+
Specialty name search. So, searching "John Smith nose" would return
|
149
|
+
"Dr. John Smith", the ENT Specialist before "Dr. John Smith" the Internist.
|
150
|
+
|
151
|
+
|
152
|
+
# @param search_term String to search by
|
153
|
+
# @param zip_code Zip Code to search near
|
154
|
+
# @param [Hash] opts the optional parameters
|
155
|
+
# @option opts [String] :accepts_insurance Limit results to Providers who accept at least one insurance plan. Note that the inverse of this filter is not supported and any value will evaluate to true
|
156
|
+
# @option opts [Array<String>] :hios_ids HIOS id of one or more plans
|
157
|
+
# @option opts [String] :page Page number
|
158
|
+
# @option opts [String] :per_page Number of records to return per page
|
159
|
+
# @option opts [String] :radius Radius (in miles) to use to limit results
|
160
|
+
# @return [InlineResponse200]
|
161
|
+
def providers_get(search_term, zip_code, opts = {})
|
162
|
+
data, _status_code, _headers = providers_get_with_http_info(search_term, zip_code, opts)
|
163
|
+
return data
|
164
|
+
end
|
165
|
+
|
166
|
+
# Find providers by term and zip code
|
167
|
+
# All `Provider` searches require a `zip_code`, which we use for weighting
|
168
|
+
the search results to favor `Provider`s that are near the user. For example,
|
169
|
+
we would want "Dr. John Smith" who is 5 miles away to appear before
|
170
|
+
"Dr. John Smith" who is 100 miles away.
|
171
|
+
|
172
|
+
The weighting also allows for non-exact matches. In our prior example, we
|
173
|
+
would want "Dr. Jon Smith" who is 2 miles away to appear before the exact
|
174
|
+
match "Dr. John Smith" who is 100 miles away because it is more likely that
|
175
|
+
the user just entered an incorrect name.
|
176
|
+
|
177
|
+
The free text search also supports Specialty name search and "body part"
|
178
|
+
Specialty name search. So, searching "John Smith nose" would return
|
179
|
+
"Dr. John Smith", the ENT Specialist before "Dr. John Smith" the Internist.
|
180
|
+
|
181
|
+
|
182
|
+
# @param search_term String to search by
|
183
|
+
# @param zip_code Zip Code to search near
|
184
|
+
# @param [Hash] opts the optional parameters
|
185
|
+
# @option opts [String] :accepts_insurance Limit results to Providers who accept at least one insurance plan. Note that the inverse of this filter is not supported and any value will evaluate to true
|
186
|
+
# @option opts [Array<String>] :hios_ids HIOS id of one or more plans
|
187
|
+
# @option opts [String] :page Page number
|
188
|
+
# @option opts [String] :per_page Number of records to return per page
|
189
|
+
# @option opts [String] :radius Radius (in miles) to use to limit results
|
190
|
+
# @return [Array<(InlineResponse200, Fixnum, Hash)>] InlineResponse200 data, response status code and response headers
|
191
|
+
def providers_get_with_http_info(search_term, zip_code, opts = {})
|
192
|
+
if @api_client.config.debugging
|
193
|
+
@api_client.config.logger.debug "Calling API: ProvidersApi.providers_get ..."
|
194
|
+
end
|
195
|
+
# verify the required parameter 'search_term' is set
|
196
|
+
fail ArgumentError, "Missing the required parameter 'search_term' when calling ProvidersApi.providers_get" if search_term.nil?
|
197
|
+
# verify the required parameter 'zip_code' is set
|
198
|
+
fail ArgumentError, "Missing the required parameter 'zip_code' when calling ProvidersApi.providers_get" if zip_code.nil?
|
199
|
+
# resource path
|
200
|
+
local_var_path = "/providers".sub('{format}','json')
|
201
|
+
|
202
|
+
# query parameters
|
203
|
+
query_params = {}
|
204
|
+
query_params[:'search_term'] = search_term
|
205
|
+
query_params[:'zip_code'] = zip_code
|
206
|
+
query_params[:'accepts_insurance'] = opts[:'accepts_insurance'] if opts[:'accepts_insurance']
|
207
|
+
query_params[:'hios_ids'] = @api_client.build_collection_param(opts[:'hios_ids'], :csv) if opts[:'hios_ids']
|
208
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
209
|
+
query_params[:'per_page'] = opts[:'per_page'] if opts[:'per_page']
|
210
|
+
query_params[:'radius'] = opts[:'radius'] if opts[:'radius']
|
211
|
+
|
212
|
+
# header parameters
|
213
|
+
header_params = {}
|
214
|
+
|
215
|
+
# HTTP header 'Accept' (if needed)
|
216
|
+
local_header_accept = []
|
217
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
218
|
+
|
219
|
+
# HTTP header 'Content-Type'
|
220
|
+
local_header_content_type = []
|
221
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
222
|
+
|
223
|
+
# form parameters
|
224
|
+
form_params = {}
|
225
|
+
|
226
|
+
# http body (model)
|
227
|
+
post_body = nil
|
228
|
+
auth_names = []
|
229
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
230
|
+
:header_params => header_params,
|
231
|
+
:query_params => query_params,
|
232
|
+
:form_params => form_params,
|
233
|
+
:body => post_body,
|
234
|
+
:auth_names => auth_names,
|
235
|
+
:return_type => 'InlineResponse200')
|
236
|
+
if @api_client.config.debugging
|
237
|
+
@api_client.config.logger.debug "API called: ProvidersApi#providers_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
238
|
+
end
|
239
|
+
return data, status_code, headers
|
240
|
+
end
|
241
|
+
|
242
|
+
# Find a specific Provider
|
243
|
+
# To retrieve a specific provider, just perform a GET using his NPI number
|
244
|
+
|
245
|
+
|
246
|
+
# @param npi NPI number
|
247
|
+
# @param [Hash] opts the optional parameters
|
248
|
+
# @return [InlineResponse2001]
|
249
|
+
def providers_npi_get(npi, opts = {})
|
250
|
+
data, _status_code, _headers = providers_npi_get_with_http_info(npi, opts)
|
251
|
+
return data
|
252
|
+
end
|
253
|
+
|
254
|
+
# Find a specific Provider
|
255
|
+
# To retrieve a specific provider, just perform a GET using his NPI number
|
256
|
+
|
257
|
+
|
258
|
+
# @param npi NPI number
|
259
|
+
# @param [Hash] opts the optional parameters
|
260
|
+
# @return [Array<(InlineResponse2001, Fixnum, Hash)>] InlineResponse2001 data, response status code and response headers
|
261
|
+
def providers_npi_get_with_http_info(npi, opts = {})
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug "Calling API: ProvidersApi.providers_npi_get ..."
|
264
|
+
end
|
265
|
+
# verify the required parameter 'npi' is set
|
266
|
+
fail ArgumentError, "Missing the required parameter 'npi' when calling ProvidersApi.providers_npi_get" if npi.nil?
|
267
|
+
# resource path
|
268
|
+
local_var_path = "/providers/{npi}".sub('{format}','json').sub('{' + 'npi' + '}', npi.to_s)
|
269
|
+
|
270
|
+
# query parameters
|
271
|
+
query_params = {}
|
272
|
+
|
273
|
+
# header parameters
|
274
|
+
header_params = {}
|
275
|
+
|
276
|
+
# HTTP header 'Accept' (if needed)
|
277
|
+
local_header_accept = []
|
278
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
279
|
+
|
280
|
+
# HTTP header 'Content-Type'
|
281
|
+
local_header_content_type = []
|
282
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
283
|
+
|
284
|
+
# form parameters
|
285
|
+
form_params = {}
|
286
|
+
|
287
|
+
# http body (model)
|
288
|
+
post_body = nil
|
289
|
+
auth_names = []
|
290
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
291
|
+
:header_params => header_params,
|
292
|
+
:query_params => query_params,
|
293
|
+
:form_params => form_params,
|
294
|
+
:body => post_body,
|
295
|
+
:auth_names => auth_names,
|
296
|
+
:return_type => 'InlineResponse2001')
|
297
|
+
if @api_client.config.debugging
|
298
|
+
@api_client.config.logger.debug "API called: ProvidersApi#providers_npi_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
299
|
+
end
|
300
|
+
return data, status_code, headers
|
301
|
+
end
|
302
|
+
end
|
303
|
+
end
|