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.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +225 -0
  3. data/docs/Applicant.md +14 -0
  4. data/docs/Carrier.md +10 -0
  5. data/docs/CarrierSubsidiary.md +9 -0
  6. data/docs/County.md +16 -0
  7. data/docs/Drug.md +10 -0
  8. data/docs/DrugCoverage.md +13 -0
  9. data/docs/DrugCoverageApi.md +60 -0
  10. data/docs/InlineResponse200.md +9 -0
  11. data/docs/InlineResponse2001.md +8 -0
  12. data/docs/InlineResponse2002.md +10 -0
  13. data/docs/Plan.md +53 -0
  14. data/docs/PlanCounty.md +10 -0
  15. data/docs/PlanSearchResult.md +54 -0
  16. data/docs/PlansApi.md +118 -0
  17. data/docs/Pricing.md +12 -0
  18. data/docs/Provider.md +31 -0
  19. data/docs/ProvidersApi.md +135 -0
  20. data/docs/Query.md +15 -0
  21. data/docs/RatingArea.md +9 -0
  22. data/docs/State.md +15 -0
  23. data/docs/ZipCode.md +9 -0
  24. data/docs/ZipCountiesApi.md +63 -0
  25. data/docs/ZipCounty.md +10 -0
  26. data/lib/vericred_client/api/drug_coverage_api.rb +201 -0
  27. data/lib/vericred_client/api/plans_api.rb +317 -0
  28. data/lib/vericred_client/api/providers_api.rb +303 -0
  29. data/lib/vericred_client/api/zip_counties_api.rb +208 -0
  30. data/lib/vericred_client/api_client.rb +474 -0
  31. data/lib/vericred_client/api_error.rb +149 -0
  32. data/lib/vericred_client/configuration.rb +163 -0
  33. data/lib/vericred_client/models/applicant.rb +358 -0
  34. data/lib/vericred_client/models/carrier.rb +318 -0
  35. data/lib/vericred_client/models/carrier_subsidiary.rb +308 -0
  36. data/lib/vericred_client/models/county.rb +360 -0
  37. data/lib/vericred_client/models/drug.rb +318 -0
  38. data/lib/vericred_client/models/drug_coverage.rb +348 -0
  39. data/lib/vericred_client/models/inline_response_200.rb +308 -0
  40. data/lib/vericred_client/models/inline_response_200_1.rb +297 -0
  41. data/lib/vericred_client/models/inline_response_200_2.rb +321 -0
  42. data/lib/vericred_client/models/plan.rb +748 -0
  43. data/lib/vericred_client/models/plan_county.rb +318 -0
  44. data/lib/vericred_client/models/plan_search_result.rb +758 -0
  45. data/lib/vericred_client/models/pricing.rb +338 -0
  46. data/lib/vericred_client/models/provider.rb +528 -0
  47. data/lib/vericred_client/models/query.rb +364 -0
  48. data/lib/vericred_client/models/rating_area.rb +308 -0
  49. data/lib/vericred_client/models/state.rb +368 -0
  50. data/lib/vericred_client/models/zip_code.rb +308 -0
  51. data/lib/vericred_client/models/zip_county.rb +318 -0
  52. data/lib/vericred_client/version.rb +128 -0
  53. data/lib/vericred_client.rb +175 -0
  54. data/spec/api/drug_coverage_api_spec.rb +168 -0
  55. data/spec/api/plans_api_spec.rb +226 -0
  56. data/spec/api/providers_api_spec.rb +202 -0
  57. data/spec/api/zip_counties_api_spec.rb +171 -0
  58. data/vericred_client.gemspec +31 -0
  59. metadata +285 -0
data/docs/Provider.md ADDED
@@ -0,0 +1,31 @@
1
+ # VericredClient::Provider
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **accepting_change_of_payor_patients** | **BOOLEAN** | Is this provider accepting patients with a change of insurance? | [optional]
7
+ **accepting_medicaid_patients** | **BOOLEAN** | Is this provider accepting new Medicaid patients? | [optional]
8
+ **accepting_medicare_patients** | **BOOLEAN** | Is this provider accepting new Medicare patients? | [optional]
9
+ **accepting_private_patients** | **BOOLEAN** | Is this provider accepting new patients with private insurance? | [optional]
10
+ **accepting_referral_patients** | **BOOLEAN** | Is this provider accepting new patients via referrals? | [optional]
11
+ **city** | **String** | City name (e.g. Springfield). | [optional]
12
+ **email** | **String** | Primary email address to contact the provider. | [optional]
13
+ **gender** | **String** | Provider's gender (M or F) | [optional]
14
+ **first_name** | **String** | Given name for the provider. | [optional]
15
+ **id** | **Integer** | National Provider Index (NPI) number | [optional]
16
+ **last_name** | **String** | Family name for the provider. | [optional]
17
+ **middle_name** | **String** | Middle name for the provider. | [optional]
18
+ **personal_phone** | **String** | Personal contact phone for the provider. | [optional]
19
+ **phone** | **String** | Office phone for the provider | [optional]
20
+ **presentation_name** | **String** | Preferred name for display (e.g. Dr. Francis White may prefer Dr. Frank White) | [optional]
21
+ **specialty** | **String** | Name of the primary Specialty | [optional]
22
+ **state** | **String** | State code for the provider's address (e.g. NY). | [optional]
23
+ **state_id** | **Integer** | Foreign key to States | [optional]
24
+ **street_line_1** | **String** | First line of the provider's street address. | [optional]
25
+ **street_line_2** | **String** | Second line of the provider's street address. | [optional]
26
+ **suffix** | **String** | Suffix for the provider's name (e.g. Jr) | [optional]
27
+ **title** | **String** | Professional title for the provider (e.g. Dr). | [optional]
28
+ **type** | **String** | Type of NPI number (individual provider vs organization). | [optional]
29
+ **zip_code** | **String** | Postal code for the provider's address (e.g. 11215) | [optional]
30
+
31
+
@@ -0,0 +1,135 @@
1
+ # VericredClient::ProvidersApi
2
+
3
+ All URIs are relative to *https://api.vericred.com/*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**providers_get**](ProvidersApi.md#providers_get) | **GET** /providers | Find providers by term and zip code
8
+ [**providers_npi_get**](ProvidersApi.md#providers_npi_get) | **GET** /providers/{npi} | Find a specific Provider
9
+
10
+
11
+ # **providers_get**
12
+ > InlineResponse200 providers_get(search_term, zip_code, opts)
13
+
14
+ Find providers by term and zip code
15
+
16
+ All `Provider` searches require a `zip_code`, which we use for weighting
17
+ the search results to favor `Provider`s that are near the user. For example,
18
+ we would want "Dr. John Smith" who is 5 miles away to appear before
19
+ "Dr. John Smith" who is 100 miles away.
20
+
21
+ The weighting also allows for non-exact matches. In our prior example, we
22
+ would want "Dr. Jon Smith" who is 2 miles away to appear before the exact
23
+ match "Dr. John Smith" who is 100 miles away because it is more likely that
24
+ the user just entered an incorrect name.
25
+
26
+ The free text search also supports Specialty name search and "body part"
27
+ Specialty name search. So, searching "John Smith nose" would return
28
+ "Dr. John Smith", the ENT Specialist before "Dr. John Smith" the Internist.
29
+
30
+
31
+
32
+ ### Example
33
+ ```ruby
34
+ # load the gem
35
+ require 'vericred_client'
36
+
37
+ api_instance = VericredClient::ProvidersApi.new
38
+
39
+ search_term = "search_term_example" # String | String to search by
40
+
41
+ zip_code = "zip_code_example" # String | Zip Code to search near
42
+
43
+ opts = {
44
+ accepts_insurance: "accepts_insurance_example", # String | 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
45
+ hios_ids: ["hios_ids_example"], # Array<String> | HIOS id of one or more plans
46
+ page: "page_example", # String | Page number
47
+ per_page: "per_page_example", # String | Number of records to return per page
48
+ radius: "radius_example" # String | Radius (in miles) to use to limit results
49
+ }
50
+
51
+ begin
52
+ #Find providers by term and zip code
53
+ result = api_instance.providers_get(search_term, zip_code, opts)
54
+ p result
55
+ rescue VericredClient::ApiError => e
56
+ puts "Exception when calling ProvidersApi->providers_get: #{e}"
57
+ end
58
+ ```
59
+
60
+ ### Parameters
61
+
62
+ Name | Type | Description | Notes
63
+ ------------- | ------------- | ------------- | -------------
64
+ **search_term** | **String**| String to search by |
65
+ **zip_code** | **String**| Zip Code to search near |
66
+ **accepts_insurance** | **String**| 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 | [optional]
67
+ **hios_ids** | [**Array&lt;String&gt;**](String.md)| HIOS id of one or more plans | [optional]
68
+ **page** | **String**| Page number | [optional]
69
+ **per_page** | **String**| Number of records to return per page | [optional]
70
+ **radius** | **String**| Radius (in miles) to use to limit results | [optional]
71
+
72
+ ### Return type
73
+
74
+ [**InlineResponse200**](InlineResponse200.md)
75
+
76
+ ### Authorization
77
+
78
+ No authorization required
79
+
80
+ ### HTTP request headers
81
+
82
+ - **Content-Type**: Not defined
83
+ - **Accept**: Not defined
84
+
85
+
86
+
87
+ # **providers_npi_get**
88
+ > InlineResponse2001 providers_npi_get(npi)
89
+
90
+ Find a specific Provider
91
+
92
+ To retrieve a specific provider, just perform a GET using his NPI number
93
+
94
+
95
+
96
+ ### Example
97
+ ```ruby
98
+ # load the gem
99
+ require 'vericred_client'
100
+
101
+ api_instance = VericredClient::ProvidersApi.new
102
+
103
+ npi = "npi_example" # String | NPI number
104
+
105
+
106
+ begin
107
+ #Find a specific Provider
108
+ result = api_instance.providers_npi_get(npi)
109
+ p result
110
+ rescue VericredClient::ApiError => e
111
+ puts "Exception when calling ProvidersApi->providers_npi_get: #{e}"
112
+ end
113
+ ```
114
+
115
+ ### Parameters
116
+
117
+ Name | Type | Description | Notes
118
+ ------------- | ------------- | ------------- | -------------
119
+ **npi** | **String**| NPI number |
120
+
121
+ ### Return type
122
+
123
+ [**InlineResponse2001**](InlineResponse2001.md)
124
+
125
+ ### Authorization
126
+
127
+ No authorization required
128
+
129
+ ### HTTP request headers
130
+
131
+ - **Content-Type**: Not defined
132
+ - **Accept**: Not defined
133
+
134
+
135
+
data/docs/Query.md ADDED
@@ -0,0 +1,15 @@
1
+ # VericredClient::Query
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **applicants** | [**Array&lt;Applicant&gt;**](Applicant.md) | | [optional]
7
+ **enrollment_date** | **Date** | | [optional]
8
+ **fips_code** | **String** | | [optional]
9
+ **household_income** | **String** | | [optional]
10
+ **household_size** | **String** | | [optional]
11
+ **market** | **String** | | [optional]
12
+ **providers** | **Array&lt;String&gt;** | | [optional]
13
+ **zip_code** | **String** | | [optional]
14
+
15
+
@@ -0,0 +1,9 @@
1
+ # VericredClient::RatingArea
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | Primary key | [optional]
7
+ **state_id** | **Integer** | Foreign key to state | [optional]
8
+
9
+
data/docs/State.md ADDED
@@ -0,0 +1,15 @@
1
+ # VericredClient::State
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | Primary Key of State | [optional]
7
+ **name** | **String** | Name of state | [optional]
8
+ **code** | **String** | 2 letter code for state | [optional]
9
+ **fips_number** | **String** | National FIPs number | [optional]
10
+ **last_date_for_individual** | **Date** | Last date this state is live for individuals | [optional]
11
+ **last_date_for_shop** | **Date** | Last date this state is live for shop | [optional]
12
+ **live_for_business** | **BOOLEAN** | Is this State available for businesses | [optional]
13
+ **live_for_consumers** | **BOOLEAN** | Is this State available for individuals | [optional]
14
+
15
+
data/docs/ZipCode.md ADDED
@@ -0,0 +1,9 @@
1
+ # VericredClient::ZipCode
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **code** | **String** | 5 digit code (e.g. 11215) | [optional]
7
+ **id** | **Integer** | Primary key | [optional]
8
+
9
+
@@ -0,0 +1,63 @@
1
+ # VericredClient::ZipCountiesApi
2
+
3
+ All URIs are relative to *https://api.vericred.com/*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**zip_counties_get**](ZipCountiesApi.md#zip_counties_get) | **GET** /zip_counties | Find Zip Counties by Zip Code
8
+
9
+
10
+ # **zip_counties_get**
11
+ > InlineResponse2002 zip_counties_get(zip_prefix)
12
+
13
+ Find Zip Counties by Zip Code
14
+
15
+ ### Finding Zip Code and Fips Code
16
+
17
+ Our `Plan` endpoints require a zip code and a fips (county) code. This is
18
+ because plan pricing requires both of these elements. Users are unlikely to
19
+ know their fips code, so we provide this endpoint to look up a `ZipCounty` by
20
+ zip code and return both the selected zip and fips codes.
21
+
22
+
23
+
24
+ ### Example
25
+ ```ruby
26
+ # load the gem
27
+ require 'vericred_client'
28
+
29
+ api_instance = VericredClient::ZipCountiesApi.new
30
+
31
+ zip_prefix = "zip_prefix_example" # String | Partial five-digit Zip
32
+
33
+
34
+ begin
35
+ #Find Zip Counties by Zip Code
36
+ result = api_instance.zip_counties_get(zip_prefix)
37
+ p result
38
+ rescue VericredClient::ApiError => e
39
+ puts "Exception when calling ZipCountiesApi->zip_counties_get: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+ Name | Type | Description | Notes
46
+ ------------- | ------------- | ------------- | -------------
47
+ **zip_prefix** | **String**| Partial five-digit Zip |
48
+
49
+ ### Return type
50
+
51
+ [**InlineResponse2002**](InlineResponse2002.md)
52
+
53
+ ### Authorization
54
+
55
+ No authorization required
56
+
57
+ ### HTTP request headers
58
+
59
+ - **Content-Type**: Not defined
60
+ - **Accept**: Not defined
61
+
62
+
63
+
data/docs/ZipCounty.md ADDED
@@ -0,0 +1,10 @@
1
+ # VericredClient::ZipCounty
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **county_id** | **Integer** | ID of the parent County in Vericred&#39;s API | [optional]
7
+ **id** | **Integer** | Primary key | [optional]
8
+ **zip_code_id** | **Integer** | ID of the parent Zip Code in Vericred&#39;s API | [optional]
9
+
10
+
@@ -0,0 +1,201 @@
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 DrugCoverageApi
130
+ attr_accessor :api_client
131
+
132
+ def initialize(api_client = ApiClient.default)
133
+ @api_client = api_client
134
+ end
135
+
136
+ # Find Drug Coverages for a given NDC
137
+ # Drug Coverages are the specific tier level, quantity limit, prior authorization
138
+ and step therapy for a given Drug/Plan combination. This endpoint returns
139
+ all DrugCoverages for a given Drug
140
+
141
+
142
+ # @param ndc NDC for a drug
143
+ # @param [Hash] opts the optional parameters
144
+ # @return [Array<DrugCoverage>]
145
+ def drugs_ndc_coverages_get(ndc, opts = {})
146
+ data, _status_code, _headers = drugs_ndc_coverages_get_with_http_info(ndc, opts)
147
+ return data
148
+ end
149
+
150
+ # Find Drug Coverages for a given NDC
151
+ # Drug Coverages are the specific tier level, quantity limit, prior authorization
152
+ and step therapy for a given Drug/Plan combination. This endpoint returns
153
+ all DrugCoverages for a given Drug
154
+
155
+
156
+ # @param ndc NDC for a drug
157
+ # @param [Hash] opts the optional parameters
158
+ # @return [Array<(Array<DrugCoverage>, Fixnum, Hash)>] Array<DrugCoverage> data, response status code and response headers
159
+ def drugs_ndc_coverages_get_with_http_info(ndc, opts = {})
160
+ if @api_client.config.debugging
161
+ @api_client.config.logger.debug "Calling API: DrugCoverageApi.drugs_ndc_coverages_get ..."
162
+ end
163
+ # verify the required parameter 'ndc' is set
164
+ fail ArgumentError, "Missing the required parameter 'ndc' when calling DrugCoverageApi.drugs_ndc_coverages_get" if ndc.nil?
165
+ # resource path
166
+ local_var_path = "/drugs/{ndc}/coverages".sub('{format}','json').sub('{' + 'ndc' + '}', ndc.to_s)
167
+
168
+ # query parameters
169
+ query_params = {}
170
+
171
+ # header parameters
172
+ header_params = {}
173
+
174
+ # HTTP header 'Accept' (if needed)
175
+ local_header_accept = []
176
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
177
+
178
+ # HTTP header 'Content-Type'
179
+ local_header_content_type = []
180
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
181
+
182
+ # form parameters
183
+ form_params = {}
184
+
185
+ # http body (model)
186
+ post_body = nil
187
+ auth_names = []
188
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
189
+ :header_params => header_params,
190
+ :query_params => query_params,
191
+ :form_params => form_params,
192
+ :body => post_body,
193
+ :auth_names => auth_names,
194
+ :return_type => 'Array<DrugCoverage>')
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug "API called: DrugCoverageApi#drugs_ndc_coverages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
+ end
198
+ return data, status_code, headers
199
+ end
200
+ end
201
+ end