vericred_client 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,168 @@
|
|
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 'spec_helper'
|
127
|
+
require 'json'
|
128
|
+
|
129
|
+
# Unit tests for VericredClient::DrugCoverageApi
|
130
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
131
|
+
# Please update as you see appropriate
|
132
|
+
describe 'DrugCoverageApi' do
|
133
|
+
before do
|
134
|
+
# run before each test
|
135
|
+
@instance = VericredClient::DrugCoverageApi.new
|
136
|
+
end
|
137
|
+
|
138
|
+
after do
|
139
|
+
# run after each test
|
140
|
+
end
|
141
|
+
|
142
|
+
describe 'test an instance of DrugCoverageApi' do
|
143
|
+
it 'should create an instact of DrugCoverageApi' do
|
144
|
+
@instance.should be_a(VericredClient::DrugCoverageApi)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# unit tests for drugs_ndc_coverages_get
|
149
|
+
# Find Drug Coverages for a given NDC
|
150
|
+
# Drug Coverages are the specific tier level, quantity limit, prior authorization
|
151
|
+
and step therapy for a given Drug/Plan combination. This endpoint returns
|
152
|
+
all DrugCoverages for a given Drug
|
153
|
+
|
154
|
+
|
155
|
+
# @param ndc NDC for a drug
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @return [Array<DrugCoverage>]
|
158
|
+
describe 'drugs_ndc_coverages_get test' do
|
159
|
+
it "should work" do
|
160
|
+
# assertion here
|
161
|
+
# should be_a()
|
162
|
+
# should be_nil
|
163
|
+
# should ==
|
164
|
+
# should_not ==
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
end
|
@@ -0,0 +1,226 @@
|
|
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 'spec_helper'
|
127
|
+
require 'json'
|
128
|
+
|
129
|
+
# Unit tests for VericredClient::PlansApi
|
130
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
131
|
+
# Please update as you see appropriate
|
132
|
+
describe 'PlansApi' do
|
133
|
+
before do
|
134
|
+
# run before each test
|
135
|
+
@instance = VericredClient::PlansApi.new
|
136
|
+
end
|
137
|
+
|
138
|
+
after do
|
139
|
+
# run after each test
|
140
|
+
end
|
141
|
+
|
142
|
+
describe 'test an instance of PlansApi' do
|
143
|
+
it 'should create an instact of PlansApi' do
|
144
|
+
@instance.should be_a(VericredClient::PlansApi)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# unit tests for plans_find_post
|
149
|
+
# Find a set of plans for a Zip Code and County
|
150
|
+
# ### Location Information
|
151
|
+
|
152
|
+
Searching for a set of plans requires a `zip_code` and `fips_code`
|
153
|
+
code. These are used to determine pricing and availabity
|
154
|
+
of health plans.
|
155
|
+
|
156
|
+
Optionally, you may provide a list of Applicants or Providers
|
157
|
+
|
158
|
+
### Applicants
|
159
|
+
|
160
|
+
This is a list of people who will be covered by the plan. We
|
161
|
+
use this list to calculate the premium. You must include `age`
|
162
|
+
and can include `smoker`, which also factors into pricing in some
|
163
|
+
states.
|
164
|
+
|
165
|
+
Applicants *must* include an age. If smoker is omitted, its value is assumed
|
166
|
+
to be false.
|
167
|
+
|
168
|
+
#### Multiple Applicants
|
169
|
+
|
170
|
+
To get pricing for multiple applicants, just append multiple sets
|
171
|
+
of data to the URL with the age and smoking status of each applicant
|
172
|
+
next to each other.
|
173
|
+
|
174
|
+
For example, given two applicants - one age 32 and a non-smoker and one
|
175
|
+
age 29 and a smoker, you could use the following request
|
176
|
+
|
177
|
+
`GET /plans?zip_code=07451&fips_code=33025&applicants[][age]=32&applicants[][age]=29&applicants[][smoker]=true`
|
178
|
+
|
179
|
+
It would also be acceptible to include `applicants[][smoker]=false` after the
|
180
|
+
first applicant's age.
|
181
|
+
|
182
|
+
### Providers
|
183
|
+
|
184
|
+
We identify Providers (Doctors) by their National Practitioner
|
185
|
+
Index number (NPI). If you pass a list of Providers, keyed by
|
186
|
+
their NPI number, we will return a list of which Providers are
|
187
|
+
in and out of network for each plan returned.
|
188
|
+
|
189
|
+
For example, if we had two providers with the NPI numbers `12345` and `23456`
|
190
|
+
you would make the following request
|
191
|
+
|
192
|
+
`GET /plans?zip_code=07451&fips_code=33025&providers[][npi]=12345&providers[][npi]=23456`
|
193
|
+
|
194
|
+
### Enrollment Date
|
195
|
+
|
196
|
+
To calculate plan pricing and availability, we default to the current date
|
197
|
+
as the enrollment date. To specify a date in the future (or the past), pass
|
198
|
+
a string with the format `YYYY-MM-DD` in the `enrollment_date` parameter.
|
199
|
+
|
200
|
+
`GET /plans?zip_code=07451&fips_code=33025&enrollment_date=2016-01-01`
|
201
|
+
|
202
|
+
### Subsidy
|
203
|
+
|
204
|
+
On-marketplace plans are eligible for a subsidy based on the
|
205
|
+
`household_size` and `household_income` of the applicants. If you
|
206
|
+
pass those values, we will calculate the `subsidized_premium`
|
207
|
+
and return it for each plan. If no values are provided, the
|
208
|
+
`subsidized_premium` will be the same as the `premium`
|
209
|
+
|
210
|
+
`GET /plans?zip_code=07451&fips_code=33025&household_size=4&household_income=40000`
|
211
|
+
|
212
|
+
|
213
|
+
# @param query Plan query
|
214
|
+
# @param [Hash] opts the optional parameters
|
215
|
+
# @return [Array<Plan>]
|
216
|
+
describe 'plans_find_post test' do
|
217
|
+
it "should work" do
|
218
|
+
# assertion here
|
219
|
+
# should be_a()
|
220
|
+
# should be_nil
|
221
|
+
# should ==
|
222
|
+
# should_not ==
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
@@ -0,0 +1,202 @@
|
|
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 'spec_helper'
|
127
|
+
require 'json'
|
128
|
+
|
129
|
+
# Unit tests for VericredClient::ProvidersApi
|
130
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
131
|
+
# Please update as you see appropriate
|
132
|
+
describe 'ProvidersApi' do
|
133
|
+
before do
|
134
|
+
# run before each test
|
135
|
+
@instance = VericredClient::ProvidersApi.new
|
136
|
+
end
|
137
|
+
|
138
|
+
after do
|
139
|
+
# run after each test
|
140
|
+
end
|
141
|
+
|
142
|
+
describe 'test an instance of ProvidersApi' do
|
143
|
+
it 'should create an instact of ProvidersApi' do
|
144
|
+
@instance.should be_a(VericredClient::ProvidersApi)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# unit tests for providers_get
|
149
|
+
# Find providers by term and zip code
|
150
|
+
# All `Provider` searches require a `zip_code`, which we use for weighting
|
151
|
+
the search results to favor `Provider`s that are near the user. For example,
|
152
|
+
we would want "Dr. John Smith" who is 5 miles away to appear before
|
153
|
+
"Dr. John Smith" who is 100 miles away.
|
154
|
+
|
155
|
+
The weighting also allows for non-exact matches. In our prior example, we
|
156
|
+
would want "Dr. Jon Smith" who is 2 miles away to appear before the exact
|
157
|
+
match "Dr. John Smith" who is 100 miles away because it is more likely that
|
158
|
+
the user just entered an incorrect name.
|
159
|
+
|
160
|
+
The free text search also supports Specialty name search and "body part"
|
161
|
+
Specialty name search. So, searching "John Smith nose" would return
|
162
|
+
"Dr. John Smith", the ENT Specialist before "Dr. John Smith" the Internist.
|
163
|
+
|
164
|
+
|
165
|
+
# @param search_term String to search by
|
166
|
+
# @param zip_code Zip Code to search near
|
167
|
+
# @param [Hash] opts the optional parameters
|
168
|
+
# @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
|
169
|
+
# @option opts [Array<String>] :hios_ids HIOS id of one or more plans
|
170
|
+
# @option opts [String] :page Page number
|
171
|
+
# @option opts [String] :per_page Number of records to return per page
|
172
|
+
# @option opts [String] :radius Radius (in miles) to use to limit results
|
173
|
+
# @return [InlineResponse200]
|
174
|
+
describe 'providers_get test' do
|
175
|
+
it "should work" do
|
176
|
+
# assertion here
|
177
|
+
# should be_a()
|
178
|
+
# should be_nil
|
179
|
+
# should ==
|
180
|
+
# should_not ==
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
# unit tests for providers_npi_get
|
185
|
+
# Find a specific Provider
|
186
|
+
# To retrieve a specific provider, just perform a GET using his NPI number
|
187
|
+
|
188
|
+
|
189
|
+
# @param npi NPI number
|
190
|
+
# @param [Hash] opts the optional parameters
|
191
|
+
# @return [InlineResponse2001]
|
192
|
+
describe 'providers_npi_get test' do
|
193
|
+
it "should work" do
|
194
|
+
# assertion here
|
195
|
+
# should be_a()
|
196
|
+
# should be_nil
|
197
|
+
# should ==
|
198
|
+
# should_not ==
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
end
|